Metadata-Version: 2.1
Name: battleship-tui
Version: 0.7.0
Summary: Battleship TUI is an implementation of the popular paper-and-pen Battleship game for your terminal.
Home-page: https://github.com/Klavionik/battleship-tui
License: GPL-2.0-or-later
Keywords: battleship,game,tui
Author: Roman Vlasenko
Author-email: klavionik@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Other Audience
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Operating System :: Microsoft :: Windows :: Windows 11
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Games/Entertainment :: Board Games
Classifier: Typing :: Typed
Provides-Extra: client
Provides-Extra: dev
Provides-Extra: server
Requires-Dist: async-timeout (>=4.0.3,<5.0.0) ; (python_version < "3.11") and (extra == "client")
Requires-Dist: auth0-python (>=4.5.0,<5.0.0) ; extra == "server"
Requires-Dist: backports-strenum (>=1.2.8,<2.0.0) ; python_version < "3.11"
Requires-Dist: blacksheep (>=1.2.18,<2.0.0) ; extra == "server"
Requires-Dist: email-validator (>=2.1.0.post1,<3.0.0)
Requires-Dist: httpx (>=0.25.0,<0.26.0)
Requires-Dist: inject (>=5.1.0,<6.0.0)
Requires-Dist: loguru (>=0.7.0,<0.8.0)
Requires-Dist: pydantic (>=2.4.2,<3.0.0)
Requires-Dist: pydantic-settings (>=2.0.3,<3.0.0)
Requires-Dist: pyee (>=11.0.0,<12.0.0) ; extra == "client"
Requires-Dist: pyjwt[crypto] (>=2.8.0,<3.0.0) ; extra == "server"
Requires-Dist: redis (>=5.0.1,<6.0.0) ; extra == "server"
Requires-Dist: sentry-sdk (>=1.38.0,<2.0.0) ; extra == "server"
Requires-Dist: textual (>=0.41.0,<0.42.0) ; extra == "client"
Requires-Dist: textual-dev (>=1.2.1,<2.0.0) ; extra == "dev"
Requires-Dist: typer (>=0.9.0,<0.10.0) ; extra == "client"
Requires-Dist: uvicorn (>=0.23.2,<0.24.0) ; extra == "server"
Requires-Dist: uvloop (>=0.19.0,<0.20.0) ; extra == "server"
Requires-Dist: websockets (>=12.0.0,<13.0.0)
Requires-Dist: xdg-base-dirs (>=6.0.1,<7.0.0)
Description-Content-Type: text/markdown

![Battle](screenshots/battle.png)

# Battleship TUI
Battleship TUI is an implementation of the popular paper-and-pen Battleship game for 
your terminal. You can play against the AI or a real player via the Internet, 
customize game options and appearance, keep track of your achievements, and more.

## Features
* Singleplayer mode  
* Multiplayer mode (via Internet)
* Customizable game rules
* Game statistics

## Planned features
* Customizable UI 
* Ranking system
* Account management
* Better CLI

## Requirements
* A terminal (Windows PowerShell is fine too)
* Python 3.10 or higher

## Installation
The recommended way to install and update the game is via 
[pipx](https://pypa.github.io/pipx/) (especially if you don't know anything about 
virtual environments).

```shell
pipx install battleship-tui[client]
```

`battleship-tui` is merely a Python package and is distributed via PyPI. You can 
install it via `pip` too, but make sure it installs into a venv so that you're not 
messing with the system interpreter.

```shell
# Linux example.
python -m venv venv && source venv/bin/activate
pip install battleship-tui[client]
```

## Play
Once the game is installed you can use the `battleship` command to run it. This 
command will launch the user interface and present you with the main menu.

### Play via CLI
You can launch the game via CLI subcommands too, especially if you want to skip some 
in-game menus.

For example, if your favorite game mode is singleplayer, salvo variant, you can 
quickly get into battle by running `battleship play single --salvo`.

Run `battleship play --help` to discover available options.

## Multiplayer
You can play Battleship TUI with your friends or colleagues via the Internet. Choose 
**Multiplayer** option in the main menu to do this.

### Game account
You may sign up for a multiplayer account or try multiplayer with guest access.

To sign up, run `battleship account signup`. You'll be prompted with your email, 
desired nickname, and a password. Your nickname will be displayed in-game. It should 
contain 7 to 20 characters and be unique. Your password should contain at least 9 
characters.

> [!NOTE]
> Guests given an autogenerated nickname, their game statistics isn't saved. Guest 
> access will work until you log off.


## Screenshots
<details>
<summary>Expand to see more screenshots</summary>

### Main menu
![Main menu](screenshots/main_menu.png)

### Game summary
![Summary](screenshots/summary.png)

### Starting a multiplayer session
![Awaiting](screenshots/multiplayer.png)

### List of game sessions to join
![Sessions](screenshots/sessions.png)
</details>

