(self)
| 35 | |
| 36 | |
| 37 | def undoMove(self): |
| 38 | if len(self.moveLog) != 0: |
| 39 | move = self.moveLog.pop() |
| 40 | self.board[move.startRow][move.startCol] = move.pieceMoved |
| 41 | self.board[move.endRow][move.endCol] = move.pieceCaptured |
| 42 | self.whiteToMove = not self.whiteToMove |
| 43 | if move.pieceMoved == "wK": |
| 44 | self.whiteKingLocation = (move.startRow, move.startCol) |
| 45 | if move.pieceMoved == "bK": |
| 46 | self.blackKingLocation = (move.startRow, move.startCol) |
| 47 | """ |
| 48 | All move considering checks |
| 49 | """ |
no test coverage detected