You can just take the flappy bird code from Petit Computer dude