Report Bug
·
Request Feature
Multithreaded Rock-Paper-Scissors-Lizard-Spock CPU vs. CPU Simulation
This is a command-line interface program that demonstrates the simplicity and capability of multithreading/concurrency techniques in the Java language. It allows any computer to simulate and play the game of Rock-Paper-Scissors-Lizard-Spock against itself.
This program uses multiple threads and the principles of OOP to simulate "simultaneous play", as would occur in a real-life game of Rock-Paper-Scissors-Lizard-Spock.
It features two separate simulated AI players (each running on a separate thread) which each decide on a random move to play, before counting down and throwing their move independently of each other.
Refer to http://en.wikipedia.org/wiki/Rock-paper-scissors-lizard-Spock for more information on the game itself.
- Use of multithreading/concurrency to allow for simultaneous play
- Demonstration of Java OOP features and principles, as well as enumerated types, switch statements, and package management
- Command line output and statistics being held in a primary (separate from the players) thread provides ample opportunity for GUI overlay and statistics generation
- Calculation of each player's moves separately, including the option to set the random seed for each player (via manipulation of source code)
-
Download the repository files (project) from the download section or clone this project by typing in the bash the following command:
git clone https://github.com/afreemanio/Rock-Paper-Scissors-Lizard-Spock-Simulator.git
-
Import it into Intellij IDEA or your Java IDE of choice
-
Run the application
Alternatively, to run it with the command line only:
-
Download the repository files (project) from the download section or clone this project by typing in the bash the following command:
git clone https://github.com/afreemanio/Rock-Paper-Scissors-Lizard-Spock-Simulator.git
-
Navigate to the repository using your terminal of choice
-
With Java installed, run the command
javac -d . *.java
to compile the package
-
Run the command
java rockPaperScissorLizardSpock.RockPaperScissorLizardSpock
to run the program
Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/CoolNewFeature
) - Commit your Changes (
git commit -m 'Add some CoolNewFeature'
) - Push to the Branch (
git push origin feature/CoolNewFeature
) - Open a Pull Request
Andrew Freeman - @afreemanio - [email protected]
Project Link: https://github.com/afreemanio/Rock-Paper-Scissors-Lizard-Spock-Simulator
Copyright (c) 2021 Andrew Freeman
Distributed under and usage provided for under the GNU GPL-3.0 License. See LICENSE for the full details.