From 9f9ec9ad5a227e7a18aaaec56903623b6e28deff Mon Sep 17 00:00:00 2001 From: Programmer245 Date: Thu, 27 Jun 2024 14:33:14 +0200 Subject: [PATCH] Added javadoc for attributes of CardPlaced and Field classes --- .../polimi/ingsw/am32/model/field/CardPlaced.java | 12 ++++++++++++ .../it/polimi/ingsw/am32/model/field/Field.java | 13 ++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/main/java/it/polimi/ingsw/am32/model/field/CardPlaced.java b/src/main/java/it/polimi/ingsw/am32/model/field/CardPlaced.java index d1bbeac0..ec9a0b8b 100644 --- a/src/main/java/it/polimi/ingsw/am32/model/field/CardPlaced.java +++ b/src/main/java/it/polimi/ingsw/am32/model/field/CardPlaced.java @@ -15,9 +15,21 @@ public class CardPlaced { //--------------------------------------------------------------------------------------------- // Variables and Constants + /** + * The card that player decided to place. + */ private final NonObjectiveCard placedCard; + /** + * The x coordinate of the placed card. + */ private final int x; + /** + * The y coordinate of the placed card. + */ private final int y; + /** + * A boolean representing the face of the card that player want to use. + */ private final boolean isUp; //--------------------------------------------------------------------------------------------- diff --git a/src/main/java/it/polimi/ingsw/am32/model/field/Field.java b/src/main/java/it/polimi/ingsw/am32/model/field/Field.java index 324cfbf9..f83b38d4 100644 --- a/src/main/java/it/polimi/ingsw/am32/model/field/Field.java +++ b/src/main/java/it/polimi/ingsw/am32/model/field/Field.java @@ -18,10 +18,21 @@ public class Field { //--------------------------------------------------------------------------------------------- // Variables and Constants + /** + * The list of cards placed in the field. + */ private final ArrayList fieldCards; + /** + * The resources currently owned by the player + */ private final int[] activeRes; + /** + * The number of resources in the game + */ private static final int resourcesSize = 7; - + /** + * The resources owned by the player before the last card was placed; used for rollback + */ private final int[] oldActiveRes; //---------------------------------------------------------------------------------------------