This section provides an insight and description of the input module and network(bluetooth) connection to the
core module.

It should be noted that the input module was written by Andrew Bates and the bluetooth module by Jackson Tong.



Input module / Network -> Core module interface

Each time the player presses the button of his mouse the coordinates are captured and sent to the input section. Then the input section
determines what they were, and sends two signals. A button or a move. Furthermore whenever a legal button press or move is performed
the opponent and observers should be aware of it. For this reason the successful command is sent down the network and is received by all the
other participants.

As shown in the diagram there are two kind of messages sent between the input and the core. 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