Originally posted by VorpalF2F
Thanks!
I've forked it, and will clone it to my desktop to play with it.
I know zilch about JavaScript, but this will be a good opportunity to learn it.
Beware! If you are coming from c++ (I don't know python) it might be cumbersome.:f_ugly: All the terms mean a little bit of a different thing than in c++.
I always use the Javascript Reference from mozilla.org
The cards are represented by numbers actually. A combination of a prime-number for the rank and a prime-number for the suit. The first (right) byte contains the prime number for the rank and the second byte contains the prime number for the suit.
SSS RRRRRR
0b00000111_00111111
R contains the prime for the rank
S contains the prime for the suit
0's are unused bits.
Ace of spades would be Card(41,2). I put in a function for you makeCard() to make cards with strings like "As".