|
Every time a piece is played, judge the front, back, left, and right of the piece
For example, if you are down at position i, j, then judge the up, down, left, and right diagonals of i, j coordinates, and you can iteratively judge whether there is a chess piece at the next position. As long as the judgment is made every time. |
|