Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Gr 9 final isp help please!! Due January 16 08
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
SGeorge




PostPosted: 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.



buildingblocks.t
 Description:
So this is the game and please help me!!

Download
 Filename:  buildingblocks.t
 Filesize:  3.2 KB
 Downloaded:  94 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
StealthArcher




PostPosted: 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




PostPosted: Mon Jan 14, 2008 6:16 pm   Post subject: RE:Gr 9 final isp help please!! Due January 16 08

hey steven!!!
SGeorge




PostPosted: 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

end Btnmouse

proc display
title
drawfillbox (10, 330, 60, 380, 110)
drawfillbox (85, 280, 185, 380, 10)
drawfillbox (210, 350, 240, 380, 75)
drawfillbox (265, 230, 415, 380, 15)
drawfillbox (440, 305, 515, 380, 240)

drawfillbox (9, 9, 41, 41, 7)
drawfillbox (64, 9, 116, 61, 7)
drawfillbox (139, 9, 216, 86, 7)
drawfillbox (239, 9, 341, 111, 7)
drawfillbox (364, 9, 516, 161, 7)

drawfillbox (10, 10, 40, 40, 0)
drawfillbox (65, 10, 115, 60, 0)
drawfillbox (140, 10, 215, 85, 0)
drawfillbox (240, 10, 340, 110, 0)
drawfillbox (365, 10, 515, 160, 0)
timerunning := Time.Elapsed
var enterBtn : int := GUI.CreateButtonFull (580, 0, 0, "Enter", goodbye, 0, KEY_ESC, false)
Btnmouse
loop
exit when GUI.ProcessEvent
end loop
end display

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




PostPosted: 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




PostPosted: 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
exit when hasch
end loop
end hello

SGeorge




PostPosted: 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

proc display
title
drawfillbox (10, 330, 60, 380, 110)
drawfillbox (85, 280, 185, 380, 10)
drawfillbox (210, 350, 240, 380, 75)
drawfillbox (265, 230, 415, 380, 15)
drawfillbox (440, 305, 515, 380, 240)

drawfillbox (9, 9, 41, 41, 7)
drawfillbox (64, 9, 116, 61, 7)
drawfillbox (139, 9, 216, 86, 7)
drawfillbox (239, 9, 341, 111, 7)
drawfillbox (364, 9, 516, 161, 7)

drawfillbox (10, 10, 40, 40, 0)
drawfillbox (65, 10, 115, 60, 0)
drawfillbox (140, 10, 215, 85, 0)
drawfillbox (240, 10, 340, 110, 0)
drawfillbox (365, 10, 515, 160, 0)
timerunning := Time.Elapsed
var enterBtn : int := GUI.CreateButton (580, 0, 0, "Enter", goodbye)
loop
exit when GUI.ProcessEvent
end loop
end display

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




PostPosted: 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
Sponsor
sponsor
SGeorge




PostPosted: 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")
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 display
title
drawfillbox (10, 330, 60, 380, 110)
drawfillbox (85, 280, 185, 380, 10)
drawfillbox (210, 350, 240, 380, 75)
drawfillbox (265, 230, 415, 380, 15)
drawfillbox (440, 305, 515, 380, 240)

drawfillbox (9, 9, 41, 41, 7)
drawfillbox (64, 9, 116, 61, 7)
drawfillbox (139, 9, 216, 86, 7)
drawfillbox (239, 9, 341, 111, 7)
drawfillbox (364, 9, 516, 161, 7)

drawfillbox (10, 10, 40, 40, 0)
drawfillbox (65, 10, 115, 60, 0)
drawfillbox (140, 10, 215, 85, 0)
drawfillbox (240, 10, 340, 110, 0)
drawfillbox (365, 10, 515, 160, 0)
timerunning := Time.Elapsed
var enterBtn : int := GUI.CreateButton (580, 0, 0, "Enter", goodbye)
loop
exit when GUI.ProcessEvent
end loop
end display

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
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
shakin cookie




PostPosted: Mon Jan 14, 2008 6:40 pm   Post subject: RE:Gr 9 final isp help please!! Due January 16 08

there you go...

and btw, i have no idea how to help you...

sorry...
LaZ3R




PostPosted: Mon Jan 14, 2008 7:00 pm   Post subject: RE:Gr 9 final isp help please!! Due January 16 08

Sigh, kids using GUI... always with the GUI.

Anyways, you need to learn how to use a command called Mouse.Where if you even want to begin with having the user interact with blocks via a mouse.

Search it up in the helpmenu of turing.
StealthArcher




PostPosted: Mon Jan 14, 2008 7:04 pm   Post subject: RE:Gr 9 final isp help please!! Due January 16 08

I personally got the highest mark in my class last year, and I never touched the GUI. Smile
SGeorge




PostPosted: Mon Jan 14, 2008 7:17 pm   Post subject: Re: Gr 9 final isp help please!! Due January 16 08

how do i use mouse where to do tht please explain!!!
shakin cookie




PostPosted: Mon Jan 14, 2008 7:37 pm   Post subject: RE:Gr 9 final isp help please!! Due January 16 08

im sorry LaZ3R, but our teacher specifically said that we are required to have turing's GUI in our program.
Gooie




PostPosted: Mon Jan 14, 2008 8:27 pm   Post subject: Re: Gr 9 final isp help please!! Due January 16 08

I seriously doubt this program can be completed in time for the 16th.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 18 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: