Exemple #1
0
        void ContinueGame(Chessboard recordChessBoard)
        {
            boardView.Destory();
            isPause   = false;
            boardView = new BoardView();
            boardView.PlaceEndEvent       = PlaceEnd;
            boardView.PieceMovedStopEvent = PieceMovedStoped;
            boardView.CreateBoardPieces(recordChessBoard);
            boardView.ResetSize(board.Width, board.Height);

            recordNode = recordNode.Next;
            recordIdx++;
            ChessView.Refresh();
        }
Exemple #2
0
        void StartGame()
        {
            boardView.Destory();
            recordIdx  = 0;
            isPause    = false;
            recordNode = null;

            gameManager.CreateGame();
            gameManager.Play();

            chessboard = gameManager.orgChessBoard;
            recordMgr  = gameManager.recordMgr;

            boardView = new BoardView();
            boardView.PlaceEndEvent       = PlaceEnd;
            boardView.PieceMovedStopEvent = PieceMovedStoped;
            boardView.CreateBoardPieces(chessboard, 1000);
            boardView.ResetSize(board.Width, board.Height);
            ChessView.Refresh();

            AddRecordToListBox();
        }