update_pile_views()
-# also makes sure all non-piled cards are instantiated FIXME rename
+# also makes sure all non-piled cards are instantiated
update_pile_views = ->
ps = {}
for card in state.cards
state = window.game_model.new me
state.on 'move', (agent, card, x, y, z, pile) ->
- update_pile_views()
+ update_pile_views() # ensures instantiation of all visible cards
if state.cards[card].view? # the card is visible
# show it face down if it's in the other player's hand
state.cards[card].view.toggleClass 'your_hand', in_your_hand state.cards[card]