added more tests for chess moves; they all pass
[naja.git] / naja / tests / test_player.py
index d45c09eadcdad3957862611d5f337b41919c4f56..a7173cbc794ce6b7571dfb3962532c4b2e4e6212 100644 (file)
@@ -1,6 +1,6 @@
 from unittest import TestCase
 
-from naja.constants import BITS
+from naja.constants import BITS, MOVES
 from naja.player import PlayerBits, Player
 
 
@@ -136,11 +136,11 @@ class TestPlayer(TestCase):
     def test_legal_moves_bishop(self):
         player = Player(0x0f, (1, 3), MOVES.BISHOP)
         self.assertEqual(player.legal_moves(), [(0, 2), (0, 4), (1, 3), (2, 2),
-        (2, 4), (3, 1), (3, 4), (4, 0)])
+        (2, 4), (3, 1), (4, 0)])
 
     def test_legal_moves_knight(self):
         player = Player(0x0f, (1, 3), MOVES.KNIGHT)
-        self.assertEqual(player.legal_moves(), [(0, 1), (2, 1), (3, 2), (3, 4)])
+        self.assertEqual(player.legal_moves(), [(0, 1), (1, 3), (2, 1), (3, 2), (3, 4)])
 
     def test_set_position(self):
         player = Player(0x0f, (3, 3), MOVES.BISHOP)