public void follow_directional_path() { string input = "R5, L5, R5, R3"; var pathFollower = new PathFollower(); pathFollower.FollowPath(input, false); Assert.AreEqual(12, pathFollower.DistanceFromStart()); }
public void follow_directional_path_without_repeat() { string input = "R8, R4, R4, R8"; var pathFollower = new PathFollower(); pathFollower.FollowPath(input, true); Assert.AreEqual(4, pathFollower.DistanceFromStart()); }
private static void Main() { var pathFollower = new PathFollower(); var path = File.ReadAllText("input1.txt"); pathFollower.FollowPath(path, true); Console.Write(pathFollower.DistanceFromStart()); Console.ReadKey(); }
public void FollowPath_GivenTestFile_ReturnsABCDEF() { string filename = @"Input\testa.txt"; string expected = "ABCDEF"; string actual = PathFollower.FollowPath(filename); Assert.AreEqual(expected, actual); }
public void Update() { if (_stunned) { return; } if (_behaviour_pattern == BehaviourPattern.Path) { _path_follower.FollowPath(); } else { _steerer.Act(); } }