TicTacToe
---------

This directory contains the Otcl code example for a distributed
Tic Tac Toe game.

Out of all the code in this directory (851 lines) there are 4 lines
responsible for the distribution.

	set port [otcl oserver init]
	otcl oserver process

	in server

	and

	otcl oserver init
	otcl remoteClass PlayerServer $playerServerAddress

	int ttt

The rest of the code is responsible the the representation of a simple
Tic Tac Toe game as if it where all contained within a single
process/execution space.

To Run
------

Start the player server using an otclsh process:

../../otclsh server

This will start a player server process that is responsible for
TicTacToe recording the players available on the network. The server
will respond with the port number that it is listening on for player
registration.

Start a TicTacToe player:

../../owish ttt

You will be asked for your name, a nickname or whatever, and the address
of the player server. For the address of the player server enter
machine:port
for the location of the player server.

TicTacToe then presents a dialogue with two buttons, quite and challenge.
Selecting the challenge option shows a list of the current TicTacToe
players available on the network. Select one or more of the available
players and then choose the challenge option.

For each player you have challenged you will be presented with a familiar
3 x 3 board. Your marks are always shown as 'X' and your opponent as
'O'. The game will stop when all cells are filled or there is a winner.

It is possible to challenge yourself to a game. In this case you
will be presented with two board. One from your perspective (as the
challenger) and one from your perspective (as the challenged).
