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

Quick Search    Search Deep

org.zazof.jtegServer
Class World  view World download World.java

java.lang.Object
  extended byorg.zazof.jtegServer.World

public class World
extends java.lang.Object


Field Summary
private  java.util.Hashtable $continents
           
private  java.util.Vector $countries
           
(package private) static org.apache.log4j.Category log
           
private static java.lang.String xmlFile
           
 
Constructor Summary
World()
           
 
Method Summary
 int countArmies(Player p)
          counts all the armies of the player
 int countCountries(Player p)
          counts all the countries owned by the player
 Continent getContinent(java.lang.String continent)
           
 java.util.Enumeration getContinents()
           
 Country getCountry(int countryID)
           
 Country getCountry(java.lang.String name)
           
 int getNbCountries()
           
private  void initCountries(IXMLElement document)
          init the world with countries
private  void initNeighbours(IXMLElement document)
          init the neighbour relation between countries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

$continents

private java.util.Hashtable $continents

$countries

private java.util.Vector $countries

xmlFile

private static java.lang.String xmlFile

log

static org.apache.log4j.Category log
Constructor Detail

World

public World()
      throws ShutdownException
Method Detail

initCountries

private void initCountries(IXMLElement document)
                    throws java.lang.Exception
init the world with countries


initNeighbours

private void initNeighbours(IXMLElement document)
                     throws java.lang.Exception
init the neighbour relation between countries


getCountry

public Country getCountry(int countryID)

getCountry

public Country getCountry(java.lang.String name)

getContinent

public Continent getContinent(java.lang.String continent)

countArmies

public int countArmies(Player p)
counts all the armies of the player


countCountries

public int countCountries(Player p)
counts all the countries owned by the player


getNbCountries

public int getNbCountries()

getContinents

public java.util.Enumeration getContinents()