Return a dictionary representing a board for a new game.
()
| 34 | |
| 35 | |
| 36 | def getNewBoard(): |
| 37 | """Return a dictionary representing a board for a new game.""" |
| 38 | board = {} |
| 39 | # Set every space on the board to a peg: |
| 40 | for space in ALL_SPACES: |
| 41 | board[space] = PEG |
| 42 | |
| 43 | # Set the center space to be empty: |
| 44 | board['D4'] = EMPTY |
| 45 | |
| 46 | return board |
| 47 | |
| 48 | |
| 49 | def displayBoard(board): |