(board, tile, xstart, ystart, realMove=False)
| 458 | |
| 459 | |
| 460 | def makeMove(board, tile, xstart, ystart, realMove=False): |
| 461 | # Place the tile on the board at xstart, ystart, and flip tiles |
| 462 | # Returns False if this is an invalid move, True if it is valid. |
| 463 | tilesToFlip = isValidMove(board, tile, xstart, ystart) |
| 464 | |
| 465 | if tilesToFlip == False: |
| 466 | return False |
| 467 | |
| 468 | board[xstart][ystart] = tile |
| 469 | |
| 470 | if realMove: |
| 471 | animateTileChange(tilesToFlip, tile, (xstart, ystart)) |
| 472 | |
| 473 | for x, y in tilesToFlip: |
| 474 | board[x][y] = tile |
| 475 | return True |
| 476 | |
| 477 | |
| 478 | def isOnCorner(x, y): |
no test coverage detected