public RoboBoard CopyBoard() { RoboBoard board = new RoboBoard(); board.Load(new StringReader(this.ToStringWriter().ToString()), this.Difficulty); board.BoardFile = this.BoardFile; return(board); }
public static RoboBoard LoadBoard(String boardPath, bool isRelativePath, Difficulty difficulty) { String path = (isRelativePath ? Directory.GetCurrentDirectory() + "/" : "") + boardPath; Console.WriteLine("Loading Board: " + path); RoboBoard board = new RoboBoard(); board.Load(path, difficulty); return(board); }