I implemented minesweeper with SQL!
minesweeper-sql.demo.mp4
- Set up an SQL server:
- With Docker -> this requires you have Docker installed.
docker run --name minesweeper -d -p 2022:5432 -e POSTGRES_PASSWORD=postgres postgres
- If you set up your own server, you'll have to change the credentials.
- Install the dependencies required for this:
pip install keyboard psycopg2
- Run the program!
python input.py
- The starting position of your cursor will ALWAYS be zero.
- Your cursor is represented by ★
- WASD -> This is how you navigate the field.
- F -> This will flag a cell in the field. You can toggle a flag on/off.
- R -> This will reveal a cell, OR perform chording. a. Chording will cause the game to end IF you accidentally reveal a mine.