Fix Buildings
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
package it.polimi.ingsw.gc14.Model.Cards.TribeCards.Building;
|
||||
package it.polimi.ingsw.gc14.Model.Cards.Building;
|
||||
|
||||
public abstract class BuildingEffect {
|
||||
private int effectId;
|
||||
public int getEffectId(){
|
||||
return effectId;
|
||||
}
|
||||
private EffectType effectType;
|
||||
public EffectType getEffectType() {
|
||||
return effectType;
|
||||
}
|
||||
public BuildingEffect (EffectType effectType)
|
||||
public BuildingEffect (EffectType effectType,int effectId)
|
||||
{
|
||||
this.effectId=effectId;
|
||||
this.effectType = effectType;
|
||||
}
|
||||
//TO DO
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package it.polimi.ingsw.gc14.Model.Cards.TribeCards.Building;
|
||||
package it.polimi.ingsw.gc14.Model.Cards.Building;
|
||||
|
||||
public enum EffectType {
|
||||
FINAL, CARDSET,INVENTORPAIR, ON_EVENT , END_TURN
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
package it.polimi.ingsw.gc14.Model.Cards;
|
||||
|
||||
public class BuildingCard {
|
||||
import it.polimi.ingsw.gc14.Model.Cards.Building.BuildingEffect;
|
||||
import it.polimi.ingsw.gc14.Model.PlayableCard;
|
||||
|
||||
public class BuildingCard extends PlayableCard {
|
||||
private int price;
|
||||
public int getPrice() {
|
||||
return price;
|
||||
}
|
||||
private BuildingEffect buildingEffect;
|
||||
public BuildingEffect getBuildingEffect() {
|
||||
return buildingEffect;
|
||||
}
|
||||
private BuildingCard(int era,int price,BuildingEffect buildingEffect) {
|
||||
super(era);
|
||||
this.price = price;
|
||||
this.buildingEffect = buildingEffect;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,30 +3,30 @@ import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
|
||||
|
||||
public class Inventor extends Character {
|
||||
private int invenctionSymbol;
|
||||
private int icon;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Inventor Specific Symbol
|
||||
*/
|
||||
public int InvenctionSymbol() {
|
||||
return invenctionSymbol;
|
||||
public int Icon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param Era inventor era
|
||||
* @param invenctionSymbol inventor symbol
|
||||
* @param icon inventor symbol
|
||||
* @throws IllegalArgumentException
|
||||
*/
|
||||
public Inventor(int Era,int invenctionSymbol) throws IllegalArgumentException {
|
||||
public Inventor(int Era,int icon) throws IllegalArgumentException {
|
||||
super(Era, CharacterType.INVENTOR);
|
||||
if(invenctionSymbol<0 || invenctionSymbol>9)
|
||||
if(icon<0 || icon>9)
|
||||
throw new IllegalArgumentException();
|
||||
this.invenctionSymbol = invenctionSymbol;
|
||||
this.icon = icon;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + " Symbol:" + String.valueOf(invenctionSymbol);
|
||||
return super.toString() + " Symbol:" + String.valueOf(icon);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user