示例#1
0
 public Simulator(IReporter reporter, ILogger logger)
 {
     _reporter = reporter;
     _logger = logger;
     robot = new Robot();
     instruction = new Instruction();
 }
        public void TestInstruction()
        {
            Instruction instruction = new Instruction();
            instruction.ParseInput("PLACE 1,1,NOTRH");
            Assert.AreEqual(1, instruction.x);
            Assert.AreEqual(1, instruction.x);
            Assert.AreEqual(Orientation.NORTH, instruction.orientation);

            Assert.IsFalse(Position.ValidatePosition(4, 5));
            Assert.IsTrue(Position.ValidatePosition(4, 3));
        }