|
|
|
@ -9,8 +9,11 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
|
|
|
|
public class Province extends Actor
|
|
|
|
|
{
|
|
|
|
|
private int stars = 1;
|
|
|
|
|
private int provinceID;
|
|
|
|
|
private String displayName;
|
|
|
|
|
private String owner;
|
|
|
|
|
private int owner;
|
|
|
|
|
private int[] nextProvinces;
|
|
|
|
|
private int continentID;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* leere Act-Methode
|
|
|
|
@ -18,14 +21,22 @@ public class Province extends Actor
|
|
|
|
|
*/
|
|
|
|
|
public void act()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// GruenerWal war hier :3
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Konstruktor, benötigt Sterne
|
|
|
|
|
public Province(int s, String d)
|
|
|
|
|
public Province(int i1, int i2, int i3, String s1, int[] ia1)
|
|
|
|
|
{
|
|
|
|
|
stars = s;
|
|
|
|
|
displayName = d;
|
|
|
|
|
provinceID = i1;
|
|
|
|
|
continentID = i2;
|
|
|
|
|
stars = i3;
|
|
|
|
|
displayName = s1;
|
|
|
|
|
nextProvinces = new int[ia1.length];
|
|
|
|
|
|
|
|
|
|
for ( int z1 = 0; z1 < ia1.length; z1++)
|
|
|
|
|
{
|
|
|
|
|
nextProvinces[z1] = ia1[z1];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Liefert die Sterne als Integer
|
|
|
|
@ -34,22 +45,40 @@ public class Province extends Actor
|
|
|
|
|
return stars;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Setzt die Sterne, benötigt Integer
|
|
|
|
|
public void setStars(int s)
|
|
|
|
|
// Liefert die Provinz-ID als Integer
|
|
|
|
|
public int getProvinceID()
|
|
|
|
|
{
|
|
|
|
|
return provinceID;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Liefert den Anzeigenamen als String
|
|
|
|
|
public String getDisplayName()
|
|
|
|
|
{
|
|
|
|
|
s = stars;
|
|
|
|
|
return displayName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Liefert den Owner als String
|
|
|
|
|
public String getOwner()
|
|
|
|
|
public int getOwner()
|
|
|
|
|
{
|
|
|
|
|
return owner;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Liefert angrenzende Provinzen als Integer-Array
|
|
|
|
|
public int[] getNextProvinces()
|
|
|
|
|
{
|
|
|
|
|
return nextProvinces;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Liefert die Kontinent-ID als Integer
|
|
|
|
|
public int getContinentID()
|
|
|
|
|
{
|
|
|
|
|
return continentID;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Setzt den Owner, benötigt String
|
|
|
|
|
public void setOwner(String o)
|
|
|
|
|
public void setOwner(int o)
|
|
|
|
|
{
|
|
|
|
|
o = owner;
|
|
|
|
|
owner = o;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|