Skip to content

Instantly share code, notes, and snippets.

Avatar

John W Quarles johnwquarles

View GitHub Profile
@johnwquarles
johnwquarles / gist:9800adbe5d2e19ff7227
Created May 17, 2015
rudimentary alert-window blackjack (dealer goes first..?)
View gist:9800adbe5d2e19ff7227
var API_URL = "http://deckofcardsapi.com/api";
var API_PROXY = "https://jsonp.afeld.me/?url=";
var game;
startGame();
// to start off the game, make a new game object (with attributes that will preserve the game's state, ie, who has what cards) and then
// ask the API for a deck ID to assign to the game object's deck (we need to use it for subsequent calls to the API, when we ask it for cards from
// our deck).
// We can't do anything until we have that deck ID, but the program would happily continue on prior to actually loading the object that contains the
View whack_a_link.js
You can’t perform that action at this time.