This section provides an insight and description of the core module connection to the network.

It should be noted that the bluetooth module was written by Jackson Tong.



Core module -> Network interface

After a legal move or button press has been performed by a player the obesrers and the opponent should be notified so
that their data structures and screen is updated. For this reason the successful command is sent down the network
and is broadcasted to all consoles participating in the game.

As shown in the diagram there are two kind of messages sent between the core and the network. These are buttons and moves and their structure
is defined below:

The button composite consists of:
  • int player : Integer identification of the player that pressed it
  • int x : Integer identifying the number of the button that was pressed

    The move composite consists of:
  • int player : Integer identification of the player that performed a move
  • int x1 : Integer x-coordinate of source piece
  • int y1 : Integer y-coordinate of source piece
  • int x2 : Integer x-coordinate of destination piece
  • int y2 : Integer y-coordinate of destination piece

    The move command represents a move. The command in natural language is translated as:
    "player moved a piece from x1,y1 to x2,y2"


    Please email me if you have any questions.

    Back to core module home page
    Back to core design page


    Copyright © 2002 Spyros Lambrinidis
    Last Updated 16/03/02