Risk.Internals
Class Continent
java.lang.Object
|
+--Risk.Internals.Continent
- public class Continent
- extends java.lang.Object
Element Continent que conte un llistat amb tots els altres continents amb els
que fa frontera, una llista de tots el territoris que te, el seu nom i l'ID.
A més conté métodes especial útils per porta a terme accions concretes de l'API
que s'ha d'oferir als jugadors.
Constructor Summary |
protected |
Continent(java.lang.String s,
int id)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Continent
protected Continent(java.lang.String s,
int id)
throws NoMemoria
id
public int id()
nom
public java.lang.String nom()
afegirTerritory
public void afegirTerritory(Territory t)
throws PDIdreta,
NoMemoria
PDIdreta
NoMemoria
Border
public int Border(int num)
throws PDIdreta
- Rertorna l'id del territori numero "num" que fa frontera amb aquest continent
PDIdreta
borderWith
public void borderWith(Continent c)
throws PDIdreta,
NoMemoria
PDIdreta
NoMemoria
borderWith
public boolean borderWith(java.lang.String s)
throws PDIdreta
PDIdreta
BorderCount
public int BorderCount()
throws PDIdreta
- Rertorna el nombre de territoris que fan frontera amb aquest continent
PDIdreta
borderTotal
public int borderTotal()
- Returns:
- Total de contients que fan frontera amb aquest