Click to See Complete Forum and Search --> : online tic tac toe


manzoor10
February 6th, 2009, 10:28 AM
I'm developing a tic tac toe multiplayer game, the game is up and it is working on a single pc, I want it to be playable across two computers in LAN, I'll be using TCP/IP for this and I have already set up a chat server program. So I know how to do communication. The concern is that I have a GameBoard class which does everything, from making a move, to restarting the game and checking for winner etc. It is independant of the form except of the mouse clicks, the form just reads in the GameBoard's properties, attributes and updates itself. How may I expand it into a multiplayer game, I want to establish a client to client architechure, should I expand the GameBoard class,
should I serialize the GameBoard class and deserialize it on the other side, or just send the specific move done? Whats good, please tell me and help me out how it will be done. I mean just the head up :)

ckweius
February 18th, 2009, 01:50 AM
Let the server do all the game processes (start new game, pause game, initialize board, determine winner, etc.) and the broadcast of results to clients.
Clients should only pump user grid selection to server, receive results from server and fill the local board.