Add: complete javaDOC

This commit is contained in:
2026-06-10 11:43:58 +02:00
parent c099847cbd
commit e45a5bbb98
25 changed files with 429 additions and 616 deletions
@@ -7,7 +7,9 @@ import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.Inventor;
import java.util.*;
/** Standalone entry point used for local model testing. */
public class Main {
/** @param args unused. */
public static void main(String[] args) {
}
@@ -19,11 +19,17 @@ import java.util.*;
*/
public class MiniModel implements Serializable {
/** Upper row of tribe cards currently on the board. */
public ArrayList<TribeCard> upperListTribeCards;
/** Lower row of tribe cards currently on the board. */
public ArrayList<TribeCard> lowerListTribeCards;
/** Upper row of building cards currently on the board. */
public ArrayList<BuildingCard> upperListBuildingCards;
/** Lower row of building cards currently on the board. */
public ArrayList<BuildingCard> lowerListBuildingCards;
/** Usernames of players currently disconnected from the game. */
public ArrayList<String> disconnectedPlayers;
/** The most recent network event applied to this model. */
public NetworkEvent lastEvent;
/**
@@ -27,6 +27,7 @@ public abstract class OrderLogicCard implements Serializable {
*/
public List<OrderPlayer> playerList;
/** Total number of players in this game. */
protected final int nPlayers;
@@ -42,6 +42,11 @@ public class Player implements Serializable {
return UserName;
}
/**
* Returns the totem assigned to this player.
*
* @return this player's totem.
*/
public Totems getTotem() {
return totem;
}
@@ -81,12 +86,19 @@ public class Player implements Serializable {
private ArrayList<Shaman> shamans;
private ArrayList<Hunter> hunters;
/** @return this player's building cards. */
public ArrayList<BuildingCard> getBuildingCards() { return buildingCards; }
/** @return this player's Artist character cards. */
public ArrayList<Artist> getArtists() { return artists; }
/** @return this player's Builder character cards. */
public ArrayList<Builder> getBuilders() { return builders; }
/** @return this player's Inventor character cards. */
public ArrayList<Inventor> getInventors() { return inventors; }
/** @return this player's Gatherer character cards. */
public ArrayList<Gatherer> getGatherers() { return gatherers; }
/** @return this player's Shaman character cards. */
public ArrayList<Shaman> getShamans() { return shamans; }
/** @return this player's Hunter character cards. */
public ArrayList<Hunter> getHunters() { return hunters; }
/**
@@ -132,6 +144,11 @@ public class Player implements Serializable {
this.FoodValue += Value;
}
/**
* Sets the totem for this player.
*
* @param totem the totem to assign.
*/
public void setTotem(Totems totem) {
this.totem = totem;
}