Created
December 10, 2010 05:38
-
-
Save sgonyea/735831 to your computer and use it in GitHub Desktop.
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
['excon', 'json'].each{|lib| require lib} | |
award = (ARGV[0] || (print "Please Enter Bet Ammount: "; STDIN.gets)).to_i * 35 | |
award = 0 unless "13" == number = JSON.parse(Excon.get("http://roulette.engineyard.com/").body)["winning_number"] | |
puts "OMG WOW (#{number}), YOU SHOULD PLAY AGAIN! You won: #{award}" |
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
['excon', 'json'].each{|lib| require lib} | |
award = (ARGV[0] || (print "Please Enter Bet Ammount: "; STDIN.gets)).to_i * 35 if "13" == number = JSON.parse(Excon.get("http://roulette.engineyard.com/").body)["winning_number"] | |
puts "OMG WOW (#{number}), YOU SHOULD PLAY AGAIN! You won: #{award || 0}" |
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
['excon', 'json'].each{|lib| require lib} | |
puts "You won: $%d! YOU SHOULD PLAY AGAIN! OMG! (#: %d)" % [(award = (ARGV[0] || (print "Please Enter Bet Ammount: "; STDIN.gets)).to_i * 35 if("13" == number = JSON.parse(Excon.get("http://roulette.engineyard.com/").body)["winning_number"])) || 0, number] |
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
require 'excon' | |
puts "You won: $%d! YOU SHOULD PLAY AGAIN! OMG! (#: %d)" % [(award = (ARGV[0] || (print "Please Enter Bet Ammount: "; STDIN.gets)).to_i * 35 if "13" == num = Excon.get("http://roulette.engineyard.com/").body[/\d+/]) || 0, num] |
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
require 'excon' | |
puts "You won: $%d! YOU SHOULD PLAY AGAIN! OMG! (#: %d)" % [(award = (ARGV[0] || (print "Please Enter Bet Ammount: "; STDIN.gets)).to_i *= 35 if "13" == num = Excon.get("http://roulette.engineyard.com/").body[/\d+/]) || 0, num] |
roulette.rb = attempt 1
perlrb_roulette.rb = ach! mein eyes!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want my gist files sorted by when they were added, for github christmas :-(