Playing cards: Difference between revisions

Content added Content deleted
No edit summary
Line 635:
constructor: (@pip, @suit) ->
toString: -=> "#{@pip}#{@suit}"
 
class Deck
Line 648:
@cards.push new Card(pip, suit)
toString: -=> "[#{@cards.join(', ')}]"
shuffle: -=>
for card, i in @cards
randomCard = parseInt @cards.length * Math.random()