Created
March 6, 2015 02:32
-
-
Save lee-dohm/a7999434b3faf2c124ec to your computer and use it in GitHub Desktop.
Java Random for Rock, Paper, Scissors, Lizard, Spock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
Random random = new Random(); | |
int number = random.nextInt(5); // Rock = 0, Paper = 1, Scissors = 2, Lizard = 3, Spock = 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment