par-infini-sweeper


Namepar-infini-sweeper JSON
Version 0.3.7 PyPI version JSON
download
home_pageNone
SummaryPar Infinite Minesweeper
upload_time2025-08-15 18:35:17
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT License Copyright (c) 2025 Paul Robello Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords minesweeper terminal tui
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Par Infinite Minesweeper

[![PyPI](https://img.shields.io/pypi/v/par_infini_sweeper)](https://pypi.org/project/par_infini_sweeper/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/par_infini_sweeper.svg)](https://pypi.org/project/par_infini_sweeper/)  
![Runs on Linux | MacOS | Windows](https://img.shields.io/badge/runs%20on-Linux%20%7C%20MacOS%20%7C%20Windows-blue)
![Arch x86-63 | ARM | AppleSilicon](https://img.shields.io/badge/arch-x86--64%20%7C%20ARM%20%7C%20AppleSilicon-blue)
![PyPI - Downloads](https://img.shields.io/pypi/dm/par_infini_sweeper)



![PyPI - License](https://img.shields.io/pypi/l/par_infini_sweeper)

## Description

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

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/probello3)

## Screenshots

![Par Infinite Minesweeper](https://raw.githubusercontent.com/paulrobello/par_infini_sweeper/main/Screenshot.png)

## Technology

- Python
- Textual
- Sqlite3
- OAuth2 (For Internet Leaderboard)

## Key Features:

* Infinite board size
* Local high scores
* Internet high scores
* Auto saves and can be resumed

## 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. Your 1st click is always safe.
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.
  * `S` Toggle highlighting of sub grid under the mouse
  * `H` Highscores.
  * `T` Change theme.
  * `Q` Quit.

## Scoring

The main grid consists of 8x8 sub grids.  
When all cells that are not mines in a sub grid are uncovered the sub grid is marked solved turns a darker gray and flags are placed on any mines that are not already flagged.
* 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 $XDG_DATA_HOME/pim or appropriate folder for your OS  
The database is backed up each day you play to `game_data.sqlite.bak`  

## Internet Leaderboard

To use the internet leaderboard you must login to the server via a social provider such as google or facebook.  
This requires 2 things:
1. The game must listen on port 1999 for the authentication callback. (This may trigger a firewall warning which you must accept if you wish to continue)
2. The game must launch a browser so you can login.
- Only your hashed email is stored on the server.
- The port will only be opened for the duration of the login process.
- After you have logged in and reserved your nickname, you can then submit your scores to the server for the current game mode and difficulty.
- Nicknames may only contain the chars a-z A-Z 0-9 and . - _
- Only one score per user / game mode / difficulty is stored.
- You may submit scores for games that have not yet ended. If the score is higher than your existing one it will replace it.
- Scores are not posted to the internet automatically, so make sure you post your score before starting a new game!

See our [privacy policy](https://par-com.net/privacy_policy.html) for details on data handling.

## Prerequisites

- Python 3.11 - 3.13 (3.12 recommended)
- The instructions assume you have `uv` installed.

## Installation

### PyPi
```shell
uv tool install par_infini_sweeper
```

### GitHub
```shell
uv tool install git+https://github.com/paulrobello/par_infini_sweeper
```

## Update

### PyPi
```shell
uv tool install par_infini_sweeper -U --force
```

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


## Installed Usage
```shell
pim [OPTIONS]
```

## From source Usage
```shell
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

- More game modes
- Optimize for more performance

## Whats New

- Version 0.3.7:
  - Fixed GitHub Actions workflows for correct project references
  - Added Python version matrix testing (3.11, 3.12, 3.13)
  - Updated build configuration to target Python 3.12
  - Improved Makefile with test and clean-all targets
  - Fixed duplicate dependencies in pyproject.toml
- Version 0.3.6:
  - Removed unused dependencies
  - Updated dependencies
  - Tested on Python 3.13
- Version 0.3.5:
  - Updated dependencies
  - Minor bug fixes
- Version 0.3.4:
  - Remove some unnecessary dependencies
  - Minor bug fixes
- Version 0.3.3:
  - Subgrids now have subtle checker background
  - Added `S` key to toggle subgrid highlighting
  - Fixed bug where hitting mine on 1st click after reloading game did not end game
- Version 0.3.2:
  - Ensure 1st click is always safe
- Version 0.3.1:
  - Use XDG specification for data paths
- Version 0.3.0:
  - Fix server mode not using other parameters such as user and nick
  - Limit username and nickname to no more than 30 characters
  - Fix help dialog content display issues
  - Added internet leaderboard!
  - Added `a` key to access authentication dialog for internet leaderboard
- Version 0.2.10:
  - Updated package metadata
  - Removed some unnecessary dependencies
- 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](http://edward-jazzhands.github.io/) for all his help testing and feedback / feature requests!

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Author

Paul Robello - probello@gmail.com

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "par-infini-sweeper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "Paul Robello <probello@gmail.com>",
    "keywords": "minesweeper, terminal, tui",
    "author": null,
    "author_email": "Paul Robello <probello@gmail.com>",
    "download_url": null,
    "platform": null,
    "description": "# Par Infinite Minesweeper\n\n[![PyPI](https://img.shields.io/pypi/v/par_infini_sweeper)](https://pypi.org/project/par_infini_sweeper/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/par_infini_sweeper.svg)](https://pypi.org/project/par_infini_sweeper/)  \n![Runs on Linux | MacOS | Windows](https://img.shields.io/badge/runs%20on-Linux%20%7C%20MacOS%20%7C%20Windows-blue)\n![Arch x86-63 | ARM | AppleSilicon](https://img.shields.io/badge/arch-x86--64%20%7C%20ARM%20%7C%20AppleSilicon-blue)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/par_infini_sweeper)\n\n\n\n![PyPI - License](https://img.shields.io/pypi/l/par_infini_sweeper)\n\n## Description\n\nInfinite Minesweeper TUI. Play a game of minesweeper with infinite board size!\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/probello3)\n\n## Screenshots\n\n![Par Infinite Minesweeper](https://raw.githubusercontent.com/paulrobello/par_infini_sweeper/main/Screenshot.png)\n\n## Technology\n\n- Python\n- Textual\n- Sqlite3\n- OAuth2 (For Internet Leaderboard)\n\n## Key Features:\n\n* Infinite board size\n* Local high scores\n* Internet high scores\n* Auto saves and can be resumed\n\n## Objective\n\nThe goal of the game is to uncover all the cells that do not contain mines.\nIf you uncover a mine, you lose the game. Your 1st click is always safe.\nIf you uncover a cell that is not a mine, it will show a number indicating how many mines are in the neighboring cells.\nUse this information to determine which cells are safe to uncover.\n\n## Controls\n\n* Left click to uncover a cell. If a cell is flagged as a mine, it will not be uncovered.\n* Sub grids can only be unlocked when cells neighboring the sub grid are uncovered.\n* Shift or Ctrl + Left-click to toggle flagging a covered cell as a mine.\n* Shift or Ctrl + Left-click on an uncovered cell it will uncover all neighboring cells.\n  * As a safety you must have same number of flags as mines in the neighboring cells.\n* Drag to pan the board.\n* Keys:\n  * `F1` Help.\n  * `N` New game.\n  * `O` Move view to origin.\n  * `C` Move view to board center (computed as center of exposed sub grids).\n  * `P` Pause.\n  * `S` Toggle highlighting of sub grid under the mouse\n  * `H` Highscores.\n  * `T` Change theme.\n  * `Q` Quit.\n\n## Scoring\n\nThe main grid consists of 8x8 sub grids.  \nWhen all cells that are not mines in a sub grid are uncovered the sub grid is marked solved turns a darker gray and flags are placed on any mines that are not already flagged.\n* Easy: 8 mines\n* Medium: 12 mines\n* Hard: 16 mines\n\nWhen 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.  \nYour score is the sum of all mines in the solved sub grids.  \n\n## Storage\n\nAll data for the application is stored in a sqlite3 database located in $XDG_DATA_HOME/pim or appropriate folder for your OS  \nThe database is backed up each day you play to `game_data.sqlite.bak`  \n\n## Internet Leaderboard\n\nTo use the internet leaderboard you must login to the server via a social provider such as google or facebook.  \nThis requires 2 things:\n1. The game must listen on port 1999 for the authentication callback. (This may trigger a firewall warning which you must accept if you wish to continue)\n2. The game must launch a browser so you can login.\n- Only your hashed email is stored on the server.\n- The port will only be opened for the duration of the login process.\n- After you have logged in and reserved your nickname, you can then submit your scores to the server for the current game mode and difficulty.\n- Nicknames may only contain the chars a-z A-Z 0-9 and . - _\n- Only one score per user / game mode / difficulty is stored.\n- You may submit scores for games that have not yet ended. If the score is higher than your existing one it will replace it.\n- Scores are not posted to the internet automatically, so make sure you post your score before starting a new game!\n\nSee our [privacy policy](https://par-com.net/privacy_policy.html) for details on data handling.\n\n## Prerequisites\n\n- Python 3.11 - 3.13 (3.12 recommended)\n- The instructions assume you have `uv` installed.\n\n## Installation\n\n### PyPi\n```shell\nuv tool install par_infini_sweeper\n```\n\n### GitHub\n```shell\nuv tool install git+https://github.com/paulrobello/par_infini_sweeper\n```\n\n## Update\n\n### PyPi\n```shell\nuv tool install par_infini_sweeper -U --force\n```\n\n### GitHub\n```shell\nuv tool install git+https://github.com/paulrobello/par_infini_sweeper -U --force\n```\n\n\n## Installed Usage\n```shell\npim [OPTIONS]\n```\n\n## From source Usage\n```shell\nuv run pim [OPTIONS]\n```\n\n\n### CLI Options\n```\n--server              -s            Start webserver that allows app to be played in a browser\n--user                -u      TEXT  User name to use [default: logged in username]\n--nick                -n      TEXT  Set user nickname [default: None]\n--version             -v            Show version and exit.\n--help                              Show this message and exit.\n```\n\n## Roadmap\n\n- More game modes\n- Optimize for more performance\n\n## Whats New\n\n- Version 0.3.7:\n  - Fixed GitHub Actions workflows for correct project references\n  - Added Python version matrix testing (3.11, 3.12, 3.13)\n  - Updated build configuration to target Python 3.12\n  - Improved Makefile with test and clean-all targets\n  - Fixed duplicate dependencies in pyproject.toml\n- Version 0.3.6:\n  - Removed unused dependencies\n  - Updated dependencies\n  - Tested on Python 3.13\n- Version 0.3.5:\n  - Updated dependencies\n  - Minor bug fixes\n- Version 0.3.4:\n  - Remove some unnecessary dependencies\n  - Minor bug fixes\n- Version 0.3.3:\n  - Subgrids now have subtle checker background\n  - Added `S` key to toggle subgrid highlighting\n  - Fixed bug where hitting mine on 1st click after reloading game did not end game\n- Version 0.3.2:\n  - Ensure 1st click is always safe\n- Version 0.3.1:\n  - Use XDG specification for data paths\n- Version 0.3.0:\n  - Fix server mode not using other parameters such as user and nick\n  - Limit username and nickname to no more than 30 characters\n  - Fix help dialog content display issues\n  - Added internet leaderboard!\n  - Added `a` key to access authentication dialog for internet leaderboard\n- Version 0.2.10:\n  - Updated package metadata\n  - Removed some unnecessary dependencies\n- Version 0.2.9:\n  - Fixed some first run db issues\n- Version 0.2.8:\n  - Addata game data backup\n  - Updated readme and help\n- Version 0.2.7:\n  - Added pause key `p`\n  - Fixed bug where sometimes newly generated sub grids would not get saved if no cells were uncovered\n  - More optimizations\n  - Support for future game modes\n- Version 0.2.6:\n  - Now only highlights unrevealed surrounding cells when shift/ctrl + left-click on uncovered cells\n- Version 0.2.6:\n  - Now stops timer on game over\n  - Now highlights surrounding cells when shift/ctrl + left-click on uncovered cells\n- Version 0.2.5:\n  - Disabled some toasts to reduce clutter\n  - Moved middle click function to shift/ctrl + left-click on uncovered cells\n- Version 0.2.3:\n  - Enabled multi user support\n- Version 0.2.0:\n  - Added webserver to play in a browser\n- Version 0.1.0:\n  - Initial release\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Shoutout\n\nI would like to thank [Edward Jazzhands](http://edward-jazzhands.github.io/) for all his help testing and feedback / feature requests!\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\nPaul Robello - probello@gmail.com\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Paul Robello\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "Par Infinite Minesweeper",
    "version": "0.3.7",
    "project_urls": {
        "Discussions": "https://github.com/paulrobello/par_infini_sweeper/discussions",
        "Documentation": "https://github.com/paulrobello/par_infini_sweeper/blob/main/README.md",
        "Homepage": "https://github.com/paulrobello/par_infini_sweeper",
        "Issues": "https://github.com/paulrobello/par_infini_sweeper/issues",
        "Repository": "https://github.com/paulrobello/par_infini_sweeper",
        "Wiki": "https://github.com/paulrobello/par_infini_sweeper/wiki"
    },
    "split_keywords": [
        "minesweeper",
        " terminal",
        " tui"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "35182a0dc176a9af79040ba8bc88b5e899bf0e5e6b40b100f6c2ea5c4092a82c",
                "md5": "49f3a5b41545c6cb397e2fd1331c432a",
                "sha256": "15495766264036eeb23a80ce052dfdf3dfdb0eca97c8a0d87c65ab3c6a533e0b"
            },
            "downloads": -1,
            "filename": "par_infini_sweeper-0.3.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "49f3a5b41545c6cb397e2fd1331c432a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 43368,
            "upload_time": "2025-08-15T18:35:17",
            "upload_time_iso_8601": "2025-08-15T18:35:17.289219Z",
            "url": "https://files.pythonhosted.org/packages/35/18/2a0dc176a9af79040ba8bc88b5e899bf0e5e6b40b100f6c2ea5c4092a82c/par_infini_sweeper-0.3.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-15 18:35:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "paulrobello",
    "github_project": "par_infini_sweeper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "par-infini-sweeper"
}
        
Elapsed time: 1.23139s