|
|
@ -5,7 +5,7 @@ import java.awt.Color;
|
|
|
|
* Write a description of class Province here.
|
|
|
|
* Write a description of class Province here.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @author GruenerWal, Felix Stupp
|
|
|
|
* @author GruenerWal, Felix Stupp
|
|
|
|
* @version 0.0.2
|
|
|
|
* @version 1.1.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class Province extends Actor
|
|
|
|
public class Province extends Actor
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -198,36 +198,41 @@ public class Province extends Actor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Weist dem Owner der Provinz sein entsprechendes Color-Tag zu.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
public void oDecide(GreenfootImage province,int textSize, int owner, int eCount)
|
|
|
|
public void oDecide(GreenfootImage province,int textSize, int owner, int eCount)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
String ownerString;
|
|
|
|
String ownerString;
|
|
|
|
if(owner == 0)
|
|
|
|
if(getWorld().getPlayerColor(owner) == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ownerString = "schwarz";
|
|
|
|
ownerString = "schwarz";
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
switch(owner)
|
|
|
|
switch(getWorld().getPlayerColor(owner))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
ownerString = "schwarz";
|
|
|
|
ownerString = "schwarz";
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
ownerString = "rot";
|
|
|
|
ownerString = "blau";
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
case 3:
|
|
|
|
ownerString = "blau";
|
|
|
|
ownerString = "gruen";
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
case 4:
|
|
|
|
ownerString = "gelb";
|
|
|
|
ownerString = "rot";
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
case 5:
|
|
|
|
ownerString = "gruen";
|
|
|
|
ownerString = "gelb";
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
eCalculate(province,ownerString,textSize);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
case 6:
|
|
|
|