[gnome-chess] Adding explanatory comment to previous commit.



commit 0424e97cc35d0b725a0867f66f4951f241059b18
Author: Sahil Sareen <sahil sareen hotmail com>
Date:   Mon Jan 12 00:19:09 2015 +0530

    Adding explanatory comment to previous commit.

 src/chess-scene.vala |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/chess-scene.vala b/src/chess-scene.vala
index 9d9ea5e..47b7312 100644
--- a/src/chess-scene.vala
+++ b/src/chess-scene.vala
@@ -228,10 +228,13 @@ public class ChessScene : Object
             if (can_move && (get_selected_piece ()).type == PieceType.PAWN &&
                 (rank == 0 || rank == 7))
             {
-                /* Prompt user for selecting promotion type */
+                // Prompt user for selecting promotion type
                 PieceType? promotion_selection = choose_promotion_type ();
+
+                // If promotion dialog is closed, do nothing
                 if (promotion_selection == null)
                     return;
+
                 game.current_player.move_with_coords (selected_rank,
                     selected_file, rank, file, true, promotion_selection);
                 selected_rank = selected_file = -1;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]