Player, Slot, Events added
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
package it.polimi.ingsw.gc14.Model;
|
||||
|
||||
import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Player {
|
||||
// Getters
|
||||
private String UserName;
|
||||
public String getUserName() {
|
||||
return UserName;
|
||||
}
|
||||
|
||||
private ArrayList <TribeCard> TribeCards;
|
||||
public ArrayList <TribeCard> getTribeCards() {
|
||||
return TribeCards;
|
||||
}
|
||||
|
||||
private ArrayList <BuildingCard> BuildingCards;
|
||||
public ArrayList <BuildingCard> getBuildingCards() {
|
||||
return BuildingCards;
|
||||
}
|
||||
|
||||
private int FoodValue;
|
||||
public int getFoodValue() {
|
||||
return FoodValue;
|
||||
}
|
||||
|
||||
private int PrestigeValue;
|
||||
public int getPrestigeValue() {
|
||||
return PrestigeValue;
|
||||
}
|
||||
|
||||
/* TODO
|
||||
* private Game game;
|
||||
* public Game getGame(){
|
||||
* return Game;
|
||||
* }
|
||||
*/
|
||||
// End getters
|
||||
|
||||
// Setters
|
||||
public void setUserName(String UserName){
|
||||
this.UserName = UserName;
|
||||
}
|
||||
|
||||
public void setTribeCards(ArrayList <TribeCard> TribeCards){
|
||||
this.TribeCards = TribeCards;
|
||||
}
|
||||
|
||||
public void setBuildingCards(ArrayList <BuildingCard> BuildingCards){
|
||||
this.BuildingCards = BuildingCards;
|
||||
}
|
||||
|
||||
public void addFood(int Value){
|
||||
this.FoodValue += Value;
|
||||
}
|
||||
|
||||
public Boolean removeFood(int Value){
|
||||
if(Value > this.FoodValue){
|
||||
return false;
|
||||
}
|
||||
this.FoodValue -= Value;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void addPrestige(int Value){
|
||||
this.PrestigeValue += Value;
|
||||
}
|
||||
|
||||
// TODO
|
||||
public void removePrestige(int Value){
|
||||
// check max/min value (605)
|
||||
this.PrestigeValue -= Value;
|
||||
}
|
||||
// End setters
|
||||
|
||||
// Constructors
|
||||
public Player(String UserName){
|
||||
this.UserName = UserName;
|
||||
this.TribeCards = new ArrayList<TribeCard>();
|
||||
this.BuildingCards = new ArrayList<BuildingCard>();
|
||||
this.FoodValue = 0;
|
||||
this.PrestigeValue = 0;
|
||||
}
|
||||
// End constructors
|
||||
|
||||
// Functions
|
||||
// TODO
|
||||
public void Play(Slot slot){
|
||||
|
||||
}
|
||||
|
||||
// TODO
|
||||
public void SlotChoice(){
|
||||
|
||||
}
|
||||
// End functions
|
||||
}
|
||||
Reference in New Issue
Block a user