예제 #1
0
    def test_process_free_position_decrements_count_of_empty_positions(self):
        board = Board(3, 3)
        piece_list = [King()]
        count = board.count_empty_positions()
        
        ChessManager.process_free_position(board, piece_list, 2, 2)
        
        self.assertGreater(count, board.count_empty_positions())

        
예제 #2
0
 def test_count_empty_positions_returns_8_for_3x3_board_with_one_fullfilled(self):
     board = Board(3, 3)
     board.set_position_value(2, 2, '-1')
     
     self.assertEqual(board.count_empty_positions(), 8)
예제 #3
0
 def test_count_empty_positions_returns_9_for_empty_3x3_board(self):
     board = Board(3, 3)
     
     self.assertEqual(board.count_empty_positions(), 9)