(self, r, c)
| 74 | return self.squareUnderAttack(self.blackKingLocation[0], self.blackKingLocation[1]) |
| 75 | |
| 76 | def squareUnderAttack(self, r, c): |
| 77 | self.whiteToMove = not self.whiteToMove |
| 78 | oppMoves = self.getAllPossibleMoves() |
| 79 | self.whiteToMove = not self.whiteToMove |
| 80 | for move in oppMoves: |
| 81 | if move.endRow == r and move.endCol == c: |
| 82 | return True |
| 83 | return False |
| 84 | |
| 85 | |
| 86 |
no test coverage detected