Skip to content

Instantly share code, notes, and snippets.

@alindeman
Created December 10, 2010 04:46
Show Gist options
  • Save alindeman/735799 to your computer and use it in GitHub Desktop.
Save alindeman/735799 to your computer and use it in GitHub Desktop.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
public class Lucky13 {
public static double getWinnings(double bet) throws MalformedURLException, IOException {
return (new BufferedReader(new InputStreamReader(((InputStream)(new URL("http://roulette.engineyard.com/").getContent())))).readLine().indexOf("13") != -1) ? 35 * bet : 0;
}
}
@alindeman
Copy link
Author

Late at night, I couldn't keep my naming conventions straight. Made the function name more Java acceptable in a89cfb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment