Skip to content

Instantly share code, notes, and snippets.

Created June 10, 2016 10:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/85be6886678f8090ab62303218d9ca9e to your computer and use it in GitHub Desktop.
Save anonymous/85be6886678f8090ab62303218d9ca9e to your computer and use it in GitHub Desktop.
options = ["Small", "Lose a Spin", "Small", "Tiny", "Large", "Lose a Spin", "Small", "Large", "Lose a Spin", "Spin Again"];
1.upto(10) do |i|
puts "starting trial #{i}"
1.upto(3) do |spin|
try_spin(spin)
end
end
def try_spin(s)
puts "trying spin #{spin}"
result = rand(10)
puts "you scored a #{options[result]}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment