Computer Science Canada

WHATDOTCOLOR GUY!

Author:  Boarder16 [ Tue Dec 30, 2003 1:06 am ]
Post subject:  WHATDOTCOLOR GUY!

Hey, i forget your name on compsci, but why do they/ you call yourself whatdotcolor warrior Shocked ?? I unno what whatdotcolor is Question Question lol

Matt!

Author:  poly [ Tue Dec 30, 2003 12:19 pm ]
Post subject: 

hey since I feel very lazy this morning here it is out of the wonderful reference from turing:

Description: The whatdotcolor function is used to determine the color number of the specified pixel. The alternate spelling is whatdotcolour.
Example: This program draws a line which bounces off the edges of the screen and makes a beep when it finds a pixel that has already been colored.

dont be afraid to try the example out cause its one out of few that work! Laughing
Woah its almost 12:30...that isnt too morningish now is it

Author:  Mazer [ Tue Dec 30, 2003 2:12 pm ]
Post subject: 

lol, actually the example doesn't work!
code:

setscreen ("graphics")
var x, y : int := 0
var dx, dx : int := 1
loop
    if whatdotcolor (x, y) not= 0 then
        sound (400, 50)
    end if
    drawdot (x, y, 1)
    x := x + dx
    y := y + dy
    if x = 0 or x = maxx then
        dx := -dx
    end if
    if y = 0 or y = maxy then
        dy := -dy
    end if
end loop


they declared dx twice instead of declaring dy... you know you're smart when you try to teach somebody using code you haven't tested. let's all have a round of applause for holtsoft...

*dead silence*

ok nevermind then.


: