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-1.2.0.tar.gz (15.1 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-1.2.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for retro_games-1.2.0.tar.gz
Algorithm Hash digest
SHA256 669b9fe3f1454470628b2b0d895fcc645c5d90ddc46563d20577ac2f5f66519c
MD5 6b0ac1ab13282eb14dd43f5c09bfd7aa
BLAKE2b-256 f3f933efcb41c1b7c7d890fe7c179dee702d6ca72754c0b0bf4fbe751eff609c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for retro_games-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9d805aa15db71bcbef71da76be18f1f2b71884125b8413b0577636e038b708a
MD5 8ae2fb88daba151d60f2e2dacdf3a4d5
BLAKE2b-256 beb5545a912f2a8b9107f97dfd3998f0015f8b3ac7052ba6c8b9effef2c50238

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