Skip to main content

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

Project description

Battle

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.11 or higher

Installation

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

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.

# 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

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.1.2.tar.gz (52.9 kB view details)

Uploaded Source

Built Distribution

battleship_tui-0.1.2-py3-none-any.whl (71.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: battleship_tui-0.1.2.tar.gz
  • Upload date:
  • Size: 52.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-88-generic

File hashes

Hashes for battleship_tui-0.1.2.tar.gz
Algorithm Hash digest
SHA256 eb66d7c02c1244215a8ef5a29ef5d648f9da310e60850669a8eb96c9e364b0cd
MD5 c9aa5161b4c81ece89af31b479e4564b
BLAKE2b-256 cd42e9ce0e4a9d1303df1f8604daf659657e4d030dd1967cc89fe58834c67d09

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: battleship_tui-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 71.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-88-generic

File hashes

Hashes for battleship_tui-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ecb5178564350e12a0e67cae5bc8df2825faa50a791d332c981452c667e774d2
MD5 b4372fd608e95df9bf70284525098aa6
BLAKE2b-256 ece8e1b8d6176de3baed5d11579e5f838f82a112ecbb15f0568866364dca4c5d

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