diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/copilot.data.migration.ask2agent.xml b/.idea/copilot.data.migration.ask2agent.xml deleted file mode 100644 index 1f2ea11..0000000 --- a/.idea/copilot.data.migration.ask2agent.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 146ab09..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2d..0000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 5897eb6..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/sas2py.iml b/.idea/sas2py.iml deleted file mode 100644 index 2c80e12..0000000 --- a/.idea/sas2py.iml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/game/__init__.py b/game/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/game/__init__.py @@ -0,0 +1 @@ + diff --git a/game/__main__.py b/game/__main__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/game/__main__.py @@ -0,0 +1 @@ + diff --git a/game/asset_loader.py b/game/asset_loader.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/game/asset_loader.py @@ -0,0 +1 @@ + diff --git a/game/game.py b/game/game.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/game/game.py @@ -0,0 +1 @@ + diff --git a/tests/test_game.py b/tests/test_game.py new file mode 100644 index 0000000..410760f --- /dev/null +++ b/tests/test_game.py @@ -0,0 +1,20 @@ +import os + +# Use the SDL dummy video driver so tests can run headless in CI +os.environ.setdefault("SDL_VIDEODRIVER", "dummy") + +import pygame +from game.game import Game + + +def test_game_initializes_and_runs_briefly(): + # Ensure pygame uses the dummy driver + assert pygame.get_sdl_version() is not None + + # Instantiate the game and run for a tiny amount of time + g = Game(width=320, height=240, fps=60) + # Run the loop for 0.1 seconds using run(max_run_seconds=...) + g.run(max_run_seconds=0.1) + + # If we reached cleanup without exception, consider test passed + assert not pygame.get_init() # pygame.quit() should have been called