Created
August 25, 2014 17:43
-
-
Save itsbth/0574b1e547acdfc29eef to your computer and use it in GitHub Desktop.
This file contains 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
namespace FSharpBot | |
open Robocode | |
type MyFSharpBot() = | |
inherit Robot() | |
override this.Run() = | |
this.Initialize() | |
this.MainLoop() | |
member private this.Initialize() = | |
this.TurnLeft (this.Heading - 90.) | |
this.TurnGunRight 90. | |
member private this.MainLoop() = | |
while true do | |
this.ExecuteSingleStep() | |
member private this.ExecuteSingleStep() = | |
this.Ahead 5000. | |
this.TurnRight 90. | |
override this.OnScannedRobot evt = | |
this.Fire 1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment