Docs: refine JavaDoc for character card classes
This commit is contained in:
@@ -74,7 +74,8 @@ public class Artist extends Character {
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts this Artist card into the specified player's Artist collection.
|
||||
* Inserts this Artist card into the specified player's Artist collection
|
||||
* and applies any building effects triggered by character set completion.
|
||||
*
|
||||
* @param player the player who receives the card.
|
||||
*/
|
||||
@@ -84,5 +85,4 @@ public class Artist extends Character {
|
||||
player.buildingCards.stream().filter(x->x.getEffectId()==0).forEach(x->x.applyEffect(player));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -143,13 +143,10 @@ public class Builder extends Character {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a string representation of this {@code TribeCard}. This specific variation is used in the {@code Game}'s
|
||||
* toString to print a more detailed version.
|
||||
* <p>Includes:
|
||||
* <li>{@link #reductionValue Reduction Value}
|
||||
* <li>{@link #prestigeValue Prestige Value}
|
||||
* </p>
|
||||
* @return {@code String} - a string representation of this {@code TribeCard}.
|
||||
* Returns a detailed string representation of this {@code Builder} card,
|
||||
* including its reduction value and prestige value.
|
||||
*
|
||||
* @return a detailed string representation of this {@code Builder} card.
|
||||
* @see it.polimi.ingsw.gc14.Model.Cards.TribeCard TribeCard
|
||||
* @see it.polimi.ingsw.gc14.Model.Game Game
|
||||
* @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board
|
||||
@@ -172,7 +169,8 @@ public class Builder extends Character {
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts this Builder card into the specified player's Builder collection.
|
||||
* Inserts this Builder card into the specified player's Builder collection
|
||||
* and applies any building effects triggered by character set completion.
|
||||
*
|
||||
* @param player the player who receives the card.
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ public class Gatherer extends Character {
|
||||
/**
|
||||
* Creates a Gatherer character card with the specified era.
|
||||
*
|
||||
* @param Era Gatherers era.
|
||||
* @param Era the era of the Gatherer card.
|
||||
*/
|
||||
public Gatherer(int Era) {
|
||||
super(Era, CharacterType.GATHERER);
|
||||
@@ -32,7 +32,7 @@ public class Gatherer extends Character {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Gatherer character card with the specified era.
|
||||
* Creates a Gatherer character card with the specified image id and era.
|
||||
*
|
||||
* @param idIMG the image identifier of the Gatherer card.
|
||||
* @param Era the era of the Gatherer card.
|
||||
@@ -74,7 +74,8 @@ public class Gatherer extends Character {
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts this Gatherer card into the specified player's Gatherer collection.
|
||||
* Inserts this Gatherer card into the specified player's Gatherer collection
|
||||
* and applies any building effects triggered by character set completion.
|
||||
*
|
||||
* @param player the player who receives the card.
|
||||
*/
|
||||
@@ -82,4 +83,4 @@ public class Gatherer extends Character {
|
||||
player.gatherers.add(this);
|
||||
player.buildingCards.stream().filter(x->x.getEffectId()==0).forEach(x->x.applyEffect(player));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,11 +93,14 @@ public class Hunter extends Character {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a string representation of this {@code TribeCard}. This specific variation is used in the {@code Game}'s
|
||||
* toString to print a more detailed version.
|
||||
* Returns a detailed string representation of this {@code TribeCard}.
|
||||
* This specific variation is used in the {@code Game}'s
|
||||
* toString to provide a more detailed version.
|
||||
*
|
||||
* <p>Potentially includes:
|
||||
* <li>{@link #icon Icon}
|
||||
* </p>
|
||||
*
|
||||
* @return {@code String} - a string representation of this {@code TribeCard}.
|
||||
* @see it.polimi.ingsw.gc14.Model.Cards.TribeCard TribeCard
|
||||
* @see it.polimi.ingsw.gc14.Model.Game Game
|
||||
@@ -125,6 +128,10 @@ public class Hunter extends Character {
|
||||
/**
|
||||
* Inserts this Hunter card into the specified player's Hunter collection.
|
||||
*
|
||||
* <p>If this card has the Hunter icon, the player gains 1 food for each
|
||||
* Hunter currently in their tribe. The method also applies any building
|
||||
* effects triggered by character set completion.
|
||||
*
|
||||
* @param player the player who receives the card.
|
||||
*/
|
||||
@Override
|
||||
@@ -136,4 +143,4 @@ public class Hunter extends Character {
|
||||
player.buildingCards.stream().filter(x->x.getEffectId()==0).forEach(x->x.applyEffect(player));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -97,11 +97,14 @@ public class Inventor extends Character {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a string representation of this {@code TribeCard}. This specific variation is used in the {@code Game}'s
|
||||
* toString to print a more detailed version.
|
||||
* Returns a detailed string representation of this {@code TribeCard}.
|
||||
* This specific variation is used in the {@code Game}'s toString
|
||||
* to provide a more detailed version.
|
||||
*
|
||||
* <p>Includes:
|
||||
* <li>{@link #icon Icons's ID}
|
||||
* </p>
|
||||
*
|
||||
* @return {@code String} - a string representation of this {@code TribeCard}.
|
||||
* @see it.polimi.ingsw.gc14.Model.Cards.TribeCard TribeCard
|
||||
* @see it.polimi.ingsw.gc14.Model.Game Game
|
||||
@@ -125,6 +128,9 @@ public class Inventor extends Character {
|
||||
/**
|
||||
* Inserts this Inventor card into the specified player's Inventor collection.
|
||||
*
|
||||
* <p>The method also applies the building effects related to inventor pairs
|
||||
* and any building effects triggered by character set completion.
|
||||
*
|
||||
* @param player the player who receives the card.
|
||||
*/
|
||||
@Override
|
||||
@@ -133,4 +139,4 @@ public class Inventor extends Character {
|
||||
player.inventors.add(this);
|
||||
player.buildingCards.stream().filter(x->x.getEffectId()==0).forEach(x->x.applyEffect(player));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ public class Shaman extends Character {
|
||||
* @return the icon value of this Shaman card.
|
||||
*/
|
||||
public int getIcon() {
|
||||
return icon;
|
||||
return icon;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,8 +90,8 @@ public class Shaman extends Character {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a string representation of this {@code TribeCard}. This specific variation is used in the {@code Game}'s
|
||||
* toString to print a more detailed version.
|
||||
* Returns a string representation of this {@code TribeCard}. This specific variation is used in the {@code Game}'s
|
||||
* toString to provide a more detailed version.
|
||||
* <p>Includes:
|
||||
* <li>{@link #icon Number of stars}
|
||||
* </p>
|
||||
@@ -116,7 +116,8 @@ public class Shaman extends Character {
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts this Shaman card into the specified player's Shaman collection.
|
||||
* Inserts this Shaman card into the specified player's Shaman collection
|
||||
* and applies any building effects triggered by character set completion.
|
||||
*
|
||||
* @param player the player who receives the card.
|
||||
*/
|
||||
@@ -126,4 +127,4 @@ public class Shaman extends Character {
|
||||
player.shamans.add(this);
|
||||
player.buildingCards.stream().filter(x->x.getEffectId()==0).forEach(x->x.applyEffect(player));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user