Posted: Mon Jan 14, 2008 6:11 pm Post subject: Gr 9 final isp help please!! Due January 16 08
So In my game you have to drag Five blocks from the top of the screen to the bottom of the screen from smallest to greatest!
I need help where you have to be able to drag the blocks down and i can't do that please help and fast!!!
Here take a look at my program.
Posted: Mon Jan 14, 2008 6:14 pm Post subject: RE:Gr 9 final isp help please!! Due January 16 08
I find this time of year, very sad.
It's only 3 kb, post it in code tags and we can offer help, but be forewarned, try to ask us to do it for you, and well, let's not go there.
shakin cookie
Posted: Mon Jan 14, 2008 6:16 pm Post subject: RE:Gr 9 final isp help please!! Due January 16 08
hey steven!!!
SGeorge
Posted: Mon Jan 14, 2008 6:19 pm Post subject: Re: Gr 9 final isp help please!! Due January 16 08
kk help me now please!!!
%Stevenson George
%Dec.26.07
%Ms.Dyke
%This program will let you put blocks in order from smallest to biggest.
%Set screen up
import GUI
setscreen ("nocursor")
setscreen ("noecho")
forward proc mainMenu
forward proc userinput
%Declaration Statement
var name : string
var timerunning : int
var winID1 : int := Window.Open ("position:100;100,graphics:640;400")
%Title
procedure title
cls
locate (1, 30)
put "The Building Blocks Game"
put ""
end title
procedure goodbye
title
put "Thank-you for playing this game and hope you got all the blocks in the correct order."
put ""
put "By: Stevenson George"
put ""
put "Player: ", name
put "Your time was: ", timerunning, " milliseconds"
delay (4000)
Window.Close (winID1)
View.Update
end goodbye
proc Btnmouse
var x, y, buttonnumber, buttonupdown, buttons : int
var nx, ny : int
loop
buttonwait ("down", x, y, buttonnumber, buttonupdown)
nx := x
ny := y
loop
drawfillbox (x, y, nx, ny, 0) % Erase previous line
exit when buttonmoved ("up")
mousewhere (nx, ny, buttons)
drawbox (x, y, nx, ny, brightred) % Draw line to position
end loop
buttonwait ("up", nx, ny, buttonnumber, buttonupdown)
drawfillbox (x, y, nx, ny, brightgreen) % Draw line to final position
drawfillbox (x - 2, y + 2, nx + 2, ny - 2, 0)
drawfillbox (x, y, nx, ny, 0)
end loop
body userinput
title
put "Please enter your name: " ..
get name
display
View.Update
end userinput
procedure introduction
title
put "This program will test your skill to place blocks from smallest to largest."
var mainBtn : int := GUI.CreateButton (200, 50, 0, "Main Menu", mainMenu)
loop
exit when GUI.ProcessEvent
end loop
View.Update
end introduction
procedure goodbye1
title
put "Thank-you for playing this game and hope you got all the blocks in the correct order."
put ""
put "By: Stevenson George"
delay (4000)
Window.Close (winID1)
View.Update
end goodbye1
proc goodbyenice
title
put "Congratulations! You have put the blocks from smallest to largest!"
var enterBtn : int := GUI.CreateButton (580, 0, 0, "Enter", goodbye)
end goodbyenice
proc goodbyewrong
title
put "INCORRECT! Sorry try again and remember to put the blocks from smallest to largest."
var mainBtn : int := GUI.CreateButton (200, 50, 0, "Main Menu", mainMenu)
end goodbyewrong
body mainMenu
title
var introBtn : int := GUI.CreateButton (200, 275, 0, "Introduction", introduction)
var playBtn : int := GUI.CreateButton (200, 200, 0, "Play Building Blocks Game!", userinput)
var exitBtn : int := GUI.CreateButton (200, 125, 0, "Exit", goodbye1)
loop
exit when GUI.ProcessEvent
end loop
View.Update
end mainMenu
fork music
introduction
loop
mainMenu
exit when GUI.ProcessEvent
userinput
display
end loop
goodbye
[/list][/list]
SGeorge
Posted: Mon Jan 14, 2008 6:20 pm Post subject: Re: RE:Gr 9 final isp help please!! Due January 16 08
shakin cookie @ Mon Jan 14, 2008 6:16 pm wrote:
hey steven!!!
SUP akiva
shakin cookie
Posted: Mon Jan 14, 2008 6:25 pm Post subject: RE:Gr 9 final isp help please!! Due January 16 08
oh, and steven, when you post code, put
Turing:
at the top and
at the bottom. It will make it look like this:
Turing:
proc hello
put"Hello!" loop exitwhenhasch endloop end hello
SGeorge
Posted: Mon Jan 14, 2008 6:33 pm Post subject: Re: Gr 9 final isp help please!! Due January 16 08
Thx Akiva and get someone to help me!!!
[syntax="turing"]
%Stevenson George
%Dec.26.07
%Ms.Dyke
%This program will let you put blocks in order from smallest to biggest.
%Set screen up
import GUI
setscreen ("nocursor")
setscreen ("noecho")
forward proc mainMenu
forward proc userinput
%Declaration Statement
var name : string
var timerunning : int
var winID1 : int := Window.Open ("position:100;100,graphics:640;400")
%Title
procedure title
cls
locate (1, 30)
put "The Building Blocks Game"
put ""
end title
procedure goodbye
title
put "Thank-you for playing this game and hope you got all the blocks in the correct order."
put ""
put "By: Stevenson George"
put ""
put "Player: ", name
put "Your time was: ", timerunning, " milliseconds"
delay (4000)
Window.Close (winID1)
View.Update
end goodbye
body userinput
title
put "Please enter your name: " ..
get name
display
View.Update
end userinput
procedure introduction
title
put "This program will test your skill to place blocks from smallest to largest."
var mainBtn : int := GUI.CreateButton (200, 50, 0, "Main Menu", mainMenu)
loop
exit when GUI.ProcessEvent
end loop
View.Update
end introduction
procedure goodbye1
title
put "Thank-you for playing this game and hope you got all the blocks in the correct order."
put ""
put "By: Stevenson George"
delay (4000)
Window.Close (winID1)
View.Update
end goodbye1
proc goodbyenice
title
put "Congratulations! You have put the blocks from smallest to largest!"
var enterBtn : int := GUI.CreateButton (580, 0, 0, "Enter", goodbye)
end goodbyenice
proc goodbyewrong
title
put "INCORRECT! Sorry try again and remember to put the blocks from smallest to largest."
var mainBtn : int := GUI.CreateButton (200, 50, 0, "Main Menu", mainMenu)
end goodbyewrong
body mainMenu
title
var introBtn : int := GUI.CreateButton (200, 275, 0, "Introduction", introduction)
var playBtn : int := GUI.CreateButton (200, 200, 0, "Play Building Blocks Game!", userinput)
var exitBtn : int := GUI.CreateButton (200, 125, 0, "Exit", goodbye1)
loop
exit when GUI.ProcessEvent
end loop
View.Update
end mainMenu
introduction
loop
mainMenu
exit when GUI.ProcessEvent
userinput
display
end loop
goodbye
[syntax="turing"]
shakin cookie
Posted: Mon Jan 14, 2008 6:35 pm Post subject: RE:Gr 9 final isp help please!! Due January 16 08
no no no... you have to put [/syntax] at the bottom... not [syntax="turing"] again!
Sponsor Sponsor
SGeorge
Posted: Mon Jan 14, 2008 6:38 pm Post subject: Re: Gr 9 final isp help please!! Due January 16 08
U didnt tell me@
Turing:
%Stevenson George %Dec.26.07 %Ms.Dyke %This program will let you put blocks in order from smallest to biggest. %Set screen up import GUI
setscreen("nocursor") setscreen("noecho") forwardproc mainMenu
forwardproc userinput
%Declaration Statement var name :string var timerunning :int var winID1 :int:=Window.Open("position:100;100,graphics:640;400")
%Title procedure title
cls locate(1, 30) put"The Building Blocks Game" put"" end title
procedure goodbye
title
put"Thank-you for playing this game and hope you got all the blocks in the correct order." put"" put"By: Stevenson George" put"" put"Player: ", name
put"Your time was: ", timerunning, " milliseconds" delay(4000) Window.Close(winID1) View.Update end goodbye
body userinput
title
put"Please enter your name: "..
get name
display
View.Update end userinput
procedure introduction
title
put"This program will your skill to place blocks from smallest to largest." var mainBtn :int:=GUI.CreateButton(200, 50, 0, "Main Menu", mainMenu) loop exitwhenGUI.ProcessEvent endloop View.Update end introduction
procedure goodbye1
title
put"Thank-you for playing this game and hope you got all the blocks in the correct order." put"" put"By: Stevenson George" delay(4000) Window.Close(winID1) View.Update end goodbye1
proc goodbyenice
title
put"Congratulations! You have put the blocks from smallest to largest!" var enterBtn :int:=GUI.CreateButton(580, 0, 0, "Enter", goodbye) end goodbyenice
proc goodbyewrong
title
put"INCORRECT! Sorry try again and remember to put the blocks from smallest to largest." var mainBtn :int:=GUI.CreateButton(200, 50, 0, "Main Menu", mainMenu) end goodbyewrong
body mainMenu
title
var introBtn :int:=GUI.CreateButton(200, 275, 0, "Introduction", introduction) var playBtn :int:=GUI.CreateButton(200, 200, 0, "Play Building Blocks Game!", userinput) var exitBtn :int:=GUI.CreateButton(200, 125, 0, "Exit", goodbye1) loop exitwhenGUI.ProcessEvent endloop View.Update end mainMenu