GR.Gambling.Backgammon.Board.FinishedCount C# (CSharp) Method

FinishedCount() public method

public FinishedCount ( int player ) : int
player int
return int
        public int FinishedCount(int player)
        {
            return finished[player];
        }

Usage Example

Example #1
0
        private static Board SwapSides(Board b)
        {
            Board sb = b.Clone();

            int n;
            for (int s = 0; s < 24; s++)
            {
                n = b.PointCount(0, s);
                sb.SetPoint(0, s, b.PointCount(1, s));
                sb.SetPoint(1, s, n);
            }

            sb.SetFinished(1, b.FinishedCount(0));
            sb.SetFinished(0, b.FinishedCount(1));

            sb.SetCaptured(1, b.CapturedCount(0));
            sb.SetCaptured(0, b.CapturedCount(1));

            return sb;
        }