SeaBattle/rust/sea_battle_cli_player
Pierre Hubert 600c55bebe
All checks were successful
continuous-integration/drone/push Build is passing
Merge pull request 'Update Rust crate clap to 4.5.3' (#164) from renovate/clap-4.x into master
Reviewed-on: #164
2024-03-22 06:56:06 +00:00
..
img Improve READMEs 2022-10-17 20:25:19 +02:00
src Update Rustls dependencies 2024-01-17 19:08:38 +01:00
Cargo.toml Merge pull request 'Update Rust crate clap to 4.5.3' (#164) from renovate/clap-4.x into master 2024-03-22 06:56:06 +00:00
README.md Update READMEs 2022-10-17 20:29:41 +02:00

Sea battle cli player

Build Status Crate Documentation

A sea battle shell client player for the sea_battle_backend crate, based on the tui library.

Available play modes

  • 🤖 Play against bot (this mode does not require any Internet connection, a local server is automatically spawn)
  • 🎲 Play against a random player
  • Create play invite (online). In this mode, the server returns an invitation code to give to the opponent
  • 🎫 Accept play invite (online)

For the 🤖 bot and create invite modes, game rules can be customized before starting the game.

Installation

You can install the backend using the following command:

cargo install sea_battle_cli_player

Usage

Simply launch using:

sea_battle_cli_player

Offline LAN

If you want to run a local server to play offline LAN games, the cli player can also act as the server:

RUST_LOG=info sea_battle_cli_player -s -l 0.0.0.0:7000

Then all the players must specify the address of this server to use it instead of the default official one:

sea_battle_cli_player -r http://IP_OF_TARGET:7000