Implemented a game loop and wrote a stub for user input.