Commit f8fb207f authored by Arnaud B.'s avatar Arnaud B.

Fix a bad behaviour.

parent 248a437a
......@@ -996,14 +996,14 @@ private class FourInARow : Gtk.Application
private inline bool on_key_press (Gdk.EventKey event)
{
if (timeout != 0
|| (!gameover && !is_player_human ()))
return false;
string key = (!) (Gdk.keyval_name (event.keyval) ?? "");
if (key == "" || key == "Tab" || event.is_modifier == 1)
return false;
if (timeout != 0
|| (!gameover && !is_player_human ()))
return true;
if (gameover)
{
blink_winner (2);
......@@ -1013,14 +1013,14 @@ private class FourInARow : Gtk.Application
if (key == "Left" || event.keyval == keypress_left)
{
if (column == 0)
return false;
return true;
column_moveto--;
move_cursor (column_moveto);
}
else if (key == "Right" || event.keyval == keypress_right)
{
if (column >= /* BOARD_COLUMNS_MINUS_ONE */ size - 1)
return false;
return true;
column_moveto++;
move_cursor (column_moveto);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment