Exemplo n.º 1
0
 public RambotBehavior(Robot robot)
 {
     Robot = robot;
     rand = new Random(872349872);
     height = Math.Round(Robot.BattleFieldHeight);
     width = Math.Round(Robot.BattleFieldWidth);
 }
Exemplo n.º 2
0
        public BotState(Robot bot, ScannedRobotEvent evnt)
        {
            var direction = bot.Heading + evnt.Bearing;

            this.Observer = bot;
            this.Energy = evnt.Energy;
            this.Location = Geometry.ShiftBy(bot.GetLocation(), direction, evnt.Distance, bot.GetArenaBounds());
            this.Heading = evnt.Heading;
            this.Velocity = evnt.Velocity;
            this.Turn = bot.Time;
        }
Exemplo n.º 3
0
 public BotState(Robot bot, ScannedRobotEvent evnt)
 {
     double heading = bot.Heading + evnt.Bearing;
     this.Observer = bot;
     this.Energy = evnt.Energy;
     this.Location = bot.GetLocation().ShiftBy(heading, evnt.Distance, bot.GetArenaBounds());
     if (evnt.Velocity < 0)
     {
         this.Velocity = evnt.Velocity * -1;
         this.Heading = Utils.NormalAbsoluteAngleDegrees(evnt.Heading + 180);
     }
     else
     {
         this.Heading = evnt.Heading;
         this.Velocity = evnt.Velocity;
     }
     this.Turn = bot.Time;
 }
Exemplo n.º 4
0
 public RobotPropertyHandler(Robot.DebugPropertyH prop)
 {
     m_botProp = prop;
 }
Exemplo n.º 5
0
 public MegaCrasherBehavior(Robot robot)
 {
     Robot = robot;
 }