public void RoverCommands() { var _rover = new Rover("Max", _mars); var positionHit = 0; _rover.Commands("FFRFRF", out positionHit); Assert.AreEqual(new Tuple <uint, uint> (1, 1), _rover.Position); }
public void DiscoveringWithHit3() { List <Tuple <uint, uint> > obstacles = new System.Collections.Generic.List <Tuple <uint, uint> > (); obstacles.Add(new Tuple <uint, uint> (0, 6)); var _mars = new Mars(new Tuple <uint, uint> (100, 100), obstacles); var _rover = new Rover("Max", _mars); var positionHit = 0; var flag = _rover.Commands("FFFFFFFFF", out positionHit); var expectedPosition = 6; Assert.AreEqual(false, flag); Assert.AreEqual(expectedPosition, positionHit); Assert.AreEqual(new Tuple <uint, uint> (0, 5), _rover.Position); }