Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-cgt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add agent argument to set_cards
[peach-cgt.git]
/
client.coffee
diff --git
a/client.coffee
b/client.coffee
index
fbe2815
..
63fd6c6
100644
(file)
--- a/
client.coffee
+++ b/
client.coffee
@@
-120,11
+120,13
@@
init = ->
@cards[card].view.toggleClass 'flipped', state
if agent is me
tell_server ['flip', agent, card, state]
@cards[card].view.toggleClass 'flipped', state
if agent is me
tell_server ['flip', agent, card, state]
- state.on 'set_cards', (cards) ->
+ state.on 'set_cards', (agent, cards) ->
# FIXME add agent arg and tell server if it's not us
$('.card').remove()
for card in cards
instantiate_card card
# FIXME add agent arg and tell server if it's not us
$('.card').remove()
for card in cards
instantiate_card card
+ if agent is me
+ tell_server ['set_cards', agent, cards]
# timeout so browser will stop showing that we're loading
timeout 1, poll_for_updates
# timeout so browser will stop showing that we're loading
timeout 1, poll_for_updates