From 72fdee5b47b96ddd662f9571c498743612ebbd74 Mon Sep 17 00:00:00 2001 From: bpotocki Date: Fri, 23 Jan 2026 19:04:05 +0000 Subject: [PATCH] Initial commit --- .commit_template | 12 +++++++ .gitignore | 1 + asteroid.py | 4 +++ asteroid_spawner.py | 4 +++ nav_game.py | 4 +++ pyproject.toml | 16 +++++++++ spaceship.py | 4 +++ uv.lock | 82 +++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 127 insertions(+) create mode 100644 .commit_template create mode 100644 .gitignore create mode 100644 asteroid.py create mode 100644 asteroid_spawner.py create mode 100644 nav_game.py create mode 100644 pyproject.toml create mode 100644 spaceship.py create mode 100644 uv.lock diff --git a/.commit_template b/.commit_template new file mode 100644 index 0000000..8f580e7 --- /dev/null +++ b/.commit_template @@ -0,0 +1,12 @@ + + +# ----------------------------------------------------------------- +# Write your entire commit message above this line. +# +# Software frameworks can be very powerful tools, allowing you to +# do a lot with very little code. In the `retro` framework, you +# create agents, and then the `Game` class runs the game with them. +# +# How does writing a program like the nav game feel different from +# the programs you were writing in Unit 1? +# diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/asteroid.py b/asteroid.py new file mode 100644 index 0000000..257354b --- /dev/null +++ b/asteroid.py @@ -0,0 +1,4 @@ +# asteroid.py +# ------------ +# By MWC Contributors +# This module defines an asteroid agent class. diff --git a/asteroid_spawner.py b/asteroid_spawner.py new file mode 100644 index 0000000..92e542d --- /dev/null +++ b/asteroid_spawner.py @@ -0,0 +1,4 @@ +# asteroid_spawner.py +# ------------------- +# By MWC Contributors +# This module defines an AsteroidSpawner agent class. diff --git a/nav_game.py b/nav_game.py new file mode 100644 index 0000000..191d83d --- /dev/null +++ b/nav_game.py @@ -0,0 +1,4 @@ +# nav_game.py +# ------------ +# By MWC Contributors +# This class implements a simple game where a spaceship avoids asteroids. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7eb8822 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,16 @@ +[project] +name = "lab-retro" +version = "5.0.0" +description = "" +authors = [{ name = "Chris Proctor", email = "chris@chrisproctor.net" }] +requires-python = ">=3.10,<4.0" +readme = "README.md" +license = { text = "MIT" } +dependencies = ["retro-games (>=1.1.0,<2.0.0)"] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.uv] +package = false diff --git a/spaceship.py b/spaceship.py new file mode 100644 index 0000000..9f3552a --- /dev/null +++ b/spaceship.py @@ -0,0 +1,4 @@ +# spaceship.py +# ------------ +# By MWC Contributors +# This module defines a spaceship agent class. diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..bd092c0 --- /dev/null +++ b/uv.lock @@ -0,0 +1,82 @@ +version = 1 +requires-python = ">=3.10, <4.0" +resolution-markers = [ + "platform_system == 'Windows'", + "platform_system != 'Windows'", +] + +[[package]] +name = "ansicon" +version = "1.89.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b6/e2/1c866404ddbd280efedff4a9f15abfe943cb83cde6e895022370f3a61f85/ansicon-1.89.0.tar.gz", hash = "sha256:e4d039def5768a47e4afec8e89e83ec3ae5a26bf00ad851f914d1240b444d2b1", size = 67312 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/75/f9/f1c10e223c7b56a38109a3f2eb4e7fe9a757ea3ed3a166754fb30f65e466/ansicon-1.89.0-py2.py3-none-any.whl", hash = "sha256:f1def52d17f65c2c9682cf8370c03f541f410c1752d6a14029f97318e4b9dfec", size = 63675 }, +] + +[[package]] +name = "blessed" +version = "1.20.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jinxed", marker = "platform_system == 'Windows'" }, + { name = "six" }, + { name = "wcwidth" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/25/ae/92e9968ad23205389ec6bd82e2d4fca3817f1cdef34e10aa8d529ef8b1d7/blessed-1.20.0.tar.gz", hash = "sha256:2cdd67f8746e048f00df47a2880f4d6acbcdb399031b604e34ba8f71d5787680", size = 6655612 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/76/98/584f211c3a4bb38f2871fa937ee0cc83c130de50c955d6c7e2334dbf4acb/blessed-1.20.0-py2.py3-none-any.whl", hash = "sha256:0c542922586a265e699188e52d5f5ac5ec0dd517e5a1041d90d2bbf23f906058", size = 58372 }, +] + +[[package]] +name = "jinxed" +version = "1.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ansicon", marker = "platform_system == 'Windows'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/20/d0/59b2b80e7a52d255f9e0ad040d2e826342d05580c4b1d7d7747cfb8db731/jinxed-1.3.0.tar.gz", hash = "sha256:1593124b18a41b7a3da3b078471442e51dbad3d77b4d4f2b0c26ab6f7d660dbf", size = 80981 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/e3/0e0014d6ab159d48189e92044ace13b1e1fe9aa3024ba9f4e8cf172aa7c2/jinxed-1.3.0-py2.py3-none-any.whl", hash = "sha256:b993189f39dc2d7504d802152671535b06d380b26d78070559551cbf92df4fc5", size = 33085 }, +] + +[[package]] +name = "lab-retro" +version = "5.0.0" +source = { virtual = "." } +dependencies = [ + { name = "retro-games" }, +] + +[package.metadata] +requires-dist = [{ name = "retro-games", specifier = ">=1.1.0,<2.0.0" }] + +[[package]] +name = "retro-games" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "blessed" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c5/60/e3f7e599da8a67046feab880561680ecf1c4b2b9752e4e674426cc0070ca/retro_games-1.1.0.tar.gz", hash = "sha256:2167b574f42fe1e739b7c9ec75e98a9b76df42e2166376b85559291b3dc58f82", size = 16181 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c8/bb/731a73a94f0a5c1ef821204807396507e09569c297e9825512ff05322cef/retro_games-1.1.0-py3-none-any.whl", hash = "sha256:c621117e4dd528b1e4870d897d00c4365566ab3ba965177e3996ed3c889dd9f8", size = 21376 }, +] + +[[package]] +name = "six" +version = "1.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050 }, +] + +[[package]] +name = "wcwidth" +version = "0.2.13" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5", size = 101301 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859", size = 34166 }, +]