Exemple #1
0
        public PlaceCommand(SimulatorMap map, string args)
        {
            if (String.IsNullOrEmpty(args))
            {
                throw new InvalidArgumentsException();
            }

            var argumentsSplitted = args.Split(',');

            if (argumentsSplitted.Length != 3)
            {
                throw new InvalidArgumentsException();
            }

            this.map = map;
            this.potentialPosition = Tuple.Create(int.Parse(argumentsSplitted[0]), int.Parse(argumentsSplitted[1]));
            this.potentialFace     = (FacesEnum)Enum.Parse(typeof(FacesEnum), argumentsSplitted[2].ToUpper());
        }
Exemple #2
0
 public void Setup()
 {
     toyRobot = new ToyRobot();
     map      = SimulatorMap.Instance;
 }
Exemple #3
0
 public MoveCommand(SimulatorMap map, string args)
 {
     this.map = map;
 }
 public LeftCommand(SimulatorMap map, string args)
 {
 }
Exemple #5
0
 public RightCommand(SimulatorMap map, String args)
 {
 }
Exemple #6
0
 public ReportCommand(SimulatorMap map, string args)
 {
 }