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-0.1.1.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

retro_games-0.1.1-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

Supported by

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