Computer Science Canada help |
Author: | Mike [ Tue Jan 07, 2003 12:43 pm ] |
Post subject: | help |
[code] setscreen ("graphics:vga") setscreen ("nocursor") setscreen ("noecho") var MidX : int := maxx div 2 var MidY : int := maxy div 2 const UpKey := "8" const DownKey := "2" const RightKey := "6" const LeftKey := "4" const HoleRadius := 6 const endkey := "1" const pgdnkey := "3" const pgupkey := "9" const homekey := "7" var keystroke : string (1) put "WELCOME TO THE ETCH-A-SKETCH PROGRAM!" put "" put "Instructions:" put "" put "Use the numberpad on NumLock" put "to move the pointer around" put "Press 8 to move up" put "Press 2 to move down" put "Press 6 to move right" put "Press 4 to move left" put "To clear the screen press c" put "To quit press q" put "" put "tip: if you want the cursor to start " put "in a certain place move it to that " put "place and then press c" put "" put "" put "" put "press any key" getch (keystroke) cls loop drawfilloval (MidX, MidY, HoleRadius, HoleRadius, 1) getch (keystroke) if keystroke = UpKey then MidY := MidY + 2 elsif keystroke = DownKey then MidY := MidY - 2 elsif keystroke = RightKey then MidX := MidX + 2 elsif keystroke = LeftKey then MidX := MidX - 2 elsif keystroke = endkey then MidX := MidX - 2 MidY := MidY - 2 elsif keystroke = pgdnkey then MidX := MidX + 2 MidY := MidY - 2 elsif keystroke = pgupkey then MidX := MidX + 2 MidY := MidY + 2 elsif keystroke = homekey then MidX := MidX - 2 MidY := MidY + 2 elsif keystroke = "q" then exit elsif keystroke = "c" then put "Shake Shake" delay (1000) cls end if end loop [code] how do i put that game to ask draw a box level 1. level2.draw a the letter C level3.draw a funny face level4. draw house |
Author: | Dan [ Tue Jan 07, 2003 5:47 pm ] |
Post subject: | |
it whode porby be very hread to wirte a progame that can alisyes what was drawn on the screen and see if it was box, ect in turing. althouth it whode not be impoible you whode have to recored the impoute of the user in an array and then check to see if it matchs the inputed need to make a box, ect. this may wrok but the user whode have to make the box 100% like the one you whont them to. i whode sugested not making your game have levels but insted try adding things like difrent colors and shapes to draw with. |