JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
add agent argument to set_cards
[peach-cgt.git] / server.coffee
index ab0ca9f..29cddb1 100644 (file)
@@ -169,15 +169,15 @@ new_game = (id) ->
                forward_events.call this, 'mark', agent, card, state
        game.on 'flip', (agent, card, state) ->
                forward_events.call this, 'flip', agent, card, state
-       game.on 'set_cards', (cards) ->
-               forward_events.call this, 'set_cards', cards
+       game.on 'set_cards', (agent, cards) ->
+               forward_events.call this, 'set_cards', agent, cards
 
        return game
 
 test_init = ->
        test_game = new_game 'test'
        timeout 4000, ->
-               test_game.set_cards [
+               test_game.set_cards 'server', [
                        { text: "Wildabeast 2/2", x: 20, y: 140}
                        { text: "Wild beast 2/2", x: 150, y: 140}
                        { text: "Angora bunny 1/1", x: 300, y: 140}