X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=server.coffee;h=4ae7fe779b718916a55b3491b367e8ca0a97f148;hb=e39c3d01d9c40b425168f1f8dcb2d9ddef975808;hp=94672a9696236e13c7f08b7c7747295a8f3e8986;hpb=b828a190d7672e89aa84801b66edb0d82076e45d;p=peach-cgt.git diff --git a/server.coffee b/server.coffee index 94672a9..4ae7fe7 100644 --- a/server.coffee +++ b/server.coffee @@ -161,8 +161,8 @@ new_game = (id) -> game.p1_queue = [] game.p2_queue = [] - game.on 'move', (agent, card, x, y) -> - forward_events.call this, 'move', agent, card, x, y + game.on 'move', (agent, card, x, y, z) -> + forward_events.call this, 'move', agent, card, x, y, z game.on 'mark', (agent, card, state) -> forward_events.call this, 'mark', agent, card, state game.on 'flip', (agent, card, state) -> @@ -185,15 +185,18 @@ test_init = -> timeout 4000, -> test_game.set_cards 'server', [ { text: "Wildabeast 2/2", x: 220, y: 200, owner: 'p2'} - { text: "Wild beast 2/2", x: 350, y: 200, owner: 'p2'} + { text: "Boar 2/2", x: 360, y: 200, owner: 'p2', pile: 'p2_discard'} { text: "Angora bunny 1/1", x: 500, y: 200, owner: 'p2'} - { text: "Ambulatory Cactus 2/1", x: 650, y: 200, owner: 'p2'} + { text: "Ambulatory Cactus 2/1", x: 660, y: 200, owner: 'p2'} { text: "Ent 0/5", x: 800, y: 200, owner: 'p2'} { text: "Carnivore 2/1", x: 220, y: 420, owner: 'p1'} - { text: "Herbivore 1/2", x: 350, y: 420, owner: 'p1'} - { text: "Stone Wall 0/10", x: 500, y: 420, owner: 'p1'} - { text: "Log 0/1", x: 650, y: 420, owner: 'p1'} - { text: "Ent 0/5", x: 800, y: 420, owner: 'p1'} + { text: "Herbivore 1/2", x: 360, y: 420, owner: 'p1'} + { text: "Stone Wall 0/10", x: 500, y: 420, owner: 'p1', pile: 'p1_draw', flipped: true} + { text: "Log 0/1", x: 660, y: 420, owner: 'p1', pile: 'p1_draw', flipped: true} + { text: "Ent 0/5", x: 800, y: 420, owner: 'p1', pile: 'p1_draw', flipped: true} + { text: "Barricade 0/10", x: 500, y: 420, owner: 'p1', pile: 'p1_draw', flipped: true} + { text: "O(log(n)) 0/1", x: 660, y: 420, owner: 'p1', pile: 'p1_draw', flipped: true} + { text: "Fence 0/5", x: 800, y: 420, owner: 'p1', pile: 'p1_draw', flipped: true} ] test_init()