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
@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?