Skip to content

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.

License

Notifications You must be signed in to change notification settings

afreemanio/Rock-Paper-Scissors-Lizard-Spock-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rock-Paper-Scissors-Lizard-Spock CPU vs. CPU Simulator

Contributors Forks Stargazers Issues MIT License LinkedIn

Report Bug · Request Feature

Multithreaded Rock-Paper-Scissors-Lizard-Spock CPU vs. CPU Simulation

Content

About The Project

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.

Logo

Refer to http://en.wikipedia.org/wiki/Rock-paper-scissors-lizard-Spock for more information on the game itself.

Built With

Features

  • 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)

Installation

  1. 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
    
  2. Import it into Intellij IDEA or your Java IDE of choice

  3. Run the application

Alternatively, to run it with the command line only:

  1. 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
    
  2. Navigate to the repository using your terminal of choice

  3. With Java installed, run the command

     javac -d . *.java 
    

    to compile the package

  4. Run the command

     java rockPaperScissorLizardSpock.RockPaperScissorLizardSpock
    

    to run the program

Contributing

Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/CoolNewFeature)
  3. Commit your Changes (git commit -m 'Add some CoolNewFeature')
  4. Push to the Branch (git push origin feature/CoolNewFeature)
  5. Open a Pull Request

Contact

Andrew Freeman - @afreemanio - [email protected]

Project Link: https://github.com/afreemanio/Rock-Paper-Scissors-Lizard-Spock-Simulator

License

Copyright (c) 2021 Andrew Freeman

Distributed under and usage provided for under the GNU GPL-3.0 License. See LICENSE for the full details.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages