swift implementation of flappy bird