[gnome-games/glchess-vala] Promotion working
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/glchess-vala] Promotion working
- Date: Mon, 27 Dec 2010 00:35:52 +0000 (UTC)
commit 562a96f76d0cdb4d48387174b6186bbb1d276bd2
Author: Robert Ancell <robert ancell canonical com>
Date: Mon Dec 27 11:35:44 2010 +1100
Promotion working
glchess/src/chess-game.vala | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glchess/src/chess-game.vala b/glchess/src/chess-game.vala
index 463f77c..fec4214 100644
--- a/glchess/src/chess-game.vala
+++ b/glchess/src/chess-game.vala
@@ -291,9 +291,9 @@ public class ChessState
/* Update board */
board[start] = null;
- //if (piece.type == PieceType.PAWN && r1 == 0 || r1 == 7)
- // board[end] = new ChessPiece (old_current_player, promotion_type);
- //else
+ if (piece.type == PieceType.PAWN && (r1 == 0 || r1 == 7))
+ board[end] = new ChessPiece (old_current_player, promotion_type);
+ else
board[end] = piece;
piece_masks[Color.WHITE] &= BitBoard.clear_location_masks[start];
piece_masks[Color.BLACK] &= BitBoard.clear_location_masks[start];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]