An Object Oriented Design implementation of the famous game Rock Paper Scissors
In order to compile the project, you'll require JDK 11 and Maven build tool to be installed and configured on your PC.
The project can be compiled and the required artifacts can be generated by running the command:
mvn clean install
while being on the root folder rock-paper-scissors
Once compiled, the game can then be started in multiple ways.
- Using Maven
exec
plugin: While being on the root folder rock-paper-scissors, run the command:
mvn exec:java
- Using generated jar file: The game can also be executed directly via the jar file generated in the target folder. While being on the root folder rock-paper-scissors, run the command:
java -jar target/rock-paper-scissors-1.0-jar-with-dependencies.jar
Welcome to the Game of (Rock/Paper/Scissors) xxxxx[;;;;;;;;;>
Ready Player (#One)?
Enter your name: Subzero
Enter number of rounds: 2
Game #1 of 2
Choose your move (Rock, Paper, Scissors): Rock
Subzero chooses ROCK
ShaoKahn chooses PAPER
(Mortal Kombat voice) FATALITY! ShaoKahn WINS!
Game #2 of 2
Choose your move (Rock, Paper, Scissors): Paper
Subzero chooses PAPER
ShaoKahn chooses ROCK
(Mortal Kombat voice) FATALITY! Subzero WINS!