fix(client_web): black moves indexes display

This commit is contained in:
Henri Bourcereau 2026-03-28 16:37:05 +01:00
parent 31ee129262
commit bef0ecbd8c
2 changed files with 56 additions and 39 deletions

View file

@ -987,7 +987,12 @@ impl GameState {
player.color, self.board, dice, player.dice_roll_count
);
let points_rules = PointsRules::new(&player.color, &self.board, *dice);
Ok(points_rules.get_result_jans(player.dice_roll_count))
let (jans, points) = points_rules.get_result_jans(player.dice_roll_count);
Ok(if player.color == Color::White {
(jans, points)
} else {
(jans.mirror(), points)
})
}
/// Determines if someone has won the game