Crates.io | pong-cli |
lib.rs | pong-cli |
version | 1.0.1 |
source | src |
created_at | 2019-10-26 17:03:48.740056 |
updated_at | 2019-10-27 18:49:55.559419 |
description | Play pong from the command-line! |
homepage | |
repository | https://github.com/Noah2610/pong-cli |
max_upload_size | |
id | 175930 |
size | 115,204 |
A CLI pong clone.
Uses the crossterm
and specs
crates.
Play pong from your terminal!
Play against a ball-chasing AI opponent, locally against another player,
or let two AIs fight it out!
Everything is configurable, see the Configuration section.
You'll need to have cargo
and rust
version 1.38.0 or higher installed.
Download, build, and install from crates.io with ...
cargo install pong-cli
Then you should be able to run the game from anywhere with ...
pong-cli
Binaries for Linux and Windows are available from the releases GitHub page.
From there, simply download the .zip
file for your platform,
extract the archive and run the executable:
pong-cli
for Linux (from terminal),PongCLI.desktop
file from your GUI file-managerpong-cli.exe
for WindowsTo build the game from source, you'll need to clone the repo and compile the game using cargo
.
You'll need to have rust
version 1.38.0 or higher installed.
Clone the repository with ...
git clone https://github.com/Noah2610/pong-cli
cd
into the project's root with cd pong-cli
,
Then you can build and run the game with ...
cargo run --release
You can also install it with cargo
, so it is available everywhere from the command-line ...
cargo install --path .
Settings are read from a .ron
file at one of the following locations (checked in order):
./settings.ron
./pong-cli.ron
$HOME/.pong-cli.ron
$HOME/.config/pong-cli/settings.ron
(for Linux),$HOME/AppData/Roaming/pong-cli/settings.ron
(for Windows)$HOME/Library/Preferences/pong-cli/settings.ron
(for MacOS)To start, copy the default settings.ron
file to one of these locations.
Once the settings.ron
file is in place, you can edit it as you wish.
The file itself is commented, so just open it to see all available settings.
On Linux, you can enter the following (if you have curl
installed), to
automatically create the proper directory/directories and download the latest settings.ron
file:
mkdir -p ~/.config/pong-cli
curl https://raw.githubusercontent.com/Noah2610/pong-cli/master/settings.ron > ~/.config/pong-cli/settings.ron
Feature | Default? | Description |
---|---|---|
random |
YES | Enables randomization for ball spawning directions. See settings.ron file for configuration. |
style |
YES | Adds configurable color and text styling (bold, underline, etc.) to the game. See settings.ron file for configuration. |
nightly |
no | Enables specs/nightly feature for debug/development purposes. |
Use --no-default-features
to disable all features when building with cargo build/run
.