Closed TKPending closed 9 months ago
Changed the logic in the 'GenerateLegalMoves' function, added a 'IsTileOccupied' method, which deals with checking if tiles are empty. If a piece is found then we stop generating moves. Also, if the last tile checked is an enemy tile then we push that tile as the last valid move, preventing pieces from jumping over enemy tiles
Create logic which will reduce the amount of "valid" moves, to prevent friendly pieces jumping over each other. Aside from the knight, if there is a piece in the way. Any movement (including the friendly piece) and further should be considered an invalid movement.