示例#1
0
    /// <summary>
    /// 搬一步棋的棋子
    /// </summary>
    /// <param name="mv"></param>
    /// <returns></returns>
    public int MovePiece(int mv)
    {
        int sqSrc, sqDst;

        sqSrc = logic.Src(mv);
        sqDst = logic.Dst(mv);
        sbyte pcCaptured = currentBoard[sqDst];

        if (pcCaptured != 0)
        {
            DeletePiece(sqDst, pcCaptured);
        }
        sbyte pc = currentBoard[sqSrc];

        DeletePiece(sqSrc, pc);
        AddPiece(sqDst, pc);
        return(pcCaptured);
    }
示例#2
0
文件: Search.cs 项目: tacthgin/Games
 /// <summary>
 /// 求MVV/LVA值
 /// </summary>
 /// <param name="mv"></param>
 /// <returns></returns>
 public int MvvLva(int mv)
 {
     return((ucMvvLva[situation.CurrentBoard[chessLogic.Dst(mv)]] << 3) - ucMvvLva[situation.CurrentBoard[chessLogic.Src(mv)]]);
 }