Skip to content

Latest commit

 

History

History
76 lines (63 loc) · 1.67 KB

README.md

File metadata and controls

76 lines (63 loc) · 1.67 KB

paper-soccer

A networked version of paper soccer game in modern console.

paper-soccer

Requirements

Tested on:

  • gcc with C++20 support
  • cmake (3.18)
  • googletest (1.12.1)
  • protobuf (libprotobuf-dev package) (3.12.4)
  • protoc (protobuf-compiler package) (3.12.4) - a command line tool
  • boost (libboost-all-dev package) (1.74)
    • boost.asio
    • boost.program_options
  • ncurses (libncurses-dev package) (6.3)
  • also terminal (e.g. gnome-terminal) supporting font fallback because "weird" Unicode characters are used

Installation

git clone https://github.com/MateuszJanda/paper-soccer --recursive

cd paper-soccer
cmake CMakeLists.txt
make

# To run tests
make runTests
./runTests

Example

Run as server and wait for connection (default port 8787)

./paper-soccer --wait

# Equivalent
./paper-soccer --wait --port 8787

Connect to localhost server

./paper-soccer --connect localhost

# Equivalent
./paper-soccer --connect localhost --port 8787

Game control

Key Direction
Enter End turn
u Undo player move
n Start new game, when this game end
Ctrl+c Exit

Ball movements

Ball placement can be changed by mouse or keyboard.

Key Direction
w Top
x Bottom
a Left
d Right
q Top-Left
e Top-Right
z Bottom-Left
c Bottom-Right

Code style settings

clang-format -style='{BasedOnStyle: WebKit, Cpp11BracedListStyle: true, SpaceBeforeCpp11BracedList: false}' -i *.?pp