Ejemplo n.º 1
0
 public Robot(int x, int y, string orientation, IInstructionsParser instructionsParser, Grid grid)
 {
     Position = new Position(x, y, orientation.ToDegrees());
     _instructionsParser = instructionsParser;
     _grid = grid;
 }
Ejemplo n.º 2
0
 public void Setup()
 {
     _grid = new Grid(5, 3);
     _instructionsParser = new InstructionsParser()
     {
         InstructionDefinitions = new List<Instruction>{
             new Instruction("F", 1),
             new Instruction("R", 0, 90),
             new Instruction("L", 0, -90)
         }
     };
 }