public void PlotPath() { List <Point> points = new List <Point>(); Point currentPoint = new Point(0, 0, 0); foreach (string section in Path) { string direction = section.Substring(0, 1); int amount = Convert.ToInt32(section.Substring(1)); for (int i = 1; i < amount + 1; i++) { currentPoint.AddOneDistance(direction); points.Add(new Point(currentPoint.x, currentPoint.y, currentPoint.steps)); } } Points = points.ToArray(); }