Revisions
-
dlomibao revised this gist
Dec 4, 2012 . No changes.There are no files selected for viewing
-
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 5 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 @@ -68,5 +68,9 @@ Robot.prototype.onHitByBullet = function(ev) { robot.fire(); } }; Robot.prototype.onRobotCollision = function(ev) { var robot = ev.robot; robot.turn(20); robot.ahead(100); // trying to run away }; -
dlomibao 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 @@ -22,7 +22,7 @@ Robot.prototype.onIdle = function(ev) { if(.6>Math.random()){ robot.ahead(go+clo); robot.turn(95); } }; -
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 1 addition and 27 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 @@ -20,12 +20,6 @@ Robot.prototype.onIdle = function(ev) { robot.rotateCannon(90); robot = ev.robot; if(.6>Math.random()){ robot.ahead(go+clo); robot.turn(90); @@ -51,17 +45,6 @@ Robot.prototype.onScannedRobot = function(ev) { robot.rotateCannon(-10); } }; Robot.prototype.onWallCollision= function(ev){ var robot = ev.robot; @@ -72,16 +55,7 @@ Robot.prototype.onWallCollision= function(ev){ robot.rotateCannon(90); robot.back(go); robot.rotateCannon(90); } Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; -
dlomibao 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 @@ -40,7 +40,7 @@ Robot.prototype.onScannedRobot = function(ev) { bFriendly |= ( sr.parentId !=null && sr.parentId==robot.id); if(bFriendly){ robot.back(50); } if(!bFriendly){ robot.fire(); -
dlomibao 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 @@ -28,7 +28,7 @@ Robot.prototype.onIdle = function(ev) { if(.6>Math.random()){ robot.ahead(go+clo); robot.turn(90); } }; -
dlomibao 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 @@ -28,7 +28,7 @@ Robot.prototype.onIdle = function(ev) { if(.6>Math.random()){ robot.ahead(go+clo); robot.turn(-90); } }; -
dlomibao 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 @@ -28,7 +28,7 @@ Robot.prototype.onIdle = function(ev) { if(.6>Math.random()){ robot.ahead(go+clo); robot.turn(-10); } }; -
dlomibao 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 @@ -39,7 +39,9 @@ Robot.prototype.onScannedRobot = function(ev) { var bFriendly = ( robot.parentId !=null && robot.parentId==sr.id); bFriendly |= ( sr.parentId !=null && sr.parentId==robot.id); if(bFriendly){ robot.ahead(50); } if(!bFriendly){ robot.fire(); robot.fire(); -
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 9 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 @@ -12,7 +12,7 @@ var Robot = function(robot) { Robot.prototype.onIdle = function(ev) { var robot = ev.robot; var clo =0 robot.clone(); if(robot.parentId!=null){ clo=-240; } @@ -83,8 +83,14 @@ Robot.prototype.onWallCollision= function(ev){ } Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; if(robot.parentId!=null){ robot.turn(ev.bearing); robot.fire(); robot.fire(); robot.fire(); robot.fire(); robot.fire(); } }; -
dlomibao 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 @@ -20,11 +20,11 @@ Robot.prototype.onIdle = function(ev) { robot.rotateCannon(90); robot = ev.robot; // if(Math.random()>.7){ // robot.turn(50); //} if(.6>Math.random()){ robot.ahead(go+clo); -
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 6 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 @@ -12,7 +12,7 @@ var Robot = function(robot) { Robot.prototype.onIdle = function(ev) { var robot = ev.robot; var clo =0 if(robot.parentId!=null){ clo=-240; } @@ -81,6 +81,10 @@ Robot.prototype.onWallCollision= function(ev){ robot.back(go); robot.rotateCannon(45);*/ } Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; // Turn to wherever the bullet was fired robot.clone(); // so we can see who shot it }; -
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 7 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 @@ -2,6 +2,7 @@ //FightCode can only understand your robot //if its class is called Robot var go=120; var Robot = function(robot) { }; @@ -10,22 +11,25 @@ var Robot = function(robot) { Robot.prototype.onIdle = function(ev) { var robot = ev.robot; var clo =0 robot.clone(); if(robot.parentId!=null){ clo=-240; } robot.rotateCannon(90); robot = ev.robot; if(Math.random()>.7){ robot.turn(50); } if(.6>Math.random()){ robot.ahead(go+clo); robot.turn(-20); } }; Robot.prototype.onScannedRobot = function(ev) { -
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 7 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 @@ -14,6 +14,13 @@ Robot.prototype.onIdle = function(ev) { robot.rotateCannon(90); robot = ev.robot; if(Math.random()>.7){ go=go*-1; robot.turn(50); } if(.6>Math.random()){ robot.ahead(go); robot.turn(-20); -
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 9 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 @@ -22,13 +22,21 @@ Robot.prototype.onIdle = function(ev) { }; Robot.prototype.onScannedRobot = function(ev) { var sr = ev.scannedRobot; var robot = ev.robot; var bFriendly = ( robot.parentId !=null && robot.parentId==sr.id); bFriendly |= ( sr.parentId !=null && sr.parentId==robot.id); if(!bFriendly){ robot.fire(); robot.fire(); robot.rotateCannon(-15); robot.fire(); robot.fire(); robot.rotateCannon(-10); } // robot.fire(); -
dlomibao 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 @@ -29,7 +29,7 @@ Robot.prototype.onScannedRobot = function(ev) { robot.fire(); robot.fire(); robot.rotateCannon(-10); // robot.fire(); -
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 0 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 @@ -23,7 +23,6 @@ Robot.prototype.onIdle = function(ev) { Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; robot.fire(); robot.fire(); robot.rotateCannon(-15); -
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 1 addition 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 @@ -63,10 +63,6 @@ Robot.prototype.onWallCollision= function(ev){ robot.back(go); robot.rotateCannon(45);*/ } -
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 4 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 @@ -10,9 +10,8 @@ var Robot = function(robot) { Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.clone(); robot.rotateCannon(90); robot = ev.robot; if(.6>Math.random()){ @@ -24,12 +23,15 @@ Robot.prototype.onIdle = function(ev) { Robot.prototype.onScannedRobot = function(ev) { var robot = ev.robot; if(robot.id!=robot.parentId){ robot.fire(); robot.fire(); robot.rotateCannon(-15); robot.fire(); robot.fire(); robot.rotateCannon(-10); } // robot.fire(); //if(Math.random()<.5){ -
dlomibao 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 @@ -10,6 +10,8 @@ var Robot = function(robot) { Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.clone(); robot.rotateCannon(90); robot = ev.robot; @@ -62,7 +64,7 @@ Robot.prototype.onWallCollision= function(ev){ Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.turnCannon(ev.bearing); // Turn to wherever the bullet was fired }; -
dlomibao 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 @@ -6,11 +6,7 @@ var Robot = function(robot) { }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; @@ -63,5 +59,10 @@ Robot.prototype.onWallCollision= function(ev){ robot.back(go); robot.rotateCannon(45);*/ } Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.turnCannon(ev.bearing); // Turn to wherever the bullet was fired robot.clone(); }; -
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 3 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 @@ -5,14 +5,12 @@ var go=120; var Robot = function(robot) { }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.turnCannon(ev.bearing); // Turn to wherever the bullet was fired robot.clone(); }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; -
dlomibao 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 @@ -5,14 +5,14 @@ var go=120; var Robot = function(robot) { }; /* Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.turnCannon(ev.bearing); // Turn to wherever the bullet was fired robot.fire(); // so we can see who shot it robot.fire(); robot.ahead(30); };*/ Robot.prototype.onIdle = function(ev) { var robot = ev.robot; -
dlomibao 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 @@ -5,14 +5,14 @@ var go=120; var Robot = function(robot) { }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.turnCannon(ev.bearing); // Turn to wherever the bullet was fired robot.fire(); // so we can see who shot it robot.fire(); robot.ahead(30); }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; -
dlomibao 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 @@ -5,14 +5,14 @@ var go=120; var Robot = function(robot) { }; /* Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.turnCannon(ev.bearing); // Turn to wherever the bullet was fired robot.fire(); // so we can see who shot it robot.fire(); robot.ahead(30); };*/ Robot.prototype.onIdle = function(ev) { var robot = ev.robot; -
dlomibao 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 @@ -8,7 +8,7 @@ var Robot = function(robot) { Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.turnCannon(ev.bearing); // Turn to wherever the bullet was fired robot.fire(); // so we can see who shot it robot.fire(); robot.ahead(30); -
dlomibao 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 @@ -9,7 +9,9 @@ var Robot = function(robot) { Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.turn(ev.bearing); // Turn to wherever the bullet was fired robot.fire(); // so we can see who shot it robot.fire(); robot.ahead(30); }; Robot.prototype.onIdle = function(ev) { -
dlomibao revised this gist
Dec 4, 2012 . 1 changed file with 6 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 @@ -6,6 +6,12 @@ var Robot = function(robot) { }; Robot.prototype.onHitByBullet = function(ev) { var robot = ev.robot; robot.turn(ev.bearing); // Turn to wherever the bullet was fired // so we can see who shot it }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; -
dlomibao 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 @@ -13,8 +13,8 @@ Robot.prototype.onIdle = function(ev) { robot = ev.robot; if(.6>Math.random()){ robot.ahead(go); robot.turn(-20); } }; -
dlomibao 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 @@ -10,8 +10,8 @@ Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.rotateCannon(90); robot = ev.robot; if(.6>Math.random()){ robot.ahead(go); }
NewerOlder