From 90281c05ceff0b21c126140a3282ce443228b1b1 Mon Sep 17 00:00:00 2001 From: nate Date: Tue, 20 May 2025 00:21:36 +0000 Subject: [PATCH] Initial commit --- .commit_template | 12 ++++++ .gitignore | 1 + asteroid.py | 4 ++ asteroid_spawner.py | 4 ++ nav_game.py | 4 ++ poetry.lock | 91 +++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 21 +++++++++++ spaceship.py | 4 ++ 8 files changed, 141 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 poetry.lock create mode 100644 pyproject.toml create mode 100644 spaceship.py 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/poetry.lock b/poetry.lock new file mode 100644 index 0000000..3fece54 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,91 @@ +# This file is automatically @generated by Poetry 2.0.0 and should not be changed by hand. + +[[package]] +name = "ansicon" +version = "1.89.0" +description = "Python wrapper for loading Jason Hood's ANSICON" +optional = false +python-versions = "*" +groups = ["main"] +markers = "platform_system == \"Windows\"" +files = [ + {file = "ansicon-1.89.0-py2.py3-none-any.whl", hash = "sha256:f1def52d17f65c2c9682cf8370c03f541f410c1752d6a14029f97318e4b9dfec"}, + {file = "ansicon-1.89.0.tar.gz", hash = "sha256:e4d039def5768a47e4afec8e89e83ec3ae5a26bf00ad851f914d1240b444d2b1"}, +] + +[[package]] +name = "blessed" +version = "1.20.0" +description = "Easy, practical library for making terminal apps, by providing an elegant, well-documented interface to Colors, Keyboard input, and screen Positioning capabilities." +optional = false +python-versions = ">=2.7" +groups = ["main"] +files = [ + {file = "blessed-1.20.0-py2.py3-none-any.whl", hash = "sha256:0c542922586a265e699188e52d5f5ac5ec0dd517e5a1041d90d2bbf23f906058"}, + {file = "blessed-1.20.0.tar.gz", hash = "sha256:2cdd67f8746e048f00df47a2880f4d6acbcdb399031b604e34ba8f71d5787680"}, +] + +[package.dependencies] +jinxed = {version = ">=1.1.0", markers = "platform_system == \"Windows\""} +six = ">=1.9.0" +wcwidth = ">=0.1.4" + +[[package]] +name = "jinxed" +version = "1.3.0" +description = "Jinxed Terminal Library" +optional = false +python-versions = "*" +groups = ["main"] +markers = "platform_system == \"Windows\"" +files = [ + {file = "jinxed-1.3.0-py2.py3-none-any.whl", hash = "sha256:b993189f39dc2d7504d802152671535b06d380b26d78070559551cbf92df4fc5"}, + {file = "jinxed-1.3.0.tar.gz", hash = "sha256:1593124b18a41b7a3da3b078471442e51dbad3d77b4d4f2b0c26ab6f7d660dbf"}, +] + +[package.dependencies] +ansicon = {version = "*", markers = "platform_system == \"Windows\""} + +[[package]] +name = "retro-games" +version = "1.1.0" +description = "A simple framework for Terminal-based games" +optional = false +python-versions = "<4.0,>=3.10" +groups = ["main"] +files = [ + {file = "retro_games-1.1.0-py3-none-any.whl", hash = "sha256:c621117e4dd528b1e4870d897d00c4365566ab3ba965177e3996ed3c889dd9f8"}, + {file = "retro_games-1.1.0.tar.gz", hash = "sha256:2167b574f42fe1e739b7c9ec75e98a9b76df42e2166376b85559291b3dc58f82"}, +] + +[package.dependencies] +blessed = ">=1.20.0,<2.0.0" + +[[package]] +name = "six" +version = "1.17.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["main"] +files = [ + {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, + {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, +] + +[[package]] +name = "wcwidth" +version = "0.2.13" +description = "Measures the displayed width of unicode strings in a terminal" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"}, + {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"}, +] + +[metadata] +lock-version = "2.1" +python-versions = ">=3.10,<4.0" +content-hash = "03cc38c17964eb2c920ecf014cbfcf966c0c719418a127947b33382f086a0a6e" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ce552a8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,21 @@ +[project] +name = "lab-retro" +version = "0.1.0" +description = "" +authors = [ + {name = "Chris Proctor",email = "chris@chrisproctor.net"} +] +license = {text = "MIT"} +readme = "README.md" +requires-python = ">=3.10,<4.0" +dependencies = [ + "retro-games (>=1.1.0,<2.0.0)" +] + + +[build-system] +requires = ["poetry-core>=2.0.0,<3.0.0"] +build-backend = "poetry.core.masonry.api" + +[tool.poetry] +package-mode = 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.