public void Program(IRobotControl robot) { robot.GoDown(); robot.GoDown(); for (int i = 0; i < 5; i++) { robot.GoRight(); } robot.GoUp(); robot.GoUp(); robot.GoRight(); }
public void AddRobot(string id, IRobotControl control) { Coordinates randomPosition; do { randomPosition = arena.RandomCoordinates(random); } while (robots.Any(x => x.Position == randomPosition)); var r = new Robot { Id = id, Position = randomPosition, Bearing = Bearing.North, Velocity = 0, Control = control, HitPoints = 100, }; robots.Add(r); }
/// <summary> /// 注册入战场 /// </summary> /// <param name="Robot"></param> /// <param name="Env"></param> public void RegistedToWorld(IRobotControl Robot, IBattleEnv Env,IBattleMap Map) { this.Robot = Robot; this.Env = Env; this.Map = Map; }
public void Program(IRobotControl robot) { robot.GoRight(); robot.GoRight(); robot.GoRight(); }