public void PrintBoard()
 {
     for (int i = 0; i < Size; i++)
     {
         Console.WriteLine(BoardString.Substring(i * Size, Size));
     }
 }
示例#2
0
        public string BoardAsString()
        {
            string result = "";

            for (int i = 0; i < Size; i++)
            {
                result += BoardString.Substring(i * Size, Size);
                result += "\n";
            }
            return(result);
        }
示例#3
0
        public void PrintBoardToFile(string filename)
        {
            List <string> ls = new List <string>();

            for (int i = 0; i < Size; i++)
            {
                ls.Add(BoardString.Substring(i * Size, Size));
            }

            File.AppendAllLines(filename, ls, Encoding.Default);
        }