(function(){var n;n=io(socket_server_url),n.on("connected",function(){return function(e){return n._pvp_id=e.user_id}}(this)),n.on("room-created",function(){return function(n){return cc.director.runScene(cc.TransitionFade.create(1,new App.Scenes.PVPLandingScene(n),new cc.Color(0,0,0)))}}(this)),n.on("invalid-room",function(){return function(){return alert("The room is invalid or full.")}}(this)),n.on("left-player",function(){return function(){return alert("Your partner left this game.")}}(this)),n.on("pvp-started",function(){return function(n){return cc.director.runScene(cc.TransitionFade.create(1,new App.Scenes.PVPStageScene(n),new cc.Color(0,0,0)))}}(this)),n.on("reset-lamb",function(){return function(e){var t;return t=n._pvp_stage_scene.get_lamb(e.id),t.reset(e)}}(this)),n.on("add-lamb",function(){return function(e){return n._pvp_stage_scene.add_lamb(e)}}(this)),n.on("pvp-won",function(){return function(e){var t;return t=n._pvp_stage_scene.get_lamb(e.lamb_id),n._pvp_stage_scene.trigger("pvp-won",t)}}(this)),n.on("pvp-lost",function(){return function(e){var t;return t=n._pvp_stage_scene.get_lamb(e.lamb_id),n._pvp_stage_scene.trigger("pvp-lost",t)}}(this)),window.$socket=n}).call(this);