The rules of rock paper scissors are fairly simple:
- Scissors/Rock: Player1 Loses
- Scissors/Paper: Player1 Wins
- Scissors/Scissors: Tie
- Paper/Rock: Player1 Wins
- Paper/Scissors: Player1 Loses
- Paper/Paper: Tie
- Rock/Paper: Player1 Loses
- Rock/Scissors: Player1 Wins
- Rock/Rock: Tie
This Code Kata is to implement a modules that meets these rules.
This codespace environment should be setup properly (via vscode devcontainers - see the devcontainer.json file). This includes the ability to debug, check code coverage, and calculate complexity.
If you want to get the tooling installed locally, you have 2 options:
- Use the SE team's
se-tup
utility (here), and runse-tup install gtest
- Manually get the following programs installed (this snippet shows using
apt
but some are fetchable viasnap
or other means):
sudo apt install gcovr pmccabe cmake gcc g++ gdb
To build and run:
cmake -S . -B build && cmake --build build --target run-tests
There is a branch with a set of examples named solution
.