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(); }
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(); }