Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.zazof.jteg
Class BoardModel  view BoardModel download BoardModel.java

java.lang.Object
  extended byorg.zazof.jteg.BoardModel

public class BoardModel
extends java.lang.Object

The BoardModel is a part of the Model-View-Controller structure and handles all board data. Thus this class doesn't know anything about its visualization.


Field Summary
private  int $armiesPositionX
           
private  int $armiesPositionY
           
private  DiceList $attackDices
           
private static java.lang.String $boardMapLocation
           
private  DiceList $defenceDices
           
private  java.lang.String $dicesText
           
private static java.lang.String $selectedThemeLocation
           
private static int CANNON
           
private  int[] cardTypes
           
private  CountryList cl
           
private static int COMODIN
           
private static boolean DEBUG
           
private static int GALLEON
           
private static int GLOBO
           
private  PlayerList pl
           
 
Constructor Summary
BoardModel(PlayerList pl)
          Constructor of this BoardModel
 
Method Summary
 java.util.Enumeration getAttackDices()
          Returns the dices from the BoardModel used by the attacker
static java.lang.String getBoardMapFileName()
          Returns the directory of the currently selected theme
 java.util.Enumeration getCountries()
          Returns the countries of the boardmodel
 CountryList getCountryList()
          Returns the countrylist associated with this boardmodel
 java.util.Enumeration getDefenceDices()
          Returns the dices from the boardmodel used by the defender
 java.lang.String getDiceTextColor()
          Returns the color of the text above the dices (the countrynames involved in an attack)
static java.lang.String getSelectedThemeLocation()
          Returns the directory of the currently selected theme
 int getXArmiesCoordinate()
          Returns the X-Coordinate of the Armies Informationscreen that can be used by visualiserclasses
 int getYArmiesCoordinate()
          Returns the Y-Coordinate of the Armies Informationscreen that can be used by visualiserclasses
private  void initCountryList(IXMLElement document)
          Parses the xml document with the board structure
private  void initDiceList(IXMLElement document)
          Parses all information that is relevant for dices and creates Diceobjects to be added to the game.
 void messageArrived(Message m)
          This method is called from the BoardController class, because the BoardController redirects some messages to the BoardModel.
private  void showThemeInformation(IXMLElement document)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

$selectedThemeLocation

private static java.lang.String $selectedThemeLocation

$armiesPositionX

private int $armiesPositionX

$armiesPositionY

private int $armiesPositionY

$boardMapLocation

private static java.lang.String $boardMapLocation

pl

private PlayerList pl

cl

private CountryList cl

$attackDices

private DiceList $attackDices

$defenceDices

private DiceList $defenceDices

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

$dicesText

private java.lang.String $dicesText

cardTypes

private int[] cardTypes

GLOBO

private static final int GLOBO
See Also:
Constant Field Values

GALLEON

private static final int GALLEON
See Also:
Constant Field Values

CANNON

private static final int CANNON
See Also:
Constant Field Values

COMODIN

private static final int COMODIN
See Also:
Constant Field Values
Constructor Detail

BoardModel

public BoardModel(PlayerList pl)
Constructor of this BoardModel

Method Detail

initCountryList

private void initCountryList(IXMLElement document)
Parses the xml document with the board structure


initDiceList

private void initDiceList(IXMLElement document)
Parses all information that is relevant for dices and creates Diceobjects to be added to the game. Dicelists are constructed


showThemeInformation

private void showThemeInformation(IXMLElement document)

messageArrived

public void messageArrived(Message m)
This method is called from the BoardController class, because the BoardController redirects some messages to the BoardModel.


getCountries

public java.util.Enumeration getCountries()
Returns the countries of the boardmodel


getAttackDices

public java.util.Enumeration getAttackDices()
Returns the dices from the BoardModel used by the attacker


getDefenceDices

public java.util.Enumeration getDefenceDices()
Returns the dices from the boardmodel used by the defender


getCountryList

public CountryList getCountryList()
Returns the countrylist associated with this boardmodel


getSelectedThemeLocation

public static java.lang.String getSelectedThemeLocation()
Returns the directory of the currently selected theme


getBoardMapFileName

public static java.lang.String getBoardMapFileName()
Returns the directory of the currently selected theme


getDiceTextColor

public java.lang.String getDiceTextColor()
Returns the color of the text above the dices (the countrynames involved in an attack)


getXArmiesCoordinate

public int getXArmiesCoordinate()
Returns the X-Coordinate of the Armies Informationscreen that can be used by visualiserclasses


getYArmiesCoordinate

public int getYArmiesCoordinate()
Returns the Y-Coordinate of the Armies Informationscreen that can be used by visualiserclasses