private Node NodeFactory(Position pos, string s) { s = s.ToUpper(); switch (s) { case ".": return(new NeutralNode(pos, s)); case "X": return(new WallNode(pos, s)); case "G": _goal = new GoalNode(pos, s); return(_goal); case "S": _start = new StartNode(pos, "A"); return(_start); default: throw new ArgumentException(); } }
public World(World w) { _start = w.Start; _goal = w.Goal; _world = w.WorldNodes; }
public World() { _start = null; _goal = null; }