Commit 1c61de4f authored by Eben Blaisdell's avatar Eben Blaisdell

safe strats

parent ca4ada8c
......@@ -504,20 +504,20 @@ Block.prototype.onTurn =function (){
funce.exec("onTurn",[],this.interp);
}
Block.prototype.sendMessage = function(dir){
//console.log("onMessage");
//console.log(dir);
console.log("sendMessage");
console.log(dir);
dir = parseInt(dir);
dir = this.untransformDir(dir);
messagex = this.x + Block.dx(dir);
messagey = this.y + Block.dy(dir);
if(messagex>=0 && messagey>=0 && messagex<this.game.width && messagey<this.game.height && this.game.board[messagex][messagey] != null) {
this.game.board[messagex][messagey].onMessage(((dir+2)%4).toString());
this.game.board[messagex][messagey].onMessage((dir+2)%4);
}
}
Block.prototype.onMessage = function(dir){
console.log("onMessageBegin");
//console.log(dir);
funce.exec("onMessage",[this.transformDir(parseInt(dir)).toString()],this.interp);
funce.exec("onMessage",[this.transformDir(dir).toString()],this.interp);
console.log("onMessageBegin");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment