The game rules are an important part of each game. Their correct
implementation ensures that not only the game is played correctly
but also that crucial aspects of its game play are revealed and exhibited.

The Stratego2Go game implements most of the modern rules of the Stratego Game. These can be found in Ed's Stratego Site.

Each console has a core module inside irrespective of if it is an observer or a player.
The core module of this specific game, handles more than the rules though. It can be regarded as a hub where multiple inputs
are processed and filtered and the appropriate signals are sent to the correct modules.

The diagram below is an overview of the links of the core to the other modules in the system and to its
basic source of information which is the data structures.



As we see, the game rule section is receiving input from the input section. Upon receiving this input,
the game rules section verifies the input by accessing data from the data structures section and finally
provides the output section with the correct signals. The output section consists of the network and the grahics section.

The implementation of the game is specific to the way and order in which it is played.
Two basic sections can be identified. These are:

  • The initialisation phase
  • The battle phase

    For each phase there are specific aims and goals to be achieved. These aims are set by the nature of the game.
    Since this is a network game message passing and synchronisation is crucial. Furthermore, the addition of the
    observers make the game vulnerable to disturbances. These are just a part of the problems that have to be taken into
    consideration. The aims of the whole module and of each phase are outlined below.

    AIMS - TASKS TO BE PERFOMED

  • Implements Stratego game rules and checks player input against them
  • Insure observer does not interfere with game
  • Provide correct signals to the network and graphics module
  • Maintain data structures that contain information needed during game
  • Filter wrong commands while transferring correct ones to the appropriate module
  • Avoid creation of separate modules for observer and player
  • Enhance game and module re-usability

    AIMS - INITIALISATION PHASE

  • Identify player id by reading signal from input module
  • Place pieces on battlefield while updating data structures and screen
  • Maintain correct information on start array
  • Correct number of pieces should be placed
  • Each player places move on his part of the board
  • Update ALL players/observers battlefield array and graphics module accordingly
  • Filter inappropriate commands
  • Send signal to graphics to inform user of mistakes being made
  • Start game by pressing start button, if all pieces placed

    AIMS - BATTLE PHASE

  • Maintain battlefield array representing board
  • Player moves should be correct relative to each piece
  • Attacks should be correct and winner should be decided according to pieces involved in battle
  • Consider revealing one players piece to opponent when appropriate
  • When flag captured declare winner
  • Game should be turn based
  • Messages should appear in players screen
  • Update observer screen at all times and insure that his messages are filtered

    Each of these phases are analysed in detail in the Design section of the core section.

    Please email me if you have any questions.

    Back to core module home page


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