Closed innaamogolonova closed 2 months ago
Just asking for a bit more clarity. The code works well as is really enjoyable to watch.
Something interesting I noted is that when giving invalid input (ie. negative numbers) such as
rainbow(-5)
the behavior here is different than fromCC-Library-Lantern
. InCC-Library-Lantern
the behavior was rapidly changing colors. InCC-Lantern
(this repo), the behavior runs slowly, starting at orange.This may be a quirk of our implementation of the
wait()
wrapper function. I'll open up a ticket for this.
Opened ticket #25 for this. Bounds handling inside this function is the easiest way to resolve this for now but it may be worth some exploration to see if this occurs for other functions.
Just to clarify, this PR does not need to resolve #25.
Addressed the changes requested by:
Why:
Closes the following issues (all PRs must close an issue):
What's being changed
Simplifies the rainbow() method in act3 examples to implement Lantern.h library, making the function easier to read.
Testing instructions
The easiest way to test is to run the rainbow method in activity 3 which double as testing files.
You can verify that the code works appropriately by visually inspecting the colors that result from the activity function calls.
Check off the following