Skip to content

Instantly share code, notes, and snippets.

@thinsoldier
Created August 18, 2016 22:14
Show Gist options
  • Save thinsoldier/09ec23cbbfd78f262493bfbdf53504ea to your computer and use it in GitHub Desktop.
Save thinsoldier/09ec23cbbfd78f262493bfbdf53504ea to your computer and use it in GitHub Desktop.
var count = 0;
function cc(card) {
// Only change code below this line
data = {};
for ( x of [2,3,4,5,6] ){ data[x] = 1; }
for ( x of [7,8,9] ){ data[x] = 0; }
for ( x of [10,'J','Q','K','A'] ){ data[x] = -1; }
count += data[card];
return ( count > 0 ) ? count+" Bet" : count+" Hold";
// Only change code above this line
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment