Zumwalt
07-20-2005, 01:05 PM
I have a Tic Tac Toe game that I need to figure a piece of the puzzle out on, as a whole, it works (this was origanlly written in a vb.net book, I modified it to fit my needs), the problem is, the book didn't really explain very well how to create a listener that can add each connection to a collection and clear the listener to accept another connection.
This is only working for 2 connections.
What I need to learn how to do, and hopefully someone can give me a pointer or show me to a book I can read on how to accomplish this, is to allow a dynamic growth of my collection of players, and know if a collection item is used or open.
I figured I would have to create a collection and one of the objects in the collection item would be a 'dirty' flag or a 'used' flag, when the person disconnects, change the flag to available.
What I don't get, is how to move a connection around, meaning my player(0) is the listening channel, when someone connects, it moves them from player(0) to player(open), if there is no player(open) create a new player(x).
Here is the working code.No binaries please. Please remove all compiled files and re-post the attachment. Thanks.
This is only working for 2 connections.
What I need to learn how to do, and hopefully someone can give me a pointer or show me to a book I can read on how to accomplish this, is to allow a dynamic growth of my collection of players, and know if a collection item is used or open.
I figured I would have to create a collection and one of the objects in the collection item would be a 'dirty' flag or a 'used' flag, when the person disconnects, change the flag to available.
What I don't get, is how to move a connection around, meaning my player(0) is the listening channel, when someone connects, it moves them from player(0) to player(open), if there is no player(open) create a new player(x).
Here is the working code.No binaries please. Please remove all compiled files and re-post the attachment. Thanks.