my program...help pls
Author |
Message |
air_force91
|
Posted: Tue Nov 25, 2003 1:39 pm Post subject: my program...help pls |
|
|
ok well...this is a simple project...im not done yet...i need help with something:
code: | %declare variables
var winID:int
var today:string
var num1,num2,num3:int
%assign a value to WinID
winID:=Window.Open("position:top,center,graphics:640;640")
colorback(26)
cls
colour(10)
put "How are your today?"
get today
if today="fine"then
put "Me too! So let's start!"
elsif today="not good"then %can put "not good"
put "Maybe you will hit the jackpot today! "..
put "Then you will be happy."
elsif today="great"then
put "That is nice to hear. Let's start!"
else
put "I want to start the game now."
end if
delay(1000)
cls
%"for" statement for three numbers"
put "Alright. You will now pick three one-digit numbers."..
put " Good Luck!"
put " "
delay(500)
put "Enter the first number:"
get num1
cls
colour(99)
put "The first number you have picked is: ",num1
put " "
delay(1000)
put "Enter the second number:"
get num2
delay(1000)
cls
colour(77)
put "The second number you have picked is: ",num2
put " "
delay(1000)
put "Enter the third number:"
get num3
delay(1000)
cls
process siren
loop
for i : 60 .. 3000 by 100
Music.Sound ( i, 50 ) % Sound note
end for
for decreasing i : 2900 .. 200 by 100
Music.Sound ( i, 50 ) % Sound note
end for
end loop
end siren
fork siren
%numbers being processed
put "|",num1, "|"
delay(500)
locate(1, 1)
put "|", num2, "|"
delay(500)
locate(1, 1)
put "|", num3,"|"
delay(500)
locate(1, 1)
if num1>5or num2<6and num2>=9then
put "Ladies and Gentlemen, "..
put "we have a WINNER!"
else
put "Game over. You lose!"
end if
|
ok....u know the loop part...with the sound...well...what if i want to end it after lets say a few seconds...after the winner is announced and then i want to clear the screen and do something else....in another words i want the loop to end in a few seconds and move onto something else...how could i do that? do u have any other suggestions that i could include in my assignment...??thanx... ![Smile Smile](http://compsci.ca/v3/images/smiles/icon_smile.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
air_force91
|
Posted: Tue Nov 25, 2003 1:41 pm Post subject: (No subject) |
|
|
code: | %numbers being processed
put "|",num1, "|"
delay(500)
locate(1, 1)
put "|", num2, "|"
delay(500)
locate(1, 1)
put "|", num3,"|"
delay(500)
locate(1, 1)
|
here i wanted multiple numbers to change...u know...like in matrix...but i don't know how to...is there an easy way to make the effect? |
|
|
|
|
![](images/spacer.gif) |
Dan
![](http://wiki.compsci.ca/images/archive/3/3c/20100325043407!Danspic.gif)
|
Posted: Tue Nov 25, 2003 5:03 pm Post subject: (No subject) |
|
|
as for the matrix thing a quick sreach of turing secion whould get you: http://www.compsci.ca/v2/search.php?mode=results
the top ones on that are full code for matrix effect in turing. |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
![](images/spacer.gif) |
Dan
![](http://wiki.compsci.ca/images/archive/3/3c/20100325043407!Danspic.gif)
|
Posted: Tue Nov 25, 2003 5:09 pm Post subject: (No subject) |
|
|
as for the loop thing, if you replace the loop with a for loop then you can set it how may times it will run and it should stop once it has run that many times.
to clear the screen use cls |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
![](images/spacer.gif) |
FDisk87
|
Posted: Sat Dec 06, 2003 4:52 pm Post subject: (No subject) |
|
|
so the point of this game is to enter a number that is greater than 5, then one that is less than 6, then greater than or equal to 9? |
|
|
|
|
![](images/spacer.gif) |
air_force91
|
Posted: Sat Dec 06, 2003 8:53 pm Post subject: (No subject) |
|
|
nah...well...it was supposed to be a guessing game but it didn't work out...i could've worked it out if i had another day to work on the bonus project... but oh well...it's done...my class is on the unit on interfacing... |
|
|
|
|
![](images/spacer.gif) |
|
|