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

Username:   Password: 
 RegisterRegister   
 Windows problems (not microsoft windows)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cycro1234




PostPosted: Thu Jan 20, 2005 10:26 pm   Post subject: Windows problems (not microsoft windows)

Here are some of the procedures i have. If i change the order, they won't work.

open new window called mainWin

procedure menu
Menu stuff
end menu

procedure winWindow
Opens a new window after user wins a game of connect 4
[After user presses key, should close itself AND the game screen then run menu]
end winWindow

procedure redWon
Displays some text that player red won
calls winWindow
end redWon

procedure blueWon
Displays text that player blue won
calls winWindow
end blueWon

procedure check
if 4 in a row for red then
calls redWon
if 4 in a row for blue then
calls blueWon
end check

procedure dropBall
if playerTurn = 1 then
animate falling ball red
calls check
else
animate falling ball blue
calls check
end dropBall

procedure arrowControl
controls arrow movement
end arrowControl

procedure drawDisplay
opens new window for game screen
draws the connect 4 board
calls arrowControl
end drawDisplay

When the winWindow opens up, I can succesfuly close it, but the gameScreen is still running, so whatever new window i set active, all output will go to it. Meaning that the game will still run, but in a diferent window. Any ideas on how to fix this? I submitted by code incase you need to look it over.



Cycro connect 4.zip
 Description:
Connect 4

Download
 Filename:  Cycro connect 4.zip
 Filesize:  141.55 KB
 Downloaded:  136 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
cycro1234




PostPosted: Thu Jan 20, 2005 11:01 pm   Post subject: (No subject)

I'm serious. Somebody plz at least attempt to help me out.... Crying or Very sad
Bacchus




PostPosted: Thu Jan 20, 2005 11:11 pm   Post subject: (No subject)

let it sit man, its been less then an hour since you posted, and its nightime. go to bed and check it in the morning. dont rely on anybody to help you, they do it if they can/have the time/want to just keep trying to figure it out and hope someone helps Smile (lol i posted for some help before and figured it out before anyone even posted on mine)
cycro1234




PostPosted: Thu Jan 20, 2005 11:22 pm   Post subject: (No subject)

I DON'T HAVE TIME TO SLEEP!! It's due tomorow. Your rite, let it sit. I DID. I figured out that problem i kep babbling about. NOW MY WINDOWS DONT WORK!!! I'm ok....Just really...*twitch* stressed out...Please help me Laughing
josh




PostPosted: Fri Jan 21, 2005 9:03 am   Post subject: (No subject)

as a wise man once said, "your failure to plan ahead does not caonstitue and emergency for me"
Tony




PostPosted: Fri Jan 21, 2005 9:16 am   Post subject: Re: Windows problems (not microsoft windows)

well it's not enough to just close the window, you need to actually stop the game loop..

just because you can't see the program's output, doesn't mean it is not there Wink

so do whatever you have to - exits, flags, etc.. If you need a quick fix, just stick a delay(60000) and you'll have 60 seconds to convince your teacher that everything is perfect Laughing
eNc




PostPosted: Fri Jan 21, 2005 9:23 am   Post subject: Re: Windows problems (not microsoft windows)

tony wrote:
well it's not enough to just close the window, you need to actually stop the game loop..

just because you can't see the program's output, doesn't mean it is not there Wink

so do whatever you have to - exits, flags, etc.. If you need a quick fix, just stick a delay(60000) and you'll have 60 seconds to convince your teacher that everything is perfect Laughing



lmao thats halarious, yea try and exit when condition or something.
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 1  [ 7 Posts ]
Jump to:   


Style:  
Search: