A silly little rock paper scissors game.
I created this repository a while ago, and then I never did anything with it. I'm in my C phase right now and when I found this while scrolling through my GitHub, I knew I just had to do something with it.
I'm sure most know the rules of Rock Paper Scissors, but just in case you don't, here's how it works:
First, you pick a move out of either rock, paper, or scissors. Note that the
game will only accept the strings rock
, paper
, or scissors
verbatim as
input. That means that inputting the string Rock
will cause an error.
After you pick your move, the computer player will pick its move. Then, the winner will be determined based on the rule that rock beats scissors, scissors beat paper, and paper beats rock. I suppose the reasoning is that rock squishes scissors, scissors cut paper, and paper wraps rock? Some of those don't make a whole ton of sense, but I digress.
You need the following programs to run the code:
- C Compiler
- Ninja
- CMake
You can use the following commands to compile and run the code:
cmake -S . -B build
ninja -C build
build/rps
That's all there is to it!
This is public domain software. Do with it as you please.