Carry out the peg move on the given board.
(board, space, direction)
| 164 | |
| 165 | |
| 166 | def makeMove(board, space, direction): |
| 167 | """Carry out the peg move on the given board.""" |
| 168 | nextSpace, secondNextSpace = getNeighboringSpaces(space, direction) |
| 169 | |
| 170 | board[space] = EMPTY # Peg is no longer in this space. |
| 171 | board[nextSpace] = EMPTY # Removing the jumped-over peg. |
| 172 | board[secondNextSpace] = PEG # The moved peg lands here. |
| 173 | |
| 174 | |
| 175 | def getScore(board): |
no test coverage detected