Пример #1
0
        public bool ImportLevel(string level)
        {
            int           rows    = 0;
            int           columns = 0;
            List <string> boardList;

            if (!ParseInput(level, out rows, out columns, out boardList))
            {
                return(false);
            }

            Board board = new Board(rows, columns);

            if (!board.InitialiseBoard(boardList))
            {
                return(false);
            }
            board.GenerateBoardValues();

            Level = board.ToString();
            return(true);
        }