Fix bug where pawns could eat people on the opposite side of the board.

This commit is contained in:
Daniel Weber 2023-01-02 16:44:38 -05:00
parent 72d2f4e4fd
commit c3c14e7882

View File

@ -386,8 +386,14 @@ static void Mark_Potential_Moves(uint8_t piece, uint8_t column, uint8_t row)
}
pawn_move(temp_row, column);
pawn_take(temp_row, column - 1u, piece);
pawn_take(temp_row, column + 1u, piece);
if(column != 0)
{
pawn_take(temp_row, column - 1u, piece);
}
if(column != 7u)
{
pawn_take(temp_row, column + 1u, piece);
}
break;
}