Computer Science Canada Slight Tic-Tac-Toe problem |
Author: | TheFerret [ Wed Mar 17, 2004 11:36 pm ] |
Post subject: | Slight Tic-Tac-Toe problem |
I made a Tic-Tac-Toe game and it works good but when you hit yes to play again and put in 2 x's and 2 o's it stops and says it is finished and I have tried changing stuff around and nothing works... P.S. My code is probally so un effiecent |
Author: | AsianSensation [ Wed Mar 17, 2004 11:54 pm ] |
Post subject: | |
did you also reset fill? That might be the problem, from a cursory glance anyways. |
Author: | TheFerret [ Thu Mar 18, 2004 12:09 am ] | ||
Post subject: | |||
That fixed but another question, how can you put a procedure in a process and have the procedure below work... exp...(I took out a big part of the code)
|
Author: | AsianSensation [ Thu Mar 18, 2004 9:08 am ] | ||
Post subject: | |||
well, first of all, I wouldn't try to use processes, it's very inaccurate for the things you want to do. But if you really want to do this, function prototype it. use forward.
notice how you can't use forward with processes. So you have to prototype the procedure only. |
Author: | TheFerret [ Thu Mar 18, 2004 1:57 pm ] |
Post subject: | |
It works, here is my Tic-Tac-Toe game... |
Author: | AsianSensation [ Thu Mar 18, 2004 2:04 pm ] |
Post subject: | |
slight problem, I don't think you checked for input on the same spot. That means I can input square 1 as the coordinate for 9 times. Should fix that, I dont see any other problems so far, gj. |
Author: | recneps [ Thu Mar 18, 2004 3:57 pm ] |
Post subject: | |
for some more ideas, check out my fp, the source code is there, show you how i made it so that you couldnt click on a used sq ![]() |