I hereby claim:
- I am krogon on github.
- I am krogon (https://keybase.io/krogon) on keybase.
- I have a public key ASDIuH6J5uTe2ni_ICqJhNMK5Ruxv4pc3P3VqEIz3XafGAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
045688ea4cd21ea0ad0dfaa81bb13ee0c95fd81207bcd657cb656ab34e5eec7933c85855b38553e49fe99006fd983450506b63de187d314bc7fc0a645fd3d775a2 |
var Robot = function(robot){ | |
robot.turnLeft(robot.angle % 90); | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
if (robot.parentId) { | |
robot.ahead(1); | |
robot.turnGunRight(1); | |
} | |
else { |
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |