Пример #1
0
        public void ViewToBoard()
        {
            Board theBoard = gameBoardCopy; // in the loop, don't get the board each time from the game

            foreach (Square square in Squares.All)
            {
                TBoardButton boardButton = this[square];
                string       text        = GetBoardButtonText(boardButton);
                theBoard[square] = SquareContentMapper.ToContent(text);
            }
            ;
        }
Пример #2
0
        public void BoardToView()
        {
            Board theBoard = gameBoardCopy; // in the loop, don't get the board each time from the game

            foreach (Square square in Squares.All)
            {
                string       text        = SquareContentMapper.ToText(theBoard[square]);
                TBoardButton boardButton = this[square];
                SetBoardButtonText(boardButton, text);
            }
            ;
        }