It reminded me of "you must build a boat" where the minigame affects the RPG.
Good implementation, but I noticed that when the ball's direction is higher on the X coordinate it goes fast: did you forget to normalize the velocity vector after changing the direction?