this is the code that I learned in my first programming class that I plan to use as a template for my first game