You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.
In the Game of Life exercises, I used the "magic string" "blue" for the color of my circles, which then propagates out across the tests, etc., in an awkward way.
One option would be to add another named constant for that color instead of scattering the "magic string" "blue" all over the code.
Alternatively I could write a draw-cell function that encapsulates both "solid" and "blue" so they're only in one place.
The text was updated successfully, but these errors were encountered:
Or I could just define a variable cell that is the (circle cell-radius "solid" "blue") logic, which would probably be nicer than a draw-cell function. (Credit to Jackson Lennox for that idea.)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In the Game of Life exercises, I used the "magic string"
"blue"
for the color of my circles, which then propagates out across the tests, etc., in an awkward way.One option would be to add another named constant for that color instead of scattering the "magic string"
"blue"
all over the code.Alternatively I could write a
draw-cell
function that encapsulates both"solid"
and"blue"
so they're only in one place.The text was updated successfully, but these errors were encountered: