def test_is_not_one_hive_four(self): t = [ board.Tile(0, 0, 0, piece.create_ladybug('W')), board.Tile(1, 0, 0, piece.create_ladybug('W')), board.Tile(2, 0, 0, piece.create_ladybug('W')), board.Tile(2, 2, 0, piece.create_ladybug('W')) ] self.assertFalse(hiveutil.is_one_hive(t))
def test_is_one_hive_four(self): t = [ board.Tile(0, 0, 0, piece.create_ladybug('W')), board.Tile(1, 0, 0, piece.create_beetle('W')), board.Tile(1, 1, 0, piece.create_beetle('W')), board.Tile(1, 2, 0, piece.create_beetle('W')) ] self.assertTrue(hiveutil.is_one_hive(t))
def test_is_not_one_hive_eleven(self): t = [ board.Tile(0, 0, 0, piece.create_ladybug('W')), board.Tile(1, 0, 0, piece.create_ladybug('W')), board.Tile(0, 1, 0, piece.create_ladybug('W')), board.Tile(0, 1, 0, piece.create_ladybug('W')), board.Tile(1, 1, 0, piece.create_ladybug('W')), board.Tile(2, 1, 0, piece.create_ladybug('W')), board.Tile(3, 0, 0, piece.create_ladybug('W')), board.Tile(3, -1, 0, piece.create_ladybug('W')), board.Tile(3, -1, 0, piece.create_ladybug('W')), board.Tile(4, 0, 0, piece.create_ladybug('W')), board.Tile(5, 1, 0, piece.create_ladybug('W')), ] self.assertFalse(hiveutil.is_one_hive(t))
def test_is_one_hive_zero(self): t = [ ] self.assertTrue(hiveutil.is_one_hive(t))
def test_is_one_hive_two_z_axis(self): t = [ board.Tile(0, 0, 0, piece.create_ladybug('W')), board.Tile(0, 0, 1, piece.create_beetle('W')) ] self.assertTrue(hiveutil.is_one_hive(t))
def test_is_one_hive_two_negative(self): t = [ board.Tile(0, 0, 0, piece.create_ladybug('W')), board.Tile(-1, 0, 0, piece.create_ladybug('W')) ] self.assertTrue(hiveutil.is_one_hive(t))