Add: toString methods JavaDOC

This commit is contained in:
2026-05-02 17:29:40 +02:00
parent b8c6c86d92
commit 06162a243f
8 changed files with 27 additions and 4 deletions
@@ -1,5 +1,5 @@
package it.polimi.ingsw.gc14.Model.Cards.Building; package it.polimi.ingsw.gc14.Model.Cards.Building;
public enum EffectType { public enum EffectType {
FINAL, CARD_SET,INVENTOR_PAIR, ON_EVENT , ON_END_TURN, ON_ROUND_END FINAL, CARD_SET, INVENTOR_PAIR, ON_EVENT, ON_END_TURN, ON_ROUND_END
} }
@@ -1,5 +1,5 @@
package it.polimi.ingsw.gc14.Model.Cards.TribeCards; package it.polimi.ingsw.gc14.Model.Cards.TribeCards;
public enum CharacterType { public enum CharacterType {
INVENTOR,BUILDER, GATHERER,ARTIST,SHAMAN,HUNTER INVENTOR, BUILDER, GATHERER, ARTIST, SHAMAN, HUNTER
} }
@@ -1,5 +1,5 @@
package it.polimi.ingsw.gc14.Model.GamePackage; package it.polimi.ingsw.gc14.Model.GamePackage;
public enum GameStages { public enum GameStages {
WAITING,SLOT_CHOICE, RESOLVING_ACTIONS, OPTIONAL_CARD_EFFECT, RESOLVING_EVENT,ENDING,ENDED WAITING, SLOT_CHOICE, RESOLVING_ACTIONS, OPTIONAL_CARD_EFFECT, RESOLVING_EVENT, ENDING, ENDED
} }
@@ -52,10 +52,14 @@ public class Order2 extends OrderLogicCard {
} }
} }
} }
/**
* Creates the TURN ORDER box of the TUI.
* @return the string containing the box
*/
@Override @Override
public String toString() public String toString()
{ {
var table = new AsciiTable(BorderStyle.UNICODE, 2); var table = new AsciiTable(BorderStyle.UNICODE, 2);
List<String> stringUp=new ArrayList<>(); List<String> stringUp=new ArrayList<>();
for(int i=0;i<2;i++) for(int i=0;i<2;i++)
@@ -53,6 +53,11 @@ public class Order3 extends OrderLogicCard {
} }
} }
} }
/**
* Creates the TURN ORDER box of the TUI.
* @return the string containing the box
*/
@Override @Override
public String toString() public String toString()
{ {
@@ -60,6 +60,11 @@ public class Order4 extends OrderLogicCard {
} }
} }
} }
/**
* Creates the TURN ORDER box of the TUI.
* @return the string containing the box
*/
@Override @Override
public String toString() public String toString()
{ {
@@ -61,6 +61,11 @@ public class Order5 extends OrderLogicCard {
} }
} }
} }
/**
* Creates the TURN ORDER box of the TUI.
* @return the string containing the box
*/
@Override @Override
public String toString() public String toString()
{ {
@@ -17,6 +17,10 @@ public class OrderPlayer implements Serializable {
this.player=player; this.player=player;
this.played=played; this.played=played;
} }
/**
* @return the string containing the username and whether it played or not.
*/
@Override @Override
public String toString() { public String toString() {
return player.getUserName()+" "+played; return player.getUserName()+" "+played;