xabierpayet wrote:can you put some source code?.
I will post the sources soon, when it's finished...
This game is quite simple to make, really:
Game board is stored in a two dimensional table. We make the table internally a little bit bigger than the real game board because we want to add extra border around the board edges. This is done, so we can save some comparisons when checking the winning position. There is no need to check if we are at the edge of the board. Extra border around the board will always terminate a search anyway.
Local player input is simply handled by building the game board grid as buttons and using event handler for handling the button presses. We simply use SendData() function to send the move as a line of text consisting button id to remote player. Remote player input is handled by using event handler for "OnReceiveData" event.
Synchronizing game turns is also simple. We use variable, which can have two states: 1 and -1. This variable is often called lambda and can have some clever uses. For an example we can use the same procedure for testing our own pieces and enemy's pieces in a game. If player1 plays on positive lambda with positive pieces and player2 plays on negative lambda with negative pieces, we can multiply value of the piece on board with lambda and result is always positive if the piece is owned by player whose turn it is.