Skip to main content

Battleship TUI is an implementation of the popular paper-and-pen Battleship game for your terminal.

Project description

Battle PyPI - Version PyPI - Python Version

Battleship TUI

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

[!NOTE] Please consider this an alpha-version software. You can still use it and enjoy it but note that things may break and data might get lost. Feel free to fill in an issue if you've found a bug or have a question.

Features

  • Singleplayer mode
  • Multiplayer mode (via Internet)
  • Customizable game rules
  • Customizable UI
  • Launch via CLI
  • Game statistics

Planned features

  • Ranking system
  • Account management

Requirements

  • A terminal (Windows PowerShell is fine too, see below)
  • Python 3.10 or higher

[!NOTE] If you're on Windows, make sure to install the newer Windows Terminal. The older Windows PowerShell can't properly display some symbols.

Installation

If you're on Linux or macOS, most probably you already have Python installed. You can verify it by running $ python --version. If your Python version is lower than required, try installing the latest operating system updates.

If you're on Windows, you can download and install the latest Python release from the official site.

The recommended way to install and update the game is via pipx (especially if you don't know anything about virtual environments).

Install pipx, then install the game.

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.

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

Expand to see more screenshots

Main menu

Main menu

Game summary

Summary

Starting a multiplayer session

Awaiting

List of game sessions to join

Sessions

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

battleship_tui-0.24.0.tar.gz (67.4 kB view details)

Uploaded Source

Built Distribution

battleship_tui-0.24.0-py3-none-any.whl (93.9 kB view details)

Uploaded Python 3

File details

Details for the file battleship_tui-0.24.0.tar.gz.

File metadata

  • Download URL: battleship_tui-0.24.0.tar.gz
  • Upload date:
  • Size: 67.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for battleship_tui-0.24.0.tar.gz
Algorithm Hash digest
SHA256 e9a9880752f8a970f4279242b31ac1c54f53edac51b34535e4cb229d13163b36
MD5 b80aaf4b4fe386d796ae55da84654952
BLAKE2b-256 31dd514010f45f8ab219544a086defb7a308fda00c0847cc4ce2c97341bcf957

See more details on using hashes here.

Provenance

File details

Details for the file battleship_tui-0.24.0-py3-none-any.whl.

File metadata

  • Download URL: battleship_tui-0.24.0-py3-none-any.whl
  • Upload date:
  • Size: 93.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for battleship_tui-0.24.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2bb4a113e288f9895c43006884c47405c0dd8bfd599c98daf78188fb1257df3
MD5 cd0d6736d8fb2dac478c1a6887940fa5
BLAKE2b-256 61328affc0cb2c05831c434e84a2847dda079a408f5e5f2617396401ea122ae2

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page