Skip to content

Latest commit

 

History

History
76 lines (55 loc) · 1.85 KB

README.md

File metadata and controls

76 lines (55 loc) · 1.85 KB

Game of Life

Tests Deploy Run in browser

Classic Conway's Game of Life

Plans

  • infinite field:
    • field is split into 32x32 (or 64x64) blocks, where each line in a block is an integer number, where each bit is a cell
    • the whole field is a dict where keys are block coordinates and values are blocks
      See models.py for inner implementation of the game field.
  • game loop
  • implement gui using pyxel
    • display field on the screen
      • draw visible part of the field
      • change scale with the mouse wheel
      • pan field view with the middle mouse button
    • controls (start/stop, step buttons)
    • edit with the mouse, clear the field
    • add a help screen
  • optimizations:
    • use parallelization (blocks can be processed independently, so it's possible to process subsets of blocks in different threads/processes)
    • rewrite parts in cython?

Online demo

https://insolor.github.io/game-of-life/

Running locally

Install dependencies

poetry install

Then run

poetry run app

Or using poethepoet:

poe run

Or

poetry shell  # activate the virtual environment
python -m game_of_life

Or

poetry shell
pyxel run main.py

Or

make run

Building to html

make all