Given the date of the assignment, I think I can assume that it's already been due so I suppose I could try and answer it.
I kind of mixed basic and c++ code structures, but I think something like this would work. The only slightly tedious part is the row's offset. It's just nested loops, nothing really tricky here.
offset = 0
flag = 0
for y = 0 to 7
for x = 0 to 13 step 2
pen.setPosition(x*40 + offset,y*40)
pen.fillRect(40,40)
pen.setPosition(0 ,(y+1)*40)
pen.drawLine(0,endOfScreen)
next x
//determine whether to increase or decrease the offset of the row
//offsets by 3 each time
if flag = 0 and offset = 6
{
flag = 1
}
if flag = 1 and offset = 0
{
flag = 0
}
if flag = 0 then offset += 3
if flag = 1 then offset -= 3
next y
As for the circles, I don't know what its suppose to look like.
Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51