Esempio n. 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());
        }
Esempio n. 2
0
 public void Setup()
 {
     toyRobot = new ToyRobot();
     map      = SimulatorMap.Instance;
 }
Esempio n. 3
0
 public MoveCommand(SimulatorMap map, string args)
 {
     this.map = map;
 }
Esempio n. 4
0
 public LeftCommand(SimulatorMap map, string args)
 {
 }
Esempio n. 5
0
 public RightCommand(SimulatorMap map, String args)
 {
 }
Esempio n. 6
0
 public ReportCommand(SimulatorMap map, string args)
 {
 }