예제 #1
0
파일: test_pieces.py 프로젝트: Ceasar/Chess
 def test_moves_blocked_enemy(self):
     bishop = Bishop(self.white, (0, 0))
     knight = Knight(self.black, (1, 1))
     self.board.add_piece(bishop)
     self.board.add_piece(knight)
     moves = list(bishop.moves(self.board))
     self.assertEquals(len(moves), 1, moves)
예제 #2
0
파일: test_pieces.py 프로젝트: Ceasar/Chess
 def test_moves_corner(self):
     bishop = Bishop(self.white, (0, 0))
     self.board.add_piece(bishop)
     moves = list(bishop.moves(self.board))
     self.assertEquals(len(moves), 7, moves)
예제 #3
0
파일: test_pieces.py 프로젝트: Ceasar/Chess
 def test_moves_center(self):
     bishop = Bishop(self.white, (4, 4))
     self.board.add_piece(bishop)
     moves = list(bishop.moves(self.board))
     self.assertEquals(len(moves), 13, moves)