|
|
@ -268,6 +268,7 @@ testSuite GameTest of TestSuite:
|
|
|
|
self.check(not self.game.isStalemate(Color.Black))
|
|
|
|
self.check(not self.game.isStalemate(Color.Black))
|
|
|
|
self.check(not self.game.isStalemate(Color.White))
|
|
|
|
self.check(not self.game.isStalemate(Color.White))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Check isDrawClaimable
|
|
|
|
method testIsDrawClaimableThreeFoldRepTrue() =
|
|
|
|
method testIsDrawClaimableThreeFoldRepTrue() =
|
|
|
|
self.setup()
|
|
|
|
self.setup()
|
|
|
|
self.game.checkedMove(notationToMove("g1f3", Color.White))
|
|
|
|
self.game.checkedMove(notationToMove("g1f3", Color.White))
|
|
|
@ -293,6 +294,345 @@ testSuite GameTest of TestSuite:
|
|
|
|
self.game.checkedMove(notationToMove("f6g8", Color.Black))
|
|
|
|
self.game.checkedMove(notationToMove("f6g8", Color.Black))
|
|
|
|
self.check(not self.game.isDrawClaimable())
|
|
|
|
self.check(not self.game.isDrawClaimable())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
method testIsDrawClaimableFiftyMoveRuleTrue() =
|
|
|
|
|
|
|
|
self.game = initGame([
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, BRook,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
WBishop, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, WKing, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, WRook, 0,
|
|
|
|
|
|
|
|
0, 0, 0, BKing, 0, 0, 0, 0
|
|
|
|
|
|
|
|
], Color.Black)
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a2a5", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f5g6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a5e5", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h4f6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5e2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b7a7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e2e1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g6f5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e1b1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f6d4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e8d8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f5e6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d8c8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d4e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7f7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e6d5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1a1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f7h7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a1a2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6f4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a2a6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f4e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a6b6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h7c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c8d8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7a7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d8c8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c8d8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b6b1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7a7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1e1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e1d1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d5e6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7b7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b7b3", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c6c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b3h3", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d8c8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h3h8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c8b7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h8b8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b7a7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b8b4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1d1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e6d7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1h1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7f4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h1h3", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f4e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h3h1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6f4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f4c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b4b5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b5b6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2g2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b6b3", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g2c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b3b1", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c3", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c3c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d7d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2d2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6c6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d2c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c6d5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2g2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g2g5", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d5c6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7a6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1b8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g5g7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b8b6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a6a7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b6b1", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7a8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1e1", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g7b7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e1e8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a8a7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6c5", Color.White))
|
|
|
|
|
|
|
|
self.check(self.game.isDrawClaimable())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
method testIsDrawClaimableFiftyMoveRuleFalseNinetyFour() =
|
|
|
|
|
|
|
|
self.game = initGame([
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, BRook,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
WBishop, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, WKing, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, WRook, 0,
|
|
|
|
|
|
|
|
0, 0, 0, BKing, 0, 0, 0, 0
|
|
|
|
|
|
|
|
], Color.Black)
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a2a5", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f5g6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a5e5", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h4f6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5e2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b7a7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e2e1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g6f5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e1b1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f6d4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e8d8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f5e6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d8c8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d4e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7f7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e6d5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1a1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f7h7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a1a2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6f4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a2a6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f4e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a6b6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h7c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c8d8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7a7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d8c8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c8d8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b6b1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7a7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1e1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e1d1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d5e6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7b7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b7b3", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c6c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b3h3", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d8c8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h3h8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c8b7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h8b8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b7a7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b8b4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1d1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e6d7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1h1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7f4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h1h3", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f4e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h3h1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6f4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f4c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b4b5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b5b6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2g2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b6b3", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g2c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b3b1", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c3", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c3c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d7d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2d2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6c6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d2c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c6d5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2g2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g2g5", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d5c6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7a6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1b8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g5g7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b8b6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a6a7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b6b1", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7a8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1e1", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g7b7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e1e8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a8a7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6c5", Color.White))
|
|
|
|
|
|
|
|
self.check(self.game.isDrawClaimable())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
method testIsDrawClaimableFiftyMoveRuleFalseCapture() =
|
|
|
|
|
|
|
|
self.game = initGame([
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, BRook,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
WBishop, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, WKing, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, BPawn, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, WRook, 0,
|
|
|
|
|
|
|
|
0, 0, 0, BKing, 0, 0, 0, 0
|
|
|
|
|
|
|
|
], Color.Black)
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a2a5", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f5g6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a5e5", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h4f6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5e2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b7a7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e2e1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g6f5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e1b1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f6d4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e8d8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f5e6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d8c8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d4e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7f7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e6d5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1a1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f7h7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a1a2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6f4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a2a6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f4e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a6b6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h7c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c8d8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7a7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d8c8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c8d8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b6b1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7a7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1e1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e1d1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d5e6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7b7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b7b3", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c6c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b3h3", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d8c8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h3h8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c8b7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h8b8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b7a7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b8b4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1d1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e6d7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1h1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7f4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h1h3", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f4e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h3h1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("h1c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6f4", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("f4c7", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c1", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b4b5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c1c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b5b6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2g2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b6b3", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g2c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b3b1", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2c3", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c7e5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c3c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d7d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2d2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6c6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d2c2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c6d5", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("c2g2", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e5d6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g2g5", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d5c6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7a6", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1b8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g5g7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b8b6", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a6a7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b6b1", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a7a8", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("b1e1", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("g7b7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("e1e8", Color.White))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("a8a7", Color.Black))
|
|
|
|
|
|
|
|
self.game.checkedMove(notationToMove("d6c5", Color.White))
|
|
|
|
|
|
|
|
self.check(not self.game.isDrawClaimable())
|
|
|
|
|
|
|
|
|
|
|
|
## Tests for Pawn moves
|
|
|
|
## Tests for Pawn moves
|
|
|
|
method testCheckedMovePawnSingleTrue() =
|
|
|
|
method testCheckedMovePawnSingleTrue() =
|
|
|
|
self.setup()
|
|
|
|
self.setup()
|
|
|
|