The CTREE is built from the optimized microcode (maturity at CMAT_FINAL), it represents an AST-like tree with C statements and expressions. It can be printed as C code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -H "Authorization: Bearer <APPVEYOR API TOKEN>" -T appveyor.yml https://ci.appveyor.com/api/projects/<OWNER>/<PROJECT>/settings/yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // helpers | |
| function areEnemies(robot, sighted) { | |
| var sightedIsChild = (robot.id == sighted.parentId); | |
| var sightedIsParent = (robot.parentId == sighted.id); | |
| return !(sightedIsChild || sightedIsParent); | |
| }; | |
| function baseStep(robot) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Robot = function(robot) { | |
| this.turnToRight = true; | |
| this.invertedDirection = false; | |
| }; | |
| Robot.prototype.onIdle = function(ev) { | |
| var robot = ev.robot; | |
| if(this.turnToRight == true) { | |
| robot.turn(5); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Robot = function(robot){ | |
| robot.turnLeft(robot.angle % 90); | |
| //robot.turnGunRight(90); | |
| robot.clone(); | |
| this.direction = 1; | |
| }; | |
| Robot.prototype.onIdle = function(ev) { | |
| var robot = ev.robot; | |
| robot.ahead(1); | |
| if (robot.parentId) { |