6: Simulate Last updated Save as PDF Page ID13596 6.1: How to Play Simulate6.2: Source Code to Simulate6.3: The Usual Starting Stuff6.4: Setting Up the Buttons6.5: The main() Function6.6: Some Local Variables Used in This Program6.7: Drawing the Board and Handling Input6.8: Checking for Mouse Clicks6.9: Checking for Keyboard Presses6.10: The Two States of the Game Loop6.11: Figuring Out if the Player Pressed the Right Buttons6.12: Epoch Time6.13: Drawing the Board to the Screen6.14: Same Old terminate() Function6.15: Reusing The Constant Variables6.16: Animating the Button Flash6.17: Drawing the Buttons6.18: Animating the Background Change6.19: The Game Over Animation6.20: Converting from Pixel Coordinates to Buttons6.21: Explicit is Better Than Implicit