Display the board data structure on the screen.
(board)
| 68 | |
| 69 | |
| 70 | def displayBoard(board): |
| 71 | """Display the board data structure on the screen.""" |
| 72 | displayLetterLabels() # Display the letter labels at the top. |
| 73 | |
| 74 | # Display each board row: |
| 75 | for y in range(BOARD_HEIGHT): |
| 76 | # Display the leftside number label: |
| 77 | print(str(y + 1).rjust(2) + ' ', end='') |
| 78 | for x in range(BOARD_WIDTH): |
| 79 | # Display each tile in this row, followed by a space: |
| 80 | print(board[(x, y)] + ' ', end='') |
| 81 | # Display the rightside number label: |
| 82 | print(y + 1) |
| 83 | |
| 84 | displayLetterLabels() # Display the letter labels at the bottom. |
| 85 | |
| 86 | |
| 87 | def displayLetterLabels(): |
no test coverage detected