The four-color game is hard for dogs, too. We can make it easier by changing the size of the blue box with a DifficultyPicker: Start with it taking up the whole screen, and slowly reduce the size until it's the same as the other boxes!

One more thing...

There's one more thing I changed in this version of the Blue Tap game: I put blue last in the boxColorsarray. Can you guess why? Tip: Try putting it in the middle of the array, and see what happens!

OK, one last thing...

The first time I wrote this game, it was 156 lines long - almost 5 times longer than this one! But I didn't have Doggie And Me commands like DifficultyPicker and onRoundStart - I just wrote it all by hand.

Learn More

speed Infinity
boxSize = max(totalWidth, totalHeight)/2
boxCenters = [
[-boxSize/2, -boxSize/2]
[-boxSize/2, boxSize/2]
[boxSize/2, boxSize/2]
[boxSize/2, -boxSize/2]
]
boxColors = [black, yellow, white, blue]
# set up box size difficulty:
# a box 3 times the normal size will take up the whole screen, so we will make that the easiest size.
# the hardest size is the "regular" size.
sizePicker = new DifficultyPicker boxSize*3, boxSize
onRoundStart ->
cg()
# pick a size for the blue box, based on difficulty:
blueBoxSize = sizePicker.pick()
shuffle boxCenters
for i in [0..3]
moveto boxCenters[i]
if boxColors[i] == blue
# if this is a blue box, use our special size
box boxColors[i], blueBoxSize
else
# if it's not a blue box, use the regular box size
box boxColors[i], boxSize
# on tap, see if the tap was on blue. if yes, feed the dog!
tap ->
if lasttap.touches blue
feed()