Make it really obvious when an en passant capture is performed

Let's change the window title. Should hopefully cut down on bug reports.

https://bugzilla.gnome.org/show_bug.cgi?id=485246
This commit is contained in:
Michael Catanzaro 2018-04-24 11:45:57 -05:00
parent 9b41b9bef7
commit 384ebe0120

View file

@ -1210,6 +1210,14 @@ Copyright © 20152016 Sahil Sareen""";
/* Window title on a Black human's turn if he is in check */
headerbar.set_title (_("Black is in Check"));
}
else if (game.current_state.last_move != null &&
game.current_state.last_move.en_passant)
{
if (game.current_player.color == Color.WHITE)
headerbar.set_title (_("Black performed an en passant capture"));
else
headerbar.set_title (_("White performed an en passant capture"));
}
else if (game.current_player.color == Color.WHITE)
{
if (human_player == null || human_player.color == Color.WHITE)