Created
December 10, 2010 03:40
-
-
Save cosine/735731 to your computer and use it in GitHub Desktop.
EngineYard's Lucky13
This file contains hidden or 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 'rest_client'; require 'json' | |
| def gamble (wager) | |
| JSON.parse(RestClient.get("http://roulette.engineyard.com/")).values[0] == "13" ? wager * 36 : 0 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment