← go back
document = ""
document += (
  '<table '
    'style="'
      "border: 6px solid black;"
  '">'
)
for x, row in enumerate(board):
  document += (
    '<tr>'
  )
  for y, cell in enumerate(row):
    document += (
      '<td '
        'style="'
          "width: 60px;"
          "height: 60px;"
          f"background-color: #{COLORS[cell]};"
          "font-size: 24pt;"
      '">'
    )
    if x == y == 3:  # center: add "w"
      document += "w"
    document += "</td>"
  document += "</tr>"
document += "</table>"

hmmm

Sep 2, 2024, 2:49 AM (edited)
2 0 0

Comments