[iagno] No endgame animation on small board.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno] No endgame animation on small board.
- Date: Wed, 22 May 2019 13:00:07 +0000 (UTC)
commit daae1e79507db183e43e9be9e9a3cc56cc615a1e
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Apr 26 13:24:54 2019 +0200
No endgame animation on small board.
It feels bad.
src/game-view.vala | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/src/game-view.vala b/src/game-view.vala
index d7e2f20..7c709e9 100644
--- a/src/game-view.vala
+++ b/src/game-view.vala
@@ -616,18 +616,19 @@ private class GameView : Gtk.DrawingArea
* Show the actual final positions of the pieces before flipping the board.
* Otherwise, it could seem like the final player placed the other's piece.
*/
- Timeout.add_seconds (2, () => {
- if (!game.is_complete) // in case an undo has been called
- return Source.REMOVE;
-
- set_winner_and_loser_variables ();
- flip_final_result_now = true;
- for (uint8 x = 0; x < game_size; x++)
- for (uint8 y = 0; y < game_size; y++)
- flip_final_result_tile (x, y);
-
- return Source.REMOVE;
- });
+ if (game_size >= 6)
+ Timeout.add_seconds (2, () => {
+ if (!game.is_complete) // in case an undo has been called
+ return Source.REMOVE;
+
+ set_winner_and_loser_variables ();
+ flip_final_result_now = true;
+ for (uint8 x = 0; x < game_size; x++)
+ for (uint8 y = 0; y < game_size; y++)
+ flip_final_result_tile (x, y);
+
+ return Source.REMOVE;
+ });
}
private void flip_final_result_tile (uint8 x, uint8 y)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]