def test_not_self_capture(self): # o.o.. # x.xo. board = Board(5, 5) board.place_stone(Player.black, Point(1, 1)) board.place_stone(Player.black, Point(1, 3)) board.place_stone(Player.white, Point(2, 1)) board.place_stone(Player.white, Point(2, 3)) board.place_stone(Player.white, Point(1, 4)) self.assertFalse(board.is_self_capture(Player.black, Point(1, 2)))
def test_not_self_capture_is_other_capture(self): # xx... # oox.. # x.o.. board = Board(5, 5) board.place_stone(Player.black, Point(3, 1)) board.place_stone(Player.black, Point(3, 2)) board.place_stone(Player.black, Point(2, 3)) board.place_stone(Player.black, Point(1, 1)) board.place_stone(Player.white, Point(2, 1)) board.place_stone(Player.white, Point(2, 2)) board.place_stone(Player.white, Point(1, 3)) self.assertFalse(board.is_self_capture(Player.black, Point(1, 2)))