Refactor: Gatherers->Gatherer Fixed
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
package it.polimi.ingsw.gc14.Model.Cards.TribeCards;
|
package it.polimi.ingsw.gc14.Model.Cards.TribeCards;
|
||||||
|
|
||||||
public enum CharacterType {
|
public enum CharacterType {
|
||||||
INVENTOR,BUILDER,GATHERERS,ARTIST,SHAMAN,HUNTER
|
INVENTOR,BUILDER, GATHERER,ARTIST,SHAMAN,HUNTER
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ public class Gatherer extends Character {
|
|||||||
* @param Era gatherers era
|
* @param Era gatherers era
|
||||||
*/
|
*/
|
||||||
public Gatherer(int Era) {
|
public Gatherer(int Era) {
|
||||||
super(Era, CharacterType.GATHERERS);
|
super(Era, CharacterType.GATHERER);
|
||||||
}
|
}
|
||||||
public Gatherer(int Era, int nMin) {
|
public Gatherer(int Era, int nMin) {
|
||||||
super(Era, CharacterType.GATHERERS,nMin);
|
super(Era, CharacterType.GATHERER,nMin);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -2,13 +2,11 @@ package it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events;
|
|||||||
|
|
||||||
import it.polimi.ingsw.gc14.Model.Cards.Building.Effects.Building1;
|
import it.polimi.ingsw.gc14.Model.Cards.Building.Effects.Building1;
|
||||||
import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
|
import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
|
||||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character;
|
|
||||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
|
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
|
||||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.EventType;
|
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.EventType;
|
||||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.EventCard;
|
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.EventCard;
|
||||||
import it.polimi.ingsw.gc14.Model.Player;
|
import it.polimi.ingsw.gc14.Model.Player;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public class Sustenance extends EventCard {
|
public class Sustenance extends EventCard {
|
||||||
private int PrestigeDebt;
|
private int PrestigeDebt;
|
||||||
@@ -26,7 +24,7 @@ public class Sustenance extends EventCard {
|
|||||||
public void activateEvent (ArrayList <Player> playerList) throws NullPointerException {
|
public void activateEvent (ArrayList <Player> playerList) throws NullPointerException {
|
||||||
for(Player player : playerList){
|
for(Player player : playerList){
|
||||||
int NChar = player.getTotCharacters();
|
int NChar = player.getTotCharacters();
|
||||||
int NGatherers = player.getNType(CharacterType.GATHERERS);
|
int NGatherers = player.getNType(CharacterType.GATHERER);
|
||||||
|
|
||||||
int NCharDiscount = 0;
|
int NCharDiscount = 0;
|
||||||
for(Player p : playerList){
|
for(Player p : playerList){
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class Player {
|
|||||||
case HUNTER -> hunters.size();
|
case HUNTER -> hunters.size();
|
||||||
case BUILDER -> builders.size();
|
case BUILDER -> builders.size();
|
||||||
case SHAMAN -> shamans.size();
|
case SHAMAN -> shamans.size();
|
||||||
case GATHERERS -> gatherers.size();
|
case GATHERER -> gatherers.size();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user