GR.Gambling.Backgammon.Board.LastChequer C# (CSharp) 메소드

LastChequer() 공개 메소드

Returns the point of the last chequer of the player from the player's perspective. Returns 24 for captured and -1 if all checkers have been bearoffed.
public LastChequer ( int player ) : int
player int
리턴 int
        public int LastChequer(int player)
        {
            if (CapturedCount(player) > 0)
                return 24;

            int point = -1;
            for (point = 23; point >= 0; point--)
                if (board[player][point] > 0)
                    return point;

            return point;
        }