Instance of deleted on characters, Changed Building Effect Logic
This commit is contained in:
@@ -3,6 +3,7 @@ package it.polimi.ingsw.gc14.Model;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCard;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -18,6 +19,13 @@ public class Player {
|
||||
private ArrayList <Character> CharacterCards;
|
||||
public ArrayList <Character> getCharacterCards() {
|
||||
ArrayList <Character> copy = new ArrayList <>();
|
||||
ArrayList<Character> temp = new ArrayList <>();
|
||||
temp.addAll(artists);
|
||||
temp.addAll(builders);
|
||||
temp.addAll(gatherers);
|
||||
temp.addAll(inventors);
|
||||
temp.addAll(shamans);
|
||||
temp.addAll(hunters);
|
||||
for(Character character:CharacterCards){
|
||||
copy.add(character.clone());
|
||||
}
|
||||
@@ -33,6 +41,13 @@ public class Player {
|
||||
return copy;
|
||||
}
|
||||
|
||||
public ArrayList <Artist> artists;
|
||||
public ArrayList <Builder> builders;
|
||||
public ArrayList <Inventor> inventors;
|
||||
public ArrayList <Gatherers> gatherers;
|
||||
public ArrayList <Shaman> shamans;
|
||||
public ArrayList <Hunter> hunters;
|
||||
|
||||
private int FoodValue;
|
||||
public int getFoodValue() {
|
||||
return FoodValue;
|
||||
@@ -52,15 +67,6 @@ public class Player {
|
||||
// End getters
|
||||
|
||||
// Setters
|
||||
public void setUserName(String UserName) throws IllegalArgumentException{
|
||||
int max_len = 32;
|
||||
if(UserName.length() > max_len || UserName.length() == 0){
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
this.UserName = UserName;
|
||||
}
|
||||
|
||||
|
||||
public void addFood(int Value){
|
||||
this.FoodValue += Value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user