Compare commits

..

No commits in common. "4b4bdd6f8d5264217908a72024bdc86f0445f025" and "7481a639ad2b1191cc37ee6216c9a2a659b799dd" have entirely different histories.

12 changed files with 24 additions and 54 deletions

8
.idea/.gitignore generated vendored
View file

@ -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

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Ask2AgentMigrationStateService">
<option name="migrationStatus" value="COMPLETED" />
</component>
</project>

View file

@ -1,10 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>

View file

@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

8
.idea/modules.xml generated
View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/sas2py.iml" filepath="$PROJECT_DIR$/.idea/sas2py.iml" />
</modules>
</component>
</project>

10
.idea/sas2py.iml generated
View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml generated
View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

1
game/__init__.py Normal file
View file

@ -0,0 +1 @@

1
game/__main__.py Normal file
View file

@ -0,0 +1 @@

1
game/asset_loader.py Normal file
View file

@ -0,0 +1 @@

1
game/game.py Normal file
View file

@ -0,0 +1 @@

20
tests/test_game.py Normal file
View file

@ -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