Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

gradually until it is all white, and then changes its color gradually back to black. Only stop when the user presses ESCAPE. Hint: ( 0

gradually until it is all white, and then changes its color gradually back to black. Only stop when the user
presses ESCAPE.
Hint: (0,0,0) is the color black while (255,255,255) is the color white.
Lab7B: Create a Rxgame screen which is 600600, and then draw 4 red squares, each at a corner of the
screen, and one red square at the exact center of the screen. All squares must be 6060. The game
must run until the user presses ESCAPE. (Remember to account for the Surface's width and height!).
Lab7C: Create 2 Rects that are 100100, one with starting coordinates at the top left of the screen and
the other one with starting coordinates at the bottom left of the screen. Create 2 Surfaces, one green and
one Blue, also 100100. Use the two Rects to blit the two Surfaces onto the Display.
Using move(), move the two Rects across the screen and, when they reach the border, have them return
to where they started, repeating the cycle. The Rects should move at a speed of 5 pixels at a time. The
Display must be 1000500. Only stop when the user presses ESCAPE.
Hint: You probably want to keep track of what direction the Rects are moving.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

Influences on Nonverbal Communication?

Answered: 1 week ago