byteface / bombdisposer

rip-off minesweep to test domonic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bomb Disposer

The minesweeper game built to test using domonic and sanic.

setup
python3 -m venv venv
. venv/bin/activate
python -m pip install -r requirements.txt
running
python bombdisposer.py

you can then see it at: localhost:9000

about

  • Test storing game data in a session.

  • The python metaclass dumps to a dict. So by using it as the model for all Game assets you can store game state. Here I do it on a session (which a user can see if they probe).

  • Decisions on users success are made on the server side aysnc.

  • Threads are used to speed-up checking the tiles.

  • If you make HUGE grid. Increase recursion limit at the top of the file. i.e

    print(sys.getrecursionlimit()) sys.setrecursionlimit(5000)

Notes

Still in dev. You may have to comment-out any 'say' commands which i use for testing...

# from domonic.terminal import say
# say("something")

Still todo

  • change cover from UI
  • change grid size from UI
  • timer
  • save best times
  • sfx
  • consider swap out numpy/sanic for something lighter. But not important for now.

About

rip-off minesweep to test domonic

License:MIT License


Languages

Language:Python 100.0%