Fixed: JavaDOC finished for buildings 1, 8, 10, 13
This commit is contained in:
@@ -8,8 +8,20 @@ import it.polimi.ingsw.gc14.Model.Player;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* During the Sustenance Event, you have a discount of 1 Food token on the total you
|
||||||
|
* would have to pay, for each of the indicated Characters in your tribe.
|
||||||
|
*/
|
||||||
public class Building1 extends BuildingCard {
|
public class Building1 extends BuildingCard {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The icon parameter indicates the character's type involved in the building effect
|
||||||
|
*/
|
||||||
private CharacterType icon ;
|
private CharacterType icon ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the icon attribute
|
||||||
|
*/
|
||||||
public CharacterType getIcon() {return icon;}
|
public CharacterType getIcon() {return icon;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import it.polimi.ingsw.gc14.Model.Player;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* At the end of the game, you gain 6 Prestige Points for each set of 6 different character cards in your tribe
|
||||||
|
*/
|
||||||
public class Building10 extends BuildingCard {
|
public class Building10 extends BuildingCard {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,12 +35,16 @@ public class Building10 extends BuildingCard {
|
|||||||
return new Building10(getEra(),getPrice(),getPrestigeValue());
|
return new Building10(getEra(),getPrice(),getPrestigeValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Counts the number of different character sets and the player gains an amount of Prestige Points
|
||||||
|
* equal to the number of sets multiplied by 6.
|
||||||
|
* @param player the player who owns the building
|
||||||
|
* @throws IllegalArgumentException thrown if the player doesn't own this building
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void applyEffect(Player player) throws IllegalArgumentException {
|
public void applyEffect(Player player) throws IllegalArgumentException {
|
||||||
if(!player.buildingCards.contains(this))
|
if(!player.buildingCards.contains(this))
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
HashMap<CharacterType,Integer> map = new HashMap<CharacterType,Integer>();
|
|
||||||
|
|
||||||
int numSet=player.getNType(CharacterType.INVENTOR);
|
int numSet=player.getNType(CharacterType.INVENTOR);
|
||||||
for(CharacterType type : CharacterType.values())
|
for(CharacterType type : CharacterType.values())
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ import it.polimi.ingsw.gc14.Model.Cards.Building.EffectType;
|
|||||||
import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
|
import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
|
||||||
import it.polimi.ingsw.gc14.Model.Player;
|
import it.polimi.ingsw.gc14.Model.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* At the end of the game, you gain 25 Prestige Points.
|
||||||
|
*/
|
||||||
public class Building13 extends BuildingCard{
|
public class Building13 extends BuildingCard{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -27,7 +30,11 @@ public class Building13 extends BuildingCard{
|
|||||||
return new Building13(getEra(),getPrice(),getPrestigeValue());
|
return new Building13(getEra(),getPrice(),getPrestigeValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add 25 Prestige Points to the player
|
||||||
|
* @param player the player who owns the building
|
||||||
|
* @throws IllegalArgumentException thrown if the player doesn't own this building
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void applyEffect(Player player) throws IllegalArgumentException {
|
public void applyEffect(Player player) throws IllegalArgumentException {
|
||||||
if(!player.buildingCards.contains(this))
|
if(!player.buildingCards.contains(this))
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
|
|||||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.Builder;
|
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.Builder;
|
||||||
import it.polimi.ingsw.gc14.Model.Player;
|
import it.polimi.ingsw.gc14.Model.Player;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* At the end of the game, you gain double the Prestige Points indicated on the Builder cards in your tribe.
|
||||||
|
*/
|
||||||
public class Building8 extends BuildingCard {
|
public class Building8 extends BuildingCard {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor of the building
|
* Constructor of the building
|
||||||
* @param era the game era of the building
|
* @param era the game era of the building
|
||||||
@@ -32,7 +32,11 @@ public class Building8 extends BuildingCard {
|
|||||||
return new Building8(getEra(),getPrice(),getPrestigeValue());
|
return new Building8(getEra(),getPrice(),getPrestigeValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For each builder in the player's hand, he gains double the Prestige Point indicated on the builder card.
|
||||||
|
* @param player the player who owns the building
|
||||||
|
* @throws IllegalArgumentException thrown if the player doesn't own this building
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void applyEffect(Player player) throws IllegalArgumentException {
|
public void applyEffect(Player player) throws IllegalArgumentException {
|
||||||
if(!player.buildingCards.contains(this))
|
if(!player.buildingCards.contains(this))
|
||||||
|
|||||||
Reference in New Issue
Block a user