Skip to content

Commit

Permalink
[123] (fix on better-notation) Changed the condition for inverting th…
Browse files Browse the repository at this point in the history
…e boad coordinates.
  • Loading branch information
TomPlanche committed Jan 28, 2025
1 parent 26a2dcc commit 391d62d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/game_logic/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,10 @@ impl Game {

// When recording the move, invert coordinates if playing as black
let (history_from, history_to) = if self.player_turn == PieceColor::Black
&& self.bot.is_none() // Don't invert for bot moves
&& (!self.opponent.as_ref().is_some_and(|opp| opp.color == PieceColor::Black))
// Don't invert for multiplayer
// Don't invert for bot moves
&& self.bot.is_none()
// Don't invert for multiplayer games
&& self.opponent.is_none()
{
(invert_position(from), invert_position(to))
} else {
Expand Down

0 comments on commit 391d62d

Please sign in to comment.