Ball Throwing Minigame
From the Super Mario Wiki
The Ball Throwing Minigame is one of the minigames found in World-e in Super Mario Advance 4: Super Mario Bros. 3. It can be played in a Red Toad House from the special world after collecting 50 Advance Coins. The player must pay 30 coins each time they play this game.
Mario or Luigi will start the minigame in a room where they have a red ball. The object is to throw the ball and make contact with a bubble hovering at the top of the screen. The ball turns yellow after being thrown once, blue when thrown twice, and disappears after all three throws are used. It is possible for the ball to rebound and hit the bubble two or even three times in a single throw.
If the ball can hit the bubble three times, the player can get the contents of the bubble (a random item).