Beispiel #1
0
        private int ClampToDeployableBoard(int absValue, int troopWidth)
        {
            int halfWidthForOffset = BoardUtils.GetHalfWidthForOffset(troopWidth);
            int num = this.boardSize - 1 - halfWidthForOffset;

            if (absValue > num)
            {
                return(num);
            }
            if (absValue < halfWidthForOffset)
            {
                return(halfWidthForOffset);
            }
            return(absValue);
        }
Beispiel #2
0
 public unsafe static long $Invoke3(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(BoardUtils.GetHalfWidthForOffset(*(int *)args)));
 }