import unittest from snakes import SNAKE_REGISTRATIONS, SnakeBuilder from snakes.engine import ( BitBoard, BitboardDuelMixin, BitboardSpatialMixin, BitboardSurvivalMixin, ) from snakes.strategies.prism import PrismBattleSnake_GPT_5_6_Sol class TestSnakePackageLayout(unittest.TestCase): def test_registry_uses_explicit_package_modules(self): for name, registration in SNAKE_REGISTRATIONS.items(): with self.subTest(name=name): self.assertTrue(registration.module.startswith("snakes.")) self.assertNotEqual(registration.module, f"snakes.{name}") def test_registry_builds_active_strategies_after_package_move(self): for name in ("ApexBattleSnake", "PrismBattleSnake_GPT_5_6_Sol"): with self.subTest(name=name): snake = SnakeBuilder.build(name) self.assertEqual(snake.__class__.__name__, name) def test_prism_composes_reusable_engine_mixins(self): snake = PrismBattleSnake_GPT_5_6_Sol() self.assertIsInstance(snake, BitboardDuelMixin) self.assertIsInstance(snake, BitboardSpatialMixin) self.assertIsInstance(snake, BitboardSurvivalMixin) self.assertIsInstance(snake._get_bb(11, 11), BitBoard) if __name__ == "__main__": unittest.main()