Return a dictionary representing a Mancala board in the starting state: 4 seeds in each pit and 0 in the stores.
()
| 71 | |
| 72 | |
| 73 | def getNewBoard(): |
| 74 | """Return a dictionary representing a Mancala board in the starting |
| 75 | state: 4 seeds in each pit and 0 in the stores.""" |
| 76 | |
| 77 | # Syntactic sugar - Use a shorter variable name: |
| 78 | s = STARTING_NUMBER_OF_SEEDS |
| 79 | |
| 80 | # Create the data structure for the board, with 0 seeds in the |
| 81 | # stores and the starting number of seeds in the pits: |
| 82 | return {'1': 0, '2': 0, 'A': s, 'B': s, 'C': s, 'D': s, 'E': s, |
| 83 | 'F': s, 'G': s, 'H': s, 'I': s, 'J': s, 'K': s, 'L': s} |
| 84 | |
| 85 | |
| 86 | def displayBoard(board): |