Photo of the game running Simple Snake Game in C++ with SFML
Clone this repository
using git
~ $ git clone https://github.com/Renan2010/RLSnake.git
Or using github-cli
Note
To use github-cli
you need to allocate your github account, otherwise it won't work.
~ $ gh repo clone Renan2010/RLSnake
Enter the RLSnake
directory
~ $ cd RLSnake
And run ninja to compile this game
~/RLSnake $ ninja -j $(nproc)
Execute RLsnake
~/RLSnake $ ./RLSnake
And enjoy :)
Button | Action |
---|---|
W,A,S,D | Move |
What is $(nproc)
?
$(nproc)
is the total number of cores, plus the threads on your machine/PC, the more cores, the faster the compilation
For exanple:
My PC is an Intel Core i5-2400 4C/4T
~ $ nproc
Output: 4
Other example AMD Ryzen 9 9950x 16C/32T <- best CPU for multi-core
~ $ nproc
Output: 32
in short, $(nproc)
will take the cpu cores "automatically"