HomeworkBuilt at home. Verified in class at the start of the next session.

gap = 100

gap = 130
The picture on the left is Lab 1's stoplight. Not a redrawing of it — the same image file, because the program you finish today produces it pixel for pixel.
The picture on the right is the point. It is the same program after one number changed. Every lamp moved and the housing grew to fit, and you will not have touched a single coordinate to do it.
'F' → Fullscreen
Make a copy of your finished Lab 1 program, named 1-10-stoplight. Work in the copy. You will want the original to compare against.
Run your program after every task. For Tasks 1 through 3 the window should look exactly the same every single time. That is how you know each step was correct.
How to read the code blocks. Each task's code block shows your whole program, from line 1, as it should look when that task is finished.
You never start a new file and you never delete your work. The green lines marked with a + are the ones you add or change for that task — everything else is already in your file. Do not type the + sign.
BeginDrawing and EndDrawing. Write the count down. You are going to compare against it later.#:package Raylib-cs@8.0.0
using Raylib_cs;
int screenWidth = 400;int screenHeight = 600;
Raylib.InitWindow(screenWidth, screenHeight, "Stoplight");Raylib.SetTargetFPS(60);
while (!Raylib.WindowShouldClose()){ Raylib.BeginDrawing(); Raylib.ClearBackground(Color.DarkGray);
Raylib.DrawRectangle(140, 60, 120, 320, Color.Black); Raylib.DrawCircle(200, 120, 40, Color.Red); Raylib.DrawCircle(200, 220, 40, Color.Yellow); Raylib.DrawCircle(200, 320, 40, Color.Green);
Raylib.EndDrawing();}
Raylib.CloseWindow();DrawCircle calls to use them.firstLampY appears as a bare number in a DrawCircle call. The other two lamps are calculated.#:package Raylib-cs@8.0.0
using Raylib_cs;
int screenWidth = 400;int screenHeight = 600;
int lampX = 200;int firstLampY = 120;int lampRadius = 40;int gap = 100;
Raylib.InitWindow(screenWidth, screenHeight, "Stoplight");Raylib.SetTargetFPS(60);
while (!Raylib.WindowShouldClose()){ Raylib.BeginDrawing(); Raylib.ClearBackground(Color.DarkGray);
Raylib.DrawRectangle(140, 60, 120, 320, Color.Black); Raylib.DrawCircle(lampX, firstLampY, lampRadius, Color.Red); Raylib.DrawCircle(lampX, firstLampY + gap, lampRadius, Color.Yellow); Raylib.DrawCircle(lampX, firstLampY + 2 * gap, lampRadius, Color.Green);
Raylib.EndDrawing();}
Raylib.CloseWindow();padding, then the four housing values, then rewrite DrawRectangle to use them.lampX's literal 200 with screenWidth / 2 while you are here.gap to 130 and run it. Compare against the second picture at the top of this page.gap back to 100 before you submit.#:package Raylib-cs@8.0.0
using Raylib_cs;
int screenWidth = 400;int screenHeight = 600;
int lampRadius = 40;int padding = 20;int gap = 100;
int lampX = screenWidth / 2;int firstLampY = 120;
int housingWidth = 2 * (lampRadius + padding);int housingHeight = 2 * gap + 2 * lampRadius + 2 * padding;int housingX = lampX - housingWidth / 2;int housingY = firstLampY - lampRadius - padding;
Raylib.InitWindow(screenWidth, screenHeight, "Stoplight");Raylib.SetTargetFPS(60);
while (!Raylib.WindowShouldClose()){ Raylib.BeginDrawing(); Raylib.ClearBackground(Color.DarkGray);
Raylib.DrawRectangle(housingX, housingY, housingWidth, housingHeight, Color.Black); Raylib.DrawCircle(lampX, firstLampY, lampRadius, Color.Red); Raylib.DrawCircle(lampX, firstLampY + gap, lampRadius, Color.Yellow); Raylib.DrawCircle(lampX, firstLampY + 2 * gap, lampRadius, Color.Green);
Raylib.EndDrawing();}
Raylib.CloseWindow();DrawCircle line, and housingHeight will need to account for three gaps instead of two.gap at 100, your window is identical to the first picture on this page.DrawCircle or DrawRectangle call contains a bare coordinate number any more.gap alone moves the lamps and resizes the housing.Answer the following questions before submitting your work.
gap by itself moves two lamps and resizes the housing. Trace that chain: name every value that recalculates as a result, and say why each one had to.Submit three things to the dropbox:
gap set back to 100.gap = 100 and at gap = 130.