[gnome-chess] Rename ChessMove.moved_rook to castling_rook



commit 95292f55970c8b830dbd384ed2beee5e79c2a6e7
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Tue Apr 24 09:54:55 2018 -0500

    Rename ChessMove.moved_rook to castling_rook

 lib/chess-game.vala  |    4 ++--
 lib/chess-move.vala  |    8 ++++----
 lib/chess-state.vala |    2 +-
 src/gnome-chess.vala |    2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/lib/chess-game.vala b/lib/chess-game.vala
index e342e72..53375aa 100644
--- a/lib/chess-game.vala
+++ b/lib/chess-game.vala
@@ -149,8 +149,8 @@ public class ChessGame : Object
         if (state.last_move.victim != null)
             state.last_move.victim.died ();
         state.last_move.piece.moved ();
-        if (state.last_move.moved_rook != null)
-            state.last_move.moved_rook.moved ();
+        if (state.last_move.castling_rook != null)
+            state.last_move.castling_rook.moved ();
         moved (state.last_move);
         complete_move ();
 
diff --git a/lib/chess-move.vala b/lib/chess-move.vala
index f5d7585..6b6b021 100644
--- a/lib/chess-move.vala
+++ b/lib/chess-move.vala
@@ -14,7 +14,7 @@ public class ChessMove : Object
     public int number;
     public ChessPiece piece;
     public ChessPiece? promotion_piece;
-    public ChessPiece? moved_rook;
+    public ChessPiece? castling_rook;
     public ChessPiece? victim;
     public int r0;
     public int f0;
@@ -26,7 +26,7 @@ public class ChessMove : Object
 
     public string get_lan ()
     {
-        if (moved_rook != null)
+        if (castling_rook != null)
         {
             if (f1 > f0)
                 return "O-O";
@@ -75,7 +75,7 @@ public class ChessMove : Object
 
     private string make_san (string[] piece_names)
     {
-        if (moved_rook != null)
+        if (castling_rook != null)
         {
             if (f1 > f0)
                 return "O-O";
@@ -127,7 +127,7 @@ public class ChessMove : Object
         move.number = number;
         move.piece = piece;
         move.promotion_piece = promotion_piece;
-        move.moved_rook = moved_rook;
+        move.castling_rook = castling_rook;
         move.victim = victim;
         move.r0 = r0;
         move.f0 = f0;
diff --git a/lib/chess-state.vala b/lib/chess-state.vala
index 7306288..6d297ad 100644
--- a/lib/chess-state.vala
+++ b/lib/chess-state.vala
@@ -536,7 +536,7 @@ public class ChessState : Object
             last_move.promotion_piece = board[end];
         last_move.victim = victim;
         if (rook_end >= 0)
-            last_move.moved_rook = board[rook_end];
+            last_move.castling_rook = board[rook_end];
         last_move.r0 = r0;
         last_move.f0 = f0;
         last_move.r1 = r1;
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 7c31291..59f9ca8 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -1031,7 +1031,7 @@ Copyright © 2015–2016 Sahil Sareen""";
         switch (scene.move_format)
         {
         case "human":
-            if (move.moved_rook == null)
+            if (move.castling_rook == null)
             {
                 int index;
                 if (move.victim == null)


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