Computer Science Canada Two Player Connect Four |
Author: | xAXISx [ Wed Jun 28, 2006 9:21 pm ] | ||
Post subject: | Two Player Connect Four | ||
Took me a day and a half, but I made it. Checking for lines was the hardest part, but I really suggest anyone who's new to program simple games like this. They really help. Easy to use, just type in your names and click the column to place a piece. Here goes:
|
Author: | MysticVegeta [ Thu Jun 29, 2006 11:39 am ] |
Post subject: | |
Nice, excellent game, couldnt find any game bugs. good job, I liked how you used loop and end loop now instead of processes, notice how much faster it runs? good job +bits |
Author: | Clayton [ Thu Jun 29, 2006 11:42 am ] |
Post subject: | |
not bad, i like the little dropping motion thing, pretty cool ![]() ![]() |
Author: | xAXISx [ Thu Jun 29, 2006 2:43 pm ] |
Post subject: | |
Thanks, and I made this a little while ago, but I think it's in the case of a draw, I'll look at it a little later. Edit: Ahh yes, it results 2 incase of a draw. |
Author: | Clayton [ Thu Jun 29, 2006 5:08 pm ] |
Post subject: | |
how can you have a draw? in real life the player checks after each turn (after a reasonable amount of turns for each player) whether theyve won or not right? so the only logical answers to the question is a)yes (true) or b)no (false), so unless there had been a third color added to connect four (and it doesnt look like it from your game) you cant possibly come up with a draw ![]() |
Author: | xAXISx [ Thu Jun 29, 2006 6:04 pm ] |
Post subject: | |
SuperFreak82 wrote: how can you have a draw? in real life the player checks after each turn (after a reasonable amount of turns for each player) whether theyve won or not right? so the only logical answers to the question is a)yes (true) or b)no (false), so unless there had been a third color added to connect four (and it doesnt look like it from your game) you cant possibly come up with a draw
![]() Well, if all columns are full and no player has won yet, that's when a draw occurs. |
Author: | TheOneTrueGod [ Thu Jun 29, 2006 6:04 pm ] |
Post subject: | |
What if all spaces are covered, but there is no winner? This would result in a draw. |
Author: | Clayton [ Thu Jun 29, 2006 7:02 pm ] |
Post subject: | |
all right you win, i still think you should have a boolean win check, then just have a counter to keep track of how many turns have gone by, if all possible turns have been taken, (when the counter is at 42) and there is no win, then call it a draw, but whatever |
Author: | MysticVegeta [ Thu Jun 29, 2006 7:37 pm ] |
Post subject: | |
Just to avoid " = 1, = 2, = 0", why make 1 more variable called counter to keep track of the # of moves? you are using more memory... |
Author: | xAXISx [ Thu Jun 29, 2006 9:58 pm ] |
Post subject: | |
MysticVegeta wrote: Just to avoid " = 1, = 2, = 0", why make 1 more variable called counter to keep track of the # of moves? you are using more memory...
Okay, better than my current approach, which checks if each column is full after every turn, that's kind of inefficient. Thanks. |