Exemple #1
0
 public Rover move_using(string instructions)
 {
     foreach (var instruction in instructions)
     {
         Spin.Get(instruction).apply(rover_tasks, rover);
     }
     return(rover);
 }
        public void Should_spin_left_provided_L()
        {
            var result = Spin.Get('L');

            Assert.AreEqual(result, Spin.left);
        }
        public void Should_move_provided_M()
        {
            var result = Spin.Get('M');

            Assert.AreEqual(result, Spin.move);
        }
        public void Should_spin_right_provided_R()
        {
            var result = Spin.Get('R');

            Assert.AreEqual(result, Spin.right);
        }