# show the turtle, so we know what it's doing: st() # define some useful numbers and colors: boxSize = max(totalWidth, totalHeight)/2 boxCenters = [ [-boxSize/2, -boxSize/2] [-boxSize/2, boxSize/2] [boxSize/2, boxSize/2] [boxSize/2, -boxSize/2] ] boxColors = [blue, yellow, white, black] # on round start, randomize box position and draw 4 boxes onRoundStart -> cg() # clear graphics shuffle boxCenters # randomize the order of the box centers for i in [0..3] # for each of the 4 box centers/colors moveto boxCenters[i] # move to the current center box boxColors[i], boxSize # draw a box of the current color # on tap, see if the tap was on blue. if yes, feed the dog! tap -> if lasttap.touches blue feed()