[gnome-games] chess: Add comments about needing claim draw tests
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] chess: Add comments about needing claim draw tests
- Date: Tue, 25 Jan 2011 10:44:56 +0000 (UTC)
commit 1023a07a049b350ff76806ae6bf5ee19b0d15701
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Jan 25 18:48:25 2011 +1000
chess: Add comments about needing claim draw tests
glchess/src/test-chess-game.vala | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/glchess/src/test-chess-game.vala b/glchess/src/test-chess-game.vala
index b175c4e..f0cfedc 100644
--- a/glchess/src/test-chess-game.vala
+++ b/glchess/src/test-chess-game.vala
@@ -109,7 +109,7 @@ class GlChess
/* Checkmate */
test_good_move ("k7/8/8/8/8/8/1R6/1R6 w - - 0 1", "Ra1#",
- "k7/8/8/8/8/8/1R6/R7 b - - 1 1", ChessResult.WHITE_WON);
+ "k7/8/8/8/8/8/1R6/R7 b - - 1 1", ChessResult.WHITE_WON, ChessRule.CHECKMATE);
/* Stalemate */
test_good_move ("k7/8/7R/8/8/8/8/1R6 w - - 0 1", "Rh7",
@@ -119,6 +119,15 @@ class GlChess
test_good_move ("k7/7p/7K/8/8/8/8/8 w - - 0 1", "Kxh7",
"k7/7K/8/8/8/8/8/8 b - - 0 1", ChessResult.DRAW, ChessRule.INSUFFICIENT_MATERIAL);
+ // FIXME: Need to be able to test claim draw
+
+ /* Claim draw due to 50 move rule */
+ //test_good_move ("p7/8/8/8/8/8/8/P7 w - - 50 1", "draw",
+ // "p7/8/8/8/8/8/8/P7 w - - 50 1", ChessResult.DRAW, ChessRule.FIFTY_MOVES);
+
+ /* Need 50 moves for 50 move rule */
+ //test_bad_move ("p7/8/8/8/8/8/8/P7 w - - 49 1", "draw");
+
stdout.printf ("%d/%d tests successful\n", test_count - failure_count, test_count);
return failure_count;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]