Skip to content

Instantly share code, notes, and snippets.

@aa2kb
Created February 13, 2017 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aa2kb/5ffe0693755197e8e24cdc888f7b224a to your computer and use it in GitHub Desktop.
Save aa2kb/5ffe0693755197e8e24cdc888f7b224a to your computer and use it in GitHub Desktop.
Cards-class
var numbers = ['ace','two','three','four','five','six','seven','eight','nine','ten','jack','queen','king'];
var suit = ['clubs','diamonds','hearts','spades'];
var deckSize = numbers.length * suit.length;
var $thedeck = [];
var playerSet = [];
const deck = class cardSet {
constructor() {
this.cards = [];
this.dealt = [];
var c = 0;
for (var j=0; j<suit.length; j++) {
for (var i=0; i<numbers.length; i++) {
this.cards[c] = numbers[i] + " of " + suit[j];
c++;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment