Sockets and Tic Tac Toe
For this program you are going to modify your tic-tac-toe program to do
socket communication in addition to the normal mode of operation. You are
also going to add an option to play more that one game at a time.
On the client end, for the multigame option, the program should now ask
how many games you want play, and should display the score when you
finish each game.
It should now have three modes of operation.
- no arguments
Standard terminal based I/O
- -s port
Server running on given port
- -c host port -n num
Client that will connect to server on given host and port and play num games.
The idea here is that you may play on the local terminal, using telnet as
a client, or even have it play against itself ( Server vs. Client ).
Here is a sample run from mine.
This program is due on April 30th.
The Goals
- utilize file descriptor streams
- write socket code
- write object oriented code