Aim and hit space to fire enjoy the music.
I programmed a game that could shoot targets the hardest problem that I had was that the targets would stay in the same place every time you started the game so I had to fix it so that when you started the game they would go to random spots and then I had another with that they would get stuck in the walls so I had to add that they would move if they got stuck on a wall. I also had a problem with it being really repetitive and boring so I deiced to add so music to make it better. I also had to individually program each target and background off the Glock 18 so the Glock has majority of the coding. So far there are only 8 levels and 9 backdrops I plan on add some more levels and different variables like fake targets and surprise backgrounds. I choose a Glock 18 because it is a fully automatic pistol with a 20+1 round magazine size. There is about 30 to 40 lines of coding on the pistol only it took me about 2 hours of work to finish the entire project with the error fixes and other coding like the music.