Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Added javadoc for attributes of CardPlaced and Field classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Programmer245 committed Jun 27, 2024
1 parent 2dccbc4 commit 9f9ec9a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/main/java/it/polimi/ingsw/am32/model/field/CardPlaced.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

//---------------------------------------------------------------------------------------------
Expand Down
13 changes: 12 additions & 1 deletion src/main/java/it/polimi/ingsw/am32/model/field/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,21 @@ public class Field {
//---------------------------------------------------------------------------------------------
// Variables and Constants

/**
* The list of cards placed in the field.
*/
private final ArrayList<CardPlaced> 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;

//---------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 9f9ec9a

Please sign in to comment.