Pick a color and make a dot. Can you adjust the color and the size?
If you add a second line of code to your program, you can draw a second dot. Drawing a smaller dot on top of a bigger dot will make a donut. To clear the middle, you can draw in white
or even in a special color called erase
.
By alternating light and dark dots of different sizes, you can make a bullseye. Can you draw a collection of dots to make interesting striped patterns?
Did you put a space in the middle of a color?
HINT: colors are spelled without a space. """ else if /^dot\s+[a-z0-9]+\s*[0-9]+/i.test(dotline) popup """
Did you forget a comma?
HINT: use a comma between the color and size. """ else if /^dot[a-z]{3}/i.test(dotline) popup """
Did you forget a space?
HINT: put a space before the color. """ else if dotline.toLowerCase() != dotline popup """
Did you use capital letters?
HINT: most built-in names are lowercase. """ else if /^[ \t]+/.test(dotline) popup """
Did you indent your code?
HINT: line up your code on the left. """ else if (m = /^dot\s+([a-z]+)/.exec(dotline)) and not (m[1] in cssc) popup """
#{m[1]} is not a color name I know.
HINT: look for the color reference below. """ return if lasterrorevent return if dotcount == 1 and sizes[0] == 100 and colors.purple popup """
Can you change the color?
HINT: find the colors reference page below. """ else if dotcount == 1 and sizes[0] == 100 popup """
Can you make a different size?
HINT: the number is the diameter. """ else if dotcount == 1 popup """
Try adding a second dot!
HINT: add a second line of code. """ else if _.keys(colors).length == 1 popup """
Are your dots all the same color?
HINT: try picking different colors. """ else if _.uniq(sizes).length == 1 popup """
Are your dots all the same size?
HINT: try picking a different size for a dot. """ else if _.min(sizes) <= 16 popup """
HINT: your dot is smaller than the turtle """ else if not _.every(sizes, (v, i) -> i is 0 or sizes[i - 1] >= v) popup """
Did you cover up a dot?
Try drawing the bigger one first.
"""
else if dotcount < 3
popup """
Challenge: try drawing a bullseye. """ else popup """
Beautiful! You may want to try
"More Ideas" or explore other projects.
"""
$(window).click ->
if dotcount is 0
popup """
Click on the blue play button to run the program. """ setTimeout((-> done -> setTimeout hints, 500), 500)