Posted: Wed Nov 05, 2003 8:58 am Post subject: (No subject)
that's it, take this
code:
var x, y : int
Draw.FillMapleLeaf (0, 0, maxx, maxy, black)
loop
x := Rand.Int (0, maxx)
y := Rand.Int (0, maxy)
if whatdotcolor (x, y) not= 7 then
drawfill (x, y, 7, 7)
end if
end loop
Tony
Posted: Wed Nov 05, 2003 9:56 am Post subject: (No subject)
ohh you're good. But not good enough
code:
var x,y:int
loop
x:=Rand.Int(0,maxx)
y:=Rand.Int(0,maxy)
if whatdotcolor (x,y) not= black then
Draw.FillMapleLeaf (x, y, x+1, y+1, black)
end if
end loop
Posted: Wed Nov 05, 2003 4:50 pm Post subject: (No subject)
this looks like a challenge to me...
code:
process makemyscreengoblack (x, y : int)
var xcoordinate, ycoordinate : int
xcoordinate := 0
ycoordinate := 0
loop
xcoordinate := xcoordinate + 1
if xcoordinate = x then
exit
end if
end loop
loop
ycoordinate := ycoordinate + 1
if ycoordinate = y then
exit
end if
end loop
drawdot (x, y, black)
end makemyscreengoblack
var x, y : int
x := 0
y := 0
loop
x := x + 1
if x = maxx then
x := 0
y := y + 1
end if
if y = maxy then
exit
end if
fork makemyscreengoblack (x, y)
end loop
uh... we were going for efficiency, right?
PS: sorry, Catalyst.
AsianSensation
Posted: Thu Nov 06, 2003 2:13 pm Post subject: (No subject)
Eventually.....
code:
var chars : array char of boolean
var x, y := 0
loop
Input.KeyDown (chars)
if chars (KEY_RIGHT_ARROW) then
x += 1
end if
if chars (KEY_LEFT_ARROW) then
x -= 1
end if
if chars (KEY_UP_ARROW) then
y += 1
end if
if chars (KEY_DOWN_ARROW) then
y -= 1
end if
drawfillbox (x, y, x + 5, y + 5, black)
delay (20)
end loop
Tony
Posted: Thu Nov 06, 2003 7:32 pm Post subject: (No subject)
although back in the day...
code:
var c:string(1)
for x:1..maxx by 5
for y:1..maxy by 5
locate(1,1)
put "would you like to color (",x,",",y,")"
getch(c)
if c="y" or c="Y" then
Draw.FillBox(x,y,x+5,y+5,black)
end if
end for
end for