Example #1
0
    /**
     * Return if a color still has to be well placed or not
     */
    public bool IsColorFullyFound(BallManager.Color ball_color, PlayerRow current_player_row)
    {
        int         color_count  = this.CountColor(ball_color);
        List <Ball> player_balls = current_player_row.GetBalls();

        for (int x = 0, y = this.m_balls.Count - 1; x < this.m_balls.Count; x++, y--)
        {
            if (player_balls[x].GetColor() == ball_color && player_balls[x].Equals(this.m_balls[y]))
            {
                color_count--;
            }
        }

        return(color_count == 0);
    }