X-Git-Url: https://jasonwoof.com/gitweb/?p=peach-cgt.git;a=blobdiff_plain;f=client.coffee;h=6da0968d083b43cddcf74502702360ac3f9b7e57;hp=0c54a71fb4064273e50fd223f92a2ef21124b5ec;hb=2931445ceb51e471291c9a8fd90ffa0d67b3d801;hpb=f12edd687531576f662976ccb4d24a9f5cd42fd9
diff --git a/client.coffee b/client.coffee
index 0c54a71..6da0968 100644
--- a/client.coffee
+++ b/client.coffee
@@ -298,7 +298,7 @@ init_card_designer = ->
container.append ul
- submit = $ $ "
Done
"
+ submit = $ $ "Done
"
submit.bind 'click', ->
$('#deck_designer').remove()
show_message cards_in_deck
@@ -310,15 +310,17 @@ init_card_designer = ->
pile: "#{state.agent}_draw"
x: 0
y: 0
- z: next_card_z()
flipped: true
}
cards.push card
- cards.push card
- cards.push card
- cards.push card
+ cards.push $.extend {}, card # clone
+ cards.push $.extend {}, card # clone
+ cards.push $.extend {}, card # clone
+ # asign z-index in random order
cards.shuffle()
+ for card in cards
+ card.z = next_card_z()
show_message cards
# let server assign card numbers