Skip to main content

Par Infinite Minesweeper

Project description

Par Infinite Minesweeper

Description

Infinite Minesweeper TUI. Play a game of minesweeper with infinite board size!

Par Infinite Minesweeper

Technology

  • Python
  • Textual
  • Sqlite3

Objective

The goal of the game is to uncover all the cells that do not contain mines. If you uncover a mine, you lose the game. If you uncover a cell that is not a mine, it will show a number indicating how many mines are in the neighboring cells. Use this information to determine which cells are safe to uncover.

Controls

  • Left click to uncover a cell. If a cell is flagged as a mine, it will not be uncovered.
  • Sub grids can only be unlocked when cells neighboring the sub grid are uncovered.
  • Shift or Ctrl + Left-click to toggle flagging a covered cell as a mine.
  • Shift or Ctrl + Left-click on an uncovered cell it will uncover all neighboring cells.
    • As a safety you must have same number of flags as mines in the neighboring cells.
  • Drag to pan the board.
  • Keys:
    • F1 Help.
    • N New game.
    • O Move view to origin.
    • C Move view to board center (computed as center of exposed sub grids).
    • P Pause.
    • H Highscores.
    • T Change theme.
    • Q Quit.

Scoring

The main grid consists of 8x8 sub grids.
Depending the difficulty level, the number of mines in each sub grid will vary.

  • Easy: 8 mines
  • Medium: 12 mines
  • Hard: 16 mines

When all cells that are not mines in a sub grid are uncovered the sub grid is marked solved and flags are placed on any mines that are not already flagged.
Your score is the sum of all mines in the solved sub grids.

Storage

All data for the application is stored in a sqlite3 database located in ~/.pim/game_data.sqlite
The database is backed up daily to ~/.pim/game_data.sqlite.bak

Prerequisites

The instructions assume you have uv installed.

Installation

PyPi

uv tool install par_infini_sweeper

GitHub

uv tool install git+https://github.com/paulrobello/par_infini_sweeper

Update

PyPi

uv tool install par_infini_sweeper -U --force

GitHub

uv tool install git+https://github.com/paulrobello/par_infini_sweeper -U --force

Installed Usage

pim [OPTIONS]

From source Usage

uv run pim [OPTIONS]

CLI Options

--server              -s            Start webserver that allows app to be played in a browser
--user                -u      TEXT  User name to use [default: logged in username]
--nick                -n      TEXT  Set user nickname [default: None]
--version             -v            Show version and exit.
--help                              Show this message and exit.

Roadmap

  • Global Leaderboard
  • More game modes
  • Optimize for more performance

Whats New

  • Version 0.2.9:
    • Fixed some first run db issues
  • Version 0.2.8:
    • Addata game data backup
    • Updated readme and help
  • Version 0.2.7:
    • Added pause key p
    • Fixed bug where sometimes newly generated sub grids would not get saved if no cells were uncovered
    • More optimizations
    • Support for future game modes
  • Version 0.2.6:
    • Now only highlights unrevealed surrounding cells when shift/ctrl + left-click on uncovered cells
  • Version 0.2.6:
    • Now stops timer on game over
    • Now highlights surrounding cells when shift/ctrl + left-click on uncovered cells
  • Version 0.2.5:
    • Disabled some toasts to reduce clutter
    • Moved middle click function to shift/ctrl + left-click on uncovered cells
  • Version 0.2.3:
    • Enabled multi user support
  • Version 0.2.0:
    • Added webserver to play in a browser
  • Version 0.1.0:
    • Initial release

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Shoutout

I would like to thank Edward Jazzhands for all his help testing and feedback / feature requests!

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Paul Robello - probello@gmail.com

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

par_infini_sweeper-0.2.9.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

par_infini_sweeper-0.2.9-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file par_infini_sweeper-0.2.9.tar.gz.

File metadata

  • Download URL: par_infini_sweeper-0.2.9.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for par_infini_sweeper-0.2.9.tar.gz
Algorithm Hash digest
SHA256 1c7f0b7a75d82b2ae431c570d3eb1794b40a96eac1d63233229f8c68a30419c7
MD5 4da7377e0edbbf822a8aa99e3de7c612
BLAKE2b-256 544423fdb5bb403f8c9d9ec6a2cdb7ba42e650ab80fa943109b47d0690a70354

See more details on using hashes here.

Provenance

The following attestation bundles were made for par_infini_sweeper-0.2.9.tar.gz:

Publisher: publish.yml on paulrobello/par_infini_sweeper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file par_infini_sweeper-0.2.9-py3-none-any.whl.

File metadata

File hashes

Hashes for par_infini_sweeper-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 a20bbfdc278fa5e7938cbb8c54e5c6dfdbc1c8038b4f635a87cb1efd328ab5c6
MD5 958f74de89e4df1cfb082b6ea0d418bb
BLAKE2b-256 7147d2f32feb9c974799eb14150bdeeb9ef423973f8a96bea6a014e571d29191

See more details on using hashes here.

Provenance

The following attestation bundles were made for par_infini_sweeper-0.2.9-py3-none-any.whl:

Publisher: publish.yml on paulrobello/par_infini_sweeper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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