Q:

score increase the chance of apperance

Hello I'm developing a game that each time a user blows a block the users get 1 point and the point get added to an overall score while the game is running.
the game consists of 4 standard views what i want to be done is that the more the chance increase the more a background appear on the views.
in another way the higher the score the more the chance of a background to be bind to the view when the user reach's 50 it starts to bind it with the background and when the user reach's 200 the chance of binding becomes 100%
    this.Bcolor=random.nextInt(4 - 1 + 1) + 1; // generate a random color between 1 and 3
    if(FallAnimationActivity.score % 100 == 0) { // here where i want to apply the chance alogrithm.
        FallAnimationActivity.showcolorbuttons();
        switch (Bcolor) {
            case 1:
                this.setBackgroundColor(Color.BLUE);
                break;
            case 2:
                this.setBackgroundColor(Color.RED);
                break;
            case 3:
                this.setBackgroundColor(Color.GREEN);
                break;
            case 4:
                this.setBackgroundColor(Color.BLACK);
                break;
        }
    }
    else{
        this.setBcolor(0);
    }

FallAnimationActivity.score is the user score that keeps increasing while he pops the blocks that appears.
Thank you.

A:

You can use an algorithm that generates a number between 1 and 200. if the number is smaller than the score, return true, otherwise, return false.

