Place a tile on the board, flipping any of the opponent's pieces. Returns False for invalid moves, True for valid.
(board, tile, xstart, ystart)
| 206 | |
| 207 | |
| 208 | def makeMove(board, tile, xstart, ystart): |
| 209 | """Place a tile on the board, flipping any of the opponent's pieces. |
| 210 | Returns False for invalid moves, True for valid.""" |
| 211 | tilesToFlip = isValidMove(board, tile, xstart, ystart) |
| 212 | |
| 213 | if tilesToFlip == False: |
| 214 | return False |
| 215 | |
| 216 | board[(xstart, ystart)] = tile |
| 217 | for x, y in tilesToFlip: |
| 218 | board[(x, y)] = tile |
| 219 | return True |
| 220 | |
| 221 | |
| 222 | def getComputerMove(board): |
no test coverage detected