[gnome-games] chess: Add test for check
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] chess: Add test for check
- Date: Tue, 25 Jan 2011 05:21:31 +0000 (UTC)
commit 686bb4ef19699a0a9902393ce2e4068d559fcdf0
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Jan 25 14:45:26 2011 +1000
chess: Add test for check
glchess/src/test-chess-game.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/glchess/src/test-chess-game.vala b/glchess/src/test-chess-game.vala
index 99552a7..03e4ecd 100644
--- a/glchess/src/test-chess-game.vala
+++ b/glchess/src/test-chess-game.vala
@@ -88,6 +88,10 @@ class GlChess
/* Can't move into check */
test_bad_move ("4r3/8/8/8/8/8/4R3/4K3 w - - 0 1", "e2f2");
+ /* Check */
+ test_good_move ("k7/8/8/8/8/8/8/1R6 w - - 0 1", "b1a1",
+ "k7/8/8/8/8/8/8/R7 b - - 0 1", CheckState.CHECK);
+
/* Checkmate */
test_good_move ("k7/8/8/8/8/8/1R6/1R6 w - - 0 1", "b1a1",
"k7/8/8/8/8/8/1R6/R7 b - - 0 1", CheckState.CHECKMATE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]