Exemplo n.º 1
0
    def test_get_number_of_attacking_pairs_v(self):
        size = 5
        queens = (XYLocation(1, 3), XYLocation(1, 4), XYLocation(1, 0))
        nqb = NQueensBoard(size)
        nqb.set_board(queens)

        self.assertEqual(3, nqb.get_number_of_attacking_pairs())
Exemplo n.º 2
0
    def test_get_number_of_attacking_pairs_v(self):
        size = 5
        queens = (XYLocation(1, 3), XYLocation(1, 4), XYLocation(1, 0))
        nqb = NQueensBoard(size)
        nqb.set_board(queens)

        self.assertEqual(3, nqb.get_number_of_attacking_pairs())