JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
track z-axis (layer) on server, use for view init
[peach-cgt.git] / common.coffee
index cec2bc5..3cf6867 100644 (file)
@@ -21,7 +21,7 @@ class GameState
                return unless @hooks[event]?
                for callback in @hooks[event]
                        callback.apply this, args
-       move: (agent, card, x, y) -> # FIXME add pile argument
+       move: (agent, card, x, y, z) -> # FIXME add pile argument
                # FIXME what to do on error?
                return unless @cards[card]? #?.pile?
                #cur_pile = cards[card].pile
@@ -29,8 +29,9 @@ class GameState
 
                @cards[card].x = x
                @cards[card].y = y
+               @cards[card].z = z
 
-               @trigger 'move', agent, card, x, y # FIXME add pile argument
+               @trigger 'move', agent, card, x, y, z # FIXME add pile argument
 
        mark: (agent, card, state) ->
                # FIXME what to do on error?