queue = game.p2_queue
game.p2_waiter = false
game.p2_queue = []
- timeout 2000, -> # FIXME remove this delay for player 2 (just here to test lag handling)
- waiter.writeHead 200, 'Content-Type': 'text/javascript'
- waiter.end JSON.stringify queue
+ waiter.writeHead 200, 'Content-Type': 'text/javascript'
+ waiter.end JSON.stringify queue
# this marks a game as "dirty" and makes sure there's exactly one timeout
# that'll respond to any clients that are waiting, and now have messages.