|
@@ -220,20 +220,25 @@ public class Player
|
|
|
{
|
|
|
return abilities;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public void setEnergySupply(int energySupply)
|
|
|
{
|
|
|
this.energySupply = energySupply;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public void setObjectivesAmount(int objectivesAmount)
|
|
|
{
|
|
|
this.objectivesAmount = objectivesAmount;
|
|
|
}
|
|
|
-
|
|
|
- public void getAbilities(PlayerAbilities playerAbilities)
|
|
|
+
|
|
|
+ public boolean hasWon()
|
|
|
{
|
|
|
- abilities = playerAbilities;
|
|
|
+ return objectivesVisited >= objectivesAmount;
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean hasLost()
|
|
|
+ {
|
|
|
+ return energyUsed >= energySupply;
|
|
|
}
|
|
|
|
|
|
public void reset(int energySupply, int objectivesAmount, PlayerAbilities abilities)
|