Computer Science Canada skech pad 2.0 |
Author: | r.m_spy [ Sat Dec 01, 2007 12:17 pm ] |
Post subject: | skech pad 2.0 |
const MOUSE_SMOOTHING := 5 var mouse_x, mouse_y, button : int := 0 var w:int:=1 var k:array char of boolean var u:char:=chr(200) var d:char:=chr(208) var s:char:=chr(32) var e:char:=chr(10) var r:string var old_mouse_x, old_mouse_y : real := 0 put"the intructions for scetch pad ray" put"" put"put the mouse over the turing screen" put"this will draw a line" put"" put"to change a color, scroll up or down" put"let go for that color" put"" put"press the mouse to draw in paint" put"" put"press space to get the box eraser" put"press space again to return painting" put"press enter to delete your whole screen" put"" put"ready" get r cls loop Mouse.Where (mouse_x, mouse_y, button) old_mouse_x := (old_mouse_x * (MOUSE_SMOOTHING - 1) + mouse_x) / MOUSE_SMOOTHING old_mouse_y := (old_mouse_y * (MOUSE_SMOOTHING - 1) + mouse_y) / MOUSE_SMOOTHING if Mouse.ButtonMoved("down") then drawfillbox(round(old_mouse_x-5),round(old_mouse_y-5),round(old_mouse_x+5),round(old_mouse_y+5),w) else drawdot(round(old_mouse_x-1),round(old_mouse_y-1),w) end if Input.KeyDown(k) if k(u) then delay(100) if w>253 then w:=w-200 else w:=w+1 end if elsif k(d) then delay(100) if w<3 then w:=w+200 else w:=w-1 end if elsif k(s) then loop Mouse.Where (mouse_x, mouse_y, button) old_mouse_x := (old_mouse_x * (MOUSE_SMOOTHING - 1) + mouse_x) / MOUSE_SMOOTHING old_mouse_y := (old_mouse_y * (MOUSE_SMOOTHING - 1) + mouse_y) / MOUSE_SMOOTHING drawfillbox(round(old_mouse_x-5),round(old_mouse_y-5),round(old_mouse_x+5),round(old_mouse_y+5),white) Input.KeyDown(k) if k(e) then cls end if exit when k(s) and Mouse.ButtonMoved("up") end loop elsif k(e) then cls end if end loop |
Author: | theiinsilence [ Mon Dec 03, 2007 4:46 pm ] |
Post subject: | Re: skech pad 2.0 |
an ok program could use a litle work, btw it paints wheither the mouse is clicked or not, and another sugestion would be to use Input.Pause comand instead of getting the random variable "r" and not doing anything with it, keep trying |
Author: | darkangel [ Tue Dec 04, 2007 5:42 am ] |
Post subject: | Re: skech pad 2.0 |
hehe hold down "space" and draw like crazy |
Author: | Tallguy [ Mon Apr 14, 2008 12:08 pm ] |
Post subject: | RE:skech pad 2.0 |
okay, wats the point?, good though |
Author: | repsoccer16 [ Tue Apr 15, 2008 8:01 am ] |
Post subject: | RE:skech pad 2.0 |
lol pretty good but ya really what's the point...you should try making an etch a sketch |
Author: | crysis [ Tue Apr 15, 2008 8:26 am ] |
Post subject: | RE:skech pad 2.0 |
hey i played and i couldn't change colors |
Author: | Michael516 [ Tue Apr 15, 2008 8:31 am ] |
Post subject: | RE:skech pad 2.0 |
i couldn't either, all the scrolling did was make it bigger once and then did nothing else |
Author: | crysis [ Tue Apr 15, 2008 8:34 am ] |
Post subject: | RE:skech pad 2.0 |
ya its kind of messed up |
Author: | nastynika [ Tue Apr 15, 2008 8:34 am ] |
Post subject: | Re: skech pad 2.0 |
not bad a couple bugs to work out by the looks of it but not to shabby |
Author: | r.m_spy [ Sun Sep 13, 2009 5:30 pm ] |
Post subject: | RE:skech pad 2.0 |
Sorry, up and down changes color |
Author: | andrew. [ Sun Sep 13, 2009 6:48 pm ] | ||
Post subject: | RE:skech pad 2.0 | ||
Kinda weird, but cool at the same time. P.S. Next time upload the code or put it in syntax tags like this:
|
Author: | r.m_spy [ Wed Mar 10, 2010 7:00 am ] | ||
Post subject: | skech pad 3.0 | ||
|
Author: | USEC_OFFICER [ Wed Mar 10, 2010 12:02 pm ] |
Post subject: | RE:skech pad 2.0 |
1: No explaination. Why did you post this? 2: Use The Turing syntax please. |
Author: | peterchen1995 [ Sat Dec 18, 2010 5:53 pm ] |
Post subject: | Re: skech pad 2.0 |
I also made a sketch pad Hope you enjoy it! |