Enable strict type checking in Visual Studio Code by setting python.analysis.typeCheckingMode to "strict". Now revisit the Tic-Tac-Toe program from a previous lecture, including the Tkinter user interface code. Add type hints so that the program passes all type checks in strict mode.
a) Write a pygame program that initially displays a blank window. Each time the user clicks, a new donut should appear at the current mouse position. Use this image:
b) Modify the program so that each donut moves at a rate of 50 pixels/second in a random direction until it leaves the window.
Write a pygame program that displays balloons with random colors. Every 3 seconds, a new balloon should appear near the bottom of the screen. Each balloon should rise until it reaches the top of the screen, then vanish.
Extend your program from the previous exercise, turning it into a simple video game. Each time the player clicks a balloon, it should pop and the user should gain a point. If any balloon reaches the top of the screen, the player has lost and the game is over. As the game proceeds, balloons should appear more frequently and move more quickly, so that the game becomes harder and harder. Display a score at the top of the screen.
Extend the asteroids starter program from the lecture so that asteroids appear on the screen. Asteroids should have three sizes: small, medium, and large. If the player shoots a large asteroid, it should break into two medium asteroids. Similarly, shooting a medium asteroid should break it into two small asteroids. Shooting a small asteroid destroys it. If the player's ship collides with an asteroid, the game ends.
Extend the platformer starter program from the lecture so that a single horizontal platform appears some distance above the ground. The player should be able to jump up onto the platform. If they walk off the platform, they should fall to the ground.