For clean Ubuntu 20.04 installation
sudo add-apt-repository universe
sudo apt update
sudo apt install cmake doxygen g++ libboost-test1.67-dev libsfml-dev
mkdir build
cd ./build
cmake ..
make -j4
./app
to run main app
Tests are in ./tests/
Go to docs/
directory
From docs/
doxygen config
This generates html/
and latex/
directories
To view documentation in html open html/index.html
To generate pdf
go to latex/
directory and run:
make pdf
For clean Windows 10 20H2 installation
- Boost
Download and install prebuilt binary (version 1.67 or higher)
https://sourceforge.net/projects/boost/files/boost-binaries/ - CMake
https://cmake.org/download/ - Doxygen
https://www.doxygen.nl/download.html - SFML
Download and put inlib/win
(in project root)
https://www.sfml-dev.org/files/SFML-2.5.1-windows-vc15-64-bit.zip - Microsoft Visual C++
https://visualstudio.microsoft.com/pl/vs/features/cplusplus/
mkdir build
cd build
cmake .. -A x64
./app
- Boost
- CMake
- Doxygen
- SFML
- Up arrow and X are to rotate 90° clockwise.
- Space to hard drop.
- Ctrl and Z are to rotate 90° counterclockwise.
- Down, Left, Right arrows perform soft drop, left shift, and right shift respectively.
Numpad controls:
- 8, 4, 6, and 2 are hard drop, left shift, right shift, and soft drop respectively.
- 1, 5, and 9 are to rotate 90° clockwise.
- 3 and 7 are to rotate 90° counterclockwise.
Action | Point Value |
---|---|
Single | 100 * level |
Double | 300 * level |
Triple | 500 * level |
Tetris | 800 * level |
Soft drop | 1 point per cell |
Hard drop | 2 points per cell |
We use clang-format to ensure that everyone is using the same formatting rules.
We use coding style based on Google C++ Style
But we make following modifications
const int kBufferSize = 128; // Google
const int BUFFER_SIZE = 128; // our style
enum class UrlTableError { // Google
kOk = 0,
kOutOfMemory,
kMalformedInput,
};
enum class UrlTableError { // our style
OK = 0,
OUT_OF_MEMORY,
MALFORMED_INPUT,
};
class MyClass { // Google
public:
...
void FooBar();
};
class MyClass { // our style
public: // access specifier -4 spaces
...
void fooBar(); // tab is 4 spaces wide
};
We use 100 column lines
We use .hpp and .cpp file extensions
We name our files using snake_case format