diff --git a/docs/station-fall.apk b/docs/station-fall.apk index 006b3cb..1c977ab 100644 Binary files a/docs/station-fall.apk and b/docs/station-fall.apk differ diff --git a/docs/station-fall.tar.gz b/docs/station-fall.tar.gz index e63d639..1efca5c 100644 Binary files a/docs/station-fall.tar.gz and b/docs/station-fall.tar.gz differ diff --git a/src/main.py b/src/main.py index 6628e9a..f629369 100644 --- a/src/main.py +++ b/src/main.py @@ -42,7 +42,7 @@ async def run_game(win, screen_width, screen_height, background, truck_img, sett # music set to dead pygame.mixer.music.stop() music_volume = pygame.mixer.music.get_volume() - pygame.mixer.music.load('sound/uncomfortable-panels.ogg') + pygame.mixer.music.load(resolve_asset_path("sound/uncomfortable-panels.ogg")) pygame.mixer.music.set_volume(music_volume) pygame.mixer.music.play(-1) diff --git a/src/render.py b/src/render.py index 0cf087a..18ef0e9 100644 --- a/src/render.py +++ b/src/render.py @@ -200,7 +200,7 @@ def draw_credits(win, screen_width, screen_height, background, float_time, menu_ ("Meheraj Khatri", "| Developer | UI & Mechanics Integration | QA Lead |"), ("Loy Ngo", "| Developer | Navigation System (Minimap) | UI/Menu Systems |"), ("Rowan Ess", "| Developer | Music |"), - ("Sebastian Bentancourt","| Developer |"), + ("Sebastian Betancourt","| Developer | Web Deployment | Build Pipeline |"), ("Yusairah Haque", "| Developer |"), ("Zachary Evans", "| Developer |"), ] diff --git a/src/test_cases/test_deployment.py b/src/test_cases/test_deployment.py new file mode 100644 index 0000000..0dde79e --- /dev/null +++ b/src/test_cases/test_deployment.py @@ -0,0 +1,43 @@ +import unittest +from pathlib import Path +import re + +class TestDeployment(unittest.TestCase): + + def test_no_sys_exit_in_game(self): + source = Path("src/game.py").read_text() + self.assertNotIn("sys.exit()", source) + + def test_no_bare_asyncio_imports(self): + for path in Path("src").glob("*.py"): + source = path.read_text() + self.assertNotIn("from asyncio import", source, + f"Illegal asyncio import in {path.name}") + + def test_resolve_asset_path_used_for_sounds(self): + source = Path("src/game.py").read_text() + calls = re.findall(r'pygame\.mixer\.Sound\((.*?)\)', source) + for call in calls: + self.assertIn("resolve_asset_path", call, + f"Sound loaded without resolve_asset_path: {call}") + + def test_docs_index_has_hidpi_fix(self): + index_path = Path("docs/index.html") + if not index_path.exists(): + self.skipTest("docs/index.html not built yet") + self.assertIn("fixCanvas", index_path.read_text()) + + def test_docs_index_no_pythonrc(self): + index_path = Path("docs/index.html") + if not index_path.exists(): + self.skipTest("docs/index.html not built yet") + self.assertNotIn("pythonrc.py", index_path.read_text()) + + def test_docs_index_no_100_percent_canvas(self): + index_path = Path("docs/index.html") + if not index_path.exists(): + self.skipTest("docs/index.html not built yet") + self.assertNotIn("width: 100%", index_path.read_text()) + +if __name__ == "__main__": + unittest.main() \ No newline at end of file