Skip to content

A networked version of paper soccer game in modern console supporting "weird" Unicode characters.

License

Notifications You must be signed in to change notification settings

MateuszJanda/paper-soccer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A networked version of paper soccer game in modern console supporting "weird" Unicode characters.

Topics

Resources

License

Stars

Watchers

Forks