/// <summary> /// 添加走子记录 /// </summary> public void AppendRecord( int orgPlayerIdx, int dstPlayerIdx, BoardIdx orgBoardIdx, BoardIdx dstBoardIdx, string tips, ChessRecordType type) { Record record = new Record( gameMgr.chessBoard, orgPlayerIdx, dstPlayerIdx, orgBoardIdx, dstBoardIdx, tips, type); Push(record); }
public Record( Chessboard chessBoard, int orgPlayerIdx, int dstPlayerIdx, BoardIdx orgBoardIdx, BoardIdx dstBoardIdx, string tips, ChessRecordType type) { this.tips = tips; this.type = type; this.orgBoardIdx = orgBoardIdx; this.dstBoardIdx = dstBoardIdx; this.orgPlayerIdx = orgPlayerIdx; this.dstPlayerIdx = dstPlayerIdx; orgPiece = chessBoard.GetPiece(orgBoardIdx); dstPiece = chessBoard.GetPiece(dstBoardIdx); orgPieceIsFirstMove = orgPiece.IsFirstMove; lastActionPieceAtBoardIdx = chessBoard.LastActionPieceAtBoardIdx; lastActionPieceAtPrevBoardIdx = chessBoard.LastActionPieceAtPrevBoardIdx; }