Jump to content

Playing cards: Difference between revisions

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()
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.