Skip to main content

A simple framework for Terminal-based games

Project description

Retro

A simple framework for Terminal-based games.

╔════════════════════════════════╗
║                                ║
║                                ║
║                                ║
║      *************             ║
║      *                         ║
║      *                         ║
║      **>                       ║
║             @                  ║
║                                ║
║                                ║
╠════════════════════════════════╣
║score: 153                      ║
║                                ║
╚════════════════════════════════╝

Layout

  • There are two panes, a fixed-size play area at the top and a state window at the bottom. When enabled, a sidebar containing debug messages is also shown.

Concepts and skills needed

  • We need to discuss immutability, and the difference between mutable objects and immutable values.

    • Specifically, we care about the difference between tuples and lists.
    • State must be immutable!
    • Objects are only ever equal to themselves.
  • The game is structured as a collection of agents which interact.

Design/pedagogical criteria

  • Make thinking visible.
    • Avoid subclasses; they require interaction with invisible parent attributes.
    • Instead, compose functionality from other classes which might be somewhat black-boxed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

retro_games-2.1.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

retro_games-2.1.0-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file retro_games-2.1.0.tar.gz.

File metadata

  • Download URL: retro_games-2.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.9

File hashes

Hashes for retro_games-2.1.0.tar.gz
Algorithm Hash digest
SHA256 bfd545262b8ca210ee62bd9f1ec23d15ebfa544fc6086e77cd400554e4eaaa0d
MD5 1e2b83c624ce61afb4ff45e95626941a
BLAKE2b-256 b3ffd095a51171f137c6edcdf397ca829badbd32ff1f7ccec765c4e48edcfdf5

See more details on using hashes here.

File details

Details for the file retro_games-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for retro_games-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26617bc6f3aab4ad35c16db8d8514ebe8d92ac45b6e08bb1cf11b8e488272e98
MD5 f33fb5c0f069a292a4c2415e94979fa4
BLAKE2b-256 e1f0803a97a9ce3732e673f6ed3f3a04aef8b275ea4ca13b8bb79ee18508e639

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page