-
-
Save Firvagor/4204827 to your computer and use it in GitHub Desktop.
Revisions
-
Walko revised this gist
Dec 4, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ Robot.prototype.onScannedRobot = function(ev) { robot.stop(); robot.fire(); robot.turn(15); robot.ahead(0,5); robot.rotateCannon(-30); robot.fire(); -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -38,7 +38,7 @@ Robot.prototype.onScannedRobot = function(ev) { }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.fire(5); robot.turn(200); robot.ahead(500); // trying to run away robot.clone(robot); -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(1); robot.rotateCannon(360); robot.ahead(1); //robot.back(1000); @@ -31,7 +31,7 @@ Robot.prototype.onScannedRobot = function(ev) { robot.stop(); robot.fire(); robot.turn(15); robot.ahead(50); robot.rotateCannon(-30); robot.fire(); -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(1); robot.rotateCannon(360); // robot.ahead(1); //robot.back(1000); @@ -30,8 +30,8 @@ Robot.prototype.onScannedRobot = function(ev) { //robot.ahead(5000); robot.stop(); robot.fire(); robot.turn(15); robot.ahead(20); robot.rotateCannon(-30); robot.fire(); -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -47,9 +47,9 @@ Robot.prototype.onRobotCollision = function(ev) { Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(10 - ev.bulletBearing); robot.back(70); robot.ahead(70); }; -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -41,14 +41,16 @@ Robot.prototype.onRobotCollision = function(ev) { robot.fire(2); robot.turn(200); robot.ahead(500); // trying to run away robot.clone(robot); }; Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(50 - ev.bulletBearing); robot.back(50); robot.ahead(50); }; //Robot.prototype.onScannedRobot = function(ev) { -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -48,6 +48,7 @@ Robot.prototype.onHitByBullet = function(ev) { robot.turn(50 - ev.bulletBearing); robot.back(50); robot.ahead(50); robot.clone(robot); }; //Robot.prototype.onScannedRobot = function(ev) { -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -46,8 +46,8 @@ Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(50 - ev.bulletBearing); robot.back(50); robot.ahead(50); }; //Robot.prototype.onScannedRobot = function(ev) { -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,9 +7,9 @@ var Robot = function(robot) { Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(1); robot.rotateCannon(360); robot.ahead(1); //robot.back(1000); -
Walko revised this gist
Dec 4, 2012 . No changes.There are no files selected for viewing
-
Walko revised this gist
Dec 4, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,7 @@ Robot.prototype.onRobotCollision = function(ev) { Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(50 - ev.bulletBearing); robot.back(20); robot.ahead(20); -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -45,8 +45,9 @@ Robot.prototype.onRobotCollision = function(ev) { Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(10 - ev.bulletBearing); robot.back(20); robot.ahead(20); }; //Robot.prototype.onScannedRobot = function(ev) { -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ Robot.prototype.onScannedRobot = function(ev) { robot.stop(); robot.fire(); robot.turn(25); robot.ahead(10); robot.rotateCannon(-30); robot.fire(); -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 10 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -21,14 +21,19 @@ Robot.prototype.onIdle = function(ev) { Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; // robot.fire(4); // robot.rotateCannon(0,1); // robot.fire(1); // robot.rotateCannon(0,1); //robot.rotateCannon(10); // robot.turn(50); //robot.ahead(5000); robot.stop(); robot.fire(); robot.turn(25); robot.ahead(50); robot.rotateCannon(-30); robot.fire(); }; Robot.prototype.onRobotCollision = function(ev) { -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,8 +7,10 @@ var Robot = function(robot) { Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(10); robot.rotateCannon(360); robot.ahead(10); //robot.back(1000); // robot.rotateCannon(360); -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,6 +20,9 @@ Robot.prototype.onIdle = function(ev) { Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(4); robot.rotateCannon(0,1); robot.fire(1); robot.rotateCannon(0,1); //robot.rotateCannon(10); // robot.turn(50); //robot.ahead(5000); @@ -36,7 +39,7 @@ Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(40 - ev.bulletBearing); robot.back(50); }; //Robot.prototype.onScannedRobot = function(ev) { -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -36,7 +36,7 @@ Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(40 - ev.bulletBearing); robot.back(10); }; //Robot.prototype.onScannedRobot = function(ev) { -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(1000); robot.rotateCannon(360); //robot.back(1000); // robot.rotateCannon(360); // robot.turn(20); @@ -19,7 +19,7 @@ Robot.prototype.onIdle = function(ev) { Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(4); //robot.rotateCannon(10); // robot.turn(50); //robot.ahead(5000); -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(1000); robot.rotateCannon(360); robot.fire(1); //robot.back(1000); // robot.rotateCannon(360); // robot.turn(20); @@ -27,7 +28,7 @@ Robot.prototype.onScannedRobot = function(ev) { }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.fire(2); robot.turn(200); robot.ahead(500); // trying to run away }; -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,18 +9,19 @@ Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(1000); robot.rotateCannon(360); //robot.back(1000); // robot.rotateCannon(360); // robot.turn(20); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(3); //robot.rotateCannon(10); // robot.turn(50); //robot.ahead(5000); }; -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,8 +18,8 @@ Robot.prototype.onIdle = function(ev) { Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(3); //robot.turn(50); robot.ahead(5000); @@ -37,15 +37,15 @@ Robot.prototype.onHitByBullet = function(ev) { robot.back(1000); }; //Robot.prototype.onScannedRobot = function(ev) { // var robot; // var robot1; //var scanned =ev.scannedRobot; //robot = ev.robot; //robot.fire(5); // robot1.clone(robot); // if(scannedRobot !== robot1.parentId && scanned.parentId !== robot1.id) // robot1.fire(2); //}; -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 7 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -33,16 +33,19 @@ Robot.prototype.onRobotCollision = function(ev) { Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(40 - ev.bulletBearing); robot.back(1000); }; Robot.prototype.onScannedRobot = function(ev) { var robot; // var robot1; var scanned =ev.scannedRobot; robot = ev.robot; robot.fire(5); // robot1.clone(robot); // if(scannedRobot !== robot1.parentId && scanned.parentId !== robot1.id) // robot1.fire(2); }; -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 15 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,11 +7,12 @@ var Robot = function(robot) { Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(1000); robot.rotateCannon(360); robot.back(1000); robot.rotateCannon(360); robot.turn(20); }; @@ -25,6 +26,7 @@ Robot.prototype.onScannedRobot = function(ev) { }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.fire(5); robot.turn(200); robot.ahead(500); // trying to run away }; @@ -35,3 +37,12 @@ Robot.prototype.onHitByBullet = function(ev) { robot.back(100); robot.clone(robot); }; Robot.prototype.onScannedRobot = function(ev) { var robot; var scanned =ev.scannedRobot; robot = ev.robot; robot.fire(5); //if(scanned.id !== robot.parentId && scanned.parentId !== robot.id) { robot.fire(3);}esle{ robot.fire(3);} }; -
Walko revised this gist
Dec 4, 2012 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Robot.prototype.onIdle = function(ev) { robot.rotateCannon(360); robot.back(100); robot.rotateCannon(360); robot.clone(robot); }; @@ -19,6 +20,7 @@ Robot.prototype.onScannedRobot = function(ev) { robot.fire(); robot.turn(50); robot.ahead(5000); }; Robot.prototype.onRobotCollision = function(ev) { @@ -31,4 +33,5 @@ Robot.prototype.onHitByBullet = function(ev) { robot = ev.robot; robot.turn(180 - ev.bulletBearing); robot.back(100); robot.clone(robot); }; -
Walko revised this gist
Dec 4, 2012 . No changes.There are no files selected for viewing
-
Walko created this gist
Dec 4, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ //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); robot.rotateCannon(360); robot.back(100); robot.rotateCannon(360); }; Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); robot.turn(50); robot.ahead(5000); }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.turn(200); robot.ahead(500); // trying to run away }; Robot.prototype.onHitByBullet = function(ev) { var robot; robot = ev.robot; robot.turn(180 - ev.bulletBearing); robot.back(100); };