Created
July 15, 2015 16:21
-
-
Save micronix/802681007c6cf6b216fc to your computer and use it in GitHub Desktop.
Example Random
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
options = ['rock', 'paper', 'scissors'] | |
index = rand(3) | |
computer = options[index] | |
# more compact | |
options = ['rock', 'paper', 'scissors'] | |
computer = options[rand(3)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment