diff --git a/.gitignore b/.gitignore index e44eabc0..5fa2958d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Match files +*.match + # Compiled class file *.class @@ -34,3 +37,4 @@ target/ .project src/main/resources/graphics/ +bin/ diff --git a/deliveries/JAR/GUI.jar b/deliveries/JAR/GUI.jar new file mode 100644 index 00000000..8d651521 Binary files /dev/null and b/deliveries/JAR/GUI.jar differ diff --git a/deliveries/JAR/README.md b/deliveries/JAR/README.md new file mode 100644 index 00000000..ff70af45 --- /dev/null +++ b/deliveries/JAR/README.md @@ -0,0 +1,30 @@ +# Eseguire i JAR +## Jar del server + +```bash +java -jar Server.jar [RMI Port] [TCP Port] +``` +`RMI Port` e `TCP Port` sono opzionali, se non specificate assumono rispettivamente i valori `2222` e `9999`. + +## Jar della TUI + +```bash +java -jar TUI.jar +``` +Per eseguire la TUI e' consigliato utilizzare un nerd font. + +## Jar della GUI +```bash +java -jar GUI.jar +``` + +# Compilare i JAR +1. (Opzionale, senza la GUI non funziona) Scaricare la cartella risorse da [qui](https://drive.google.com/file/d/15CvIqbfmjXKmvkwzr2-L_PMIKgQnIvA3/view?usp=sharing). +2. Estrarre le immagini nella cartella `src/main/resources/images` +3. Eseguire il comando: + +```bash +./mvnw clean package +``` + +I file risultanti si troveranno nella cartella target. \ No newline at end of file diff --git a/deliveries/JAR/Server.jar b/deliveries/JAR/Server.jar new file mode 100644 index 00000000..6fdf486b Binary files /dev/null and b/deliveries/JAR/Server.jar differ diff --git a/deliveries/JAR/TUI.jar b/deliveries/JAR/TUI.jar new file mode 100644 index 00000000..1e79c8e3 Binary files /dev/null and b/deliveries/JAR/TUI.jar differ diff --git a/deliveries/Javadoc/allclasses-index.html b/deliveries/Javadoc/allclasses-index.html new file mode 100644 index 00000000..6a77d058 --- /dev/null +++ b/deliveries/Javadoc/allclasses-index.html @@ -0,0 +1,561 @@ + + + + +All Classes and Interfaces (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes and Interfaces

+
+
+
+
+
+
Class
+
Description
+ +
+
Messages sent by clients to the server to express a user intention to do an + action
+
+ +
+
Subclass of MatchState.
+
+ +
+
Subclass of MatchState.
+
+ +
 
+ +
+
AvailableMatches
+
+ +
+
This response is sent when a user is connected to the server.
+
+ +
+
Board is the class that contains all the information relative to a Player's status
+
+ +
+
Game board, manages card display
+
+ +
+
Represents a position on the board, used to find valid positions and display anchor numbers when + a player must choose where to place the card.
+
+ +
+
Highest abstraction of the card object, with common aspects for every card in + the game (except objectives).
+
+ +
 
+ +
+
Topological definition of a card's side
+
+ +
+
Parser of Cards, implements a custom parser for Requirement
+
+ +
+
Singleton that represents a collection of all cards actually existing in the Game, so only those used + in the Match instances.
+
+ +
+
Serialize game cards into json
+
+ +
 
+ +
+
JavaFX controller for the chat pane
+
+ +
+
The action communicates the player's choice of the initial card's side.
+
+ +
+
Subclass of MatchState.
+
+ +
+
The action communicates the intention of a player to choose his secret objective.
+
+ +
+
Subclass of MatchState.
+
+ +
 
+ +
+
This class contains just elements needed to show the player's board, points, resources, hand and objectives
+
+ +
+
Every time a socket gets accepted by the TCP server, a new ClientListener will be created with + it, and it will: + + Acquire the client's username + Make the client (which is still not a Player) choose/create a Match to join + Create its PlayerControllerTCP, which will also make him join such Match + Listen for any message received and, execute the corresponding action.
+
+ +
+
Receives messages from server to client
+
+ +
+
Represents pawns colors.
+
+ +
+
Controller for the connection scene
+
+ +
+
All the corners of a card, which can contain a Symbol
+
+ +
+
The action communicates (to the server) the intention of a client to create a new match.
+
+ +
+
This is a temporary class, used to have all the logic related to deck creation in a single place, so that + when it will be implemented correctly we know where to modify it
+
+ +
 
+ +
+
The action communicates the intention of a player to draw a card.
+
+ +
+
It communicates the intention of a player to draw the initial card.
+
+ +
+
It communicates the intention of a player to draw the (2) secret objectives.
+
+ +
+
All the sources a player can draw from: the decks and the four visible cards.
+
+ +
+
Sent to the clients when an error happens
+
+ +
+
Controller of the error scene window
+
+ +
+
Subclass of MatchState.
+
+ +
+
Generic used to create the decks for all the types of cards
+
+ +
+
The client asks for an updated version of the lobby; + The server returns an AvailableMatchesMessage response.
+
+ +
+
The front side of these cards always gives points, but needs a certain requirement to be met in order to be played
+
+ +
+
Class from which the FXML application is run, so it's entry point for the user.
+
+ +
+
Class to manage graphical clients
+
+ +
+
JavaFX implementation of Codex Naturalis client
+
+ +
+
Class that handles client game loop from TUI.
+
+ +
 
+ +
 
+ +
+
Every player has an initial card (which will automatically be placed in the + center of the board)
+
+ +
+
Class that handles the prompt and gets the user input
+
+ +
 
+ +
 
+ +
+
This class will handle all the IO operations for a certain socket.
+
+ +
+
The action communicates the intention of a client to join a match.
+
+ +
+
Last request status.
+
+ +
+
LeaderboardEntry
+
+ +
 
+ +
+
Represents the match played by Player instances, therefore implements a slice of game logic + using drawCard(...), setInitialSide(...), setSecretObjective(...), proposeSecretObjective(...), etc.
+
+ +
+
This response is sent to each player when the match is finished
+
+ +
+
Interface to be implemented by any class that wants to be an observer of Match, so wants to be able to + get notified when an event occurs in a match (to which it's subscribed).
+
+ +
+
Functional interface used to represents a method call (MatchObserverCallable.call(MatchObserver)) on a MatchObserver.
+
+ +
+
This response is sent to the user who just rejoined a match.
+
+ +
+
JavaFX controller of the match scene
+
+ +
+
Sent when the required amount of players is reached and the match is about to start.
+
+ +
+
Represents an appendix of Match.
+
+ +
+
Represents the current match macro-state from the client point of view.
+
+ +
+
Subclass of MatchObserver supposed to perform routine actions, which means actions that are to be + performed when there's a state transition, BUT that are not related to a specific player.
+
+ +
+
Message
+
+ +
 
+ +
+
Class used by a generic client to receive from and transmit to a remote Server instance and a + remote PlayerController instance.
+
+ +
+
Class used by a generic client to receive from and transmit to a remote Server instance and a + remote PlayerControllerRMI instance using the RMI protocol.
+
+ +
+
Class used by a generic client to receive from and transmit to a remote Server instance + and a remote PlayerControllerTCP instance using the TCP protocol.
+
+ +
+
Subclass of MatchState.
+
+ +
+
Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
+
+ +
+
Represents a pair of generic values.
+
+ +
+
This class handles the card already placed on the board, since we need to remember which card covers which
+
+ +
+
PlacedCardRecord
+
+ +
+
Before placing a card, its placement must be verified.
+
+ +
+
JavaFX node, Pane showing all the player pawns and points
+
+ +
+
Class that represents every kind of card that can be played during the game.
+
+ +
+
The action communicates the intention of the player to place a card on its board.
+
+ +
+
Represents each in-game user, so acts also as a gateway receiving input by the Controller.
+
+ +
+
Controller for a match player, the only agent needing a view and so a controller in this + application.
+
+ +
+
Subclass of PlayerController that implements its abstract methods through RMI interactions.
+
+ +
+
RMI interface used to declare all and only the methods callable on a remote PlayerControllerRMI instance implementing + this interface.
+
+ +
+
Subclass of PlayerController that implements its abstract methods through TCP + interactions.
+
+ +
+
Class used to synchronyze methods that should be ran only during other player's turns.
+
+ +
+
Controller of the player tab
+
+ +
+
This class handles requirements involving relative positioning of cards, e.g.
+
+ +
+
This class handles requirements involving relative positioning of cards, e.g.
+
+ +
+
JavaFX Controller of the ranking scene, shows the leaderboard after the match is finished
+
+ +
+
Network interface used to declare all and only the methods callable on a remote view instance implementing this interface or + by message listener for TCP.
+
+ +
+
Represents the status of a remote request sent to a remove Server or PlayerController.
+
+ +
+
A condition must be met in order to play a golden card and to get points from the objectives.
+
+ +
+
Card that does not require any conditions to be played.
+
+ +
+
Messages sent from the server to the clients to update them about another + user's move or to the consequence of their action
+
+ +
+
JavaFX controller of a scene
+
+ +
+
SendBroadcastTextMessage
+
+ +
+
SendPrivateTextMessage
+
+ +
+
The server class of this application.
+
+ +
+
RMI interface used to declare all and only the methods callable on a remote Server instance implementing this + interface by a client.
+
+ +
+
ShownCard
+
+ +
+
Represents a card side.
+
+ +
+
This response is sent to each user in the match when a user chooses his secret objective.
+
+ +
+
This response is sent to each user in the match when a user draws a card.
+
+ +
+
This response is sent to each user in the match when a user draws an initial card.
+
+ +
+
This response is sent to each user in the match when a user draws the two secret objectives.
+
+ +
+
This response is sent when a player joins the current match.
+
+ +
+
SomeonePlayedCardMessage
+
+ +
+
This response is sent when a player quits the current match.
+
+ +
+
SomeoneSentBroadcastTextMessage
+
+ +
+
SomeoneSentPrivateTextMessage
+
+ +
+
This response is sent to each user in the match when a user chosees the initial side of a card.
+
+ +
+
Contains all the possible symbols a corner can store or a multiplier can have.
+
+ +
+
Class containing the ServerSocket.
+
+ +
 
+ +
+
Class that handles the actual printing to the terminal.
+
+ +
+
Valid positions of a board, ie all the points a new card can be linked to
+
+ +
+
JavaFX controller for the waiting scene.
+
+ +
+
Subclass of MatchState.
+
+ +
 
+ +
+
WrongInputFormatException
+
+ +
 
+ +
 
+ +
 
+
+
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/allpackages-index.html b/deliveries/Javadoc/allpackages-index.html new file mode 100644 index 00000000..d856659e --- /dev/null +++ b/deliveries/Javadoc/allpackages-index.html @@ -0,0 +1,99 @@ + + + + +All Packages (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
Package Summary
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/copy.svg b/deliveries/Javadoc/copy.svg new file mode 100644 index 00000000..7c46ab15 --- /dev/null +++ b/deliveries/Javadoc/copy.svg @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/deliveries/Javadoc/element-list b/deliveries/Javadoc/element-list new file mode 100644 index 00000000..6677f937 --- /dev/null +++ b/deliveries/Javadoc/element-list @@ -0,0 +1,16 @@ +it.polimi.ingsw.client.frontend +it.polimi.ingsw.client.frontend.gui +it.polimi.ingsw.client.frontend.gui.controllers +it.polimi.ingsw.client.frontend.gui.nodes +it.polimi.ingsw.client.frontend.tui +it.polimi.ingsw.client.network +it.polimi.ingsw.controllers +it.polimi.ingsw.exceptions +it.polimi.ingsw.gamemodel +it.polimi.ingsw.network.messages +it.polimi.ingsw.network.messages.actions +it.polimi.ingsw.network.messages.errors +it.polimi.ingsw.network.messages.responses +it.polimi.ingsw.network.tcp +it.polimi.ingsw.server +it.polimi.ingsw.utils diff --git a/deliveries/Javadoc/help-doc.html b/deliveries/Javadoc/help-doc.html new file mode 100644 index 00000000..fcfc9be1 --- /dev/null +++ b/deliveries/Javadoc/help-doc.html @@ -0,0 +1,198 @@ + + + + +API Help (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+

JavaDoc Help

+ +
+
+

Navigation

+Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces + +
+
+
+

Kinds of Pages

+The following sections describe the different kinds of pages in this collection. +
+

Overview

+

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

+
+
+

Package

+

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

+
    +
  • Interfaces
  • +
  • Classes
  • +
  • Enum Classes
  • +
  • Exception Classes
  • +
  • Annotation Interfaces
  • +
+
+
+

Class or Interface

+

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

+
    +
  • Class Inheritance Diagram
  • +
  • Direct Subclasses
  • +
  • All Known Subinterfaces
  • +
  • All Known Implementing Classes
  • +
  • Class or Interface Declaration
  • +
  • Class or Interface Description
  • +
+
+
    +
  • Nested Class Summary
  • +
  • Enum Constant Summary
  • +
  • Field Summary
  • +
  • Property Summary
  • +
  • Constructor Summary
  • +
  • Method Summary
  • +
  • Required Element Summary
  • +
  • Optional Element Summary
  • +
+
+
    +
  • Enum Constant Details
  • +
  • Field Details
  • +
  • Property Details
  • +
  • Constructor Details
  • +
  • Method Details
  • +
  • Element Details
  • +
+

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

+

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

+
+
+

Other Files

+

Packages and modules may contain pages with additional information related to the declarations nearby.

+
+
+

Use

+

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.

+
+
+

Tree (Class Hierarchy)

+

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

+
    +
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • +
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • +
+
+
+

Serialized Form

+

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.

+
+
+

All Packages

+

The All Packages page contains an alphabetic index of all packages contained in the documentation.

+
+
+

All Classes and Interfaces

+

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

+
+
+

Index

+

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

+
+
+
+This help file applies to API documentation generated by the standard doclet.
+ +
+
+ + diff --git a/deliveries/Javadoc/index-all.html b/deliveries/Javadoc/index-all.html new file mode 100644 index 00000000..f5e925a8 --- /dev/null +++ b/deliveries/Javadoc/index-all.html @@ -0,0 +1,3723 @@ + + + + +Index (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A B C D E F G H I J L M N O P Q R S T U V W X Y 
All Classes and Interfaces|All Packages|Serialized Form +

A

+
+
ActionMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
Messages sent by clients to the server to express a user intention to do an + action
+
+
ActionMessage(String) - Constructor for class it.polimi.ingsw.network.messages.actions.ActionMessage
+
+
Class constructor.
+
+
add(T) - Method in class it.polimi.ingsw.gamemodel.GameDeck
+
+
Adds a card to the bottom of the deck
+
+
addCard(ShownCard) - Method in class it.polimi.ingsw.client.frontend.tui.ValidPositions
+
+
Adds a card, updating all the valid linking points.
+
+
addCard(Pair<Integer, Integer>, InitialCard, Side) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.BoardPane
+
+
Add a card to the board
+
+
addCard(Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.BoardPane
+
+
Add a card to the board
+
+
addHandCard(PlayableCard) - Method in class it.polimi.ingsw.gamemodel.Board
+
+
Adds a card to the player's hand (which is visible to every player)
+
+
addMatchCard(String, int, int, boolean) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController
+
+
Create the container for a Match
+
+
addPlayer() - Method in class it.polimi.ingsw.gamemodel.MatchState
+
+
Checks dynamically if a player can be added in the current state, otherwise throws an exception.
+
+
addPlayer() - Method in class it.polimi.ingsw.gamemodel.WaitState
+
+
This method call is allowed by this class instances.
+
+
addPlayer(Player) - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Adds a new player to the match, assuming it's not null.
+
+
addPlayer(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController
+
+
Adds a player to the chat.
+
+
addPlayer(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
+
Add a player to the list
+
+
addPlayerTab(String, Color) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
+
Add the tab of the given player
+
+
addPoints(int) - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Adds points to the player.
+
+
addRanking(LeaderboardEntry) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController
+
+
Add an entry to the graphical leaderboard
+
+
AfterDrawState - Class in it.polimi.ingsw.gamemodel
+
+
Subclass of MatchState.
+
+
AfterDrawState(Match) - Constructor for class it.polimi.ingsw.gamemodel.AfterDrawState
+
+
Initializes this instance.
+
+
AfterMoveState - Class in it.polimi.ingsw.gamemodel
+
+
Subclass of MatchState.
+
+
AfterMoveState(Match) - Constructor for class it.polimi.ingsw.gamemodel.AfterMoveState
+
+
Initializes this instance.
+
+
AlreadyUsedUsernameException - Exception Class in it.polimi.ingsw.exceptions
+
 
+
AlreadyUsedUsernameException(String) - Constructor for exception class it.polimi.ingsw.exceptions.AlreadyUsedUsernameException
+
 
+
ANIMAL - Enum constant in enum class it.polimi.ingsw.gamemodel.Symbol
+
 
+
applyCSS(Parent, String) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Applies the specified CSS to a javafx scene parent
+
+
askUser() - Method in class it.polimi.ingsw.client.frontend.tui.InputHandler
+
+
Flushes stdin, prints prompt and then gets the user input.
+
+
AvailableMatch - Record Class in it.polimi.ingsw.utils
+
+
AvailableMatches
+
+
AvailableMatch(String, Integer, Integer, boolean) - Constructor for record class it.polimi.ingsw.utils.AvailableMatch
+
+
Creates an instance of a AvailableMatch record class.
+
+
availableMatches - Variable in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
AvailableMatchesMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
This response is sent when a user is connected to the server.
+
+
AvailableMatchesMessage(Map<String, Match>) - Constructor for class it.polimi.ingsw.network.messages.responses.AvailableMatchesMessage
+
+
Class constructor.
+
+
+

B

+
+
back - Variable in class it.polimi.ingsw.gamemodel.Card
+
 
+
BACK - Enum constant in enum class it.polimi.ingsw.gamemodel.Side
+
 
+
BLUE - Enum constant in enum class it.polimi.ingsw.gamemodel.Color
+
 
+
Board - Class in it.polimi.ingsw.gamemodel
+
+
Board is the class that contains all the information relative to a Player's status
+
+
Board() - Constructor for class it.polimi.ingsw.gamemodel.Board
+
+
Class constructor.
+
+
BoardPane - Class in it.polimi.ingsw.client.frontend.gui.nodes
+
+
Game board, manages card display
+
+
BoardPane() - Constructor for class it.polimi.ingsw.client.frontend.gui.nodes.BoardPane
+
+
Constructor of BoardPane
+
+
BoardPosition - Record Class in it.polimi.ingsw.client.frontend.tui
+
+
Represents a position on the board, used to find valid positions and display anchor numbers when + a player must choose where to place the card.
+
+
BoardPosition(boolean, Optional<Corner>) - Constructor for record class it.polimi.ingsw.client.frontend.tui.BoardPosition
+
+
Creates an instance of a BoardPosition record class.
+
+
BOTTOM_LEFT - Enum constant in enum class it.polimi.ingsw.gamemodel.Corner
+
 
+
BOTTOM_RIGHT - Enum constant in enum class it.polimi.ingsw.gamemodel.Corner
+
 
+
bottomLeftCorner - Variable in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
 
+
bottomRightCorner - Variable in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
 
+
+

C

+
+
calculatePoints(Board, Pair<Integer, Integer>) - Method in class it.polimi.ingsw.gamemodel.GoldCard
+
+
Will compute the total points this card gives based on the board it's played on.
+
+
call(MatchObserver) - Method in interface it.polimi.ingsw.gamemodel.MatchObserverCallable
+
+
Generic method call on a MatchObserver.
+
+
card() - Method in record class it.polimi.ingsw.client.frontend.ShownCard
+
+
Returns the value of the card record component.
+
+
Card - Class in it.polimi.ingsw.gamemodel
+
+
Highest abstraction of the card object, with common aspects for every card in + the game (except objectives).
+
+
Card() - Constructor for class it.polimi.ingsw.gamemodel.Card
+
+
Empty constructor used for deserialization.
+
+
cardBorderH - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.BoardPane
+
 
+
cardBorderH - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
 
+
cardBorderW - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.BoardPane
+
 
+
cardBorderW - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
 
+
CardException - Exception Class in it.polimi.ingsw.exceptions
+
 
+
CardException(String) - Constructor for exception class it.polimi.ingsw.exceptions.CardException
+
 
+
CardFace - Class in it.polimi.ingsw.gamemodel
+
+
Topological definition of a card's side
+
+
CardFace(Symbol, Symbol, Symbol, Symbol, Set<Symbol>) - Constructor for class it.polimi.ingsw.gamemodel.CardFace
+
+
Class constructor.
+
+
cardHeight - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.BoardPane
+
 
+
cardHeight - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
 
+
cardID() - Method in record class it.polimi.ingsw.utils.PlacedCardRecord
+
+
Returns the value of the cardID record component.
+
+
CardJsonParser - Class in it.polimi.ingsw.utils
+
+
Parser of Cards, implements a custom parser for Requirement
+
+
CardJsonParser() - Constructor for class it.polimi.ingsw.utils.CardJsonParser
+
 
+
CardsManager - Class in it.polimi.ingsw.utils
+
+
Singleton that represents a collection of all cards actually existing in the Game, so only those used + in the Match instances.
+
+
CardsSerializer - Class in it.polimi.ingsw.utils
+
+
Serialize game cards into json
+
+
CardsSerializer() - Constructor for class it.polimi.ingsw.utils.CardsSerializer
+
 
+
CardView - Class in it.polimi.ingsw.client.frontend.gui.nodes
+
 
+
CardView() - Constructor for class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Initialize an empty CardView
+
+
CardView(InitialCard, Side) - Constructor for class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Initialize a CardView of an Initial Card
+
+
CardView(Objective, Side) - Constructor for class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Initialize a CardView of an Objective Card
+
+
CardView(PlayableCard, Side) - Constructor for class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Initialize a CardView of a Playable Card
+
+
cardWidth - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.BoardPane
+
 
+
cardWidth - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
 
+
changePlayer() - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Method used to show the turn has changed.
+
+
changePlayer() - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
changePlayer() - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Notifies all players (but the current one) that someone is playing their turn.
+
+
chatContainer - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController
+
 
+
chatHistoryScrollPane - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController
+
 
+
chatPane - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
ChatPaneController - Class in it.polimi.ingsw.client.frontend.gui.controllers
+
+
JavaFX controller for the chat pane
+
+
ChatPaneController() - Constructor for class it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController
+
 
+
chooseInitialCardSide(Side) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Communicates the chosen initial card side.
+
+
chooseInitialCardSide(Side) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Communicates the chosen initial card side.
+
+
chooseInitialCardSide(Side) - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Communicates the chosen initial card side.
+
+
chooseInitialCardSide(Side) - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Communicates the chosen initial card side.
+
+
chooseInitialCardSide(Side) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Communicates the chosen initial card side.
+
+
chooseInitialCardSide(Side) - Method in interface it.polimi.ingsw.controllers.PlayerControllerRMIInterface
+
+
Communicates the chosen initial card side.
+
+
chooseInitialCardSide(Side) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Tries to set the player's initial card's side, unless there was a WrongTurnException + or a WrongStateException, in which case a new ErrorMessage is sent with the + exception content
+
+
chooseInitialCardSide(Side) - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Chooses the initial card side.
+
+
ChooseInitialCardSideMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
The action communicates the player's choice of the initial card's side.
+
+
ChooseInitialCardSideMessage(String, Side) - Constructor for class it.polimi.ingsw.network.messages.actions.ChooseInitialCardSideMessage
+
+
Class constructor.
+
+
chooseInitialSide() - Method in class it.polimi.ingsw.gamemodel.ChooseInitialSideState
+
+
This method call is allowed by this class instances.
+
+
chooseInitialSide() - Method in class it.polimi.ingsw.gamemodel.MatchState
+
+
Checks dynamically if a player can choose the initial card side in the current state, otherwise throws an exception.
+
+
ChooseInitialSideState - Class in it.polimi.ingsw.gamemodel
+
+
Subclass of MatchState.
+
+
ChooseInitialSideState(Match) - Constructor for class it.polimi.ingsw.gamemodel.ChooseInitialSideState
+
+
Initializes this instance.
+
+
chooseSecretObjective() - Method in class it.polimi.ingsw.gamemodel.ChooseSecretObjectiveState
+
+
This method call is allowed by this class instances.
+
+
chooseSecretObjective() - Method in class it.polimi.ingsw.gamemodel.MatchState
+
+
Checks dynamically if a player can choose their secret objective in the current state, otherwise throws an exception.
+
+
chooseSecretObjective(Objective) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Communicates the chosen secret objective.
+
+
chooseSecretObjective(Objective) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Communicates the chosen secret objective.
+
+
chooseSecretObjective(Objective) - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Communicates the chosen secret objective.
+
+
chooseSecretObjective(Objective) - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Communicates the chosen secret objective.
+
+
chooseSecretObjective(Objective) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Communicates the chosen secret objective.
+
+
chooseSecretObjective(Objective) - Method in interface it.polimi.ingsw.controllers.PlayerControllerRMIInterface
+
+
Communicates the chosen secret objective.
+
+
chooseSecretObjective(Objective) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Tries to set the player's secret objective, unless there was a WrongTurnException or + a WrongStateException, in which case a new ErrorMessage is sent with the + exception content
+
+
chooseSecretObjective(Objective) - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Sets the player private objective (only at the start of the game).
+
+
ChooseSecretObjectiveMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
The action communicates the intention of a player to choose his secret objective.
+
+
ChooseSecretObjectiveMessage(String, Integer) - Constructor for class it.polimi.ingsw.network.messages.actions.ChooseSecretObjectiveMessage
+
+
Class constructor.
+
+
ChooseSecretObjectiveState - Class in it.polimi.ingsw.gamemodel
+
+
Subclass of MatchState.
+
+
ChooseSecretObjectiveState(Match) - Constructor for class it.polimi.ingsw.gamemodel.ChooseSecretObjectiveState
+
+
Initializes this instance.
+
+
ChosenMatchException - Exception Class in it.polimi.ingsw.exceptions
+
 
+
ChosenMatchException(String) - Constructor for exception class it.polimi.ingsw.exceptions.ChosenMatchException
+
 
+
clearTerminal() - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Clears the terminal.
+
+
ClientBoard - Class in it.polimi.ingsw.client.frontend
+
+
This class contains just elements needed to show the player's board, points, resources, hand and objectives
+
+
ClientBoard(Color, List<PlayableCard>) - Constructor for class it.polimi.ingsw.client.frontend.ClientBoard
+
+
Class constructor.
+
+
clientBoards - Variable in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
ClientListener - Class in it.polimi.ingsw.network.tcp
+
+
Every time a socket gets accepted by the TCP server, a new ClientListener will be created with + it, and it will: + + Acquire the client's username + Make the client (which is still not a Player) choose/create a Match to join + Create its PlayerControllerTCP, which will also make him join such Match + Listen for any message received and, execute the corresponding action.
+
+
ClientListener(Socket, Server) - Constructor for class it.polimi.ingsw.network.tcp.ClientListener
+
+
Class constructor.
+
+
ClientReceiver - Class in it.polimi.ingsw.network.tcp
+
+
Receives messages from server to client
+
+
ClientReceiver(NetworkHandlerTCP, Socket) - Constructor for class it.polimi.ingsw.network.tcp.ClientReceiver
+
+
Class constructor.
+
+
close() - Method in class it.polimi.ingsw.network.tcp.IOHandler
+
+
Closes the input and output streams, if not null.
+
+
Color - Enum Class in it.polimi.ingsw.gamemodel
+
+
Represents pawns colors.
+
+
confirmSubmitBroadcastMessage(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController
+
+
Handles the receipt of confirmation of successful submit of a broadcast message + from this client to the server (either broadcast or private).
+
+
confirmSubmitPrivateMessage(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController
+
+
Handles the receipt of confirmation of successful submit of a private message + from this client to the server (either broadcast or private).
+
+
connected - Variable in class it.polimi.ingsw.client.network.NetworkHandler
+
 
+
ConnectionSceneController - Class in it.polimi.ingsw.client.frontend.gui.controllers
+
+
Controller for the connection scene
+
+
ConnectionSceneController() - Constructor for class it.polimi.ingsw.client.frontend.gui.controllers.ConnectionSceneController
+
 
+
convertCoordinates(Pair<Integer, Integer>) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.BoardPane
+
+
Convert coordinates from game coordinate to JavaFX Board coordinates
+
+
coords() - Method in record class it.polimi.ingsw.client.frontend.ShownCard
+
+
Returns the value of the coords record component.
+
+
Corner - Enum Class in it.polimi.ingsw.gamemodel
+
+
All the corners of a card, which can contain a Symbol
+
+
CORNER_OBJ - Enum constant in enum class it.polimi.ingsw.gamemodel.Symbol
+
 
+
createGoldDeck() - Method in class it.polimi.ingsw.utils.DeckCreator
+
+
Create the deck of gold cards
+
+
createInitialDeck() - Method in class it.polimi.ingsw.utils.DeckCreator
+
+
Create the deck of initial cards
+
+
createMatch(String, int) - Method in class it.polimi.ingsw.server.Server
+
+
Create a new blank match.
+
+
createMatch(String, int) - Method in interface it.polimi.ingsw.server.ServerRMIInterface
+
+
Lets the calling view create a new match.
+
+
createMatch(String, Integer) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Tries to create a match.
+
+
createMatch(String, Integer) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
createMatch(String, Integer) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Asks to create a match.
+
+
createMatch(String, Integer) - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Asks to create a match.
+
+
createMatch(String, Integer) - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Asks to create a match.
+
+
CreateMatchMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
The action communicates (to the server) the intention of a client to create a new match.
+
+
CreateMatchMessage(String, String, int) - Constructor for class it.polimi.ingsw.network.messages.actions.CreateMatchMessage
+
 
+
createObjectiveDeck() - Method in class it.polimi.ingsw.utils.DeckCreator
+
+
Create the deck of objective cards
+
+
createResourceDeck() - Method in class it.polimi.ingsw.utils.DeckCreator
+
+
Create the deck of resource cards
+
+
createUsername - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController
+
 
+
currentPlayer - Variable in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
currentPlayers() - Method in record class it.polimi.ingsw.utils.AvailableMatch
+
+
Returns the value of the currentPlayers record component.
+
+
+

D

+
+
decideWinner() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Calculates the winner (or winners)
+
+
DeckCreator - Class in it.polimi.ingsw.utils
+
+
This is a temporary class, used to have all the logic related to deck creation in a single place, so that + when it will be implemented correctly we know where to modify it
+
+
DeckCreator() - Constructor for class it.polimi.ingsw.utils.DeckCreator
+
 
+
DeckException - Exception Class in it.polimi.ingsw.exceptions
+
 
+
DeckException(String) - Constructor for exception class it.polimi.ingsw.exceptions.DeckException
+
 
+
decksTopReign - Variable in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
disable() - Method in class it.polimi.ingsw.client.frontend.tui.PlayerControls
+
+
Disables the player's controls.
+
+
disconnect() - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
+
Request disconnection from the network
+
+
disconnect() - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Disconnects from the server.
+
+
disconnect() - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Disconnects from the server.
+
+
disconnect() - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Disconnects from the server.
+
+
doInitialTurnFinish() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Marks the initial turn as finished, assuming the initial turn hasn't finished yet.
+
+
doStart() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Marks the match as started, assuming the match hasn't started yet.
+
+
drawCard() - Method in class it.polimi.ingsw.gamemodel.AfterMoveState
+
+
This method call is allowed by this class instances.
+
+
drawCard() - Method in class it.polimi.ingsw.gamemodel.MatchState
+
+
Checks dynamically if a player can draw a playable card in the current state, otherwise throws an exception.
+
+
drawCard(DrawSource) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Draws a card.
+
+
drawCard(DrawSource) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Draws a card.
+
+
drawCard(DrawSource) - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Draws a card.
+
+
drawCard(DrawSource) - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Draws a card.
+
+
drawCard(DrawSource) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Draws a card.
+
+
drawCard(DrawSource) - Method in interface it.polimi.ingsw.controllers.PlayerControllerRMIInterface
+
+
Draws a card.
+
+
drawCard(DrawSource) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Tries to draw a card, unless there was a WrongStateException, in which case a new + ErrorMessage is sent with the exception content
+
+
drawCard(DrawSource) - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Draws a card from the passed source.
+
+
drawCard(DrawSource) - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Adds a card to the player's hand, popping it from the required source
+
+
drawCard(PlayableCard) - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
+
Adds a card to the player's hand.
+
+
DrawCardMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
The action communicates the intention of a player to draw a card.
+
+
DrawCardMessage(String, DrawSource) - Constructor for class it.polimi.ingsw.network.messages.actions.DrawCardMessage
+
 
+
drawInitialCard() - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Draws an initial card for the player.
+
+
drawInitialCard() - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Draws an initial card for the player.
+
+
drawInitialCard() - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Draws an initial card for the player.
+
+
drawInitialCard() - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Draws an initial card for the player.
+
+
drawInitialCard() - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Draws an initial card for the player.
+
+
drawInitialCard() - Method in interface it.polimi.ingsw.controllers.PlayerControllerRMIInterface
+
+
Draws an initial card for the player.
+
+
drawInitialCard() - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Tries to get the player initial card, unless there was a WrongTurnException or a + WrongStateException, in which case a new ErrorMessage is sent with the + exception content
+
+
drawInitialCard() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Draws a card from the initial cards deck
+
+
drawInitialCard() - Method in class it.polimi.ingsw.gamemodel.MatchState
+
+
Checks dynamically if an initial card can be drawn in the current state, otherwise throws an exception.
+
+
drawInitialCard() - Method in class it.polimi.ingsw.gamemodel.NextTurnState
+
+
This method call is allowed by this class instances if and only if the initial card side choosing + hasn't finished yet.
+
+
drawInitialCard() - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Gets an initial card from the match.
+
+
DrawInitialCardMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
It communicates the intention of a player to draw the initial card.
+
+
DrawInitialCardMessage(String) - Constructor for class it.polimi.ingsw.network.messages.actions.DrawInitialCardMessage
+
 
+
drawSecretObjectives() - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Draws two secret objectives.
+
+
drawSecretObjectives() - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Draws two secret objectives.
+
+
drawSecretObjectives() - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Draws two secret objectives.
+
+
drawSecretObjectives() - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Draws two secret objectives.
+
+
drawSecretObjectives() - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Draws two secret objectives.
+
+
drawSecretObjectives() - Method in interface it.polimi.ingsw.controllers.PlayerControllerRMIInterface
+
+
Draws two secret objectives.
+
+
drawSecretObjectives() - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Tries to get the player's secret objectives pair (from which he will have to choose one), + unless there was a WrongTurnException or a WrongStateException, in which case + a new ErrorMessage is sent with the exception content
+
+
drawSecretObjectives() - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Gets two objectives from the match objectives deck considered to be secret.
+
+
DrawSecretObjectivesMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
It communicates the intention of a player to draw the (2) secret objectives.
+
+
DrawSecretObjectivesMessage(String) - Constructor for class it.polimi.ingsw.network.messages.actions.DrawSecretObjectivesMessage
+
 
+
DrawSource - Enum Class in it.polimi.ingsw.gamemodel
+
+
All the sources a player can draw from: the decks and the four visible cards.
+
+
+

E

+
+
EMPTY_CORNER - Enum constant in enum class it.polimi.ingsw.gamemodel.Symbol
+
 
+
enable() - Method in class it.polimi.ingsw.client.frontend.tui.PlayerControls
+
+
Enables player's custom controls, and notifies all threads synchronized on this object.
+
+
enableDrawSourcesInteractions(boolean) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
+
Enables/disables mouse interactions with draw sources.
+
+
enablePlaceCardInteractions(boolean) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Enables/disables mouse interactions with hand cards.
+
+
equals(Object) - Method in record class it.polimi.ingsw.client.frontend.ShownCard
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in record class it.polimi.ingsw.client.frontend.tui.BoardPosition
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in class it.polimi.ingsw.gamemodel.Card
+
 
+
equals(Object) - Method in class it.polimi.ingsw.gamemodel.Objective
+
 
+
equals(Object) - Method in class it.polimi.ingsw.gamemodel.Player
+
 
+
equals(Object) - Method in record class it.polimi.ingsw.utils.AvailableMatch
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in record class it.polimi.ingsw.utils.LeaderboardEntry
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in record class it.polimi.ingsw.utils.Pair
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in record class it.polimi.ingsw.utils.PlacedCardRecord
+
+
Indicates whether some other object is "equal to" this one.
+
+
ErrorMessage - Class in it.polimi.ingsw.network.messages.errors
+
+
Sent to the clients when an error happens
+
+
ErrorMessage(String, String) - Constructor for class it.polimi.ingsw.network.messages.errors.ErrorMessage
+
 
+
ErrorSceneController - Class in it.polimi.ingsw.client.frontend.gui.controllers
+
+
Controller of the error scene window
+
+
ErrorSceneController() - Constructor for class it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController
+
 
+
errorTitle - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController
+
 
+
+

F

+
+
FAILED - Enum constant in enum class it.polimi.ingsw.utils.RequestStatus
+
 
+
FEATHER - Enum constant in enum class it.polimi.ingsw.gamemodel.Symbol
+
 
+
FinalState - Class in it.polimi.ingsw.gamemodel
+
+
Subclass of MatchState.
+
+
FinalState(Match) - Constructor for class it.polimi.ingsw.gamemodel.FinalState
+
+
Initializes this instance.
+
+
first() - Method in record class it.polimi.ingsw.utils.Pair
+
+
Returns the value of the first record component.
+
+
FIRST_VISIBLE - Enum constant in enum class it.polimi.ingsw.gamemodel.DrawSource
+
+
First gold card (first among all)
+
+
firstObjective - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
firstVisible - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
FOURTH_VISIBLE - Enum constant in enum class it.polimi.ingsw.gamemodel.DrawSource
+
+
Second resource card (fourth among all)
+
+
fourthVisible - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
fromString(String) - Method in enum class it.polimi.ingsw.gamemodel.Side
+
+
Return a instance of this enum from its corresponding string representation.
+
+
front - Variable in class it.polimi.ingsw.gamemodel.Card
+
 
+
FRONT - Enum constant in enum class it.polimi.ingsw.gamemodel.Side
+
 
+
FULL_CORNER - Enum constant in enum class it.polimi.ingsw.gamemodel.Symbol
+
 
+
FUNGUS - Enum constant in enum class it.polimi.ingsw.gamemodel.Symbol
+
 
+
+

G

+
+
GameDeck<T> - Class in it.polimi.ingsw.gamemodel
+
+
Generic used to create the decks for all the types of cards
+
+
GameDeck() - Constructor for class it.polimi.ingsw.gamemodel.GameDeck
+
+
Class constructor, takes no argument as the decks start empty
+
+
getAction() - Method in class it.polimi.ingsw.network.messages.actions.ActionMessage
+
 
+
getAvailableMatches() - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
+
Request available matches to the server
+
+
getAvailableMatches() - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Asks the server to send a list of AvailableMatch
+
+
getAvailableMatches() - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Asks the server to send a list of AvailableMatch.
+
+
getAvailableMatches() - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Asks the server to send a list of AvailableMatch.
+
+
GetAvailableMatchesMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
The client asks for an updated version of the lobby; + The server returns an AvailableMatchesMessage response.
+
+
GetAvailableMatchesMessage(String) - Constructor for class it.polimi.ingsw.network.messages.actions.GetAvailableMatchesMessage
+
 
+
getAvailableResources() - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
 
+
getAvailableResources() - Method in class it.polimi.ingsw.gamemodel.Board
+
+
Getter for the total resources of a player
+
+
getAvailableResources() - Method in class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
getAvailableResources() - Method in class it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage
+
 
+
getAvailableResources() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneSetInitialSideMessage
+
 
+
getBasicResources() - Static method in enum class it.polimi.ingsw.gamemodel.Symbol
+
+
Generates subset containing only the basic resources (4 reigns and 3 "symbols")
+
+
getBlackPawnImagePath() - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Get image path of the black pawn
+
+
getBoard() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Get the Board Pane of the player
+
+
getBoard() - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Getter for the player's board.
+
+
getCard() - Method in class it.polimi.ingsw.gamemodel.PlacedCard
+
+
Getter for the PlacedCard class
+
+
getCardBuilder() - Method in class it.polimi.ingsw.utils.CardJsonParser
+
+
Returns a Gson builder with pretty print and custom Requirement deserializer
+
+
getCardID() - Method in class it.polimi.ingsw.network.messages.actions.PlayCardMessage
+
 
+
getCardID() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneDrewCardMessage
+
 
+
getCardID() - Method in class it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage
+
 
+
getCenter() - Method in class it.polimi.ingsw.gamemodel.CardFace
+
+
Getter for the center of the card
+
+
getChatPane() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
+
Get the chat pane controller
+
+
getColor() - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
 
+
getCorner(Corner) - Method in class it.polimi.ingsw.gamemodel.CardFace
+
+
Used to get the symbol present in one of the four corners of a card
+
+
getCurrentHand() - Method in class it.polimi.ingsw.gamemodel.Board
+
+
Getter for the hand of the player (which must be composed of three PlayableCard), which is visible + to every player
+
+
getCurrentPlayer() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Gets the player who's playing (or choosing the secret objective) at the moment.
+
+
getCurrentPlayer() - Method in class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
getCurrentPlayers() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
+
Get the amount of current players
+
+
getCurrentState() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Getter for the current match state.
+
+
getDecksTopReigns() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Getter for the cards back on the top of the decks (i.e.
+
+
getDecksTopReigns() - Method in class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
getDeckTopReigns() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneDrewCardMessage
+
 
+
getDrawSource() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneDrewCardMessage
+
 
+
getError() - Method in class it.polimi.ingsw.network.messages.errors.ErrorMessage
+
+
Getter for the error code of the message
+
+
getExceptionTitle(Exception) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Translate exception type into human-readable titles
+
+
getFirstID() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneDrewSecretObjectivesMessage
+
 
+
getFromFXML(String) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Get a node from the given FXML
+
+
getGenericBack(Symbol, Pair<Integer, Integer>) - Method in class it.polimi.ingsw.utils.TUICardParser
+
 
+
getGoldCards() - Method in class it.polimi.ingsw.utils.CardsManager
+
+
Getter for the gold cards
+
+
getGoldsBack(Symbol) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Get the back of a gold card
+
+
getHand() - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
 
+
getHexFromColor(Color) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Get the hex code of the given color
+
+
getId() - Method in class it.polimi.ingsw.gamemodel.Card
+
 
+
getID() - Method in class it.polimi.ingsw.gamemodel.Objective
+
 
+
getImagePath(InitialCard, Side) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Get the image path of an intial card
+
+
getImagePath(Objective, Side) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Get the image path of an objective card
+
+
getImagePath(PlayableCard, Side) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Get the image path of a playable card
+
+
getInitialCard() - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
 
+
getInitialCardID() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneDrewInitialCardMessage
+
 
+
getInitialCards() - Method in class it.polimi.ingsw.utils.CardsManager
+
+
Getter for the initial cards
+
+
getInstance() - Static method in class it.polimi.ingsw.utils.CardsManager
+
+
Getter for the only possible instance available of this class, so used instead of a constructor.
+
+
getIO() - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Gets the I/O handler.
+
+
getJoinableMatches() - Method in class it.polimi.ingsw.server.Server
+
+
Returns the available matches as AvailableMatch instances.
+
+
getJoinableMatches() - Method in interface it.polimi.ingsw.server.ServerRMIInterface
+
+
Returns the available matches as AvailableMatch instances.
+
+
getJoinableMatchesMap() - Method in class it.polimi.ingsw.server.Server
+
 
+
getJoinedPlayers() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneJoinedMessage
+
 
+
getJoinedPlayers() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneQuitMessage
+
 
+
getLoader(String) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Get the loader from the specified path
+
+
getMatch(String) - Method in class it.polimi.ingsw.server.Server
+
+
Gets a Match from those saved in the server.
+
+
getMatches() - Method in class it.polimi.ingsw.network.messages.responses.AvailableMatchesMessage
+
 
+
getMatchName() - Method in class it.polimi.ingsw.network.messages.actions.CreateMatchMessage
+
 
+
getMatchName() - Method in class it.polimi.ingsw.network.messages.actions.JoinMatchMessage
+
 
+
getMaxPlayers() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Getter for the maximum number of player for the match
+
+
getMaxPlayers() - Method in class it.polimi.ingsw.network.messages.actions.CreateMatchMessage
+
 
+
getMaxPlayers() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneJoinedMessage
+
 
+
getMessage() - Method in class it.polimi.ingsw.network.messages.errors.ErrorMessage
+
+
Getter for the message in human language
+
+
getMessageBuilder() - Method in class it.polimi.ingsw.utils.MessageJsonParser
+
 
+
getMultiplier() - Method in class it.polimi.ingsw.gamemodel.GoldCard
+
+
Getter for the GoldCard class
+
+
getNextLine() - Method in class it.polimi.ingsw.client.frontend.tui.InputHandler
+
+
Gets the next user input.
+
+
getObjective() - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
 
+
getObjectiveID() - Method in class it.polimi.ingsw.network.messages.actions.ChooseSecretObjectiveMessage
+
 
+
getObjectiveID() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneChoseSecretObjectiveMessage
+
 
+
getObjectives() - Method in class it.polimi.ingsw.utils.CardsManager
+
+
Getter for the objectives
+
+
getPawnColor() - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Getter for the player's pawn color.
+
+
getPawnImagePath(Color) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Get image path of a pawn
+
+
getPlaced() - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
 
+
getPlacedCards() - Method in class it.polimi.ingsw.gamemodel.Board
+
+
Getter for the board's placed cards
+
+
getPlacedCards() - Method in class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
getPlacementNumber() - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
 
+
getPlayableCards() - Method in class it.polimi.ingsw.utils.CardsManager
+
+
Getter for the playable cards
+
+
getPlayedCardFace() - Method in class it.polimi.ingsw.gamemodel.PlacedCard
+
+
Getter for the Card face
+
+
getPlayedSide() - Method in class it.polimi.ingsw.gamemodel.PlacedCard
+
+
Getter for the PlacedCard class
+
+
getPlayer() - Method in class it.polimi.ingsw.controllers.PlayerController
+
+
Gets the player linked to this PlayerController instance.
+
+
getPlayerHands() - Method in class it.polimi.ingsw.network.messages.responses.MatchStartedMessage
+
 
+
getPlayerPawnColors() - Method in class it.polimi.ingsw.network.messages.responses.MatchStartedMessage
+
 
+
getPlayerPoints() - Method in class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
getPlayers() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Gets the match players.
+
+
getPlayersFinalRanking() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Getter for the final ranking of players.
+
+
getPlayersHands() - Method in class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
getPlayersUsernamesAndPawns() - Method in class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
getPoints() - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
 
+
getPoints() - Method in class it.polimi.ingsw.gamemodel.GoldCard
+
+
Getter for the GoldCard class
+
+
getPoints() - Method in class it.polimi.ingsw.gamemodel.Objective
+
+
Getter for the Objective class
+
+
getPoints() - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Getter for the player's points.
+
+
getPoints() - Method in class it.polimi.ingsw.gamemodel.ResourceCard
+
+
Getter for the ResourceCard class
+
+
getPoints() - Method in class it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage
+
 
+
getRanking() - Method in class it.polimi.ingsw.network.messages.responses.MatchFinishedMessage
+
 
+
getRecipient() - Method in class it.polimi.ingsw.network.messages.actions.SendPrivateTextMessage
+
 
+
getRecipient() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneSentPrivateTextMessage
+
 
+
getReign() - Method in class it.polimi.ingsw.gamemodel.PlayableCard
+
+
Getter for the card reign
+
+
getReigns() - Static method in enum class it.polimi.ingsw.gamemodel.Symbol
+
+
Generates subset containing only the four basic reigns
+
+
getReplacementCardID() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneDrewCardMessage
+
 
+
getReq() - Method in class it.polimi.ingsw.gamemodel.Objective
+
+
Getter for the Objective class
+
+
getReqs() - Method in class it.polimi.ingsw.gamemodel.PositionRequirement
+
+
Getter for the PositionRequirement class
+
+
getReqs() - Method in class it.polimi.ingsw.gamemodel.QuantityRequirement
+
+
Getter for the QuantityRequirement class
+
+
getRequirement() - Method in class it.polimi.ingsw.gamemodel.GoldCard
+
+
Getter for the GoldCard class
+
+
getResourceCards() - Method in class it.polimi.ingsw.utils.CardsManager
+
+
Getter for the resource cards
+
+
getResourcesBack(Symbol) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Get the back of a resource card
+
+
getResponse() - Method in class it.polimi.ingsw.network.messages.responses.ResponseMessage
+
 
+
getRightColor(Symbol) - Method in class it.polimi.ingsw.utils.TUICardParser
+
+
The method is a getter for the TUI-relative color of a specific symbol.
+
+
getRightIcon(Symbol) - Method in class it.polimi.ingsw.utils.TUICardParser
+
+
The method is a getter for the TUI-relative icon of a specific symbol.
+
+
getSecondID() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneDrewSecretObjectivesMessage
+
 
+
getSecretObjective() - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Getter for the player's secret objective.
+
+
getSecretObjective() - Method in class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
getSide() - Method in class it.polimi.ingsw.network.messages.actions.ChooseInitialCardSideMessage
+
 
+
getSide() - Method in class it.polimi.ingsw.network.messages.actions.PlayCardMessage
+
 
+
getSide() - Method in class it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage
+
 
+
getSide() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneSetInitialSideMessage
+
 
+
getSide(Side) - Method in class it.polimi.ingsw.gamemodel.Card
+
+
Getter for the required side of the card
+
+
getSize() - Method in class it.polimi.ingsw.gamemodel.GameDeck
+
+
Getter for the deck's size
+
+
getSource() - Method in class it.polimi.ingsw.network.messages.actions.DrawCardMessage
+
 
+
getStatus() - Method in class it.polimi.ingsw.client.frontend.LastRequest
+
 
+
getText() - Method in class it.polimi.ingsw.network.messages.actions.SendBroadcastTextMessage
+
 
+
getText() - Method in class it.polimi.ingsw.network.messages.actions.SendPrivateTextMessage
+
 
+
getText() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneSentBroadcastTextMessage
+
 
+
getText() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneSentPrivateTextMessage
+
 
+
getTurn() - Method in class it.polimi.ingsw.gamemodel.PlacedCard
+
+
Getter for the PlacedCard class
+
+
getUsername() - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
+
Getter for the client username
+
+
getUsername() - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Gets the player's username.
+
+
getUsername() - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Getter for the player's username.
+
+
getUsername() - Method in class it.polimi.ingsw.network.messages.actions.ActionMessage
+
 
+
getUsername() - Method in class it.polimi.ingsw.network.messages.responses.ResponseMessage
+
 
+
getValidCorner() - Static method in enum class it.polimi.ingsw.gamemodel.Symbol
+
+
Generates subset containing all the valid Symbols a corner can contain
+
+
getValidMultiplier() - Static method in enum class it.polimi.ingsw.gamemodel.Symbol
+
+
Generates subset containing all the symbols a GoldCard multiplier can be
+
+
getValidPlaces() - Method in class it.polimi.ingsw.client.frontend.tui.ValidPositions
+
+
Gets all the valid linking points.
+
+
getView() - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Getter for the view associated to this instance.
+
+
getVisibleCards() - Method in class it.polimi.ingsw.network.messages.responses.MatchStartedMessage
+
 
+
getVisibleDeckReigns() - Method in class it.polimi.ingsw.network.messages.responses.MatchStartedMessage
+
 
+
getVisibleObjectives() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Returns the visible objectives.
+
+
getVisibleObjectives() - Method in class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
getVisibleObjectives() - Method in class it.polimi.ingsw.network.messages.responses.MatchStartedMessage
+
 
+
getVisiblePlayableCards() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Getter for the four visible playable cards (i.e.
+
+
getVisiblePlayableCards() - Method in class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
getX() - Method in class it.polimi.ingsw.network.messages.actions.PlayCardMessage
+
 
+
getX() - Method in class it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage
+
 
+
getY() - Method in class it.polimi.ingsw.network.messages.actions.PlayCardMessage
+
 
+
getY() - Method in class it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage
+
 
+
giveInitialCard(InitialCard) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Give the user its initial card.
+
+
giveInitialCard(InitialCard) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
The current player is choosing the initial card side
+
+
giveInitialCard(InitialCard) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
giveInitialCard(InitialCard) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Asks the user which side he wants to play the initial card.
+
+
giveInitialCard(InitialCard) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Gives to the receiving graphical view (the client) its initial card.
+
+
giveInitialCard(InitialCard) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Gives to the receiving graphical view (the client) its initial card.
+
+
giveSecretObjectives(Pair<Objective, Objective>) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Gives the player two secret objectives to choose from.
+
+
giveSecretObjectives(Pair<Objective, Objective>) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Current player has to choose the secret objective
+
+
giveSecretObjectives(Pair<Objective, Objective>) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
giveSecretObjectives(Pair<Objective, Objective>) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Asks the user which secret objective he wants to keep between the random two given to him.
+
+
giveSecretObjectives(Pair<Objective, Objective>) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Gives to the remote object a pair of secret objectives to show them in the view and to choose one from them.
+
+
giveSecretObjectives(Pair<Objective, Objective>) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Gives to the remote object a pair of secret objectives to show them in the view and to choose one from them.
+
+
GoldCard - Class in it.polimi.ingsw.gamemodel
+
+
The front side of these cards always gives points, but needs a certain requirement to be met in order to be played
+
+
GoldCard(CardFace, Symbol, Symbol, int, QuantityRequirement) - Constructor for class it.polimi.ingsw.gamemodel.GoldCard
+
+
Class constructor.
+
+
GOLDS_DECK - Enum constant in enum class it.polimi.ingsw.gamemodel.DrawSource
+
+
Gold cards deck
+
+
goldsDeck - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
GraphicalApplication - Class in it.polimi.ingsw.client.frontend.gui
+
+
Class from which the FXML application is run, so it's entry point for the user.
+
+
GraphicalApplication() - Constructor for class it.polimi.ingsw.client.frontend.gui.GraphicalApplication
+
 
+
graphicalView - Variable in class it.polimi.ingsw.client.network.NetworkHandler
+
 
+
GraphicalView - Class in it.polimi.ingsw.client.frontend
+
+
Class to manage graphical clients
+
+
GraphicalView() - Constructor for class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Class constructor.
+
+
GraphicalViewGUI - Class in it.polimi.ingsw.client.frontend.gui
+
+
JavaFX implementation of Codex Naturalis client
+
+
GraphicalViewGUI(Stage) - Constructor for class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
+
Initialize on a given JavaFX stage
+
+
GraphicalViewTUI - Class in it.polimi.ingsw.client.frontend.tui
+
+
Class that handles client game loop from TUI.
+
+
GraphicalViewTUI() - Constructor for class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Class constructor.
+
+
GREEN - Enum constant in enum class it.polimi.ingsw.gamemodel.Color
+
 
+
GuiUtil - Class in it.polimi.ingsw.utils
+
 
+
GuiUtil() - Constructor for class it.polimi.ingsw.utils.GuiUtil
+
 
+
+

H

+
+
handCards - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
 
+
HandException - Exception Class in it.polimi.ingsw.exceptions
+
 
+
HandException(String) - Constructor for exception class it.polimi.ingsw.exceptions.HandException
+
 
+
hashCode() - Method in record class it.polimi.ingsw.client.frontend.ShownCard
+
+
Returns a hash code value for this object.
+
+
hashCode() - Method in record class it.polimi.ingsw.client.frontend.tui.BoardPosition
+
+
Returns a hash code value for this object.
+
+
hashCode() - Method in class it.polimi.ingsw.gamemodel.Card
+
 
+
hashCode() - Method in class it.polimi.ingsw.gamemodel.Player
+
 
+
hashCode() - Method in record class it.polimi.ingsw.utils.AvailableMatch
+
+
Returns a hash code value for this object.
+
+
hashCode() - Method in record class it.polimi.ingsw.utils.LeaderboardEntry
+
+
Returns a hash code value for this object.
+
+
hashCode() - Method in record class it.polimi.ingsw.utils.Pair
+
+
Returns a hash code value for this object.
+
+
hashCode() - Method in record class it.polimi.ingsw.utils.PlacedCardRecord
+
+
Returns a hash code value for this object.
+
+
+

I

+
+
id - Variable in class it.polimi.ingsw.gamemodel.Card
+
 
+
InitialCard - Class in it.polimi.ingsw.gamemodel
+
+
Every player has an initial card (which will automatically be placed in the + center of the board)
+
+
InitialCard(CardFace, CardFace) - Constructor for class it.polimi.ingsw.gamemodel.InitialCard
+
+
The initial card only gives corners and resources, never points, so we only + need to know its topological description
+
+
initialize() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController
+
 
+
initialize() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.ConnectionSceneController
+
 
+
initialize() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController
+
 
+
initialize() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController
+
 
+
initialize() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
initialize() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
 
+
initialize() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController
+
 
+
initialize() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.SceneController
+
+
This method is run when the controller is initialized
+
+
initialize() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
 
+
initializePostController() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController
+
 
+
initializePostController() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
initializePostController() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController
+
 
+
initializePostController() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.SceneController
+
+
Method to be called to do actions after the controller attributes are set
+
+
initialsPath - Static variable in class it.polimi.ingsw.utils.GuiUtil
+
 
+
INKWELL - Enum constant in enum class it.polimi.ingsw.gamemodel.Symbol
+
 
+
InputHandler - Class in it.polimi.ingsw.client.frontend.tui
+
+
Class that handles the prompt and gets the user input
+
+
InputHandler(TuiPrinter) - Constructor for class it.polimi.ingsw.client.frontend.tui.InputHandler
+
+
Class constructor.
+
+
INSECT - Enum constant in enum class it.polimi.ingsw.gamemodel.Symbol
+
 
+
INVALID_COORDS - Enum constant in enum class it.polimi.ingsw.gamemodel.PlacementOutcome
+
 
+
INVALID_ENOUGH_RESOURCES - Enum constant in enum class it.polimi.ingsw.gamemodel.PlacementOutcome
+
 
+
InvalidPlayerException - Exception Class in it.polimi.ingsw.exceptions
+
 
+
InvalidPlayerException(String) - Constructor for exception class it.polimi.ingsw.exceptions.InvalidPlayerException
+
 
+
InvalidResourceException - Exception Class in it.polimi.ingsw.exceptions
+
 
+
InvalidResourceException(String) - Constructor for exception class it.polimi.ingsw.exceptions.InvalidResourceException
+
 
+
IOHandler - Class in it.polimi.ingsw.network.tcp
+
+
This class will handle all the IO operations for a certain socket.
+
+
IOHandler(Socket) - Constructor for class it.polimi.ingsw.network.tcp.IOHandler
+
+
Class constructor.
+
+
ipAddress - Variable in class it.polimi.ingsw.client.network.NetworkHandler
+
 
+
isConnected() - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Getter for the connection status.
+
+
isConnected() - Method in class it.polimi.ingsw.gamemodel.Player
+
 
+
isDrawPhase() - Method in class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
isEmpty() - Method in class it.polimi.ingsw.gamemodel.GameDeck
+
+
Checks whether the deck is empty or not
+
+
isEnabled() - Method in class it.polimi.ingsw.client.frontend.tui.PlayerControls
+
 
+
isEndMatch() - Method in class it.polimi.ingsw.network.messages.responses.SomeoneQuitMessage
+
 
+
isFinished() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Verifies if the match is finished.
+
+
isFull() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Verifies if the match is full, thus no more players can join.
+
+
isInitialTurnFinished() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Verifies if the initial turn is finished.
+
+
isLastTurn() - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
isRejoinable() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
If the match is rejoinable (not every player is connected)
+
+
isRejoinable() - Method in record class it.polimi.ingsw.utils.AvailableMatch
+
+
Returns the value of the isRejoinable record component.
+
+
isStarted() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Verifies if the match is started.
+
+
isValid() - Method in record class it.polimi.ingsw.client.frontend.tui.BoardPosition
+
+
Returns the value of the isValid record component.
+
+
isValid(Pair<Integer, Integer>) - Method in class it.polimi.ingsw.client.frontend.tui.ValidPositions
+
+
Checks if a coordinate is a valid link point.
+
+
isValidName(String) - Static method in class it.polimi.ingsw.utils.GuiUtil
+
+
Check if the username/match name is valid + The name must be alphanumeric and between 1 and 32 characters
+
+
it.polimi.ingsw.client.frontend - package it.polimi.ingsw.client.frontend
+
 
+
it.polimi.ingsw.client.frontend.gui - package it.polimi.ingsw.client.frontend.gui
+
 
+
it.polimi.ingsw.client.frontend.gui.controllers - package it.polimi.ingsw.client.frontend.gui.controllers
+
 
+
it.polimi.ingsw.client.frontend.gui.nodes - package it.polimi.ingsw.client.frontend.gui.nodes
+
 
+
it.polimi.ingsw.client.frontend.tui - package it.polimi.ingsw.client.frontend.tui
+
 
+
it.polimi.ingsw.client.network - package it.polimi.ingsw.client.network
+
 
+
it.polimi.ingsw.controllers - package it.polimi.ingsw.controllers
+
 
+
it.polimi.ingsw.exceptions - package it.polimi.ingsw.exceptions
+
 
+
it.polimi.ingsw.gamemodel - package it.polimi.ingsw.gamemodel
+
 
+
it.polimi.ingsw.network.messages - package it.polimi.ingsw.network.messages
+
 
+
it.polimi.ingsw.network.messages.actions - package it.polimi.ingsw.network.messages.actions
+
 
+
it.polimi.ingsw.network.messages.errors - package it.polimi.ingsw.network.messages.errors
+
 
+
it.polimi.ingsw.network.messages.responses - package it.polimi.ingsw.network.messages.responses
+
 
+
it.polimi.ingsw.network.tcp - package it.polimi.ingsw.network.tcp
+
 
+
it.polimi.ingsw.server - package it.polimi.ingsw.server
+
 
+
it.polimi.ingsw.utils - package it.polimi.ingsw.utils
+
 
+
+

J

+
+
joinMatch(String) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Tries to join a match.
+
+
joinMatch(String) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
joinMatch(String) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Asks to join a match.
+
+
joinMatch(String) - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Asks to join a match.
+
+
joinMatch(String) - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Asks to join a match.
+
+
joinMatch(String, String) - Method in class it.polimi.ingsw.server.Server
+
+
Lets the calling view join on a match with the given player username, if possible; gives back to the client + an instance of its PlayerControllerRMI, to start communicating through it with the match.
+
+
joinMatch(String, String) - Method in interface it.polimi.ingsw.server.ServerRMIInterface
+
+
Lets the calling view join on a match with the given player username, if possible; gives back to the client + an instance of its PlayerControllerRMI, to start communicating through it with the match.
+
+
JoinMatchMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
The action communicates the intention of a client to join a match.
+
+
JoinMatchMessage(String, String) - Constructor for class it.polimi.ingsw.network.messages.actions.JoinMatchMessage
+
 
+
joinTitle - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController
+
 
+
+

L

+
+
lastRequest - Variable in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
LastRequest - Class in it.polimi.ingsw.client.frontend
+
+
Last request status.
+
+
LastRequest() - Constructor for class it.polimi.ingsw.client.frontend.LastRequest
+
 
+
lastTurn - Variable in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
leaderboardContainer - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController
+
 
+
LeaderboardEntry - Record Class in it.polimi.ingsw.utils
+
+
LeaderboardEntry
+
+
LeaderboardEntry(String, Integer, boolean) - Constructor for record class it.polimi.ingsw.utils.LeaderboardEntry
+
+
Creates an instance of a LeaderboardEntry record class.
+
+
link() - Method in record class it.polimi.ingsw.client.frontend.tui.BoardPosition
+
+
Returns the value of the link record component.
+
+
listen() - Method in class it.polimi.ingsw.network.tcp.ClientListener
+
+
Main loop.
+
+
listen() - Method in class it.polimi.ingsw.network.tcp.TCPServer
+
+
Main loop.
+
+
loadScene(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.SceneController
+
+
Load a node from a FXML file path, assign properties to the controller + and to the node
+
+
LOBBY - Enum constant in enum class it.polimi.ingsw.client.frontend.MatchStatus
+
 
+
LobbySceneController - Class in it.polimi.ingsw.client.frontend.gui.controllers
+
 
+
LobbySceneController() - Constructor for class it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController
+
 
+
+

M

+
+
main(String[]) - Static method in class it.polimi.ingsw.client.frontend.gui.GraphicalApplication
+
+
Launch the application
+
+
main(String[]) - Static method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
+
Main class to launch the applicaiton
+
+
main(String[]) - Static method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Launch the TUI client
+
+
main(String[]) - Static method in class it.polimi.ingsw.server.Server
+
 
+
main(String[]) - Static method in class it.polimi.ingsw.utils.CardsSerializer
+
+
Function that serializes the cards
+
+
makeMove() - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Ask the user to make a play.
+
+
makeMove() - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
+
Method called everytime it's this client turn.
+
+
makeMove() - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Ask a player to choose a card to play, the side on which the card should be played, and the + coordinates in which the card should be played; finally trying to actually play the card.
+
+
makeMove() - Method in class it.polimi.ingsw.gamemodel.MatchState
+
+
Checks dynamically if a player can make a move in the current state, otherwise throws an exception.
+
+
makeMove() - Method in class it.polimi.ingsw.gamemodel.NextTurnState
+
+
This method call is allowed by this class instances if and only if the match has already started.
+
+
makeMove(Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Makes the chosen move on the board of the current player (known because of the internal Match state); + in particular, checks if the placement is valid, then places the card on the player's board and add points + to the player.
+
+
match - Variable in class it.polimi.ingsw.controllers.PlayerController
+
 
+
match - Variable in class it.polimi.ingsw.gamemodel.MatchState
+
 
+
Match - Class in it.polimi.ingsw.gamemodel
+
+
Represents the match played by Player instances, therefore implements a slice of game logic + using drawCard(...), setInitialSide(...), setSecretObjective(...), proposeSecretObjective(...), etc.
+
+
Match(int, GameDeck<InitialCard>, GameDeck<ResourceCard>, GameDeck<GoldCard>, GameDeck<Objective>) - Constructor for class it.polimi.ingsw.gamemodel.Match
+
+
Initializes main Match attributes and allocate the attribute players List, assuming no parameter is null.
+
+
MATCH_STATE - Enum constant in enum class it.polimi.ingsw.client.frontend.MatchStatus
+
 
+
matchFinished() - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that the match has just finished.
+
+
matchFinished() - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that the match has just finished.
+
+
matchFinished() - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that the match has just finished.
+
+
matchFinished() - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Removes this match serialization file from the disk and removes this match instance from the list of matches + available in the Server.
+
+
matchFinished(List<LeaderboardEntry>) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Shows the player the match's leaderboard after the game ended.
+
+
matchFinished(List<LeaderboardEntry>) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
matchFinished(List<LeaderboardEntry>) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Shows whether the current player won or lost.
+
+
matchFinished(List<LeaderboardEntry>) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that the match has just finished.
+
+
matchFinished(List<LeaderboardEntry>) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that the match has just finished.
+
+
MatchFinishedMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
This response is sent to each player when the match is finished
+
+
MatchFinishedMessage(List<Pair<Player, Boolean>>) - Constructor for class it.polimi.ingsw.network.messages.responses.MatchFinishedMessage
+
 
+
matchName - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController
+
 
+
matchName - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
 
+
matchNumberContainer - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController
+
 
+
MatchObserver - Interface in it.polimi.ingsw.gamemodel
+
+
Interface to be implemented by any class that wants to be an observer of Match, so wants to be able to + get notified when an event occurs in a match (to which it's subscribed).
+
+
MatchObserverCallable - Interface in it.polimi.ingsw.gamemodel
+
+
Functional interface used to represents a method call (MatchObserverCallable.call(MatchObserver)) on a MatchObserver.
+
+
matchResumed() - Method in class it.polimi.ingsw.controllers.PlayerController
+
+
Notifies the view that match has resumed after a server crash.
+
+
matchResumed() - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies the view that match has resumed after a server crash.
+
+
matchResumed() - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies the view that match has resumed after a server crash.
+
+
matchResumed(Map<String, Color>, Map<String, List<PlayableCard>>, Pair<Objective, Objective>, Map<DrawSource, PlayableCard>, Pair<Symbol, Symbol>, Objective, Map<String, Map<Symbol, Integer>>, Map<String, Map<Pair<Integer, Integer>, PlacedCard>>, Map<String, Integer>, String, boolean) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that the match has resumed.
+
+
matchResumed(Map<String, Color>, Map<String, List<PlayableCard>>, Pair<Objective, Objective>, Map<DrawSource, PlayableCard>, Pair<Symbol, Symbol>, Objective, Map<String, Map<Symbol, Integer>>, Map<String, Map<Pair<Integer, Integer>, PlacedCard>>, Map<String, Integer>, String, boolean) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that the match has resumed.
+
+
MatchResumedMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
This response is sent to the user who just rejoined a match.
+
+
MatchResumedMessage(Map<String, Color>, Map<String, List<Integer>>, Pair<Integer, Integer>, Map<DrawSource, Integer>, Pair<Symbol, Symbol>, Integer, Map<String, Map<Symbol, Integer>>, Map<String, Map<Integer, PlacedCardRecord>>, Map<String, Integer>, String, boolean) - Constructor for class it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+
 
+
MatchSceneController - Class in it.polimi.ingsw.client.frontend.gui.controllers
+
+
JavaFX controller of the match scene
+
+
MatchSceneController() - Constructor for class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
matchStarted() - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that the match has just started.
+
+
matchStarted() - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that the match has just started.
+
+
matchStarted() - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that the match has just started.
+
+
matchStarted() - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Does nothing.
+
+
matchStarted(Map<String, Color>, Map<String, List<PlayableCard>>, Pair<Objective, Objective>, Map<DrawSource, PlayableCard>, Pair<Symbol, Symbol>) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Starts match on the client side, setting all variables to their initial values.
+
+
matchStarted(Map<String, Color>, Map<String, List<PlayableCard>>, Pair<Objective, Objective>, Map<DrawSource, PlayableCard>, Pair<Symbol, Symbol>) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that the match has just started.
+
+
matchStarted(Map<String, Color>, Map<String, List<PlayableCard>>, Pair<Objective, Objective>, Map<DrawSource, PlayableCard>, Pair<Symbol, Symbol>) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that the match has just started.
+
+
MatchStartedMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
Sent when the required amount of players is reached and the match is about to start.
+
+
MatchStartedMessage(Pair<Objective, Objective>, Map<DrawSource, PlayableCard>, Pair<Symbol, Symbol>, List<Player>) - Constructor for class it.polimi.ingsw.network.messages.responses.MatchStartedMessage
+
+
Calculates the needed parameters given some information from the match
+
+
MatchState - Class in it.polimi.ingsw.gamemodel
+
+
Represents an appendix of Match.
+
+
MatchState() - Constructor for class it.polimi.ingsw.gamemodel.MatchState
+
+
Empty constructor needed for deserialization.
+
+
MatchState(Match) - Constructor for class it.polimi.ingsw.gamemodel.MatchState
+
 
+
MatchStatus - Enum Class in it.polimi.ingsw.client.frontend
+
+
Represents the current match macro-state from the client point of view.
+
+
MatchStatusObserver - Class in it.polimi.ingsw.server
+
+
Subclass of MatchObserver supposed to perform routine actions, which means actions that are to be + performed when there's a state transition, BUT that are not related to a specific player.
+
+
MatchStatusObserver(String, Map<String, Match>) - Constructor for class it.polimi.ingsw.server.MatchStatusObserver
+
+
Initializes this instance main attributes.
+
+
maxPlayers() - Method in record class it.polimi.ingsw.utils.AvailableMatch
+
+
Returns the value of the maxPlayers record component.
+
+
Message - Class in it.polimi.ingsw.network.messages
+
+
Message
+
+
Message() - Constructor for class it.polimi.ingsw.network.messages.Message
+
 
+
MessageJsonParser - Class in it.polimi.ingsw.utils
+
 
+
MessageJsonParser() - Constructor for class it.polimi.ingsw.utils.MessageJsonParser
+
 
+
msgToString(Message) - Method in class it.polimi.ingsw.network.tcp.IOHandler
+
+
Converts a Message to its corresponding Json.
+
+
+

N

+
+
name() - Method in record class it.polimi.ingsw.utils.AvailableMatch
+
+
Returns the value of the name record component.
+
+
networkHandler - Variable in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
NetworkHandler - Class in it.polimi.ingsw.client.network
+
+
Class used by a generic client to receive from and transmit to a remote Server instance and a + remote PlayerController instance.
+
+
NetworkHandler(GraphicalView, String, int) - Constructor for class it.polimi.ingsw.client.network.NetworkHandler
+
+
Initialize the instance all its internal attributes.
+
+
NetworkHandlerRMI - Class in it.polimi.ingsw.client.network
+
+
Class used by a generic client to receive from and transmit to a remote Server instance and a + remote PlayerControllerRMI instance using the RMI protocol.
+
+
NetworkHandlerRMI(GraphicalView, String, int) - Constructor for class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Initialize the instance all its internal attributes.
+
+
NetworkHandlerTCP - Class in it.polimi.ingsw.client.network
+
+
Class used by a generic client to receive from and transmit to a remote Server instance + and a remote PlayerControllerTCP instance using the TCP protocol.
+
+
NetworkHandlerTCP(GraphicalView, String, Integer) - Constructor for class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Initialize the instance all its internal attributes.
+
+
nextPlayer() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Modifies the current player according to the next turn: if it's the first turn, the current player is the first + one in the players List, the turn order then follows the players List order, in a circular way.
+
+
NextTurnState - Class in it.polimi.ingsw.gamemodel
+
+
Subclass of MatchState.
+
+
NextTurnState(Match) - Constructor for class it.polimi.ingsw.gamemodel.NextTurnState
+
+
Initializes this instance.
+
+
NO_MULT - Enum constant in enum class it.polimi.ingsw.gamemodel.Symbol
+
 
+
noCardPath - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Path to what to show when a card is missing
+
+
notifyConnectionLost() - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Notify the client that the connection with the server + has been lost.
+
+
notifyConnectionLost() - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
notifyConnectionLost() - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Notifies that there has been a connection error.
+
+
notifyError(Exception) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Sets the internal state according to the occurrence of an error.
+
+
notifyError(Exception) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
notifyError(Exception) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Sets the last error message to what the server responded.
+
+
notifyError(Exception) - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Notifies the view about a remote error.
+
+
notifyError(String, String) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
+
Notify an error
+
+
notifyLastTurn() - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Notifies the player that this is the last turn he can play.
+
+
notifyLastTurn() - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
notifyMatchResumed(boolean) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Method that shows the user that the match has resumed.
+
+
notifyMatchResumed(boolean) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
notifyMatchResumed(boolean) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Notifies that the player correctly rejoined a match, and makes him play his turn.
+
+
notifyMatchStart() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Notifies all match observers that the match has started.
+
+
notifyMatchStarted() - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Method that shows the user that the match has started.
+
+
notifyMatchStarted() - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
notifyMatchStarted() - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Notifies that the match has started.
+
+
+

O

+
+
Objective - Class in it.polimi.ingsw.gamemodel
+
+
Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
+
+
Objective(int, Requirement) - Constructor for class it.polimi.ingsw.gamemodel.Objective
+
+
Class constructor.
+
+
objectivesPath - Static variable in class it.polimi.ingsw.utils.GuiUtil
+
 
+
+

P

+
+
Pair<T,U> - Record Class in it.polimi.ingsw.utils
+
+
Represents a pair of generic values.
+
+
Pair(T, U) - Constructor for record class it.polimi.ingsw.utils.Pair
+
+
Creates an instance of a Pair record class.
+
+
PARCHMENT - Enum constant in enum class it.polimi.ingsw.gamemodel.Symbol
+
 
+
parseCard(Card, Pair<Integer, Integer>, Pair<Integer, Integer>, Boolean) - Method in class it.polimi.ingsw.utils.TUICardParser
+
+
Generates a printable string representing a Card of any type
+
+
parseObjective(Objective, Pair<Integer, Integer>) - Method in class it.polimi.ingsw.utils.TUICardParser
+
 
+
pawnSize - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.PlateauPane
+
 
+
pawnsPath - Static variable in class it.polimi.ingsw.utils.GuiUtil
+
 
+
peek() - Method in class it.polimi.ingsw.gamemodel.GameDeck
+
+
Returns a card from the deck's top without removing it (returns null if empty)
+
+
PENDING - Enum constant in enum class it.polimi.ingsw.utils.RequestStatus
+
 
+
ping() - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Checks for connectivity.
+
+
ping() - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Checks for connectivity.
+
+
ping() - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Checks for connectivity.
+
+
ping() - Method in class it.polimi.ingsw.server.Server
+
+
Pings the server in order to perceive if the connection is still alive and working.
+
+
ping() - Method in interface it.polimi.ingsw.server.ServerRMIInterface
+
+
Pings the server in order to perceive if the connection is still alive and working.
+
+
placeCard(Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Places a card on the board
+
+
placeCard(Pair<Integer, Integer>, PlayableCard, Side, int) - Method in class it.polimi.ingsw.gamemodel.Board
+
+
This method will add to the board the given card (assuming the positioning is valid), and update the player's resources
+
+
placeCard(Pair<Integer, Integer>, PlayableCard, Side, Integer, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
+
Adds a card to the player's board.
+
+
PlacedCard - Class in it.polimi.ingsw.gamemodel
+
+
This class handles the card already placed on the board, since we need to remember which card covers which
+
+
PlacedCard(Card, Side, int) - Constructor for class it.polimi.ingsw.gamemodel.PlacedCard
+
+
Class constructor, which only needs to initialize the card and the turn it is played, as well as the side it was played on
+
+
PlacedCardRecord - Record Class in it.polimi.ingsw.utils
+
+
PlacedCardRecord
+
+
PlacedCardRecord(Integer, Integer, Integer, Side) - Constructor for record class it.polimi.ingsw.utils.PlacedCardRecord
+
+
Creates an instance of a PlacedCardRecord record class.
+
+
placeInitial(Side, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
+
Places initial card on the board.
+
+
PlacementOutcome - Enum Class in it.polimi.ingsw.gamemodel
+
+
Before placing a card, its placement must be verified.
+
+
PLANT - Enum constant in enum class it.polimi.ingsw.gamemodel.Symbol
+
 
+
plateauPane - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
PlateauPane - Class in it.polimi.ingsw.client.frontend.gui.nodes
+
+
JavaFX node, Pane showing all the player pawns and points
+
+
PlateauPane() - Constructor for class it.polimi.ingsw.client.frontend.gui.nodes.PlateauPane
+
+
Constructor of the node
+
+
PlayableCard - Class in it.polimi.ingsw.gamemodel
+
+
Class that represents every kind of card that can be played during the game.
+
+
PlayableCard() - Constructor for class it.polimi.ingsw.gamemodel.PlayableCard
+
 
+
PlayableCard(Symbol) - Constructor for class it.polimi.ingsw.gamemodel.PlayableCard
+
+
Constructor for PlayableCard.
+
+
playableCardsPath - Static variable in class it.polimi.ingsw.utils.GuiUtil
+
 
+
playAgainButton - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController
+
 
+
playCard(Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Plays a card.
+
+
playCard(Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Plays a card.
+
+
playCard(Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Plays a card.
+
+
playCard(Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Plays a card.
+
+
playCard(Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Plays a card.
+
+
playCard(Pair<Integer, Integer>, PlayableCard, Side) - Method in interface it.polimi.ingsw.controllers.PlayerControllerRMIInterface
+
+
Plays a card.
+
+
playCard(Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Tries to place a card on the player's board, unless there was a WrongStateException, + in which case a new ErrorMessage is sent with the exception content
+
+
playCard(Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Places a card on the player's board, on the give side and in the given position, assuming it's valid.
+
+
PlayCardMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
The action communicates the intention of the player to place a card on its board.
+
+
PlayCardMessage(String, Pair<Integer, Integer>, Integer, Side) - Constructor for class it.polimi.ingsw.network.messages.actions.PlayCardMessage
+
 
+
player - Variable in class it.polimi.ingsw.controllers.PlayerController
+
 
+
Player - Class in it.polimi.ingsw.gamemodel
+
+
Represents each in-game user, so acts also as a gateway receiving input by the Controller.
+
+
Player(Player) - Constructor for class it.polimi.ingsw.gamemodel.Player
+
+
Initializes the current instance from a copy reference
+
+
Player(String, Match) - Constructor for class it.polimi.ingsw.gamemodel.Player
+
+
Initializes the main player's attributes.
+
+
PlayerController - Class in it.polimi.ingsw.controllers
+
+
Controller for a match player, the only agent needing a view and so a controller in this + application.
+
+
PlayerController(String, Match) - Constructor for class it.polimi.ingsw.controllers.PlayerController
+
+
Instantiates the internal Player with the given username and sets the internal Match reference to + the given one, furthermore add the new Player instance to the match and subscribe this class + instance to the match observers.
+
+
PlayerControllerRMI - Class in it.polimi.ingsw.controllers
+
+
Subclass of PlayerController that implements its abstract methods through RMI interactions.
+
+
PlayerControllerRMI(String, Match) - Constructor for class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Instantiates the internal Player with the given username and sets the internal Match reference to the given one, + add the new Player instance to the match and subscribe this class instance to the match observers.
+
+
PlayerControllerRMIInterface - Interface in it.polimi.ingsw.controllers
+
+
RMI interface used to declare all and only the methods callable on a remote PlayerControllerRMI instance implementing + this interface.
+
+
PlayerControllerTCP - Class in it.polimi.ingsw.controllers
+
+
Subclass of PlayerController that implements its abstract methods through TCP + interactions.
+
+
PlayerControllerTCP(String, Match, IOHandler) - Constructor for class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Instantiates the internal Player with the given username and sets the internal Match + reference to the given one, add the new Player instance to the match and subscribe this class + instance to the match observers.
+
+
PlayerControls - Class in it.polimi.ingsw.client.frontend.tui
+
+
Class used to synchronyze methods that should be ran only during other player's turns.
+
+
PlayerControls() - Constructor for class it.polimi.ingsw.client.frontend.tui.PlayerControls
+
+
Class constructor.
+
+
players - Variable in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
playersContainer - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
 
+
PlayerTabController - Class in it.polimi.ingsw.client.frontend.gui.controllers
+
+
Controller of the player tab
+
+
PlayerTabController() - Constructor for class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
 
+
points - Variable in class it.polimi.ingsw.gamemodel.PlayableCard
+
 
+
points() - Method in record class it.polimi.ingsw.utils.LeaderboardEntry
+
+
Returns the value of the points record component.
+
+
poll() - Method in class it.polimi.ingsw.gamemodel.GameDeck
+
+
Removes a card from the deck's top (null if the deck is empty)
+
+
pop() - Method in class it.polimi.ingsw.gamemodel.GameDeck
+
+
Removes a card from the deck's top (throws exception if the deck is empty)
+
+
port - Variable in class it.polimi.ingsw.client.network.NetworkHandler
+
 
+
positionOffset - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.PlateauPane
+
 
+
PositionRequirement - Class in it.polimi.ingsw.gamemodel
+
+
This class handles requirements involving relative positioning of cards, e.g.
+
+
PositionRequirement(Map<Pair<Integer, Integer>, Symbol>) - Constructor for class it.polimi.ingsw.gamemodel.PositionRequirement
+
+
Note that, since this requirement only cares about relative positioning, there must always be + an element whose key is (0, 0)
+
+
printAvailableResources(Map<Symbol, Integer>, Integer) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints all the players' available resources (from the board).
+
+
printCard(ShownCard) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Shows a card on the terminal
+
+
printCenteredMessage(String, int) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints a one-line message in the center of the screen.
+
+
printChat(List<String>) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the message history of the most recent messages.
+
+
printDrawingScreen(Pair<Symbol, Symbol>, Map<DrawSource, PlayableCard>) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the drawing screen, containing the 2 decks and the 4 visible cards.
+
+
printEndScreen(List<LeaderboardEntry>, String) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the game's ranking.
+
+
printHand(String, Color, List<PlayableCard>) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the hand of the player, which includes the 3 available-to-play cards.
+
+
printHandAtBottom(List<PlayableCard>) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the hand of the player at the bottom of the screen.
+
+
printInitialSideBySide(InitialCard, int) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the specified initial card front and back in the middle of the screen.
+
+
printListReverse(List<String>) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints a list of Strings to the terminal, first element on last line, last element of first + line.
+
+
printMatchesLobby(List<AvailableMatch>, List<AvailableMatch>, int) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the list of matches (joinable or not) in the center of the screen.
+
+
printMessage(String) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints a message in the line above the prompt.
+
+
printMessages(List<String>) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints a list of Strings to the terminal, first element of first line, last element on last + line.
+
+
printObjectivePair(String, Pair<Objective, Objective>, int) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints a pair of objectives, with a brief description above them.
+
+
printObjectives(String, Color, Objective, Pair<Objective, Objective>) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the objectives, both common and secret, of a given player.
+
+
printPlayableFrontAndBack(PlayableCard, int) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the specified initial card front and back in the middle of the screen.
+
+
printPlayerBoard(String, ClientBoard) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the whole board, including username, points and resources.
+
+
printPrompt(String) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the command prompt.
+
+
printScoreboard(Map<String, Integer>, int) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the scoreboard at the end of the match.
+
+
printSimpleList(List<String>, Boolean, Boolean) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints a list, simple or numbered, either in the center or in the bottom left of the tui.
+
+
printStringsBoxed(List<String>, String, Color, Boolean) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints a list of strings with a box around them.
+
+
printValidPlaces(Map<Pair<Integer, Integer>, Pair<Integer, Corner>>) - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints indexes for available spots, during the placing card phase.
+
+
printWelcomeScreen() - Method in class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Prints the welcome screen in the middle of the tui view.
+
+
proposeSecretObjectives() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Extracts two cards from the deck of objectives and returns them.
+
+
proposeSecretObjectives() - Method in class it.polimi.ingsw.gamemodel.MatchState
+
+
Checks dynamically if a secret objective can be proposed to the current player in the current state, otherwise + throws an exception.
+
+
proposeSecretObjectives() - Method in class it.polimi.ingsw.gamemodel.NextTurnState
+
+
This method call is allowed by this class instances if and only if the match hasn't started yet + and the initial card side choosing has already finished.
+
+
+

Q

+
+
QuantityRequirement - Class in it.polimi.ingsw.gamemodel
+
+
This class handles requirements involving relative positioning of cards, e.g.
+
+
QuantityRequirement(Map<Symbol, Integer>) - Constructor for class it.polimi.ingsw.gamemodel.QuantityRequirement
+
+
Class constructor.
+
+
+

R

+
+
RankingSceneController - Class in it.polimi.ingsw.client.frontend.gui.controllers
+
+
JavaFX Controller of the ranking scene, shows the leaderboard after the match is finished
+
+
RankingSceneController() - Constructor for class it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController
+
 
+
readMsg() - Method in class it.polimi.ingsw.network.tcp.IOHandler
+
+
Acquires a Message from the socket's input stream.
+
+
receiveAvailableMatches(List<AvailableMatch>) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Receive the list of matches currently available
+
+
receiveAvailableMatches(List<AvailableMatch>) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
receiveAvailableMatches(List<AvailableMatch>) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Receives the currently available matches.
+
+
receiveAvailableMatches(List<AvailableMatch>) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Gives to the receiving graphical view (the client) a list of the currently available matches.
+
+
receiveBroadcastMessage(String, String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController
+
+
Handles the receipt of a broadcast message from a user who's not the current client.
+
+
receivePrivateMessage(String, String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController
+
+
Handles the receipt of a private message from a user who's not the current client.
+
+
RED - Enum constant in enum class it.polimi.ingsw.gamemodel.Color
+
 
+
registerView(RemoteViewInterface) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Sets the internal View attribute to the given argument; if it has already been called, it won't + do anything, since it's call is allowed once per PlayerController object.
+
+
registerView(RemoteViewInterface) - Method in interface it.polimi.ingsw.controllers.PlayerControllerRMIInterface
+
+
Register the given view as the one attached to the remote PlayerControllerRMI instance; if it has already been + called, it won't do anything, since it's call is allowed once per PlayerController object.
+
+
reign - Variable in class it.polimi.ingsw.gamemodel.PlayableCard
+
 
+
RemoteViewInterface - Interface in it.polimi.ingsw.client.network
+
+
Network interface used to declare all and only the methods callable on a remote view instance implementing this interface or + by message listener for TCP.
+
+
removeHandCard(PlayableCard) - Method in class it.polimi.ingsw.gamemodel.Board
+
+
Removes a card from the hand of the player
+
+
removePlayer() - Method in class it.polimi.ingsw.gamemodel.FinalState
+
+
This method call is allowed by this class instances.
+
+
removePlayer() - Method in class it.polimi.ingsw.gamemodel.MatchState
+
+
Checks dynamically if a player can be removed in the current state, otherwise it forces the Match to go to the + FinalState.
+
+
removePlayer() - Method in class it.polimi.ingsw.gamemodel.WaitState
+
+
This method call is allowed by this class instances.
+
+
removePlayer(Player) - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Removes a player from the match, assuming the player is in the match.
+
+
removePlayer(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
+
Remove a player from the list
+
+
removePlayerChoiceContainer() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Remove the container that asks for initials card, objective cards..
+
+
RequestStatus - Enum Class in it.polimi.ingsw.utils
+
+
Represents the status of a remote request sent to a remove Server or PlayerController.
+
+
Requirement - Class in it.polimi.ingsw.gamemodel
+
+
A condition must be met in order to play a golden card and to get points from the objectives.
+
+
Requirement() - Constructor for class it.polimi.ingsw.gamemodel.Requirement
+
+
Empty class constructor.
+
+
ResourceCard - Class in it.polimi.ingsw.gamemodel
+
+
Card that does not require any conditions to be played.
+
+
ResourceCard(CardFace, Symbol, int) - Constructor for class it.polimi.ingsw.gamemodel.ResourceCard
+
+
Class constructor.
+
+
RESOURCES_DECK - Enum constant in enum class it.polimi.ingsw.gamemodel.DrawSource
+
+
Resource cards deck
+
+
resourcesDeck - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
ResponseMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
Messages sent from the server to the clients to update them about another + user's move or to the consequence of their action
+
+
ResponseMessage(String) - Constructor for class it.polimi.ingsw.network.messages.responses.ResponseMessage
+
 
+
resumeMatch(Map<String, Color>, Map<String, List<PlayableCard>>, Pair<Objective, Objective>, Map<DrawSource, PlayableCard>, Pair<Symbol, Symbol>, Objective, Map<String, Map<Symbol, Integer>>, Map<String, Map<Pair<Integer, Integer>, PlacedCard>>, Map<String, Integer>, String, boolean) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Resumes match on the client side, setting all variables to their initial values.
+
+
run() - Method in class it.polimi.ingsw.network.tcp.ClientListener
+
+
Since the class extends Thread it needs to implement Thread.run().
+
+
run() - Method in class it.polimi.ingsw.network.tcp.ClientReceiver
+
+
Receives answers from the server and tries to parse it (in a new thread)
+
+
+

S

+
+
SceneController - Class in it.polimi.ingsw.client.frontend.gui.controllers
+
+
JavaFX controller of a scene
+
+
SceneController() - Constructor for class it.polimi.ingsw.client.frontend.gui.controllers.SceneController
+
 
+
screenHeight - Static variable in class it.polimi.ingsw.client.frontend.gui.GraphicalApplication
+
 
+
screenWidth - Static variable in class it.polimi.ingsw.client.frontend.gui.GraphicalApplication
+
 
+
second() - Method in record class it.polimi.ingsw.utils.Pair
+
+
Returns the value of the second record component.
+
+
SECOND_VISIBLE - Enum constant in enum class it.polimi.ingsw.gamemodel.DrawSource
+
+
Second gold card (second among all)
+
+
secondObjective - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
secondVisible - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
sendBroadcastText(Player, String) - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Sends a broadcast message in the chat.
+
+
sendBroadcastText(String) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Sends a broadcast text.
+
+
sendBroadcastText(String) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Sends a message to all the match players
+
+
sendBroadcastText(String) - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Sends a message to all the match players
+
+
sendBroadcastText(String) - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Sends a message to all the match players
+
+
sendBroadcastText(String) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Sends a broadcast in the chat.
+
+
sendBroadcastText(String) - Method in interface it.polimi.ingsw.controllers.PlayerControllerRMIInterface
+
+
Sends a text to all the players in the match.
+
+
sendBroadcastText(String) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Sends a broadcast in the chat.
+
+
sendBroadcastText(String) - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Sends a message in public chat
+
+
SendBroadcastTextMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
SendBroadcastTextMessage
+
+
SendBroadcastTextMessage(String, String) - Constructor for class it.polimi.ingsw.network.messages.actions.SendBroadcastTextMessage
+
 
+
sendJoined() - Method in class it.polimi.ingsw.controllers.PlayerController
+
+
Tries to effectively join a match, adding himself to the list of observers and the corresponding + player to the match, if the username is valid.
+
+
sendPrivateText(Player, Player, String) - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Sends a private message to the recipient chat.
+
+
sendPrivateText(Player, String) - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Sends a private message to the specified recipient
+
+
sendPrivateText(String, String) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Sends a private text.
+
+
sendPrivateText(String, String) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Sends a private message to a match player
+
+
sendPrivateText(String, String) - Method in class it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
Sends a private message to a match player
+
+
sendPrivateText(String, String) - Method in class it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
Sends a private message to a match player
+
+
sendPrivateText(String, String) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Sends a private message in the chat.
+
+
sendPrivateText(String, String) - Method in interface it.polimi.ingsw.controllers.PlayerControllerRMIInterface
+
+
Sends a text just to a specific player in the match.
+
+
sendPrivateText(String, String) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Sends a private message in the chat.
+
+
SendPrivateTextMessage - Class in it.polimi.ingsw.network.messages.actions
+
+
SendPrivateTextMessage
+
+
SendPrivateTextMessage(String, String, String) - Constructor for class it.polimi.ingsw.network.messages.actions.SendPrivateTextMessage
+
 
+
Server - Class in it.polimi.ingsw.server
+
+
The server class of this application.
+
+
Server(int, int) - Constructor for class it.polimi.ingsw.server.Server
+
+
Initializes this Server instance and its attributes.
+
+
serverAddress - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.ConnectionSceneController
+
 
+
serverPort - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.ConnectionSceneController
+
 
+
ServerRMIInterface - Interface in it.polimi.ingsw.server
+
+
RMI interface used to declare all and only the methods callable on a remote Server instance implementing this + interface by a client.
+
+
setArc(double) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Set arcHeight and arcWidth of the card
+
+
setCard(InitialCard, Side) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Change the displayed card
+
+
setCard(Objective, Side) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Change the displayed card
+
+
setCard(PlayableCard, Side) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Change the displayed card
+
+
setColor(Color) - Method in class it.polimi.ingsw.gamemodel.Player
+
+
Setter for the player's color.
+
+
setColor(String, Color) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.PlateauPane
+
+
Set the color of a player
+
+
setConnected(boolean) - Method in class it.polimi.ingsw.gamemodel.Player
+
 
+
setControllerAttributes(FXMLLoader) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.SceneController
+
+
Set graphical view and the main stage properties to the scene controller
+
+
setControllerAttributes(FXMLLoader, Node) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.SceneController
+
+
Set graphical view and the main stage properties to the scene controller + also sets the "Controller" property for the given node
+
+
setCurrentPlayer(boolean) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Set if the player is the current one
+
+
setCurrentPlayers(int) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
+
Set the current amount of players in the current match
+
+
setDrawSource(DrawSource, PlayableCard, Symbol) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
+
Set the displayed card for the given draw source
+
+
setErrror(Exception) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController
+
+
Show an error from an exception
+
+
setFocus(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
+
Force the focus on a player's tab
+
+
setFocusToTable() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
setGoldsCardBack(Symbol) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Change the displayed card to the back of a gold card
+
+
setGraphicalView(GraphicalViewGUI) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.SceneController
+
+
Set the graphical view for the controller
+
+
setHandCards(List<PlayableCard>) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Set player hand cards
+
+
setInitial(InitialCard) - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
+
Sets the initial card.
+
+
setInitialCard(InitialCard, Side) - Method in class it.polimi.ingsw.gamemodel.Board
+
+
Places the initial card in the (0, 0) coordinates, on the desired side
+
+
setInitialSide(Side, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Sets the current player's initial card side.
+
+
setLastRequestStatus(RequestStatus) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Sets the last request's status.
+
+
setLastRequestStatus(RequestStatus) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Sets the last request's status, eventually notifying all threads of the server's response.
+
+
setLobbySceneController(LobbySceneController) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
+
Set the lobby scene controller
+
+
setMatchName(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
+
Set the name of the match to display
+
+
setMaxPlayers(int) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
+
Set the maximum amount of players in the current match
+
+
setNetworkHandler(NetworkHandler) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Sets the network interface in order to communicate.
+
+
setObjectives(Pair<Objective, Objective>) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
+
Set the visible objectives cards
+
+
setPlateauPoints(String, int) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
+
Move the player pawn on the plateau
+
+
setPoints(int) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Set the amount of points that the player has
+
+
setPoints(String, int) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.PlateauPane
+
+
Set the amount of points of a player and move its pawn
+
+
setPrompt(String) - Method in class it.polimi.ingsw.client.frontend.tui.InputHandler
+
+
Sets the current prompt, without displaying it.
+
+
setResources(Map<Symbol, Integer>) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Set the displayed resources
+
+
setResourcesCardBack(Symbol) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Change the displayed card to the back of a resource card
+
+
setSecretObjective(Objective) - Method in class it.polimi.ingsw.client.frontend.ClientBoard
+
+
Sets the secret objective.
+
+
setSecretObjective(Objective) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Set the secret objective for the current player
+
+
setSecretObjective(Objective) - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Checks that the given objective is one of the proposed ones to the current player + and put the discarded objective back in the objectives deck.
+
+
setStage(Stage) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.SceneController
+
+
Set the main stage the controller is in
+
+
setState(MatchState) - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Sets the current match state, assuming it's not null.
+
+
setStateTitle(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
+
Set the current state title to express an action while playing
+
+
setStateTitle(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Set state title, usually used to tell the player what to do
+
+
setStatus(RequestStatus) - Method in class it.polimi.ingsw.client.frontend.LastRequest
+
+
Sets the status.
+
+
setText(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController
+
+
Set the text of the error that is shown in the bottom
+
+
setTitle(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController
+
+
Set the title of the error that is shown on the top
+
+
setToken(Color) - Method in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Display token of a color on the initial card
+
+
setupBoards() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Gives one gold card and two resource cards to each player (hand) + and sets the initial card for each of them.
+
+
setupDecks() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Shuffles all thr cards decks and places the visible cards on the board + Note: Called by SetupState.
+
+
setupPlayers() - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Shuffles the players turns order and gives them their pawn color.
+
+
setUsername(String) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Sets the username of the corresponding player.
+
+
setUsername(String) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Set the player username
+
+
setUsername(String) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
setUsername(String) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Sets the player's username.
+
+
setVictory(boolean) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController
+
+
Set if the player has won the match
+
+
showConnectionScene() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController
+
+
Show the connection scene
+
+
showMatch() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
+
Show the match scene when the match is started
+
+
ShownCard - Record Class in it.polimi.ingsw.client.frontend
+
+
ShownCard
+
+
ShownCard(Card, Side, Pair<Integer, Integer>) - Constructor for record class it.polimi.ingsw.client.frontend.ShownCard
+
+
Creates an instance of a ShownCard record class.
+
+
showPrompt() - Method in class it.polimi.ingsw.client.frontend.tui.InputHandler
+
+
Shows the current prompt.
+
+
showRankingScene() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
+
Show the ranking scene on match end
+
+
showWaitScene() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController
+
+
Show the wait scene
+
+
shuffle() - Method in class it.polimi.ingsw.gamemodel.GameDeck
+
+
Shuffles the deck
+
+
side() - Method in record class it.polimi.ingsw.client.frontend.ShownCard
+
+
Returns the value of the side record component.
+
+
side() - Method in record class it.polimi.ingsw.utils.PlacedCardRecord
+
+
Returns the value of the side record component.
+
+
Side - Enum Class in it.polimi.ingsw.gamemodel
+
+
Represents a card side.
+
+
someoneChoseSecretObjective(Player, Objective) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that someone has chosen the secret objective.
+
+
someoneChoseSecretObjective(Player, Objective) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that someone has chosen the secret objective.
+
+
someoneChoseSecretObjective(Player, Objective) - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that someone has chosen the secret objective.
+
+
someoneChoseSecretObjective(Player, Objective) - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Does nothing.
+
+
someoneChoseSecretObjective(String) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Changes the current player and updates last request's status to RequestStatus.SUCCESSFUL.
+
+
someoneChoseSecretObjective(String) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
someoneChoseSecretObjective(String) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Adds to the list of player with objectives the last player who chose his secret objective.
+
+
someoneChoseSecretObjective(String) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that someone (it may or may not be the receiving View instance) has chosen theirs secret objective.
+
+
someoneChoseSecretObjective(String) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that someone (it may or may not be the receiving View instance) has chosen theirs secret objective.
+
+
SomeoneChoseSecretObjectiveMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
This response is sent to each user in the match when a user chooses his secret objective.
+
+
SomeoneChoseSecretObjectiveMessage(String, Integer) - Constructor for class it.polimi.ingsw.network.messages.responses.SomeoneChoseSecretObjectiveMessage
+
 
+
someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that someone has drawn a card.
+
+
someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that someone has drawn a card.
+
+
someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard) - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that someone has drawn a card.
+
+
someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard) - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Serializes the match and saves it in the disk.
+
+
someoneDrewCard(String, DrawSource, PlayableCard, PlayableCard, Pair<Symbol, Symbol>) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Handles the replacement of the last card drawn, and changes turn.
+
+
someoneDrewCard(String, DrawSource, PlayableCard, PlayableCard, Pair<Symbol, Symbol>) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
someoneDrewCard(String, DrawSource, PlayableCard, PlayableCard, Pair<Symbol, Symbol>) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that someone (it may or may not be the receiving View instance) has drawn a card.
+
+
someoneDrewCard(String, DrawSource, PlayableCard, PlayableCard, Pair<Symbol, Symbol>) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that someone (it may or may not be the receiving View instance) has drawn a card.
+
+
SomeoneDrewCardMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
This response is sent to each user in the match when a user draws a card.
+
+
SomeoneDrewCardMessage(String, DrawSource, Integer, Integer, Pair<Symbol, Symbol>) - Constructor for class it.polimi.ingsw.network.messages.responses.SomeoneDrewCardMessage
+
 
+
someoneDrewInitialCard(InitialCard) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Show that someone is choosing the initial card side
+
+
someoneDrewInitialCard(Player, InitialCard) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that someone has drawn its initial card.
+
+
someoneDrewInitialCard(Player, InitialCard) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that someone has drawn its initial card.
+
+
someoneDrewInitialCard(Player, InitialCard) - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that someone has drawn its initial card.
+
+
someoneDrewInitialCard(Player, InitialCard) - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Does nothing.
+
+
someoneDrewInitialCard(String, InitialCard) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Notifies other players that someone drew the initial card.
+
+
someoneDrewInitialCard(String, InitialCard) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
someoneDrewInitialCard(String, InitialCard) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that someone (it may or may not be the receiving View instance) has drawn its initial card.
+
+
someoneDrewInitialCard(String, InitialCard) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that someone (it may or may not be the receiving View instance) has drawn its initial card.
+
+
SomeoneDrewInitialCardMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
This response is sent to each user in the match when a user draws an initial card.
+
+
SomeoneDrewInitialCardMessage(String, Integer) - Constructor for class it.polimi.ingsw.network.messages.responses.SomeoneDrewInitialCardMessage
+
 
+
someoneDrewSecretObjective() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
Another player is choosing the secret objective
+
+
someoneDrewSecretObjective(Player, Pair<Objective, Objective>) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that someone has drawn two secret objectives.
+
+
someoneDrewSecretObjective(Player, Pair<Objective, Objective>) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that someone has drawn two secret objectives.
+
+
someoneDrewSecretObjective(Player, Pair<Objective, Objective>) - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that someone has drawn two secret objectives.
+
+
someoneDrewSecretObjective(Player, Pair<Objective, Objective>) - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Does nothing.
+
+
someoneDrewSecretObjective(String) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Notifies other players that someone is choosing the secret objective.
+
+
someoneDrewSecretObjective(String) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
someoneDrewSecretObjective(String) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that someone (it may or may not be the receiving View instance) has drawn a pair of secret objectives.
+
+
someoneDrewSecretObjective(String) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that someone (it may or may not be the receiving View instance) has drawn a pair of secret objectives.
+
+
SomeoneDrewSecretObjectivesMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
This response is sent to each user in the match when a user draws the two secret objectives.
+
+
SomeoneDrewSecretObjectivesMessage(String, Pair<Integer, Integer>) - Constructor for class it.polimi.ingsw.network.messages.responses.SomeoneDrewSecretObjectivesMessage
+
 
+
someoneJoined(Player) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that someone has joined the match.
+
+
someoneJoined(Player) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that someone has joined the match.
+
+
someoneJoined(Player) - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that someone has joined the match.
+
+
someoneJoined(Player) - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Does nothing.
+
+
someoneJoined(String, List<String>) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Notifies the player that someone joined the lobby.
+
+
someoneJoined(String, List<String>) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
someoneJoined(String, List<String>) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Show the list of players in the match.
+
+
someoneJoined(String, List<String>) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that a player has joined the match.
+
+
someoneJoined(String, List<String>) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that a player has joined the match.
+
+
SomeoneJoinedMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
This response is sent when a player joins the current match.
+
+
SomeoneJoinedMessage(String, List<Player>, int) - Constructor for class it.polimi.ingsw.network.messages.responses.SomeoneJoinedMessage
+
 
+
someonePlayedCard(Player, Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that someone has played a card.
+
+
someonePlayedCard(Player, Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that someone has played a card.
+
+
someonePlayedCard(Player, Pair<Integer, Integer>, PlayableCard, Side) - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that someone has played a card.
+
+
someonePlayedCard(Player, Pair<Integer, Integer>, PlayableCard, Side) - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Serializes the match and saves it in the disk.
+
+
someonePlayedCard(String, Pair<Integer, Integer>, PlayableCard, Side, int, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Actually places a card on the player's board (so the Player tried to place a card and it was a + valid move).
+
+
someonePlayedCard(String, Pair<Integer, Integer>, PlayableCard, Side, int, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
someonePlayedCard(String, Pair<Integer, Integer>, PlayableCard, Side, int, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Notifies all players that someone played a card, and updates the relative player's board.
+
+
someonePlayedCard(String, Pair<Integer, Integer>, PlayableCard, Side, int, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that someone (it may or may not be the receiving View instance) has played a card.
+
+
someonePlayedCard(String, Pair<Integer, Integer>, PlayableCard, Side, int, Map<Symbol, Integer>) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that someone (it may or may not be the receiving View instance) has played a card.
+
+
SomeonePlayedCardMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
SomeonePlayedCardMessage
+
+
SomeonePlayedCardMessage(String, Pair<Integer, Integer>, Integer, Side, int, Map<Symbol, Integer>) - Constructor for class it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage
+
 
+
someoneQuit(Player) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that someone has quit from the match.
+
+
someoneQuit(Player) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that someone has quit from the match.
+
+
someoneQuit(Player) - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that someone has quit from the match.
+
+
someoneQuit(Player) - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Does nothing.
+
+
someoneQuit(String) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Notifies the player that someone quit the lobby.
+
+
someoneQuit(String) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
someoneQuit(String) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Notifies everyone else that a player left.
+
+
someoneQuit(String) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that a player has quit from the match.
+
+
someoneQuit(String) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that a player has quit from the match.
+
+
SomeoneQuitMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
This response is sent when a player quits the current match.
+
+
SomeoneQuitMessage(String, int, boolean) - Constructor for class it.polimi.ingsw.network.messages.responses.SomeoneQuitMessage
+
 
+
someoneSentBroadcastText(Player, String) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that someone sent a message in the public chat.
+
+
someoneSentBroadcastText(Player, String) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that someone sent a message in the public chat.
+
+
someoneSentBroadcastText(Player, String) - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that someone has sent a broadcast message.
+
+
someoneSentBroadcastText(Player, String) - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Does nothing.
+
+
someoneSentBroadcastText(String, String) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Notifies that someone sent a broadcast text.
+
+
someoneSentBroadcastText(String, String) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
someoneSentBroadcastText(String, String) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Adds to the chat a private text.
+
+
someoneSentBroadcastText(String, String) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that a new message in the global chat is sent
+
+
someoneSentBroadcastText(String, String) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that a new message in the global chat is sent
+
+
SomeoneSentBroadcastTextMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
SomeoneSentBroadcastTextMessage
+
+
SomeoneSentBroadcastTextMessage(String, String) - Constructor for class it.polimi.ingsw.network.messages.responses.SomeoneSentBroadcastTextMessage
+
 
+
someoneSentPrivateText(Player, Player, String) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that someone sent a private message to another user.
+
+
someoneSentPrivateText(Player, Player, String) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that someone sent a private message to another user.
+
+
someoneSentPrivateText(Player, Player, String) - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that someone has sent a private message to this player.
+
+
someoneSentPrivateText(Player, Player, String) - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Does nothing.
+
+
someoneSentPrivateText(String, String) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Notifies the player that someone sent him a private text.
+
+
someoneSentPrivateText(String, String) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
someoneSentPrivateText(String, String) - Method in class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
Adds to the chat a broadcast text.
+
+
someoneSentPrivateText(String, String) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that a new private message is sent in private chat to the current user
+
+
someoneSentPrivateText(String, String) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that a new private message is sent in private chat to the current user
+
+
SomeoneSentPrivateTextMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
SomeoneSentPrivateTextMessage
+
+
SomeoneSentPrivateTextMessage(String, String, String) - Constructor for class it.polimi.ingsw.network.messages.responses.SomeoneSentPrivateTextMessage
+
 
+
someoneSetInitialSide(Player, Side, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
Notifies that someone has chosen its initial card side.
+
+
someoneSetInitialSide(Player, Side, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
Notifies that someone has chosen its initial card side.
+
+
someoneSetInitialSide(Player, Side, Map<Symbol, Integer>) - Method in interface it.polimi.ingsw.gamemodel.MatchObserver
+
+
Notifies that someone has chosen its initial card side.
+
+
someoneSetInitialSide(Player, Side, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.server.MatchStatusObserver
+
+
Does nothing.
+
+
someoneSetInitialSide(String, Side, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.client.frontend.GraphicalView
+
+
Effectively place the initial card on the player's board, on the right side.
+
+
someoneSetInitialSide(String, Side, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
 
+
someoneSetInitialSide(String, Side, Map<Symbol, Integer>) - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Notifies that someone (it may or may not be the receiving View instance) has decided (then set) its initial card side.
+
+
someoneSetInitialSide(String, Side, Map<Symbol, Integer>) - Method in interface it.polimi.ingsw.client.network.RemoteViewInterface
+
+
Notifies that someone (it may or may not be the receiving View instance) has decided (then set) its initial card side.
+
+
SomeoneSetInitialSideMessage - Class in it.polimi.ingsw.network.messages.responses
+
+
This response is sent to each user in the match when a user chosees the initial side of a card.
+
+
SomeoneSetInitialSideMessage(String, Side, Map<Symbol, Integer>) - Constructor for class it.polimi.ingsw.network.messages.responses.SomeoneSetInitialSideMessage
+
 
+
stage - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.SceneController
+
 
+
start(Stage) - Method in class it.polimi.ingsw.client.frontend.gui.GraphicalApplication
+
+
Default method to start the FXML application, it can be called only from this class main(...).
+
+
startConnectionCheck() - Method in class it.polimi.ingsw.client.network.NetworkHandler
+
+
Periodically check the connection status
+
+
startRMIServer() - Method in class it.polimi.ingsw.server.Server
+
+
Start the RMI server.
+
+
startTCPServer() - Method in class it.polimi.ingsw.server.Server
+
+
Starts the TCP server.
+
+
stateTitle - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
stringToMsg(String) - Method in class it.polimi.ingsw.network.tcp.IOHandler
+
+
Converts a Json string to its corresponding Message.
+
+
subscribeObserver(MatchObserver) - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Adds the given MatchObserver to those observers notified on match events.
+
+
SUCCESSFUL - Enum constant in enum class it.polimi.ingsw.utils.RequestStatus
+
 
+
Symbol - Enum Class in it.polimi.ingsw.gamemodel
+
+
Contains all the possible symbols a corner can store or a multiplier can have.
+
+
+

T

+
+
tableSize - Static variable in class it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController
+
 
+
tableTab - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
takenSpots - Variable in class it.polimi.ingsw.client.frontend.gui.nodes.BoardPane
+
 
+
TCPServer - Class in it.polimi.ingsw.network.tcp
+
+
Class containing the ServerSocket.
+
+
TCPServer(Integer, Server) - Constructor for class it.polimi.ingsw.network.tcp.TCPServer
+
+
Class constructor.
+
+
THIRD_VISIBLE - Enum constant in enum class it.polimi.ingsw.gamemodel.DrawSource
+
+
First resource card (third among all)
+
+
thirdVisible - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
 
+
timesMet(Board) - Method in class it.polimi.ingsw.gamemodel.PositionRequirement
+
+
The requirement will be satisfied if the board has cards of the specified faction in the correct relative positions
+
+
timesMet(Board) - Method in class it.polimi.ingsw.gamemodel.QuantityRequirement
+
+
The requirement will be satisfied if the board has enough resources of the specified type
+
+
timesMet(Board) - Method in class it.polimi.ingsw.gamemodel.Requirement
+
+
Will be implemented on the concrete classes, as they have different kind of conditions
+
+
toJson(Message) - Method in class it.polimi.ingsw.utils.MessageJsonParser
+
 
+
tokenRadius - Static variable in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
Pawn dimensions (at center of the initial card)
+
+
toMessage(String) - Method in class it.polimi.ingsw.utils.MessageJsonParser
+
 
+
TOP_LEFT - Enum constant in enum class it.polimi.ingsw.gamemodel.Corner
+
 
+
TOP_RIGHT - Enum constant in enum class it.polimi.ingsw.gamemodel.Corner
+
 
+
topLeftCorner - Variable in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
 
+
topRightCorner - Variable in class it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
 
+
toString() - Method in record class it.polimi.ingsw.client.frontend.ShownCard
+
+
Returns a string representation of this record class.
+
+
toString() - Method in record class it.polimi.ingsw.client.frontend.tui.BoardPosition
+
+
Returns a string representation of this record class.
+
+
toString() - Method in enum class it.polimi.ingsw.gamemodel.Side
+
 
+
toString() - Method in record class it.polimi.ingsw.utils.AvailableMatch
+
+
Returns a string representation of this record class.
+
+
toString() - Method in record class it.polimi.ingsw.utils.LeaderboardEntry
+
+
Returns a string representation of this record class.
+
+
toString() - Method in record class it.polimi.ingsw.utils.Pair
+
+
Returns a string representation of this record class.
+
+
toString() - Method in record class it.polimi.ingsw.utils.PlacedCardRecord
+
+
Returns a string representation of this record class.
+
+
transition() - Method in class it.polimi.ingsw.gamemodel.AfterDrawState
+
+
If the match isn't finished, transitions to NextTurnState, otherwise to FinalState.
+
+
transition() - Method in class it.polimi.ingsw.gamemodel.AfterMoveState
+
+
Transitions to AfterDrawState.
+
+
transition() - Method in class it.polimi.ingsw.gamemodel.ChooseInitialSideState
+
+
Transitions to NextTurnState
+
+
transition() - Method in class it.polimi.ingsw.gamemodel.ChooseSecretObjectiveState
+
+
Transitions to NextTurnState
+
+
transition() - Method in class it.polimi.ingsw.gamemodel.FinalState
+
+
This call doesn't have any effect, apart from logging it to stderr.
+
+
transition() - Method in class it.polimi.ingsw.gamemodel.MatchState
+
+
Triggers the transition in Match from the current state to the next one, this means changing the current Match's + MatchState instance to a new one, having the same static type (MatchState) but a different dynamic type (a subclass + of MatchState).
+
+
transition() - Method in class it.polimi.ingsw.gamemodel.NextTurnState
+
+
Transitions to: + - AfterMoveState if the match has already started; + - ChooseInitialSideState if the initial card side choosing hasn't finished yet; + - ChooseSecretObjectiveState if the match hasn't started yet and the initial card side choosing has + already finished;
+
+
transition() - Method in class it.polimi.ingsw.gamemodel.WaitState
+
+
Transitions to NextTurnState.
+
+
TUICardParser - Class in it.polimi.ingsw.utils
+
 
+
TUICardParser() - Constructor for class it.polimi.ingsw.utils.TUICardParser
+
 
+
TuiPrinter - Class in it.polimi.ingsw.client.frontend.tui
+
+
Class that handles the actual printing to the terminal.
+
+
TuiPrinter() - Constructor for class it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
Class constructor, it creates auxiliary objects to communicate with the terminal and the card + parser.
+
+
+

U

+
+
unsubscribeObserver(MatchObserver) - Method in class it.polimi.ingsw.gamemodel.Match
+
+
Removes the given MatchObserver to those observers notified on match events.
+
+
updateLabel() - Method in class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
+
Update the players count, match name and max players
+
+
updateMatches(List<AvailableMatch>) - Method in class it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController
+
+
Set the matches displayed
+
+
username - Variable in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
username - Variable in class it.polimi.ingsw.client.network.NetworkHandler
+
 
+
username() - Method in record class it.polimi.ingsw.utils.LeaderboardEntry
+
+
Returns the value of the username record component.
+
+
+

V

+
+
VALID - Enum constant in enum class it.polimi.ingsw.gamemodel.PlacementOutcome
+
 
+
ValidPositions - Class in it.polimi.ingsw.client.frontend.tui
+
+
Valid positions of a board, ie all the points a new card can be linked to
+
+
ValidPositions() - Constructor for class it.polimi.ingsw.client.frontend.tui.ValidPositions
+
+
Class constructor.
+
+
valueOf(String) - Static method in enum class it.polimi.ingsw.client.frontend.MatchStatus
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class it.polimi.ingsw.gamemodel.Color
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class it.polimi.ingsw.gamemodel.Corner
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class it.polimi.ingsw.gamemodel.DrawSource
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class it.polimi.ingsw.gamemodel.PlacementOutcome
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class it.polimi.ingsw.gamemodel.Side
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class it.polimi.ingsw.gamemodel.Symbol
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class it.polimi.ingsw.utils.RequestStatus
+
+
Returns the enum constant of this class with the specified name.
+
+
values() - Static method in enum class it.polimi.ingsw.client.frontend.MatchStatus
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class it.polimi.ingsw.gamemodel.Color
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class it.polimi.ingsw.gamemodel.Corner
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class it.polimi.ingsw.gamemodel.DrawSource
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class it.polimi.ingsw.gamemodel.PlacementOutcome
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class it.polimi.ingsw.gamemodel.Side
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class it.polimi.ingsw.gamemodel.Symbol
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class it.polimi.ingsw.utils.RequestStatus
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
verifyCardPlacement(Pair<Integer, Integer>, Card, Side) - Method in class it.polimi.ingsw.gamemodel.Board
+
+
Checks whether the positioning is valid: the card has to be in the player's hand (note that this method won't be called on the initial card), + the given coordinates must be valid, and if the card has a requirement it must be met
+
+
victoryLabel - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController
+
 
+
view - Variable in class it.polimi.ingsw.client.frontend.gui.controllers.SceneController
+
 
+
visibleObjectives - Variable in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
visiblePlayableCards - Variable in class it.polimi.ingsw.client.frontend.GraphicalView
+
 
+
+

W

+
+
WAIT_STATE - Enum constant in enum class it.polimi.ingsw.client.frontend.MatchStatus
+
 
+
WaitingSceneController - Class in it.polimi.ingsw.client.frontend.gui.controllers
+
+
JavaFX controller for the waiting scene.
+
+
WaitingSceneController() - Constructor for class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
 
+
WaitState - Class in it.polimi.ingsw.gamemodel
+
+
Subclass of MatchState.
+
+
WaitState(Match) - Constructor for class it.polimi.ingsw.gamemodel.WaitState
+
+
Initializes this instance.
+
+
windowHeight - Static variable in class it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController
+
 
+
windowWidth - Static variable in class it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController
+
 
+
winner() - Method in record class it.polimi.ingsw.utils.LeaderboardEntry
+
+
Returns the value of the winner record component.
+
+
writeMsg(Message) - Method in class it.polimi.ingsw.network.tcp.IOHandler
+
+
Writes a Message to the socket's output stream.
+
+
writeMsg(String) - Method in class it.polimi.ingsw.network.tcp.IOHandler
+
+
Writes a Message to the socket's output stream.
+
+
WrongChoiceException - Exception Class in it.polimi.ingsw.exceptions
+
 
+
WrongChoiceException(String) - Constructor for exception class it.polimi.ingsw.exceptions.WrongChoiceException
+
 
+
WrongInputFormatException - Exception Class in it.polimi.ingsw.exceptions
+
+
WrongInputFormatException
+
+
WrongInputFormatException(String) - Constructor for exception class it.polimi.ingsw.exceptions.WrongInputFormatException
+
 
+
WrongNameException - Exception Class in it.polimi.ingsw.exceptions
+
 
+
WrongNameException(String) - Constructor for exception class it.polimi.ingsw.exceptions.WrongNameException
+
 
+
WrongStateException - Exception Class in it.polimi.ingsw.exceptions
+
 
+
WrongStateException(String) - Constructor for exception class it.polimi.ingsw.exceptions.WrongStateException
+
 
+
WrongTurnException - Exception Class in it.polimi.ingsw.exceptions
+
 
+
WrongTurnException(String) - Constructor for exception class it.polimi.ingsw.exceptions.WrongTurnException
+
 
+
+

X

+
+
x() - Method in record class it.polimi.ingsw.utils.PlacedCardRecord
+
+
Returns the value of the x record component.
+
+
+

Y

+
+
y() - Method in record class it.polimi.ingsw.utils.PlacedCardRecord
+
+
Returns the value of the y record component.
+
+
YELLOW - Enum constant in enum class it.polimi.ingsw.gamemodel.Color
+
 
+
+A B C D E F G H I J L M N O P Q R S T U V W X Y 
All Classes and Interfaces|All Packages|Serialized Form
+ +
+
+ + diff --git a/deliveries/Javadoc/index.html b/deliveries/Javadoc/index.html new file mode 100644 index 00000000..18973aae --- /dev/null +++ b/deliveries/Javadoc/index.html @@ -0,0 +1,101 @@ + + + + +Overview (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

AM08 1.0-SNAPSHOT API

+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/ClientBoard.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/ClientBoard.html new file mode 100644 index 00000000..2b72b4a0 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/ClientBoard.html @@ -0,0 +1,384 @@ + + + + +ClientBoard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ClientBoard

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.ClientBoard
+
+
+
+
public class ClientBoard +extends Object
+
This class contains just elements needed to show the player's board, points, resources, hand and objectives
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ClientBoard

      +
      public ClientBoard(Color color, + List<PlayableCard> hand)
      +
      Class constructor.
      +
      +
      Parameters:
      +
      color - The player pawn's color
      +
      hand - The player's hand
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setSecretObjective

      +
      public void setSecretObjective(Objective objective)
      +
      Sets the secret objective.
      +
      +
      Parameters:
      +
      objective - The chosen secret objective
      +
      +
      +
    • +
    • +
      +

      placeCard

      +
      public void placeCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side, + Integer points, + Map<Symbol,Integer> resources)
      +
      Adds a card to the player's board.
      +
      +
      Parameters:
      +
      coords - The card's coordinates
      +
      card - The chosen card
      +
      side - The chosen side
      +
      points - The player's point (total)
      +
      resources - The player's resources (total)
      +
      +
      +
    • +
    • +
      +

      drawCard

      +
      public void drawCard(PlayableCard card)
      +
      Adds a card to the player's hand.
      +
      +
      Parameters:
      +
      card - The drawn card
      +
      +
      +
    • +
    • +
      +

      setInitial

      +
      public void setInitial(InitialCard card)
      +
      Sets the initial card. This still does not put it in the board, as the side is still not chosen.
      +
      +
      Parameters:
      +
      card - The chosen card
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      placeInitial

      +
      public void placeInitial(Side side, + Map<Symbol,Integer> availableResources)
      +
      Places initial card on the board. At this point, the initial card's side has been chosen
      +
      +
      Parameters:
      +
      side - The chosen side
      +
      availableResources - The player's resources (total)
      +
      +
      +
    • +
    • +
      +

      getInitialCard

      +
      public InitialCard getInitialCard()
      +
      +
      Returns:
      +
      The initial card.
      +
      +
      +
    • +
    • +
      +

      getPlacementNumber

      +
      public Integer getPlacementNumber()
      +
      +
      Returns:
      +
      The card's index (ie, the first card played would have a placementNumber of 1).
      +
      +
      +
    • +
    • +
      +

      getHand

      +
      public List<PlayableCard> getHand()
      +
      +
      Returns:
      +
      The player's hand.
      +
      +
      +
    • +
    • +
      +

      getPoints

      +
      public Integer getPoints()
      +
      +
      Returns:
      +
      The player's points.
      +
      +
      +
    • +
    • +
      +

      getPlaced

      +
      public Map<Integer,ShownCard> getPlaced()
      +
      +
      Returns:
      +
      The player's board.
      +
      +
      +
    • +
    • +
      +

      getAvailableResources

      +
      public Map<Symbol,Integer> getAvailableResources()
      +
      +
      Returns:
      +
      The player's resources.
      +
      +
      +
    • +
    • +
      +

      getColor

      +
      public Color getColor()
      +
      +
      Returns:
      +
      The player pawn's color.
      +
      +
      +
    • +
    • +
      +

      getObjective

      +
      public Objective getObjective()
      +
      +
      Returns:
      +
      The player's secret objective.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/GraphicalView.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/GraphicalView.html new file mode 100644 index 00000000..ebe69324 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/GraphicalView.html @@ -0,0 +1,958 @@ + + + + +GraphicalView (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GraphicalView

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.GraphicalView
+
+
+
+
Direct Known Subclasses:
+
GraphicalViewGUI, GraphicalViewTUI
+
+
+
public abstract class GraphicalView +extends Object
+
Class to manage graphical clients
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GraphicalView

      +
      public GraphicalView()
      +
      Class constructor.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setUsername

      +
      protected void setUsername(String username)
      +
      Sets the username of the corresponding player.
      +
      +
      Parameters:
      +
      username - The chosen username
      +
      +
      +
    • +
    • +
      +

      isLastTurn

      +
      public boolean isLastTurn()
      +
      +
      Returns:
      +
      Whether is the last turn or not.
      +
      +
      +
    • +
    • +
      +

      setLastRequestStatus

      +
      public void setLastRequestStatus(RequestStatus status)
      +
      Sets the last request's status.
      +
      +
      Parameters:
      +
      status - Last request's status
      +
      +
      +
    • +
    • +
      +

      notifyError

      +
      public void notifyError(Exception exception)
      +
      Sets the internal state according to the occurrence of an error.
      +
      +
      Parameters:
      +
      exception - The thrown exception
      +
      +
      +
    • +
    • +
      +

      setNetworkHandler

      +
      public void setNetworkHandler(NetworkHandler networkHandler)
      +
      Sets the network interface in order to communicate.
      +
      +
      Parameters:
      +
      networkHandler - the interface to communicate
      +
      +
      +
    • +
    • +
      +

      createMatch

      +
      public void createMatch(String matchName, + Integer maxPlayers)
      +
      Tries to create a match.
      +
      +
      Parameters:
      +
      matchName - The match's name
      +
      maxPlayers - maximum amount of players
      +
      +
      +
    • +
    • +
      +

      joinMatch

      +
      public void joinMatch(String matchName)
      +
      Tries to join a match.
      +
      +
      Parameters:
      +
      matchName - the match's name
      +
      +
      +
    • +
    • +
      +

      sendBroadcastText

      +
      public void sendBroadcastText(String text)
      +
      Sends a broadcast text.
      +
      +
      Parameters:
      +
      text - The content
      +
      +
      +
    • +
    • +
      +

      sendPrivateText

      +
      public void sendPrivateText(String recipient, + String text)
      +
      Sends a private text.
      +
      +
      Parameters:
      +
      recipient - The recipient
      +
      text - The content
      +
      +
      +
    • +
    • +
      +

      drawInitialCard

      +
      public void drawInitialCard()
      +
      Draws an initial card for the player.
      +
      +
    • +
    • +
      +

      chooseInitialCardSide

      +
      public void chooseInitialCardSide(Side side)
      +
      Communicates the chosen initial card side.
      +
      +
      Parameters:
      +
      side - The side on which play the initial card drawn using drawInitialCard()
      +
      +
      +
    • +
    • +
      +

      drawSecretObjectives

      +
      public void drawSecretObjectives()
      +
      Draws two secret objectives.
      +
      +
    • +
    • +
      +

      chooseSecretObjective

      +
      public void chooseSecretObjective(Objective objective)
      +
      Communicates the chosen secret objective.
      +
      +
      Parameters:
      +
      objective - The chosen objective
      +
      +
      +
    • +
    • +
      +

      playCard

      +
      public void playCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
      +
      Plays a card.
      +
      +
      Parameters:
      +
      coords - The coordinates on which to place the card
      +
      card - The PlayableCard to play
      +
      side - The side on which to play the chosen card
      +
      +
      +
    • +
    • +
      +

      drawCard

      +
      public void drawCard(DrawSource source)
      +
      Draws a card.
      +
      +
      Parameters:
      +
      source - The drawing source to draw the card from
      +
      +
      +
    • +
    • +
      +

      changePlayer

      +
      public abstract void changePlayer()
      +
      Method used to show the turn has changed.
      +
      +
    • +
    • +
      +

      makeMove

      +
      public abstract void makeMove()
      +
      Ask the user to make a play. Must call playCard(Pair, PlayableCard, Side).
      +
      +
    • +
    • +
      +

      matchStarted

      +
      public void matchStarted(Map<String,Color> playersUsernamesAndPawns, + Map<String,List<PlayableCard>> playersHands, + Pair<Objective,Objective> visibleObjectives, + Map<DrawSource,PlayableCard> visiblePlayableCards, + Pair<Symbol,Symbol> decksTopReign)
      +
      Starts match on the client side, setting all variables to their initial values.
      +
      +
      Parameters:
      +
      playersUsernamesAndPawns - Map containing all players' pawns, indexed by their username
      +
      playersHands - Map containing all the players' hands, indexed by their username
      +
      visibleObjectives - The two objectives common to every player
      +
      visiblePlayableCards - The four cards that can be drawn, visible to everyone
      +
      decksTopReign - the reigns of the two decks' top
      +
      +
      +
    • +
    • +
      +

      resumeMatch

      +
      public void resumeMatch(Map<String,Color> playersUsernamesAndPawns, + Map<String,List<PlayableCard>> playersHands, + Pair<Objective,Objective> visibleObjectives, + Map<DrawSource,PlayableCard> visiblePlayableCards, + Pair<Symbol,Symbol> decksTopReign, + Objective secretObjective, + Map<String,Map<Symbol,Integer>> availableResources, + Map<String,Map<Pair<Integer,Integer>,PlacedCard>> placedCards, + Map<String,Integer> playerPoints, + String currentPlayer, + boolean drawPhase)
      +
      Resumes match on the client side, setting all variables to their initial values.
      +
      +
      Parameters:
      +
      playersUsernamesAndPawns - Map containing all players' pawns, indexed by their username
      +
      playersHands - Map containing all the players' hands, indexed by their username
      +
      visibleObjectives - The two objectives common to every player
      +
      visiblePlayableCards - The four cards that can be drawn, visible to everyone
      +
      decksTopReign - the reigns of the two decks' top
      +
      secretObjective - Secret objective of the current player
      +
      availableResources - Available resources of all the players
      +
      placedCards - Placed cards of all the players
      +
      playerPoints - Points of all the players
      +
      currentPlayer - The current player
      +
      drawPhase - If the match is resumed in draw phase
      +
      +
      +
    • +
    • +
      +

      notifyMatchStarted

      +
      protected abstract void notifyMatchStarted()
      +
      Method that shows the user that the match has started.
      +
      +
    • +
    • +
      +

      notifyMatchResumed

      +
      protected abstract void notifyMatchResumed(boolean drawPhase)
      +
      Method that shows the user that the match has resumed.
      +
      +
    • +
    • +
      +

      receiveAvailableMatches

      +
      public void receiveAvailableMatches(List<AvailableMatch> availableMatches)
      +
      Receive the list of matches currently available
      +
      +
      Parameters:
      +
      availableMatches - the list of available matches
      +
      +
      +
    • +
    • +
      +

      giveInitialCard

      +
      public void giveInitialCard(InitialCard initialCard)
      +
      Give the user its initial card.
      +
      +
      Parameters:
      +
      initialCard - the player's initial card
      +
      +
      +
    • +
    • +
      +

      giveSecretObjectives

      +
      public void giveSecretObjectives(Pair<Objective,Objective> secretObjectives)
      +
      Gives the player two secret objectives to choose from.
      +
      +
      Parameters:
      +
      secretObjectives - the two objectives to choose from
      +
      +
      +
    • +
    • +
      +

      someoneDrewInitialCard

      +
      public void someoneDrewInitialCard(String someoneUsername, + InitialCard card)
      +
      Notifies other players that someone drew the initial card.
      +
      +
      Parameters:
      +
      someoneUsername - Player who drew the initial
      +
      card - The card he drew
      +
      +
      +
    • +
    • +
      +

      someoneSetInitialSide

      +
      public void someoneSetInitialSide(String someoneUsername, + Side side, + Map<Symbol,Integer> availableResources)
      +
      Effectively place the initial card on the player's board, on the right side. Note that the card + must have already been set.
      +
      +
      Parameters:
      +
      someoneUsername - Player who chose the initial card's side
      +
      side - Chosen side
      +
      availableResources - Currently available resources for the player
      +
      +
      +
    • +
    • +
      +

      someoneDrewSecretObjective

      +
      public void someoneDrewSecretObjective(String someoneUsername)
      +
      Notifies other players that someone is choosing the secret objective. They should not know from + which objective he is choosing, so they are not passed.
      +
      +
      Parameters:
      +
      someoneUsername - Player who is choosing
      +
      +
      +
    • +
    • +
      +

      someoneChoseSecretObjective

      +
      public void someoneChoseSecretObjective(String someoneUsername)
      +
      Changes the current player and updates last request's status to RequestStatus.SUCCESSFUL.
      +
      +
      Parameters:
      +
      someoneUsername - The player who chose the objective
      +
      +
      +
    • +
    • +
      +

      someonePlayedCard

      +
      public void someonePlayedCard(String someoneUsername, + Pair<Integer,Integer> coords, + PlayableCard card, + Side side, + int points, + Map<Symbol,Integer> availableResources)
      +
      Actually places a card on the player's board (so the Player tried to place a card and it was a + valid move).
      +
      +
      Parameters:
      +
      someoneUsername - The player who made the move
      +
      coords - where he placed the card
      +
      card - the placed card
      +
      side - the side the card was placed on
      +
      points - the total points of the player after he placed the card
      +
      availableResources - the available resources of the player after he placed the card
      +
      +
      +
    • +
    • +
      +

      someoneDrewCard

      +
      public void someoneDrewCard(String someoneUsername, + DrawSource source, + PlayableCard card, + PlayableCard replacementCard, + Pair<Symbol,Symbol> deckTopReigns)
      +
      Handles the replacement of the last card drawn, and changes turn.
      +
      +
      Parameters:
      +
      someoneUsername - Player who drew the card
      +
      source - From where he drew the card
      +
      card - The card he drew
      +
      replacementCard - The replacement card, which will be null if the DrawSource is a + deck
      +
      deckTopReigns - Current deck top reigns
      +
      +
      +
    • +
    • +
      +

      notifyLastTurn

      +
      public void notifyLastTurn()
      +
      Notifies the player that this is the last turn he can play.
      +
      +
    • +
    • +
      +

      someoneJoined

      +
      public void someoneJoined(String someoneUsername, + List<String> joinedPlayers)
      +
      Notifies the player that someone joined the lobby.
      +
      +
      Parameters:
      +
      someoneUsername - Player who joined
      +
      joinedPlayers - List of the players currently in the match
      +
      +
      +
    • +
    • +
      +

      someoneQuit

      +
      public abstract void someoneQuit(String someoneUsername)
      +
      Notifies the player that someone quit the lobby.
      +
      +
      Parameters:
      +
      someoneUsername - Player who quit
      +
      +
      +
    • +
    • +
      +

      matchFinished

      +
      public abstract void matchFinished(List<LeaderboardEntry> ranking)
      +
      Shows the player the match's leaderboard after the game ended.
      +
      +
      Parameters:
      +
      ranking - Ranking of players
      +
      +
      +
    • +
    • +
      +

      someoneSentBroadcastText

      +
      public void someoneSentBroadcastText(String someoneUsername, + String text)
      +
      Notifies that someone sent a broadcast text.
      +
      +
      Parameters:
      +
      someoneUsername - Player who sent the text
      +
      text - Text he sent
      +
      +
      +
    • +
    • +
      +

      someoneSentPrivateText

      +
      public void someoneSentPrivateText(String someoneUsername, + String text)
      +
      Notifies the player that someone sent him a private text.
      +
      +
      Parameters:
      +
      someoneUsername - Player who sent the private text
      +
      text - Text he sent
      +
      +
      +
    • +
    • +
      +

      notifyConnectionLost

      +
      public abstract void notifyConnectionLost()
      +
      Notify the client that the connection with the server + has been lost.
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/LastRequest.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/LastRequest.html new file mode 100644 index 00000000..f9029172 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/LastRequest.html @@ -0,0 +1,198 @@ + + + + +LastRequest (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LastRequest

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.LastRequest
+
+
+
+
public class LastRequest +extends Object
+
Last request status. Used for synchronized methods
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      LastRequest

      +
      public LastRequest()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setStatus

      +
      public void setStatus(RequestStatus status)
      +
      Sets the status.
      +
      +
      Parameters:
      +
      status - The new status
      +
      +
      +
    • +
    • +
      +

      getStatus

      +
      public RequestStatus getStatus()
      +
      +
      Returns:
      +
      The last request's status.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/MatchStatus.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/MatchStatus.html new file mode 100644 index 00000000..995900c1 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/MatchStatus.html @@ -0,0 +1,248 @@ + + + + +MatchStatus (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class MatchStatus

+
+
java.lang.Object +
java.lang.Enum<MatchStatus> +
it.polimi.ingsw.client.frontend.MatchStatus
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<MatchStatus>, Constable
+
+
+
public enum MatchStatus +extends Enum<MatchStatus>
+
Represents the current match macro-state from the client point of view. + This is not supposed to substitute MatchState, but rather make it easier for clients + to keep track of the current state of match, which is to say whether it's unused (LOBBY), + in WaitState (WAIT_STATE) or being played (MATCH_STATE).
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      LOBBY

      +
      public static final MatchStatus LOBBY
      +
      +
    • +
    • +
      +

      WAIT_STATE

      +
      public static final MatchStatus WAIT_STATE
      +
      +
    • +
    • +
      +

      MATCH_STATE

      +
      public static final MatchStatus MATCH_STATE
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static MatchStatus[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static MatchStatus valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/ShownCard.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/ShownCard.html new file mode 100644 index 00000000..84ee5c40 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/ShownCard.html @@ -0,0 +1,294 @@ + + + + +ShownCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Record Class ShownCard

+
+
java.lang.Object +
java.lang.Record +
it.polimi.ingsw.client.frontend.ShownCard
+
+
+
+
+
Record Components:
+
card - The card to be shown
+
side - The side to be shown
+
coords - The coordinates to be shown on the card (if needed)
+
+
+
public record ShownCard(Card card, Side side, Pair<Integer,Integer> coords) +extends Record
+
ShownCard
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    ShownCard(Card card, + Side side, + Pair<Integer,Integer> coords)
    +
    +
    Creates an instance of a ShownCard record class.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Returns the value of the card record component.
    +
    + + +
    +
    Returns the value of the coords record component.
    +
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    + + +
    +
    Returns the value of the side record component.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ShownCard

      +
      public ShownCard(Card card, + Side side, + Pair<Integer,Integer> coords)
      +
      Creates an instance of a ShownCard record class.
      +
      +
      Parameters:
      +
      card - the value for the card record component
      +
      side - the value for the side record component
      +
      coords - the value for the coords record component
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      card

      +
      public Card card()
      +
      Returns the value of the card record component.
      +
      +
      Returns:
      +
      the value of the card record component
      +
      +
      +
    • +
    • +
      +

      side

      +
      public Side side()
      +
      Returns the value of the side record component.
      +
      +
      Returns:
      +
      the value of the side record component
      +
      +
      +
    • +
    • +
      +

      coords

      +
      public Pair<Integer,Integer> coords()
      +
      Returns the value of the coords record component.
      +
      +
      Returns:
      +
      the value of the coords record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/ClientBoard.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/ClientBoard.html new file mode 100644 index 00000000..5a23a9a6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/ClientBoard.html @@ -0,0 +1,106 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.ClientBoard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.ClientBoard

+
+
Packages that use ClientBoard
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/GraphicalView.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/GraphicalView.html new file mode 100644 index 00000000..c6a77453 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/GraphicalView.html @@ -0,0 +1,150 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.GraphicalView (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.GraphicalView

+
+
Packages that use GraphicalView
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/LastRequest.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/LastRequest.html new file mode 100644 index 00000000..d5a333d5 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/LastRequest.html @@ -0,0 +1,87 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.LastRequest (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.LastRequest

+
+
Packages that use LastRequest
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/MatchStatus.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/MatchStatus.html new file mode 100644 index 00000000..bf251fe3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/MatchStatus.html @@ -0,0 +1,95 @@ + + + + +Uses of Enum Class it.polimi.ingsw.client.frontend.MatchStatus (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum Class
it.polimi.ingsw.client.frontend.MatchStatus

+
+
Packages that use MatchStatus
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/ShownCard.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/ShownCard.html new file mode 100644 index 00000000..7313da1e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/class-use/ShownCard.html @@ -0,0 +1,110 @@ + + + + +Uses of Record Class it.polimi.ingsw.client.frontend.ShownCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Record Class
it.polimi.ingsw.client.frontend.ShownCard

+
+
Packages that use ShownCard
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/GraphicalApplication.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/GraphicalApplication.html new file mode 100644 index 00000000..0b3a3dd6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/GraphicalApplication.html @@ -0,0 +1,262 @@ + + + + +GraphicalApplication (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GraphicalApplication

+
+
java.lang.Object +
javafx.application.Application +
it.polimi.ingsw.client.frontend.gui.GraphicalApplication
+
+
+
+
+
public class GraphicalApplication +extends javafx.application.Application
+
Class from which the FXML application is run, so it's entry point for the user. + Apart from making use of FXML instances and methods, it interacts massively with GraphicalViewGUI.
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    +

    Nested classes/interfaces inherited from class javafx.application.Application

    +javafx.application.Application.Parameters
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static double
    + +
     
    +
    static double
    + +
     
    +
    +
    +

    Fields inherited from class javafx.application.Application

    +STYLESHEET_CASPIAN, STYLESHEET_MODENA
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static void
    +
    main(String[] args)
    +
    +
    Launch the application
    +
    +
    void
    +
    start(javafx.stage.Stage primaryStage)
    +
    +
    Default method to start the FXML application, it can be called only from this class main(...).
    +
    +
    +
    +
    +
    +

    Methods inherited from class javafx.application.Application

    +getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stop
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      screenWidth

      +
      public static double screenWidth
      +
      +
    • +
    • +
      +

      screenHeight

      +
      public static double screenHeight
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GraphicalApplication

      +
      public GraphicalApplication()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      main

      +
      public static void main(String[] args)
      +
      Launch the application
      +
      +
      Parameters:
      +
      args - args
      +
      +
      +
    • +
    • +
      +

      start

      +
      public void start(javafx.stage.Stage primaryStage) + throws IOException
      +
      Default method to start the FXML application, it can be called only from this class main(...).
      +
      +
      Specified by:
      +
      start in class javafx.application.Application
      +
      Parameters:
      +
      primaryStage - The stage to be opened
      +
      Throws:
      +
      IOException - If there has been an I/O error.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/GraphicalViewGUI.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/GraphicalViewGUI.html new file mode 100644 index 00000000..e1a59958 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/GraphicalViewGUI.html @@ -0,0 +1,779 @@ + + + + +GraphicalViewGUI (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GraphicalViewGUI

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.GraphicalView +
it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI
+
+
+
+
+
public class GraphicalViewGUI +extends GraphicalView
+
JavaFX implementation of Codex Naturalis client
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GraphicalViewGUI

      +
      public GraphicalViewGUI(javafx.stage.Stage stage)
      +
      Initialize on a given JavaFX stage
      +
      +
      Parameters:
      +
      stage - the main stage of the application
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      changePlayer

      +
      public void changePlayer()
      +
      Description copied from class: GraphicalView
      +
      Method used to show the turn has changed.
      +
      +
      Specified by:
      +
      changePlayer in class GraphicalView
      +
      +
      +
    • +
    • +
      +

      makeMove

      +
      public void makeMove()
      +
      Method called everytime it's this client turn.
      +
      +
      Specified by:
      +
      makeMove in class GraphicalView
      +
      +
      +
    • +
    • +
      +

      createMatch

      +
      public void createMatch(String matchName, + Integer maxPlayers)
      +
      Description copied from class: GraphicalView
      +
      Tries to create a match.
      +
      +
      Overrides:
      +
      createMatch in class GraphicalView
      +
      Parameters:
      +
      matchName - The match's name
      +
      maxPlayers - maximum amount of players
      +
      +
      +
    • +
    • +
      +

      joinMatch

      +
      public void joinMatch(String matchName)
      +
      Description copied from class: GraphicalView
      +
      Tries to join a match.
      +
      +
      Overrides:
      +
      joinMatch in class GraphicalView
      +
      Parameters:
      +
      matchName - the match's name
      +
      +
      +
    • +
    • +
      +

      notifyMatchStarted

      +
      protected void notifyMatchStarted()
      +
      Description copied from class: GraphicalView
      +
      Method that shows the user that the match has started.
      +
      +
      Specified by:
      +
      notifyMatchStarted in class GraphicalView
      +
      +
      +
    • +
    • +
      +

      notifyMatchResumed

      +
      protected void notifyMatchResumed(boolean drawPhase)
      +
      Description copied from class: GraphicalView
      +
      Method that shows the user that the match has resumed.
      +
      +
      Specified by:
      +
      notifyMatchResumed in class GraphicalView
      +
      +
      +
    • +
    • +
      +

      giveInitialCard

      +
      public void giveInitialCard(InitialCard initialCard)
      +
      Description copied from class: GraphicalView
      +
      Give the user its initial card.
      +
      +
      Overrides:
      +
      giveInitialCard in class GraphicalView
      +
      Parameters:
      +
      initialCard - the player's initial card
      +
      +
      +
    • +
    • +
      +

      giveSecretObjectives

      +
      public void giveSecretObjectives(Pair<Objective,Objective> secretObjectives)
      +
      Description copied from class: GraphicalView
      +
      Gives the player two secret objectives to choose from.
      +
      +
      Overrides:
      +
      giveSecretObjectives in class GraphicalView
      +
      Parameters:
      +
      secretObjectives - the two objectives to choose from
      +
      +
      +
    • +
    • +
      +

      someoneDrewInitialCard

      +
      public void someoneDrewInitialCard(String someoneUsername, + InitialCard card)
      +
      Description copied from class: GraphicalView
      +
      Notifies other players that someone drew the initial card.
      +
      +
      Overrides:
      +
      someoneDrewInitialCard in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - Player who drew the initial
      +
      card - The card he drew
      +
      +
      +
    • +
    • +
      +

      someoneSetInitialSide

      +
      public void someoneSetInitialSide(String someoneUsername, + Side side, + Map<Symbol,Integer> availableResources)
      +
      Description copied from class: GraphicalView
      +
      Effectively place the initial card on the player's board, on the right side. Note that the card + must have already been set.
      +
      +
      Overrides:
      +
      someoneSetInitialSide in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - Player who chose the initial card's side
      +
      side - Chosen side
      +
      availableResources - Currently available resources for the player
      +
      +
      +
    • +
    • +
      +

      someoneDrewSecretObjective

      +
      public void someoneDrewSecretObjective(String someoneUsername)
      +
      Description copied from class: GraphicalView
      +
      Notifies other players that someone is choosing the secret objective. They should not know from + which objective he is choosing, so they are not passed.
      +
      +
      Overrides:
      +
      someoneDrewSecretObjective in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - Player who is choosing
      +
      +
      +
    • +
    • +
      +

      someoneChoseSecretObjective

      +
      public void someoneChoseSecretObjective(String someoneUsername)
      +
      Description copied from class: GraphicalView
      +
      Changes the current player and updates last request's status to RequestStatus.SUCCESSFUL.
      +
      +
      Overrides:
      +
      someoneChoseSecretObjective in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - The player who chose the objective
      +
      +
      +
    • +
    • +
      +

      notifyLastTurn

      +
      public void notifyLastTurn()
      +
      Description copied from class: GraphicalView
      +
      Notifies the player that this is the last turn he can play.
      +
      +
      Overrides:
      +
      notifyLastTurn in class GraphicalView
      +
      +
      +
    • +
    • +
      +

      someoneJoined

      +
      public void someoneJoined(String someoneUsername, + List<String> joinedPlayers)
      +
      Description copied from class: GraphicalView
      +
      Notifies the player that someone joined the lobby.
      +
      +
      Overrides:
      +
      someoneJoined in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - Player who joined
      +
      joinedPlayers - List of the players currently in the match
      +
      +
      +
    • +
    • +
      +

      someoneQuit

      +
      public void someoneQuit(String someoneUsername)
      +
      Description copied from class: GraphicalView
      +
      Notifies the player that someone quit the lobby.
      +
      +
      Specified by:
      +
      someoneQuit in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - Player who quit
      +
      +
      +
    • +
    • +
      +

      matchFinished

      +
      public void matchFinished(List<LeaderboardEntry> ranking)
      +
      Description copied from class: GraphicalView
      +
      Shows the player the match's leaderboard after the game ended.
      +
      +
      Specified by:
      +
      matchFinished in class GraphicalView
      +
      Parameters:
      +
      ranking - Ranking of players
      +
      +
      +
    • +
    • +
      +

      someoneSentBroadcastText

      +
      public void someoneSentBroadcastText(String someoneUsername, + String text)
      +
      Description copied from class: GraphicalView
      +
      Notifies that someone sent a broadcast text.
      +
      +
      Overrides:
      +
      someoneSentBroadcastText in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - Player who sent the text
      +
      text - Text he sent
      +
      +
      +
    • +
    • +
      +

      someoneSentPrivateText

      +
      public void someoneSentPrivateText(String someoneUsername, + String text)
      +
      Description copied from class: GraphicalView
      +
      Notifies the player that someone sent him a private text.
      +
      +
      Overrides:
      +
      someoneSentPrivateText in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - Player who sent the private text
      +
      text - Text he sent
      +
      +
      +
    • +
    • +
      +

      someonePlayedCard

      +
      public void someonePlayedCard(String someoneUsername, + Pair<Integer,Integer> coords, + PlayableCard card, + Side side, + int points, + Map<Symbol,Integer> availableResources)
      +
      Description copied from class: GraphicalView
      +
      Actually places a card on the player's board (so the Player tried to place a card and it was a + valid move).
      +
      +
      Overrides:
      +
      someonePlayedCard in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - The player who made the move
      +
      coords - where he placed the card
      +
      card - the placed card
      +
      side - the side the card was placed on
      +
      points - the total points of the player after he placed the card
      +
      availableResources - the available resources of the player after he placed the card
      +
      +
      +
    • +
    • +
      +

      someoneDrewCard

      +
      public void someoneDrewCard(String someoneUsername, + DrawSource source, + PlayableCard card, + PlayableCard replacementCard, + Pair<Symbol,Symbol> deckTopReigns)
      +
      Description copied from class: GraphicalView
      +
      Handles the replacement of the last card drawn, and changes turn.
      +
      +
      Overrides:
      +
      someoneDrewCard in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - Player who drew the card
      +
      source - From where he drew the card
      +
      card - The card he drew
      +
      replacementCard - The replacement card, which will be null if the DrawSource is a + deck
      +
      deckTopReigns - Current deck top reigns
      +
      +
      +
    • +
    • +
      +

      notifyError

      +
      public void notifyError(Exception exception)
      +
      Description copied from class: GraphicalView
      +
      Sets the internal state according to the occurrence of an error.
      +
      +
      Overrides:
      +
      notifyError in class GraphicalView
      +
      Parameters:
      +
      exception - The thrown exception
      +
      +
      +
    • +
    • +
      +

      notifyError

      +
      public void notifyError(String title, + String description)
      +
      Notify an error
      +
      +
      Parameters:
      +
      title - title of the error
      +
      description - description of the error
      +
      +
      +
    • +
    • +
      +

      setUsername

      +
      public void setUsername(String username)
      +
      Description copied from class: GraphicalView
      +
      Sets the username of the corresponding player.
      +
      +
      Overrides:
      +
      setUsername in class GraphicalView
      +
      Parameters:
      +
      username - The chosen username
      +
      +
      +
    • +
    • +
      +

      getUsername

      +
      public String getUsername()
      +
      Getter for the client username
      +
      +
      Returns:
      +
      client username
      +
      +
      +
    • +
    • +
      +

      getAvailableMatches

      +
      public void getAvailableMatches()
      +
      Request available matches to the server
      +
      +
    • +
    • +
      +

      receiveAvailableMatches

      +
      public void receiveAvailableMatches(List<AvailableMatch> availableMatches)
      +
      Description copied from class: GraphicalView
      +
      Receive the list of matches currently available
      +
      +
      Overrides:
      +
      receiveAvailableMatches in class GraphicalView
      +
      Parameters:
      +
      availableMatches - the list of available matches
      +
      +
      +
    • +
    • +
      +

      setLobbySceneController

      +
      public void setLobbySceneController(LobbySceneController lobbySceneController)
      +
      Set the lobby scene controller
      +
      +
      Parameters:
      +
      lobbySceneController - controller of the lobby scene
      +
      +
      +
    • +
    • +
      +

      main

      +
      public static void main(String[] args)
      +
      Main class to launch the applicaiton
      +
      +
      Parameters:
      +
      args - command line arguments
      +
      +
      +
    • +
    • +
      +

      notifyConnectionLost

      +
      public void notifyConnectionLost()
      +
      Description copied from class: GraphicalView
      +
      Notify the client that the connection with the server + has been lost.
      +
      +
      Specified by:
      +
      notifyConnectionLost in class GraphicalView
      +
      +
      +
    • +
    • +
      +

      disconnect

      +
      public void disconnect()
      +
      Request disconnection from the network
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/class-use/GraphicalApplication.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/class-use/GraphicalApplication.html new file mode 100644 index 00000000..4165ea47 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/class-use/GraphicalApplication.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.GraphicalApplication (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.GraphicalApplication

+
+No usage of it.polimi.ingsw.client.frontend.gui.GraphicalApplication
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/class-use/GraphicalViewGUI.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/class-use/GraphicalViewGUI.html new file mode 100644 index 00000000..8ea7314b --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/class-use/GraphicalViewGUI.html @@ -0,0 +1,98 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI

+
+
Packages that use GraphicalViewGUI
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/ChatPaneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/ChatPaneController.html new file mode 100644 index 00000000..986958cf --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/ChatPaneController.html @@ -0,0 +1,324 @@ + + + + +ChatPaneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ChatPaneController

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.gui.controllers.SceneController +
it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController
+
+
+
+
+
public class ChatPaneController +extends SceneController
+
JavaFX controller for the chat pane
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      chatHistoryScrollPane

      +
      public javafx.scene.control.ScrollPane chatHistoryScrollPane
      +
      +
    • +
    • +
      +

      chatContainer

      +
      public javafx.scene.layout.VBox chatContainer
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ChatPaneController

      +
      public ChatPaneController()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      initialize

      +
      public void initialize()
      +
      Description copied from class: SceneController
      +
      This method is run when the controller is initialized
      +
      +
      Specified by:
      +
      initialize in class SceneController
      +
      +
      +
    • +
    • +
      +

      addPlayer

      +
      public void addPlayer(String playerUsername)
      +
      Adds a player to the chat.
      +
      +
      Parameters:
      +
      playerUsername - The player's username
      +
      +
      +
    • +
    • +
      +

      receiveBroadcastMessage

      +
      public void receiveBroadcastMessage(String senderUsername, + String message)
      +
      Handles the receipt of a broadcast message from a user who's not the current client. + For this purpose the method confirmSubmitBroadcastMessage(...) can be used.
      +
      +
      Parameters:
      +
      senderUsername - The username of the player that sent the message
      +
      message - The message sent
      +
      +
      +
    • +
    • +
      +

      receivePrivateMessage

      +
      public void receivePrivateMessage(String senderUsername, + String message)
      +
      Handles the receipt of a private message from a user who's not the current client. + For this purpose the method confirmSubmitPrivateMessage(...) can be used.
      +
      +
      Parameters:
      +
      senderUsername - The username of the player that sent the message
      +
      message - The message sent
      +
      +
      +
    • +
    • +
      +

      confirmSubmitBroadcastMessage

      +
      public void confirmSubmitBroadcastMessage(String message)
      +
      Handles the receipt of confirmation of successful submit of a broadcast message + from this client to the server (either broadcast or private).
      +
      +
      Parameters:
      +
      message - The message to be confirmed
      +
      +
      +
    • +
    • +
      +

      confirmSubmitPrivateMessage

      +
      public void confirmSubmitPrivateMessage(String message)
      +
      Handles the receipt of confirmation of successful submit of a private message + from this client to the server (either broadcast or private).
      +
      +
      Parameters:
      +
      message - The message to be confirmed
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/ConnectionSceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/ConnectionSceneController.html new file mode 100644 index 00000000..76d1385a --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/ConnectionSceneController.html @@ -0,0 +1,232 @@ + + + + +ConnectionSceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ConnectionSceneController

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.gui.controllers.SceneController +
it.polimi.ingsw.client.frontend.gui.controllers.ConnectionSceneController
+
+
+
+
+
public class ConnectionSceneController +extends SceneController
+
Controller for the connection scene
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      serverAddress

      +
      public javafx.scene.control.TextField serverAddress
      +
      +
    • +
    • +
      +

      serverPort

      +
      public javafx.scene.control.TextField serverPort
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ConnectionSceneController

      +
      public ConnectionSceneController()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      initialize

      +
      public void initialize()
      +
      Description copied from class: SceneController
      +
      This method is run when the controller is initialized
      +
      +
      Specified by:
      +
      initialize in class SceneController
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/ErrorSceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/ErrorSceneController.html new file mode 100644 index 00000000..f81d4e26 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/ErrorSceneController.html @@ -0,0 +1,292 @@ + + + + +ErrorSceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ErrorSceneController

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.gui.controllers.SceneController +
it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController
+
+
+
+
+
public class ErrorSceneController +extends SceneController
+
Controller of the error scene window
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      windowWidth

      +
      public static double windowWidth
      +
      +
    • +
    • +
      +

      windowHeight

      +
      public static double windowHeight
      +
      +
    • +
    • +
      +

      errorTitle

      +
      public javafx.scene.text.Text errorTitle
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ErrorSceneController

      +
      public ErrorSceneController()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      initialize

      +
      public void initialize() + throws IOException
      +
      Description copied from class: SceneController
      +
      This method is run when the controller is initialized
      +
      +
      Specified by:
      +
      initialize in class SceneController
      +
      Throws:
      +
      IOException - if there is a file error
      +
      +
      +
    • +
    • +
      +

      setText

      +
      public void setText(String text)
      +
      Set the text of the error that is shown in the bottom
      +
      +
      Parameters:
      +
      text - text of the error
      +
      +
      +
    • +
    • +
      +

      setTitle

      +
      public void setTitle(String title)
      +
      Set the title of the error that is shown on the top
      +
      +
      Parameters:
      +
      title - text of the title
      +
      +
      +
    • +
    • +
      +

      setErrror

      +
      public void setErrror(Exception e)
      +
      Show an error from an exception
      +
      +
      Parameters:
      +
      e - exception
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/LobbySceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/LobbySceneController.html new file mode 100644 index 00000000..7bbc2616 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/LobbySceneController.html @@ -0,0 +1,326 @@ + + + + +LobbySceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LobbySceneController

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.gui.controllers.SceneController +
it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController
+
+
+
+
+
public class LobbySceneController +extends SceneController
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      createUsername

      +
      public javafx.scene.control.TextField createUsername
      +
      +
    • +
    • +
      +

      matchName

      +
      public javafx.scene.control.TextField matchName
      +
      +
    • +
    • +
      +

      matchNumberContainer

      +
      public javafx.scene.layout.HBox matchNumberContainer
      +
      +
    • +
    • +
      +

      joinTitle

      +
      public javafx.scene.control.Label joinTitle
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      LobbySceneController

      +
      public LobbySceneController()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      initialize

      +
      public void initialize()
      +
      Description copied from class: SceneController
      +
      This method is run when the controller is initialized
      +
      +
      Specified by:
      +
      initialize in class SceneController
      +
      +
      +
    • +
    • +
      +

      initializePostController

      +
      public void initializePostController()
      +
      Description copied from class: SceneController
      +
      Method to be called to do actions after the controller attributes are set
      +
      +
      Overrides:
      +
      initializePostController in class SceneController
      +
      +
      +
    • +
    • +
      +

      showWaitScene

      +
      public WaitingSceneController showWaitScene() + throws IOException
      +
      Show the wait scene
      +
      +
      Returns:
      +
      the wait scene controller
      +
      Throws:
      +
      IOException - in case of file error
      +
      +
      +
    • +
    • +
      +

      updateMatches

      +
      public void updateMatches(List<AvailableMatch> matchList)
      +
      Set the matches displayed
      +
      +
      Parameters:
      +
      matchList - List of the current available matches
      +
      +
      +
    • +
    • +
      +

      addMatchCard

      +
      public void addMatchCard(String name, + int players, + int maxPlayers, + boolean isRejoinable)
      +
      Create the container for a Match
      +
      +
      Parameters:
      +
      name - name of the match
      +
      players - current amount of players
      +
      maxPlayers - maximum number of players allowed in the match
      +
      isRejoinable - if the match is rejoinable
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/MatchSceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/MatchSceneController.html new file mode 100644 index 00000000..42e77341 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/MatchSceneController.html @@ -0,0 +1,515 @@ + + + + +MatchSceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MatchSceneController

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.gui.controllers.SceneController +
it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController
+
+
+
+
+
public class MatchSceneController +extends SceneController
+
JavaFX controller of the match scene
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      tableTab

      +
      public javafx.scene.control.Tab tableTab
      +
      +
    • +
    • +
      +

      stateTitle

      +
      public javafx.scene.control.Label stateTitle
      +
      +
    • +
    • +
      +

      goldsDeck

      +
      public CardView goldsDeck
      +
      +
    • +
    • +
      +

      resourcesDeck

      +
      public CardView resourcesDeck
      +
      +
    • +
    • +
      +

      firstVisible

      +
      public CardView firstVisible
      +
      +
    • +
    • +
      +

      secondVisible

      +
      public CardView secondVisible
      +
      +
    • +
    • +
      +

      thirdVisible

      +
      public CardView thirdVisible
      +
      +
    • +
    • +
      +

      fourthVisible

      +
      public CardView fourthVisible
      +
      +
    • +
    • +
      +

      firstObjective

      +
      public CardView firstObjective
      +
      +
    • +
    • +
      +

      secondObjective

      +
      public CardView secondObjective
      +
      +
    • +
    • +
      +

      plateauPane

      +
      public PlateauPane plateauPane
      +
      +
    • +
    • +
      +

      chatPane

      +
      public javafx.scene.layout.HBox chatPane
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MatchSceneController

      +
      public MatchSceneController()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      initialize

      +
      public void initialize()
      +
      Description copied from class: SceneController
      +
      This method is run when the controller is initialized
      +
      +
      Specified by:
      +
      initialize in class SceneController
      +
      +
      +
    • +
    • +
      +

      initializePostController

      +
      public void initializePostController() + throws IOException
      +
      Description copied from class: SceneController
      +
      Method to be called to do actions after the controller attributes are set
      +
      +
      Overrides:
      +
      initializePostController in class SceneController
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      addPlayerTab

      +
      public PlayerTabController addPlayerTab(String username, + Color color) + throws IOException
      +
      Add the tab of the given player
      +
      +
      Parameters:
      +
      username - username of the player
      +
      color - color of the player
      +
      Returns:
      +
      controller of the created player tab
      +
      Throws:
      +
      IOException - if there are file errors
      +
      +
      +
    • +
    • +
      +

      setDrawSource

      +
      public void setDrawSource(DrawSource source, + PlayableCard replacementCard, + Symbol replacementReign)
      +
      Set the displayed card for the given draw source
      +
      +
      Parameters:
      +
      source - Source of the draw
      +
      replacementCard - Replacement card, can be null
      +
      replacementReign - Replacement reign, can be null
      +
      +
      +
    • +
    • +
      +

      setObjectives

      +
      public void setObjectives(Pair<Objective,Objective> objectives)
      +
      Set the visible objectives cards
      +
      +
      Parameters:
      +
      objectives - pair of the objectives
      +
      +
      +
    • +
    • +
      +

      setPlateauPoints

      +
      public void setPlateauPoints(String username, + int points)
      +
      Move the player pawn on the plateau
      +
      +
      Parameters:
      +
      username - username of the player to move
      +
      points - total amount of points of the player
      +
      +
      +
    • +
    • +
      +

      showRankingScene

      +
      public RankingSceneController showRankingScene() + throws IOException
      +
      Show the ranking scene on match end
      +
      +
      Returns:
      +
      ranking scene controller
      +
      Throws:
      +
      IOException - on file errors
      +
      +
      +
    • +
    • +
      +

      getChatPane

      +
      public ChatPaneController getChatPane()
      +
      Get the chat pane controller
      +
      +
      Returns:
      +
      the chat pane controller
      +
      +
      +
    • +
    • +
      +

      setFocus

      +
      public void setFocus(String username)
      +
      Force the focus on a player's tab
      +
      +
      Parameters:
      +
      username - username of the player
      +
      +
      +
    • +
    • +
      +

      setFocusToTable

      +
      public void setFocusToTable()
      +
      +
    • +
    • +
      +

      enableDrawSourcesInteractions

      +
      public void enableDrawSourcesInteractions(boolean enable)
      +
      Enables/disables mouse interactions with draw sources.
      +
      +
      Parameters:
      +
      enable - True if interactions should be enabled, false otherwise
      +
      +
      +
    • +
    • +
      +

      setStateTitle

      +
      public void setStateTitle(String text)
      +
      Set the current state title to express an action while playing
      +
      +
      Parameters:
      +
      text - title
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController.html new file mode 100644 index 00000000..be34b60f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController.html @@ -0,0 +1,461 @@ + + + + +PlayerTabController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PlayerTabController

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.gui.controllers.SceneController +
it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController
+
+
+
+
+
public class PlayerTabController +extends SceneController
+
Controller of the player tab
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      handCards

      +
      public javafx.scene.layout.HBox handCards
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PlayerTabController

      +
      public PlayerTabController()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      initialize

      +
      public void initialize()
      +
      Description copied from class: SceneController
      +
      This method is run when the controller is initialized
      +
      +
      Specified by:
      +
      initialize in class SceneController
      +
      +
      +
    • +
    • +
      +

      setResources

      +
      public void setResources(Map<Symbol,Integer> resources)
      +
      Set the displayed resources
      +
      +
      Parameters:
      +
      resources - map to the resources amount
      +
      +
      +
    • +
    • +
      +

      placeCard

      +
      public void placeCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
      +
      Places a card on the board
      +
      +
      Parameters:
      +
      coords -
      +
      card -
      +
      side -
      +
      +
      +
    • +
    • +
      +

      setPoints

      +
      public void setPoints(int points)
      +
      Set the amount of points that the player has
      +
      +
      Parameters:
      +
      points - amount of points
      +
      +
      +
    • +
    • +
      +

      giveSecretObjectives

      +
      public void giveSecretObjectives(Pair<Objective,Objective> objectives)
      +
      Current player has to choose the secret objective
      +
      +
      Parameters:
      +
      objectives - the two objectives to choose
      +
      +
      +
    • +
    • +
      +

      someoneDrewSecretObjective

      +
      public void someoneDrewSecretObjective()
      +
      Another player is choosing the secret objective
      +
      +
    • +
    • +
      +

      giveInitialCard

      +
      public void giveInitialCard(InitialCard card)
      +
      The current player is choosing the initial card side
      +
      +
      Parameters:
      +
      card - given initial card
      +
      +
      +
    • +
    • +
      +

      someoneDrewInitialCard

      +
      public void someoneDrewInitialCard(InitialCard card)
      +
      Show that someone is choosing the initial card side
      +
      +
      Parameters:
      +
      card - initial card
      +
      +
      +
    • +
    • +
      +

      removePlayerChoiceContainer

      +
      public void removePlayerChoiceContainer()
      +
      Remove the container that asks for initials card, objective cards..
      +
      +
    • +
    • +
      +

      setUsername

      +
      public void setUsername(String username)
      +
      Set the player username
      +
      +
      Parameters:
      +
      username - username of the player
      +
      +
      +
    • +
    • +
      +

      getBoard

      +
      public BoardPane getBoard()
      +
      Get the Board Pane of the player
      +
      +
      Returns:
      +
      the board pane
      +
      +
      +
    • +
    • +
      +

      setSecretObjective

      +
      public void setSecretObjective(Objective objective)
      +
      Set the secret objective for the current player
      +
      +
      Parameters:
      +
      objective - objective to set
      +
      +
      +
    • +
    • +
      +

      setStateTitle

      +
      public void setStateTitle(String title)
      +
      Set state title, usually used to tell the player what to do
      +
      +
      Parameters:
      +
      title - text of the title
      +
      +
      +
    • +
    • +
      +

      setHandCards

      +
      public void setHandCards(List<PlayableCard> cards)
      +
      Set player hand cards
      +
      +
      Parameters:
      +
      cards - list of cards currently in the player's hand
      +
      +
      +
    • +
    • +
      +

      setCurrentPlayer

      +
      public void setCurrentPlayer(boolean current)
      +
      Set if the player is the current one
      +
      +
      Parameters:
      +
      current - if the player is current
      +
      +
      +
    • +
    • +
      +

      enablePlaceCardInteractions

      +
      public void enablePlaceCardInteractions(boolean enable)
      +
      Enables/disables mouse interactions with hand cards.
      +
      +
      Parameters:
      +
      enable - True if interactions should be enabled, false otherwise
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/RankingSceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/RankingSceneController.html new file mode 100644 index 00000000..af846647 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/RankingSceneController.html @@ -0,0 +1,319 @@ + + + + +RankingSceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class RankingSceneController

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.gui.controllers.SceneController +
it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController
+
+
+
+
+
public class RankingSceneController +extends SceneController
+
JavaFX Controller of the ranking scene, shows the leaderboard after the match is finished
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      leaderboardContainer

      +
      public javafx.scene.layout.VBox leaderboardContainer
      +
      +
    • +
    • +
      +

      tableSize

      +
      public static double tableSize
      +
      +
    • +
    • +
      +

      victoryLabel

      +
      public javafx.scene.control.Label victoryLabel
      +
      +
    • +
    • +
      +

      playAgainButton

      +
      public javafx.scene.control.Button playAgainButton
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      RankingSceneController

      +
      public RankingSceneController()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      initialize

      +
      public void initialize() + throws IOException
      +
      Description copied from class: SceneController
      +
      This method is run when the controller is initialized
      +
      +
      Specified by:
      +
      initialize in class SceneController
      +
      Throws:
      +
      IOException - if there is a file error
      +
      +
      +
    • +
    • +
      +

      initializePostController

      +
      public void initializePostController()
      +
      Description copied from class: SceneController
      +
      Method to be called to do actions after the controller attributes are set
      +
      +
      Overrides:
      +
      initializePostController in class SceneController
      +
      +
      +
    • +
    • +
      +

      addRanking

      +
      public void addRanking(LeaderboardEntry entry)
      +
      Add an entry to the graphical leaderboard
      +
      +
      Parameters:
      +
      entry - the entry
      +
      +
      +
    • +
    • +
      +

      setVictory

      +
      public void setVictory(boolean victory)
      +
      Set if the player has won the match
      +
      +
      Parameters:
      +
      victory - if the current player has won
      +
      +
      +
    • +
    • +
      +

      showConnectionScene

      +
      public void showConnectionScene() + throws IOException
      +
      Show the connection scene
      +
      +
      Throws:
      +
      IOException - in case of file errors
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/SceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/SceneController.html new file mode 100644 index 00000000..34f9c3a3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/SceneController.html @@ -0,0 +1,344 @@ + + + + +SceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SceneController

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.gui.controllers.SceneController
+
+
+
+
Direct Known Subclasses:
+
ChatPaneController, ConnectionSceneController, ErrorSceneController, LobbySceneController, MatchSceneController, PlayerTabController, RankingSceneController, WaitingSceneController
+
+
+
public abstract class SceneController +extends Object
+
JavaFX controller of a scene
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    protected javafx.stage.Stage
    + +
     
    + + +
     
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    abstract void
    + +
    +
    This method is run when the controller is initialized
    +
    +
    void
    + +
    +
    Method to be called to do actions after the controller attributes are set
    +
    +
    protected <T extends javafx.scene.Node>
    T
    + +
    +
    Load a node from a FXML file path, assign properties to the controller + and to the node
    +
    +
    protected void
    +
    setControllerAttributes(javafx.fxml.FXMLLoader loader)
    +
    +
    Set graphical view and the main stage properties to the scene controller
    +
    +
    protected void
    +
    setControllerAttributes(javafx.fxml.FXMLLoader loader, + javafx.scene.Node node)
    +
    +
    Set graphical view and the main stage properties to the scene controller + also sets the "Controller" property for the given node
    +
    +
    void
    + +
    +
    Set the graphical view for the controller
    +
    +
    void
    +
    setStage(javafx.stage.Stage stage)
    +
    +
    Set the main stage the controller is in
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      view

      +
      protected GraphicalViewGUI view
      +
      +
    • +
    • +
      +

      stage

      +
      protected javafx.stage.Stage stage
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SceneController

      +
      public SceneController()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      initializePostController

      +
      public void initializePostController() + throws IOException
      +
      Method to be called to do actions after the controller attributes are set
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      initialize

      +
      public abstract void initialize() + throws IOException
      +
      This method is run when the controller is initialized
      +
      +
      Throws:
      +
      IOException - if there is a file error
      +
      +
      +
    • +
    • +
      +

      setGraphicalView

      +
      public void setGraphicalView(GraphicalViewGUI view)
      +
      Set the graphical view for the controller
      +
      +
      Parameters:
      +
      view - graphical view
      +
      +
      +
    • +
    • +
      +

      setStage

      +
      public void setStage(javafx.stage.Stage stage)
      +
      Set the main stage the controller is in
      +
      +
      Parameters:
      +
      stage - JavaFX stage
      +
      +
      +
    • +
    • +
      +

      loadScene

      +
      protected <T extends javafx.scene.Node> T loadScene(String path) + throws IOException
      +
      Load a node from a FXML file path, assign properties to the controller + and to the node
      +
      +
      Type Parameters:
      +
      T - Type of the node
      +
      Parameters:
      +
      path - path of the FXML file
      +
      Returns:
      +
      the node on top of the FXML
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      setControllerAttributes

      +
      protected void setControllerAttributes(javafx.fxml.FXMLLoader loader) + throws IOException
      +
      Set graphical view and the main stage properties to the scene controller
      +
      +
      Parameters:
      +
      loader - FXMLL Loader of the scene
      +
      Throws:
      +
      IOException - in case of exception
      +
      +
      +
    • +
    • +
      +

      setControllerAttributes

      +
      protected void setControllerAttributes(javafx.fxml.FXMLLoader loader, + javafx.scene.Node node) + throws IOException
      +
      Set graphical view and the main stage properties to the scene controller + also sets the "Controller" property for the given node
      +
      +
      Parameters:
      +
      loader - FXMLL Loader of the scene
      +
      Throws:
      +
      IOException - in case of exception
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/WaitingSceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/WaitingSceneController.html new file mode 100644 index 00000000..d0b3146c --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/WaitingSceneController.html @@ -0,0 +1,363 @@ + + + + +WaitingSceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WaitingSceneController

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.gui.controllers.SceneController +
it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController
+
+
+
+
+
public class WaitingSceneController +extends SceneController
+
JavaFX controller for the waiting scene. It shows all the current players + waiting for the match to start
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      matchName

      +
      public javafx.scene.control.Label matchName
      +
      +
    • +
    • +
      +

      playersContainer

      +
      public javafx.scene.layout.VBox playersContainer
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WaitingSceneController

      +
      public WaitingSceneController()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      initialize

      +
      public void initialize() + throws IOException
      +
      Description copied from class: SceneController
      +
      This method is run when the controller is initialized
      +
      +
      Specified by:
      +
      initialize in class SceneController
      +
      Throws:
      +
      IOException - if there is a file error
      +
      +
      +
    • +
    • +
      +

      addPlayer

      +
      public void addPlayer(String username)
      +
      Add a player to the list
      +
      +
      Parameters:
      +
      username - username of the player to add
      +
      +
      +
    • +
    • +
      +

      setMatchName

      +
      public void setMatchName(String name)
      +
      Set the name of the match to display
      +
      +
      Parameters:
      +
      name - name of the match
      +
      +
      +
    • +
    • +
      +

      setMaxPlayers

      +
      public void setMaxPlayers(int players)
      +
      Set the maximum amount of players in the current match
      +
      +
      Parameters:
      +
      players - maximum number of players
      +
      +
      +
    • +
    • +
      +

      setCurrentPlayers

      +
      public void setCurrentPlayers(int players)
      +
      Set the current amount of players in the current match
      +
      +
      Parameters:
      +
      players - current number of players
      +
      +
      +
    • +
    • +
      +

      getCurrentPlayers

      +
      public int getCurrentPlayers()
      +
      Get the amount of current players
      +
      +
      Returns:
      +
      the amount of current players in the match
      +
      +
      +
    • +
    • +
      +

      updateLabel

      +
      public void updateLabel()
      +
      Update the players count, match name and max players
      +
      +
    • +
    • +
      +

      removePlayer

      +
      public void removePlayer(String username)
      +
      Remove a player from the list
      +
      +
      Parameters:
      +
      username - username of the player to remove
      +
      +
      +
    • +
    • +
      +

      showMatch

      +
      public MatchSceneController showMatch() + throws IOException
      +
      Show the match scene when the match is started
      +
      +
      Returns:
      +
      the match scene controller
      +
      Throws:
      +
      IOException - if there was a file error
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/ChatPaneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/ChatPaneController.html new file mode 100644 index 00000000..63d01ec1 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/ChatPaneController.html @@ -0,0 +1,89 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.controllers.ChatPaneController

+
+
Packages that use ChatPaneController
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/ConnectionSceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/ConnectionSceneController.html new file mode 100644 index 00000000..3a291798 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/ConnectionSceneController.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.controllers.ConnectionSceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.controllers.ConnectionSceneController

+
+No usage of it.polimi.ingsw.client.frontend.gui.controllers.ConnectionSceneController
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/ErrorSceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/ErrorSceneController.html new file mode 100644 index 00000000..24f7fe6b --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/ErrorSceneController.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController

+
+No usage of it.polimi.ingsw.client.frontend.gui.controllers.ErrorSceneController
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/LobbySceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/LobbySceneController.html new file mode 100644 index 00000000..a3346389 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/LobbySceneController.html @@ -0,0 +1,89 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController

+
+
Packages that use LobbySceneController
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/MatchSceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/MatchSceneController.html new file mode 100644 index 00000000..58a3f7c3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/MatchSceneController.html @@ -0,0 +1,89 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.controllers.MatchSceneController

+
+
Packages that use MatchSceneController
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/PlayerTabController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/PlayerTabController.html new file mode 100644 index 00000000..504cc810 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/PlayerTabController.html @@ -0,0 +1,90 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.controllers.PlayerTabController

+
+
Packages that use PlayerTabController
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/RankingSceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/RankingSceneController.html new file mode 100644 index 00000000..6e60cc41 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/RankingSceneController.html @@ -0,0 +1,89 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.controllers.RankingSceneController

+
+
Packages that use RankingSceneController
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/SceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/SceneController.html new file mode 100644 index 00000000..20806ebc --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/SceneController.html @@ -0,0 +1,122 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.controllers.SceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.controllers.SceneController

+
+
Packages that use SceneController
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/WaitingSceneController.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/WaitingSceneController.html new file mode 100644 index 00000000..66abeb31 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/class-use/WaitingSceneController.html @@ -0,0 +1,89 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.controllers.WaitingSceneController

+
+
Packages that use WaitingSceneController
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/package-summary.html new file mode 100644 index 00000000..36f99ac7 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/package-summary.html @@ -0,0 +1,141 @@ + + + + +it.polimi.ingsw.client.frontend.gui.controllers (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.client.frontend.gui.controllers

+
+
+
package it.polimi.ingsw.client.frontend.gui.controllers
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/package-tree.html new file mode 100644 index 00000000..d103c19e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/package-tree.html @@ -0,0 +1,87 @@ + + + + +it.polimi.ingsw.client.frontend.gui.controllers Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.client.frontend.gui.controllers

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/package-use.html new file mode 100644 index 00000000..156f54d6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/controllers/package-use.html @@ -0,0 +1,119 @@ + + + + +Uses of Package it.polimi.ingsw.client.frontend.gui.controllers (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.client.frontend.gui.controllers

+
+ + +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/BoardPane.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/BoardPane.html new file mode 100644 index 00000000..ecaeef65 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/BoardPane.html @@ -0,0 +1,349 @@ + + + + +BoardPane (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BoardPane

+
+
java.lang.Object +
javafx.scene.Node +
javafx.scene.Parent +
javafx.scene.layout.Region +
javafx.scene.layout.Pane +
it.polimi.ingsw.client.frontend.gui.nodes.BoardPane
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
javafx.css.Styleable, javafx.event.EventTarget
+
+
+
public class BoardPane +extends javafx.scene.layout.Pane
+
Game board, manages card display
+
+
+
    + +
  • +
    +

    Property Summary

    +
    +

    Properties inherited from class javafx.scene.layout.Region

    +background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
    +
    +

    Properties inherited from class javafx.scene.Parent

    +needsLayout
    +
    +

    Properties inherited from class javafx.scene.Node

    +accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static double
    + +
     
    +
    static double
    + +
     
    +
    static double
    + +
     
    +
    static double
    + +
     
    + + +
     
    +
    +
    +

    Fields inherited from class javafx.scene.layout.Region

    +USE_COMPUTED_SIZE, USE_PREF_SIZE
    +
    +

    Fields inherited from class javafx.scene.Node

    +BASELINE_OFFSET_SAME_AS_HEIGHT
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Constructor of BoardPane
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    addCard(Pair<Integer,Integer> position, + InitialCard card, + Side side)
    +
    +
    Add a card to the board
    +
    +
    void
    +
    addCard(Pair<Integer,Integer> position, + PlayableCard card, + Side side)
    +
    +
    Add a card to the board
    +
    + + +
    +
    Convert coordinates from game coordinate to JavaFX Board coordinates
    +
    +
    +
    +
    +
    +

    Methods inherited from class javafx.scene.layout.Pane

    +getChildren
    +
    +

    Methods inherited from class javafx.scene.layout.Region

    +backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
    +
    +

    Methods inherited from class javafx.scene.Parent

    +getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, layoutChildren, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
    +
    +

    Methods inherited from class javafx.scene.Node

    +accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +

    Methods inherited from interface javafx.css.Styleable

    +getStyleableNode
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      cardWidth

      +
      public static double cardWidth
      +
      +
    • +
    • +
      +

      cardHeight

      +
      public static double cardHeight
      +
      +
    • +
    • +
      +

      cardBorderW

      +
      public static double cardBorderW
      +
      +
    • +
    • +
      +

      cardBorderH

      +
      public static double cardBorderH
      +
      +
    • +
    • +
      +

      takenSpots

      +
      public List<Pair<Integer,Integer>> takenSpots
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BoardPane

      +
      public BoardPane()
      +
      Constructor of BoardPane
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addCard

      +
      public void addCard(Pair<Integer,Integer> position, + PlayableCard card, + Side side)
      +
      Add a card to the board
      +
      +
      Parameters:
      +
      position - relative coordinates of the card
      +
      card - card to add
      +
      side - side of the card to add
      +
      +
      +
    • +
    • +
      +

      addCard

      +
      public CardView addCard(Pair<Integer,Integer> position, + InitialCard card, + Side side)
      +
      Add a card to the board
      +
      +
      Parameters:
      +
      position - relative coordinates of the card
      +
      card - card to add
      +
      side - side of the card to add
      +
      Returns:
      +
      the added CardView
      +
      +
      +
    • +
    • +
      +

      convertCoordinates

      +
      public Pair<Double,Double> convertCoordinates(Pair<Integer,Integer> coords)
      +
      Convert coordinates from game coordinate to JavaFX Board coordinates
      +
      +
      Parameters:
      +
      coords - coordinate to convert
      +
      Returns:
      +
      converted coordinates
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/CardView.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/CardView.html new file mode 100644 index 00000000..e1cf212d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/CardView.html @@ -0,0 +1,510 @@ + + + + +CardView (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CardView

+
+
java.lang.Object +
javafx.scene.Node +
javafx.scene.Parent +
javafx.scene.layout.Region +
javafx.scene.layout.Pane +
it.polimi.ingsw.client.frontend.gui.nodes.CardView
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
javafx.css.Styleable, javafx.event.EventTarget
+
+
+
public class CardView +extends javafx.scene.layout.Pane
+
+
+
    + +
  • +
    +

    Property Summary

    +
    +

    Properties inherited from class javafx.scene.layout.Region

    +background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
    +
    +

    Properties inherited from class javafx.scene.Parent

    +needsLayout
    +
    +

    Properties inherited from class javafx.scene.Node

    +accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    javafx.scene.layout.Pane
    + +
     
    +
    javafx.scene.layout.Pane
    + +
     
    +
    static double
    + +
     
    +
    static double
    + +
     
    +
    static double
    + +
     
    +
    static double
    + +
     
    +
    static String
    + +
    +
    Path to what to show when a card is missing
    +
    +
    static double
    + +
    +
    Pawn dimensions (at center of the initial card)
    +
    +
    javafx.scene.layout.Pane
    + +
     
    +
    javafx.scene.layout.Pane
    + +
     
    +
    +
    +

    Fields inherited from class javafx.scene.layout.Region

    +USE_COMPUTED_SIZE, USE_PREF_SIZE
    +
    +

    Fields inherited from class javafx.scene.Node

    +BASELINE_OFFSET_SAME_AS_HEIGHT
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Initialize an empty CardView
    +
    +
    CardView(InitialCard card, + Side side)
    +
    +
    Initialize a CardView of an Initial Card
    +
    +
    CardView(Objective card, + Side side)
    +
    +
    Initialize a CardView of an Objective Card
    +
    +
    CardView(PlayableCard card, + Side side)
    +
    +
    Initialize a CardView of a Playable Card
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    setArc(double arc)
    +
    +
    Set arcHeight and arcWidth of the card
    +
    +
    void
    +
    setCard(InitialCard card, + Side side)
    +
    +
    Change the displayed card
    +
    +
    void
    +
    setCard(Objective card, + Side side)
    +
    +
    Change the displayed card
    +
    +
    void
    +
    setCard(PlayableCard card, + Side side)
    +
    +
    Change the displayed card
    +
    +
    void
    + +
    +
    Change the displayed card to the back of a gold card
    +
    +
    void
    + +
    +
    Change the displayed card to the back of a resource card
    +
    +
    void
    +
    setToken(Color color)
    +
    +
    Display token of a color on the initial card
    +
    +
    +
    +
    +
    +

    Methods inherited from class javafx.scene.layout.Pane

    +getChildren
    +
    +

    Methods inherited from class javafx.scene.layout.Region

    +backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
    +
    +

    Methods inherited from class javafx.scene.Parent

    +getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, layoutChildren, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
    +
    +

    Methods inherited from class javafx.scene.Node

    +accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +

    Methods inherited from interface javafx.css.Styleable

    +getStyleableNode
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      cardWidth

      +
      public static double cardWidth
      +
      +
    • +
    • +
      +

      cardHeight

      +
      public static double cardHeight
      +
      +
    • +
    • +
      +

      cardBorderW

      +
      public static double cardBorderW
      +
      +
    • +
    • +
      +

      cardBorderH

      +
      public static double cardBorderH
      +
      +
    • +
    • +
      +

      tokenRadius

      +
      public static double tokenRadius
      +
      Pawn dimensions (at center of the initial card)
      +
      +
    • +
    • +
      +

      noCardPath

      +
      public static String noCardPath
      +
      Path to what to show when a card is missing
      +
      +
    • +
    • +
      +

      topLeftCorner

      +
      public javafx.scene.layout.Pane topLeftCorner
      +
      +
    • +
    • +
      +

      topRightCorner

      +
      public javafx.scene.layout.Pane topRightCorner
      +
      +
    • +
    • +
      +

      bottomLeftCorner

      +
      public javafx.scene.layout.Pane bottomLeftCorner
      +
      +
    • +
    • +
      +

      bottomRightCorner

      +
      public javafx.scene.layout.Pane bottomRightCorner
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CardView

      +
      public CardView()
      +
      Initialize an empty CardView
      +
      +
    • +
    • +
      +

      CardView

      +
      public CardView(InitialCard card, + Side side)
      +
      Initialize a CardView of an Initial Card
      +
      +
      Parameters:
      +
      card - initial card
      +
      side - side to show
      +
      +
      +
    • +
    • +
      +

      CardView

      +
      public CardView(PlayableCard card, + Side side)
      +
      Initialize a CardView of a Playable Card
      +
      +
      Parameters:
      +
      card - playable card
      +
      side - side to show
      +
      +
      +
    • +
    • +
      +

      CardView

      +
      public CardView(Objective card, + Side side)
      +
      Initialize a CardView of an Objective Card
      +
      +
      Parameters:
      +
      card - objective
      +
      side - side to show
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setCard

      +
      public void setCard(InitialCard card, + Side side)
      +
      Change the displayed card
      +
      +
      Parameters:
      +
      card - card to display
      +
      side - side of the card to display
      +
      +
      +
    • +
    • +
      +

      setCard

      +
      public void setCard(PlayableCard card, + Side side)
      +
      Change the displayed card
      +
      +
      Parameters:
      +
      card - card to display
      +
      side - side of the card to display
      +
      +
      +
    • +
    • +
      +

      setCard

      +
      public void setCard(Objective card, + Side side)
      +
      Change the displayed card
      +
      +
      Parameters:
      +
      card - card to display
      +
      side - side of the card to display
      +
      +
      +
    • +
    • +
      +

      setResourcesCardBack

      +
      public void setResourcesCardBack(Symbol reign)
      +
      Change the displayed card to the back of a resource card
      +
      +
      Parameters:
      +
      reign - reign to display
      +
      +
      +
    • +
    • +
      +

      setGoldsCardBack

      +
      public void setGoldsCardBack(Symbol reign)
      +
      Change the displayed card to the back of a gold card
      +
      +
      Parameters:
      +
      reign - reign to display
      +
      +
      +
    • +
    • +
      +

      setArc

      +
      public void setArc(double arc)
      +
      Set arcHeight and arcWidth of the card
      +
      +
      Parameters:
      +
      arc - arc width and height
      +
      +
      +
    • +
    • +
      +

      setToken

      +
      public void setToken(Color color)
      +
      Display token of a color on the initial card
      +
      +
      Parameters:
      +
      color - color of the token
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/PlateauPane.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/PlateauPane.html new file mode 100644 index 00000000..fc1c0c4f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/PlateauPane.html @@ -0,0 +1,296 @@ + + + + +PlateauPane (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PlateauPane

+
+
java.lang.Object +
javafx.scene.Node +
javafx.scene.Parent +
javafx.scene.layout.Region +
javafx.scene.layout.Pane +
it.polimi.ingsw.client.frontend.gui.nodes.PlateauPane
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
javafx.css.Styleable, javafx.event.EventTarget
+
+
+
public class PlateauPane +extends javafx.scene.layout.Pane
+
JavaFX node, Pane showing all the player pawns and points
+
+
+
    + +
  • +
    +

    Property Summary

    +
    +

    Properties inherited from class javafx.scene.layout.Region

    +background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
    +
    +

    Properties inherited from class javafx.scene.Parent

    +needsLayout
    +
    +

    Properties inherited from class javafx.scene.Node

    +accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static double
    + +
     
    +
    static double
    + +
     
    +
    +
    +

    Fields inherited from class javafx.scene.layout.Region

    +USE_COMPUTED_SIZE, USE_PREF_SIZE
    +
    +

    Fields inherited from class javafx.scene.Node

    +BASELINE_OFFSET_SAME_AS_HEIGHT
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Constructor of the node
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    setColor(String player, + Color color)
    +
    +
    Set the color of a player
    +
    +
    void
    +
    setPoints(String player, + int points)
    +
    +
    Set the amount of points of a player and move its pawn
    +
    +
    +
    +
    +
    +

    Methods inherited from class javafx.scene.layout.Pane

    +getChildren
    +
    +

    Methods inherited from class javafx.scene.layout.Region

    +backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
    +
    +

    Methods inherited from class javafx.scene.Parent

    +getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, layoutChildren, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
    +
    +

    Methods inherited from class javafx.scene.Node

    +accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +

    Methods inherited from interface javafx.css.Styleable

    +getStyleableNode
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      pawnSize

      +
      public static double pawnSize
      +
      +
    • +
    • +
      +

      positionOffset

      +
      public static double positionOffset
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PlateauPane

      +
      public PlateauPane()
      +
      Constructor of the node
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setColor

      +
      public void setColor(String player, + Color color)
      +
      Set the color of a player
      +
      +
      Parameters:
      +
      player - username of the player
      +
      color - color of the player's pawn
      +
      +
      +
    • +
    • +
      +

      setPoints

      +
      public void setPoints(String player, + int points)
      +
      Set the amount of points of a player and move its pawn
      +
      +
      Parameters:
      +
      player - username of the player
      +
      points - current number of points he has
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/class-use/BoardPane.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/class-use/BoardPane.html new file mode 100644 index 00000000..32c06277 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/class-use/BoardPane.html @@ -0,0 +1,89 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.nodes.BoardPane (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.nodes.BoardPane

+
+
Packages that use BoardPane
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/class-use/CardView.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/class-use/CardView.html new file mode 100644 index 00000000..19442ccf --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/class-use/CardView.html @@ -0,0 +1,128 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.nodes.CardView (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.nodes.CardView

+
+
Packages that use CardView
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/class-use/PlateauPane.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/class-use/PlateauPane.html new file mode 100644 index 00000000..d9b84d7c --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/class-use/PlateauPane.html @@ -0,0 +1,87 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.gui.nodes.PlateauPane (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.gui.nodes.PlateauPane

+
+
Packages that use PlateauPane
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/package-summary.html new file mode 100644 index 00000000..aa133797 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/package-summary.html @@ -0,0 +1,117 @@ + + + + +it.polimi.ingsw.client.frontend.gui.nodes (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.client.frontend.gui.nodes

+
+
+
package it.polimi.ingsw.client.frontend.gui.nodes
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/package-tree.html new file mode 100644 index 00000000..5eed5608 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/package-tree.html @@ -0,0 +1,94 @@ + + + + +it.polimi.ingsw.client.frontend.gui.nodes Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.client.frontend.gui.nodes

+
+Package Hierarchies: + +
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • javafx.scene.Node (implements javafx.event.EventTarget, javafx.css.Styleable) +
        +
      • javafx.scene.Parent +
          +
        • javafx.scene.layout.Region +
            +
          • javafx.scene.layout.Pane +
              +
            • it.polimi.ingsw.client.frontend.gui.nodes.BoardPane
            • +
            • it.polimi.ingsw.client.frontend.gui.nodes.CardView
            • +
            • it.polimi.ingsw.client.frontend.gui.nodes.PlateauPane
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/package-use.html new file mode 100644 index 00000000..db85097f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/nodes/package-use.html @@ -0,0 +1,105 @@ + + + + +Uses of Package it.polimi.ingsw.client.frontend.gui.nodes (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.client.frontend.gui.nodes

+
+ + +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/package-summary.html new file mode 100644 index 00000000..0a77bbe2 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/package-summary.html @@ -0,0 +1,119 @@ + + + + +it.polimi.ingsw.client.frontend.gui (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.client.frontend.gui

+
+
+
package it.polimi.ingsw.client.frontend.gui
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/package-tree.html new file mode 100644 index 00000000..1c54282f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/package-tree.html @@ -0,0 +1,85 @@ + + + + +it.polimi.ingsw.client.frontend.gui Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.client.frontend.gui

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/package-use.html new file mode 100644 index 00000000..097963af --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/gui/package-use.html @@ -0,0 +1,86 @@ + + + + +Uses of Package it.polimi.ingsw.client.frontend.gui (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.client.frontend.gui

+
+ + +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/package-summary.html new file mode 100644 index 00000000..8073ae0e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/package-summary.html @@ -0,0 +1,129 @@ + + + + +it.polimi.ingsw.client.frontend (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.client.frontend

+
+
+
package it.polimi.ingsw.client.frontend
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/package-tree.html new file mode 100644 index 00000000..7f5257ea --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/package-tree.html @@ -0,0 +1,106 @@ + + + + +it.polimi.ingsw.client.frontend Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.client.frontend

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+

Record Class Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/package-use.html new file mode 100644 index 00000000..26bfdb5f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/package-use.html @@ -0,0 +1,151 @@ + + + + +Uses of Package it.polimi.ingsw.client.frontend (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.client.frontend

+
+ + +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/BoardPosition.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/BoardPosition.html new file mode 100644 index 00000000..b4514caa --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/BoardPosition.html @@ -0,0 +1,283 @@ + + + + +BoardPosition (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Record Class BoardPosition

+
+
java.lang.Object +
java.lang.Record +
it.polimi.ingsw.client.frontend.tui.BoardPosition
+
+
+
+
+
Record Components:
+
isValid - Whether the position is a valid one or not
+
link - The anchor point for a valid position
+
+
+
public record BoardPosition(boolean isValid, Optional<Corner> link) +extends Record
+
Represents a position on the board, used to find valid positions and display anchor numbers when + a player must choose where to place the card.
+
+
See Also:
+
+ +
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    BoardPosition(boolean isValid, + Optional<Corner> link)
    +
    +
    Creates an instance of a BoardPosition record class.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    +
    boolean
    + +
    +
    Returns the value of the isValid record component.
    +
    + + +
    +
    Returns the value of the link record component.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BoardPosition

      +
      public BoardPosition(boolean isValid, + Optional<Corner> link)
      +
      Creates an instance of a BoardPosition record class.
      +
      +
      Parameters:
      +
      isValid - the value for the isValid record component
      +
      link - the value for the link record component
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      isValid

      +
      public boolean isValid()
      +
      Returns the value of the isValid record component.
      +
      +
      Returns:
      +
      the value of the isValid record component
      +
      +
      +
    • +
    • +
      +

      link

      +
      public Optional<Corner> link()
      +
      Returns the value of the link record component.
      +
      +
      Returns:
      +
      the value of the link record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/GraphicalViewTUI.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/GraphicalViewTUI.html new file mode 100644 index 00000000..4b40d8b7 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/GraphicalViewTUI.html @@ -0,0 +1,511 @@ + + + + +GraphicalViewTUI (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GraphicalViewTUI

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.GraphicalView +
it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+
+
+
+
+
public class GraphicalViewTUI +extends GraphicalView
+
Class that handles client game loop from TUI.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GraphicalViewTUI

      +
      public GraphicalViewTUI()
      +
      Class constructor. Starts the interface and creates all auxiliary objects.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setLastRequestStatus

      +
      public void setLastRequestStatus(RequestStatus status)
      +
      Sets the last request's status, eventually notifying all threads of the server's response.
      +
      +
      Overrides:
      +
      setLastRequestStatus in class GraphicalView
      +
      Parameters:
      +
      status - The last request's status
      +
      +
      +
    • +
    • +
      +

      someoneJoined

      +
      public void someoneJoined(String someoneUsername, + List<String> joinedPlayers)
      +
      Show the list of players in the match.
      +
      +
      Overrides:
      +
      someoneJoined in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - Last player who joined the match
      +
      joinedPlayers - List of all the other players
      +
      +
      +
    • +
    • +
      +

      giveInitialCard

      +
      public void giveInitialCard(InitialCard initialCard)
      +
      Asks the user which side he wants to play the initial card.
      +
      +
      Overrides:
      +
      giveInitialCard in class GraphicalView
      +
      Parameters:
      +
      initialCard - The initial card he drew
      +
      +
      +
    • +
    • +
      +

      giveSecretObjectives

      +
      public void giveSecretObjectives(Pair<Objective,Objective> secretObjectives)
      +
      Asks the user which secret objective he wants to keep between the random two given to him.
      +
      +
      Overrides:
      +
      giveSecretObjectives in class GraphicalView
      +
      Parameters:
      +
      secretObjectives - the pair of objectives the player has to choose from
      +
      +
      +
    • +
    • +
      +

      someoneChoseSecretObjective

      +
      public void someoneChoseSecretObjective(String someoneUsername)
      +
      Adds to the list of player with objectives the last player who chose his secret objective. + This is used to determine whether the player currently playing has already chosen secret + objective (and so should play a regular turn) or not.
      +
      +
      Overrides:
      +
      someoneChoseSecretObjective in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - the username of the last player who chose secret objective
      +
      +
      +
    • +
    • +
      +

      changePlayer

      +
      public void changePlayer()
      +
      Notifies all players (but the current one) that someone is playing their turn.
      +
      +
      Specified by:
      +
      changePlayer in class GraphicalView
      +
      +
      +
    • +
    • +
      +

      makeMove

      +
      public void makeMove()
      +
      Ask a player to choose a card to play, the side on which the card should be played, and the + coordinates in which the card should be played; finally trying to actually play the card.
      +
      +
      Specified by:
      +
      makeMove in class GraphicalView
      +
      +
      +
    • +
    • +
      +

      someonePlayedCard

      +
      public void someonePlayedCard(String someoneUsername, + Pair<Integer,Integer> coords, + PlayableCard card, + Side side, + int points, + Map<Symbol,Integer> availableResources)
      +
      Notifies all players that someone played a card, and updates the relative player's board.
      +
      +
      Overrides:
      +
      someonePlayedCard in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - The player that played the card
      +
      coords - The chosen coordinates
      +
      card - The chosen played card
      +
      side - The chosen side
      +
      points - The points of that player
      +
      availableResources - The resources of that player
      +
      +
      +
    • +
    • +
      +

      someoneQuit

      +
      public void someoneQuit(String someoneUsername)
      +
      Notifies everyone else that a player left.
      +
      +
      Specified by:
      +
      someoneQuit in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - Player's username
      +
      +
      +
    • +
    • +
      +

      matchFinished

      +
      public void matchFinished(List<LeaderboardEntry> ranking)
      +
      Shows whether the current player won or lost.
      +
      +
      Specified by:
      +
      matchFinished in class GraphicalView
      +
      Parameters:
      +
      ranking - Match ranking
      +
      +
      +
    • +
    • +
      +

      notifyError

      +
      public void notifyError(Exception exception)
      +
      Sets the last error message to what the server responded.
      +
      +
      Overrides:
      +
      notifyError in class GraphicalView
      +
      Parameters:
      +
      exception - The thrown exception
      +
      +
      +
    • +
    • +
      +

      notifyMatchStarted

      +
      protected void notifyMatchStarted()
      +
      Notifies that the match has started.
      +
      +
      Specified by:
      +
      notifyMatchStarted in class GraphicalView
      +
      +
      +
    • +
    • +
      +

      notifyMatchResumed

      +
      protected void notifyMatchResumed(boolean drawPhase)
      +
      Notifies that the player correctly rejoined a match, and makes him play his turn.
      +
      +
      Specified by:
      +
      notifyMatchResumed in class GraphicalView
      +
      Parameters:
      +
      drawPhase - whether the player should draw or play
      +
      +
      +
    • +
    • +
      +

      someoneSentPrivateText

      +
      public void someoneSentPrivateText(String someoneUsername, + String text)
      +
      Adds to the chat a broadcast text.
      +
      +
      Overrides:
      +
      someoneSentPrivateText in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - The player who sent the broadcast
      +
      text - The sent text
      +
      +
      +
    • +
    • +
      +

      someoneSentBroadcastText

      +
      public void someoneSentBroadcastText(String someoneUsername, + String text)
      +
      Adds to the chat a private text.
      +
      +
      Overrides:
      +
      someoneSentBroadcastText in class GraphicalView
      +
      Parameters:
      +
      someoneUsername - The player who sent the private text
      +
      text - The sent text
      +
      +
      +
    • +
    • +
      +

      notifyConnectionLost

      +
      public void notifyConnectionLost()
      +
      Notifies that there has been a connection error. We only care about server crashes, but it + could be anything
      +
      +
      Specified by:
      +
      notifyConnectionLost in class GraphicalView
      +
      +
      +
    • +
    • +
      +

      main

      +
      public static void main(String[] args)
      +
      Launch the TUI client
      +
      +
      Parameters:
      +
      args - command line arguments
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/InputHandler.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/InputHandler.html new file mode 100644 index 00000000..b09a308a --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/InputHandler.html @@ -0,0 +1,236 @@ + + + + +InputHandler (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InputHandler

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.tui.InputHandler
+
+
+
+
public class InputHandler +extends Object
+
Class that handles the prompt and gets the user input
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InputHandler

      +
      public InputHandler(TuiPrinter printer)
      +
      Class constructor.
      +
      +
      Parameters:
      +
      printer - The actual printer
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setPrompt

      +
      public void setPrompt(String prompt)
      +
      Sets the current prompt, without displaying it.
      +
      +
      Parameters:
      +
      prompt - The new value
      +
      +
      +
    • +
    • +
      +

      getNextLine

      +
      public String getNextLine()
      +
      Gets the next user input.
      +
      +
      Returns:
      +
      The next user input
      +
      +
      +
    • +
    • +
      +

      showPrompt

      +
      public void showPrompt()
      +
      Shows the current prompt.
      +
      +
    • +
    • +
      +

      askUser

      +
      public String askUser()
      +
      Flushes stdin, prints prompt and then gets the user input.
      +
      +
      Returns:
      +
      The user input
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/PlayerControls.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/PlayerControls.html new file mode 100644 index 00000000..05c417ee --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/PlayerControls.html @@ -0,0 +1,209 @@ + + + + +PlayerControls (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PlayerControls

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.tui.PlayerControls
+
+
+
+
public class PlayerControls +extends Object
+
Class used to synchronyze methods that should be ran only during other player's turns.
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Class constructor.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Disables the player's controls.
    +
    +
    void
    + +
    +
    Enables player's custom controls, and notifies all threads synchronized on this object.
    +
    +
    boolean
    + +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PlayerControls

      +
      public PlayerControls()
      +
      Class constructor. Starts disabled.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      isEnabled

      +
      public boolean isEnabled()
      +
      +
      Returns:
      +
      Whether the player's custom controls are enabled or not.
      +
      +
      +
    • +
    • +
      +

      enable

      +
      public void enable()
      +
      Enables player's custom controls, and notifies all threads synchronized on this object.
      +
      +
    • +
    • +
      +

      disable

      +
      public void disable()
      +
      Disables the player's controls.
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/TuiPrinter.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/TuiPrinter.html new file mode 100644 index 00000000..be258837 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/TuiPrinter.html @@ -0,0 +1,623 @@ + + + + +TuiPrinter (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TuiPrinter

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.tui.TuiPrinter
+
+
+
+
public class TuiPrinter +extends Object
+
Class that handles the actual printing to the terminal.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TuiPrinter

      +
      public TuiPrinter() + throws IOException
      +
      Class constructor, it creates auxiliary objects to communicate with the terminal and the card + parser.
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      printCard

      +
      public void printCard(ShownCard card)
      +
      Shows a card on the terminal
      +
      +
      Parameters:
      +
      card - Record containing the card and its coordinates
      +
      +
      +
    • +
    • +
      +

      clearTerminal

      +
      public void clearTerminal()
      +
      Clears the terminal.
      +
      +
    • +
    • +
      +

      printPrompt

      +
      public void printPrompt(String customMessage)
      +
      Prints the command prompt.
      +
      +
    • +
    • +
      +

      printMessages

      +
      public void printMessages(List<String> messages)
      +
      Prints a list of Strings to the terminal, first element of first line, last element on last + line.
      +
      +
      Parameters:
      +
      messages - List of messages to display
      +
      +
      +
    • +
    • +
      +

      printListReverse

      +
      public void printListReverse(List<String> message)
      +
      Prints a list of Strings to the terminal, first element on last line, last element of first + line.
      +
      +
      Parameters:
      +
      message - List of messages to display
      +
      +
      +
    • +
    • +
      +

      printMessage

      +
      public void printMessage(String string)
      +
      Prints a message in the line above the prompt.
      +
      +
      Parameters:
      +
      string - The message to print
      +
      +
      +
    • +
    • +
      +

      printAvailableResources

      +
      public void printAvailableResources(Map<Symbol,Integer> availableResources, + Integer verticalOffset)
      +
      Prints all the players' available resources (from the board).
      +
      +
      Parameters:
      +
      availableResources - map from the type of resource (Symbol) to its quantity (Integer)
      +
      verticalOffset - offset lines from the top (default is 1)
      +
      +
      +
    • +
    • +
      +

      printPlayerBoard

      +
      public void printPlayerBoard(String username, + ClientBoard board)
      +
      Prints the whole board, including username, points and resources.
      +
      +
      Parameters:
      +
      username - The username to print
      +
      board - the board to be printed
      +
      +
      +
    • +
    • +
      +

      printHand

      +
      public void printHand(String username, + Color color, + List<PlayableCard> hand)
      +
      Prints the hand of the player, which includes the 3 available-to-play cards.
      +
      +
      Parameters:
      +
      username - username of the player
      +
      color - color of the player's token
      +
      hand - list of cards (as IDs)
      +
      +
      +
    • +
    • +
      +

      printObjectives

      +
      public void printObjectives(String username, + Color color, + Objective secret, + Pair<Objective,Objective> visibles)
      +
      Prints the objectives, both common and secret, of a given player.
      +
      +
      Parameters:
      +
      username - username of the player
      +
      color - color of the player's token
      +
      secret - secret objective (as ID)
      +
      visibles - array of common objectives (as IDs)
      +
      +
      +
    • +
    • +
      +

      printObjectivePair

      +
      public void printObjectivePair(String message, + Pair<Objective,Objective> pairObjectives, + int heightOffset)
      +
      Prints a pair of objectives, with a brief description above them.
      +
      +
      Parameters:
      +
      pairObjectives - pair of objectives
      +
      heightOffset - offset lines from the top (default is 1)
      +
      +
      +
    • +
    • +
      +

      printChat

      +
      public void printChat(List<String> chat)
      +
      Prints the message history of the most recent messages.
      +
      +
      Parameters:
      +
      chat - chat object, as a list of strings
      +
      +
      +
    • +
    • +
      +

      printWelcomeScreen

      +
      public void printWelcomeScreen()
      +
      Prints the welcome screen in the middle of the tui view.
      +
      +
    • +
    • +
      +

      printEndScreen

      +
      public void printEndScreen(List<LeaderboardEntry> ranking, + String username)
      +
      Prints the game's ranking.
      +
      +
      Parameters:
      +
      ranking - The Leaderboard
      +
      username - The player's username, used to highlight your rank
      +
      +
      +
    • +
    • +
      +

      printInitialSideBySide

      +
      public void printInitialSideBySide(InitialCard initialCard, + int heightOffset)
      +
      Prints the specified initial card front and back in the middle of the screen.
      +
      +
      Parameters:
      +
      initialCard - initial card to print
      +
      heightOffset - offset lines from the top (default is 1)
      +
      +
      +
    • +
    • +
      +

      printPlayableFrontAndBack

      +
      public void printPlayableFrontAndBack(PlayableCard playableCard, + int heightOffset)
      +
      Prints the specified initial card front and back in the middle of the screen.
      +
      +
      Parameters:
      +
      playableCard - gold/resource card to print
      +
      heightOffset - offset lines from the top. For default (y-centered) must be 0
      +
      +
      +
    • +
    • +
      +

      printCenteredMessage

      +
      public void printCenteredMessage(String message, + int heightOffset)
      +
      Prints a one-line message in the center of the screen.
      +
      +
      Parameters:
      +
      message - message to display
      +
      heightOffset - offset lines from the top. For default (y-centered) must be 0
      +
      +
      +
    • +
    • +
      +

      printDrawingScreen

      +
      public void printDrawingScreen(Pair<Symbol,Symbol> decksTopReign, + Map<DrawSource,PlayableCard> visiblePlayableCards)
      +
      Prints the drawing screen, containing the 2 decks and the 4 visible cards. Unavailable + resources are not displayed.
      +
      +
      Parameters:
      +
      decksTopReign - pair of the 2 top-deck cards
      +
      visiblePlayableCards - map of visible cards
      +
      +
      +
    • +
    • +
      +

      printMatchesLobby

      +
      public void printMatchesLobby(List<AvailableMatch> joinableMatches, + List<AvailableMatch> unavailableMatches, + int heightOffset)
      +
      Prints the list of matches (joinable or not) in the center of the screen. It can print a + maximum of 99 matches.
      +
      +
      Parameters:
      +
      joinableMatches - list of available matches
      +
      unavailableMatches - list of not joinable matches
      +
      heightOffset - offset lines from the top (default is 1)
      +
      +
      +
    • +
    • +
      +

      printScoreboard

      +
      public void printScoreboard(Map<String,Integer> playerToPoints, + int heightOffset)
      +
      Prints the scoreboard at the end of the match.
      +
      +
      Parameters:
      +
      playerToPoints - map from player name as string, to total points as integer
      +
      heightOffset - offset lines from the top (default is 1)
      +
      +
      +
    • +
    • +
      +

      printHandAtBottom

      +
      public void printHandAtBottom(List<PlayableCard> hand)
      +
      Prints the hand of the player at the bottom of the screen.
      +
      +
      Parameters:
      +
      hand - list of the 3 playable cards (hand)
      +
      +
      +
    • +
    • +
      +

      printStringsBoxed

      +
      public void printStringsBoxed(List<String> stringList, + String msg, + Color textColor, + Boolean isCentered)
      +
      Prints a list of strings with a box around them.
      +
      +
      Parameters:
      +
      stringList - list of strings
      +
      msg - message to display
      +
      textColor - color of the players' name (red or green)
      +
      isCentered - if the list has to be centered in the tui or not
      +
      +
      +
    • +
    • +
      +

      printSimpleList

      +
      public void printSimpleList(List<String> stringList, + Boolean isCentered, + Boolean isNumbered)
      +
      Prints a list, simple or numbered, either in the center or in the bottom left of the tui.
      +
      +
      Parameters:
      +
      stringList - list of strings
      +
      isCentered - if you want it centered or not
      +
      isNumbered - if you want it numbered or not
      +
      +
      +
    • +
    • +
      +

      printValidPlaces

      +
      public void printValidPlaces(Map<Pair<Integer,Integer>,Pair<Integer,Corner>> validPlaces)
      +
      Prints indexes for available spots, during the placing card phase.
      +
      +
      Parameters:
      +
      validPlaces - map FROM board's coordinates where the hypotetic card would be TO a pair, + consisting of a number (the index) and the corner where future card would be linked
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/ValidPositions.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/ValidPositions.html new file mode 100644 index 00000000..e54fb080 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/ValidPositions.html @@ -0,0 +1,222 @@ + + + + +ValidPositions (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ValidPositions

+
+
java.lang.Object +
it.polimi.ingsw.client.frontend.tui.ValidPositions
+
+
+
+
public class ValidPositions +extends Object
+
Valid positions of a board, ie all the points a new card can be linked to
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ValidPositions

      +
      public ValidPositions()
      +
      Class constructor.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      isValid

      +
      public boolean isValid(Pair<Integer,Integer> coord)
      +
      Checks if a coordinate is a valid link point.
      +
      +
      Parameters:
      +
      coord - The coordinate to check
      +
      Returns:
      +
      whether the coordinate is a valid link point or not
      +
      +
      +
    • +
    • +
      +

      getValidPlaces

      +
      public Map<Pair<Integer,Integer>,Pair<Integer,Corner>> getValidPlaces()
      +
      Gets all the valid linking points.
      +
      +
      Returns:
      +
      A map from coordinate to anchor's corner and linking point's index
      +
      +
      +
    • +
    • +
      +

      addCard

      +
      public void addCard(ShownCard card)
      +
      Adds a card, updating all the valid linking points.
      +
      +
      Parameters:
      +
      card - The added card
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/BoardPosition.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/BoardPosition.html new file mode 100644 index 00000000..dac9ad0e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/BoardPosition.html @@ -0,0 +1,62 @@ + + + + +Uses of Record Class it.polimi.ingsw.client.frontend.tui.BoardPosition (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Record Class
it.polimi.ingsw.client.frontend.tui.BoardPosition

+
+No usage of it.polimi.ingsw.client.frontend.tui.BoardPosition
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/GraphicalViewTUI.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/GraphicalViewTUI.html new file mode 100644 index 00000000..d361a26d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/GraphicalViewTUI.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI

+
+No usage of it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/InputHandler.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/InputHandler.html new file mode 100644 index 00000000..1883db0f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/InputHandler.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.tui.InputHandler (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.tui.InputHandler

+
+No usage of it.polimi.ingsw.client.frontend.tui.InputHandler
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/PlayerControls.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/PlayerControls.html new file mode 100644 index 00000000..b7dbffc5 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/PlayerControls.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.tui.PlayerControls (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.tui.PlayerControls

+
+No usage of it.polimi.ingsw.client.frontend.tui.PlayerControls
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/TuiPrinter.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/TuiPrinter.html new file mode 100644 index 00000000..24195f1e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/TuiPrinter.html @@ -0,0 +1,89 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.tui.TuiPrinter (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.tui.TuiPrinter

+
+
Packages that use TuiPrinter
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/ValidPositions.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/ValidPositions.html new file mode 100644 index 00000000..27aa164b --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/class-use/ValidPositions.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.client.frontend.tui.ValidPositions (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.frontend.tui.ValidPositions

+
+No usage of it.polimi.ingsw.client.frontend.tui.ValidPositions
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/package-summary.html new file mode 100644 index 00000000..c1a579a2 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/package-summary.html @@ -0,0 +1,134 @@ + + + + +it.polimi.ingsw.client.frontend.tui (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.client.frontend.tui

+
+
+
package it.polimi.ingsw.client.frontend.tui
+
+
    +
  • + +
  • +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    Represents a position on the board, used to find valid positions and display anchor numbers when + a player must choose where to place the card.
    +
    + +
    +
    Class that handles client game loop from TUI.
    +
    + +
    +
    Class that handles the prompt and gets the user input
    +
    + +
    +
    Class used to synchronyze methods that should be ran only during other player's turns.
    +
    + +
    +
    Class that handles the actual printing to the terminal.
    +
    + +
    +
    Valid positions of a board, ie all the points a new card can be linked to
    +
    +
    +
    +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/package-tree.html new file mode 100644 index 00000000..449ae46d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/package-tree.html @@ -0,0 +1,98 @@ + + + + +it.polimi.ingsw.client.frontend.tui Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.client.frontend.tui

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+

Record Class Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/package-use.html new file mode 100644 index 00000000..956b45b6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/frontend/tui/package-use.html @@ -0,0 +1,86 @@ + + + + +Uses of Package it.polimi.ingsw.client.frontend.tui (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.client.frontend.tui

+
+ +
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/network/NetworkHandler.html b/deliveries/Javadoc/it/polimi/ingsw/client/network/NetworkHandler.html new file mode 100644 index 00000000..88f5c31f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/network/NetworkHandler.html @@ -0,0 +1,890 @@ + + + + +NetworkHandler (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NetworkHandler

+
+
java.lang.Object +
it.polimi.ingsw.client.network.NetworkHandler
+
+
+
+
All Implemented Interfaces:
+
RemoteViewInterface, Remote
+
+
+
Direct Known Subclasses:
+
NetworkHandlerRMI, NetworkHandlerTCP
+
+
+
public abstract class NetworkHandler +extends Object +implements RemoteViewInterface
+
Class used by a generic client to receive from and transmit to a remote Server instance and a + remote PlayerController instance. + It represents an abstract layer, being implemented by: NetworkHandlerRMI and NetworkHandlerTCP.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      graphicalView

      +
      protected final GraphicalView graphicalView
      +
      +
    • +
    • +
      +

      username

      +
      protected String username
      +
      +
    • +
    • +
      +

      ipAddress

      +
      protected final String ipAddress
      +
      +
    • +
    • +
      +

      port

      +
      protected final int port
      +
      +
    • +
    • +
      +

      connected

      +
      protected boolean connected
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NetworkHandler

      +
      public NetworkHandler(GraphicalView graphicalView, + String ipAddress, + int port)
      +
      Initialize the instance all its internal attributes.
      +
      +
      Parameters:
      +
      graphicalView - The GraphicalView to be subscribed to this NetworkHandler instance
      +
      ipAddress - The server IP address
      +
      port - The server port
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      startConnectionCheck

      +
      public void startConnectionCheck()
      +
      Periodically check the connection status
      +
      +
    • +
    • +
      +

      setUsername

      +
      public void setUsername(String username)
      +
      Sets the player's username.
      +
      +
      Parameters:
      +
      username - The player's username
      +
      +
      +
    • +
    • +
      +

      getAvailableMatches

      +
      public abstract void getAvailableMatches()
      +
      Asks the server to send a list of AvailableMatch
      +
      +
    • +
    • +
      +

      ping

      +
      public abstract boolean ping()
      +
      Checks for connectivity.
      +
      +
      Returns:
      +
      The status of the connection, true if active, false otherwise
      +
      +
      +
    • +
    • +
      +

      createMatch

      +
      public abstract void createMatch(String matchName, + Integer maxPlayers)
      +
      Asks to create a match.
      +
      +
      Parameters:
      +
      matchName - The match name
      +
      maxPlayers - The match maximum number of players
      +
      +
      +
    • +
    • +
      +

      joinMatch

      +
      public abstract void joinMatch(String matchName)
      +
      Asks to join a match.
      +
      +
      Parameters:
      +
      matchName - the match's name
      +
      +
      +
    • +
    • +
      +

      drawInitialCard

      +
      public abstract void drawInitialCard()
      +
      Draws an initial card for the player.
      +
      +
    • +
    • +
      +

      chooseInitialCardSide

      +
      public abstract void chooseInitialCardSide(Side side)
      +
      Communicates the chosen initial card side.
      +
      +
      Parameters:
      +
      side - The side on which play the initial card drawn using drawInitialCard()
      +
      +
      +
    • +
    • +
      +

      drawSecretObjectives

      +
      public abstract void drawSecretObjectives()
      +
      Draws two secret objectives.
      +
      +
    • +
    • +
      +

      chooseSecretObjective

      +
      public abstract void chooseSecretObjective(Objective objective)
      +
      Communicates the chosen secret objective.
      +
      +
      Parameters:
      +
      objective - The chosen objective
      +
      +
      +
    • +
    • +
      +

      playCard

      +
      public abstract void playCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
      +
      Plays a card.
      +
      +
      Parameters:
      +
      coords - The coordinates on which to place the card
      +
      card - The PlayableCard to play
      +
      side - The side on which to play the chosen card
      +
      +
      +
    • +
    • +
      +

      drawCard

      +
      public abstract void drawCard(DrawSource source)
      +
      Draws a card.
      +
      +
      Parameters:
      +
      source - The drawing source to draw the card from
      +
      +
      +
    • +
    • +
      +

      isConnected

      +
      public boolean isConnected()
      +
      Getter for the connection status.
      +
      +
      Returns:
      +
      True if connected, false otherwise
      +
      +
      +
    • +
    • +
      +

      sendBroadcastText

      +
      public abstract void sendBroadcastText(String text)
      +
      Sends a message to all the match players
      +
      +
      Parameters:
      +
      text - The content of the message
      +
      +
      +
    • +
    • +
      +

      sendPrivateText

      +
      public abstract void sendPrivateText(String recipient, + String text)
      +
      Sends a private message to a match player
      +
      +
      Parameters:
      +
      recipient - The recipient username
      +
      text - The content of the message
      +
      +
      +
    • +
    • +
      +

      disconnect

      +
      public abstract void disconnect()
      +
      Disconnects from the server.
      +
      +
    • +
    • +
      +

      receiveAvailableMatches

      +
      public void receiveAvailableMatches(List<AvailableMatch> availableMatches)
      +
      Receives the currently available matches.
      +
      +
      Specified by:
      +
      receiveAvailableMatches in interface RemoteViewInterface
      +
      Parameters:
      +
      availableMatches - The available matches
      +
      +
      +
    • +
    • +
      +

      matchStarted

      +
      public void matchStarted(Map<String,Color> playersUsernamesAndPawns, + Map<String,List<PlayableCard>> playersHands, + Pair<Objective,Objective> visibleObjectives, + Map<DrawSource,PlayableCard> visiblePlayableCards, + Pair<Symbol,Symbol> decksTopReigns)
      +
      Notifies that the match has just started. + Furthermore, gives to the receiving object all the information (parameters) needed to show to the current match + state.
      +
      +
      Specified by:
      +
      matchStarted in interface RemoteViewInterface
      +
      Parameters:
      +
      playersUsernamesAndPawns - Map that matches each pawn color to the corresponding player's username
      +
      playersHands - Map that matches each player's username to the corresponding List of cards in the hand
      +
      visibleObjectives - Pair of objectives visible to all players
      +
      visiblePlayableCards - Map having as values the visible common cards (the keys are just indexes).
      +
      decksTopReigns - Pair of reign symbols representing the two visible reigns symbols on top of the two decks; + the first one is the gold deck one, the second one the resource deck one
      +
      +
      +
    • +
    • +
      +

      matchResumed

      +
      public void matchResumed(Map<String,Color> playersUsernamesAndPawns, + Map<String,List<PlayableCard>> playersHands, + Pair<Objective,Objective> visibleObjectives, + Map<DrawSource,PlayableCard> visiblePlayableCards, + Pair<Symbol,Symbol> decksTopReigns, + Objective secretObjective, + Map<String,Map<Symbol,Integer>> availableResources, + Map<String,Map<Pair<Integer,Integer>,PlacedCard>> placedCards, + Map<String,Integer> playerPoints, + String currentPlayer, + boolean drawPhase)
      +
      Notifies that the match has resumed. + Furthermore, gives to the receiving object all the information (parameters) needed to show to the current match + state.
      +
      +
      Specified by:
      +
      matchResumed in interface RemoteViewInterface
      +
      Parameters:
      +
      playersUsernamesAndPawns - Map that matches each pawn color to the corresponding player's username
      +
      playersHands - Map that matches each player's username to the corresponding List of cards in the hand
      +
      visibleObjectives - Pair of objectives visible to all players
      +
      visiblePlayableCards - Map having as values the visible common cards (the keys are just indexes).
      +
      decksTopReigns - Pair of reign symbols representing the two visible reigns symbols on top of the two decks; + the first one is the gold deck one, the second one the resource deck one
      +
      secretObjective - Secret objective of the current player
      +
      availableResources - Available resources of all the players
      +
      placedCards - Placed cards of all the players
      +
      playerPoints - Points of all the players
      +
      currentPlayer - The current player
      +
      drawPhase - If the match is resumed in draw phase
      +
      +
      +
    • +
    • +
      +

      giveInitialCard

      +
      public void giveInitialCard(InitialCard initialCard)
      +
      Gives to the receiving graphical view (the client) its initial card.
      +
      +
      Specified by:
      +
      giveInitialCard in interface RemoteViewInterface
      +
      Parameters:
      +
      initialCard - The initial card to be given
      +
      +
      +
    • +
    • +
      +

      giveSecretObjectives

      +
      public void giveSecretObjectives(Pair<Objective,Objective> secretObjectives)
      +
      Gives to the remote object a pair of secret objectives to show them in the view and to choose one from them.
      +
      +
      Specified by:
      +
      giveSecretObjectives in interface RemoteViewInterface
      +
      Parameters:
      +
      secretObjectives - Pair of secret objectives to give
      +
      +
      +
    • +
    • +
      +

      someoneDrewInitialCard

      +
      public void someoneDrewInitialCard(String someoneUsername, + InitialCard card)
      +
      Notifies that someone (it may or may not be the receiving View instance) has drawn its initial card.
      +
      +
      Specified by:
      +
      someoneDrewInitialCard in interface RemoteViewInterface
      +
      Parameters:
      +
      someoneUsername - The username of the player who has drawn the card
      +
      card - The card drawn
      +
      +
      +
    • +
    • +
      +

      someoneSetInitialSide

      +
      public void someoneSetInitialSide(String someoneUsername, + Side side, + Map<Symbol,Integer> availableResources)
      +
      Notifies that someone (it may or may not be the receiving View instance) has decided (then set) its initial card side.
      +
      +
      Specified by:
      +
      someoneSetInitialSide in interface RemoteViewInterface
      +
      Parameters:
      +
      someoneUsername - The username of the player who has set the initial card side
      +
      side - The chosen side
      +
      availableResources - The current available resources of the player having someoneUsername as username
      +
      +
      +
    • +
    • +
      +

      someoneDrewSecretObjective

      +
      public void someoneDrewSecretObjective(String someoneUsername)
      +
      Notifies that someone (it may or may not be the receiving View instance) has drawn a pair of secret objectives. + Mind that the objectives are not passed as arguments, since they are secret to all players but the one receiving + them. The one meant to receive them receives this message too but obtain the objectives through the + giveSecretObjective() method.
      +
      +
      Specified by:
      +
      someoneDrewSecretObjective in interface RemoteViewInterface
      +
      Parameters:
      +
      someoneUsername - The username of the player who has drawn the card
      +
      +
      +
    • +
    • +
      +

      someoneChoseSecretObjective

      +
      public void someoneChoseSecretObjective(String someoneUsername)
      +
      Notifies that someone (it may or may not be the receiving View instance) has chosen theirs secret objective.
      +
      +
      Specified by:
      +
      someoneChoseSecretObjective in interface RemoteViewInterface
      +
      Parameters:
      +
      someoneUsername - The username of the player who has chosen theirs secret objective
      +
      +
      +
    • +
    • +
      +

      someonePlayedCard

      +
      public void someonePlayedCard(String someoneUsername, + Pair<Integer,Integer> coords, + PlayableCard card, + Side side, + int points, + Map<Symbol,Integer> availableResources)
      +
      Notifies that someone (it may or may not be the receiving View instance) has played a card.
      +
      +
      Specified by:
      +
      someonePlayedCard in interface RemoteViewInterface
      +
      Parameters:
      +
      someoneUsername - The username of the player who has played a card
      +
      coords - The coordinates where the card has been placed as a Pair of int
      +
      card - The card that has been played
      +
      side - The side on which the card has been played
      +
      points - The points of the player who played a card
      +
      availableResources - The current available resources of the player who played a card
      +
      +
      +
    • +
    • +
      +

      someoneDrewCard

      +
      public void someoneDrewCard(String someoneUsername, + DrawSource source, + PlayableCard card, + PlayableCard replacementCard, + Pair<Symbol,Symbol> deckTopReigns)
      +
      Notifies that someone (it may or may not be the receiving View instance) has drawn a card.
      +
      +
      Specified by:
      +
      someoneDrewCard in interface RemoteViewInterface
      +
      Parameters:
      +
      someoneUsername - The username of the player who has played a card
      +
      source - The DrawSource from which the card has been drawn
      +
      card - The card that has been drawn
      +
      replacementCard - The card that replaced the drawn one
      +
      deckTopReigns - The decks top reigns
      +
      +
      +
    • +
    • +
      +

      someoneJoined

      +
      public void someoneJoined(String someoneUsername, + List<String> joinedPlayers)
      +
      Notifies that a player has joined the match.
      +
      +
      Specified by:
      +
      someoneJoined in interface RemoteViewInterface
      +
      Parameters:
      +
      someoneUsername - The username of the player who has joined
      +
      joinedPlayers - The players currently in the match
      +
      +
      +
    • +
    • +
      +

      someoneQuit

      +
      public void someoneQuit(String someoneUsername)
      +
      Notifies that a player has quit from the match.
      +
      +
      Specified by:
      +
      someoneQuit in interface RemoteViewInterface
      +
      Parameters:
      +
      someoneUsername - The username of the player who has quit
      +
      +
      +
    • +
    • +
      +

      matchFinished

      +
      public void matchFinished(List<LeaderboardEntry> ranking)
      +
      Notifies that the match has just finished.
      +
      +
      Specified by:
      +
      matchFinished in interface RemoteViewInterface
      +
      Parameters:
      +
      ranking - The match final ranking
      +
      +
      +
    • +
    • +
      +

      someoneSentBroadcastText

      +
      public void someoneSentBroadcastText(String someoneUsername, + String text)
      +
      Notifies that a new message in the global chat is sent
      +
      +
      Specified by:
      +
      someoneSentBroadcastText in interface RemoteViewInterface
      +
      Parameters:
      +
      someoneUsername - Username of the user that sent the message
      +
      text - Content of the message
      +
      +
      +
    • +
    • +
      +

      someoneSentPrivateText

      +
      public void someoneSentPrivateText(String someoneUsername, + String text)
      +
      Notifies that a new private message is sent in private chat to the current user
      +
      +
      Specified by:
      +
      someoneSentPrivateText in interface RemoteViewInterface
      +
      Parameters:
      +
      someoneUsername - Username of the user that sent the message
      +
      text - Content of the message
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/network/NetworkHandlerRMI.html b/deliveries/Javadoc/it/polimi/ingsw/client/network/NetworkHandlerRMI.html new file mode 100644 index 00000000..cdf6011f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/network/NetworkHandlerRMI.html @@ -0,0 +1,442 @@ + + + + +NetworkHandlerRMI (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NetworkHandlerRMI

+
+
java.lang.Object +
it.polimi.ingsw.client.network.NetworkHandler +
it.polimi.ingsw.client.network.NetworkHandlerRMI
+
+
+
+
+
All Implemented Interfaces:
+
RemoteViewInterface, Remote
+
+
+
public class NetworkHandlerRMI +extends NetworkHandler
+
Class used by a generic client to receive from and transmit to a remote Server instance and a + remote PlayerControllerRMI instance using the RMI protocol.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NetworkHandlerRMI

      +
      public NetworkHandlerRMI(GraphicalView graphicalView, + String ipAddress, + int port) + throws RemoteException
      +
      Initialize the instance all its internal attributes.
      +
      +
      Parameters:
      +
      graphicalView - The GraphicalView to be subscribed to this NetworkHandler instance
      +
      ipAddress - The server IP address
      +
      port - The server port
      +
      Throws:
      +
      RemoteException - If the remote server is considered not reachable any more and cannot return as usual
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAvailableMatches

      +
      public void getAvailableMatches()
      +
      Asks the server to send a list of AvailableMatch.
      +
      +
      Specified by:
      +
      getAvailableMatches in class NetworkHandler
      +
      +
      +
    • +
    • +
      +

      joinMatch

      +
      public void joinMatch(String matchName)
      +
      Asks to join a match.
      +
      +
      Specified by:
      +
      joinMatch in class NetworkHandler
      +
      Parameters:
      +
      matchName - the match's name
      +
      +
      +
    • +
    • +
      +

      createMatch

      +
      public void createMatch(String matchName, + Integer maxPlayers)
      +
      Asks to create a match.
      +
      +
      Specified by:
      +
      createMatch in class NetworkHandler
      +
      Parameters:
      +
      matchName - The match name
      +
      maxPlayers - The match maximum number of players
      +
      +
      +
    • +
    • +
      +

      drawInitialCard

      +
      public void drawInitialCard()
      +
      Draws an initial card for the player.
      +
      +
      Specified by:
      +
      drawInitialCard in class NetworkHandler
      +
      +
      +
    • +
    • +
      +

      chooseInitialCardSide

      +
      public void chooseInitialCardSide(Side side)
      +
      Communicates the chosen initial card side.
      +
      +
      Specified by:
      +
      chooseInitialCardSide in class NetworkHandler
      +
      Parameters:
      +
      side - The side on which play the initial card drawn using drawInitialCard()
      +
      +
      +
    • +
    • +
      +

      drawSecretObjectives

      +
      public void drawSecretObjectives()
      +
      Draws two secret objectives.
      +
      +
      Specified by:
      +
      drawSecretObjectives in class NetworkHandler
      +
      +
      +
    • +
    • +
      +

      chooseSecretObjective

      +
      public void chooseSecretObjective(Objective objective)
      +
      Communicates the chosen secret objective.
      +
      +
      Specified by:
      +
      chooseSecretObjective in class NetworkHandler
      +
      Parameters:
      +
      objective - The chosen objective
      +
      +
      +
    • +
    • +
      +

      playCard

      +
      public void playCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
      +
      Plays a card.
      +
      +
      Specified by:
      +
      playCard in class NetworkHandler
      +
      Parameters:
      +
      coords - The coordinates on which to place the card
      +
      card - The PlayableCard to play
      +
      side - The side on which to play the chosen card
      +
      +
      +
    • +
    • +
      +

      drawCard

      +
      public void drawCard(DrawSource source)
      +
      Draws a card.
      +
      +
      Specified by:
      +
      drawCard in class NetworkHandler
      +
      Parameters:
      +
      source - The drawing source to draw the card from
      +
      +
      +
    • +
    • +
      +

      sendBroadcastText

      +
      public void sendBroadcastText(String text)
      +
      Sends a message to all the match players
      +
      +
      Specified by:
      +
      sendBroadcastText in class NetworkHandler
      +
      Parameters:
      +
      text - The content of the message
      +
      +
      +
    • +
    • +
      +

      sendPrivateText

      +
      public void sendPrivateText(String recipient, + String text)
      +
      Sends a private message to a match player
      +
      +
      Specified by:
      +
      sendPrivateText in class NetworkHandler
      +
      Parameters:
      +
      recipient - The recipient username
      +
      text - The content of the message
      +
      +
      +
    • +
    • +
      +

      disconnect

      +
      public void disconnect()
      +
      Disconnects from the server.
      +
      +
      Specified by:
      +
      disconnect in class NetworkHandler
      +
      +
      +
    • +
    • +
      +

      ping

      +
      public boolean ping()
      +
      Checks for connectivity.
      +
      +
      Specified by:
      +
      ping in class NetworkHandler
      +
      Returns:
      +
      The status of the connection, true if active, false otherwise
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/network/NetworkHandlerTCP.html b/deliveries/Javadoc/it/polimi/ingsw/client/network/NetworkHandlerTCP.html new file mode 100644 index 00000000..a3705d5f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/network/NetworkHandlerTCP.html @@ -0,0 +1,492 @@ + + + + +NetworkHandlerTCP (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NetworkHandlerTCP

+
+
java.lang.Object +
it.polimi.ingsw.client.network.NetworkHandler +
it.polimi.ingsw.client.network.NetworkHandlerTCP
+
+
+
+
+
All Implemented Interfaces:
+
RemoteViewInterface, Remote
+
+
+
public class NetworkHandlerTCP +extends NetworkHandler
+
Class used by a generic client to receive from and transmit to a remote Server instance + and a remote PlayerControllerTCP instance using the TCP protocol.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NetworkHandlerTCP

      +
      public NetworkHandlerTCP(GraphicalView graphicalView, + String ipAddress, + Integer port) + throws IOException
      +
      Initialize the instance all its internal attributes.
      +
      +
      Parameters:
      +
      graphicalView - The GraphicalView to be subscribed to this NetworkHandler instance
      +
      ipAddress - The server IP address
      +
      port - The server port
      +
      Throws:
      +
      RemoteException - If the remote server is considered not reachable any more and cannot + return as usual
      +
      IOException
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      notifyError

      +
      public void notifyError(Exception exception)
      +
      Notifies the view about a remote error.
      +
      +
      Parameters:
      +
      exception - The exception thrown remotely
      +
      +
      +
    • +
    • +
      +

      getUsername

      +
      public String getUsername()
      +
      Gets the player's username.
      +
      +
      Returns:
      +
      The player's username
      +
      +
      +
    • +
    • +
      +

      getIO

      +
      public IOHandler getIO()
      +
      Gets the I/O handler.
      +
      +
      Returns:
      +
      The I/O handler
      +
      +
      +
    • +
    • +
      +

      getAvailableMatches

      +
      public void getAvailableMatches()
      +
      Asks the server to send a list of AvailableMatch.
      +
      +
      Specified by:
      +
      getAvailableMatches in class NetworkHandler
      +
      +
      +
    • +
    • +
      +

      createMatch

      +
      public void createMatch(String matchName, + Integer maxPlayers)
      +
      Asks to create a match.
      +
      +
      Specified by:
      +
      createMatch in class NetworkHandler
      +
      Parameters:
      +
      matchName - The match name
      +
      maxPlayers - The match maximum number of players
      +
      +
      +
    • +
    • +
      +

      joinMatch

      +
      public void joinMatch(String matchName)
      +
      Asks to join a match.
      +
      +
      Specified by:
      +
      joinMatch in class NetworkHandler
      +
      Parameters:
      +
      matchName - the match's name
      +
      +
      +
    • +
    • +
      +

      drawInitialCard

      +
      public void drawInitialCard()
      +
      Draws an initial card for the player.
      +
      +
      Specified by:
      +
      drawInitialCard in class NetworkHandler
      +
      +
      +
    • +
    • +
      +

      chooseInitialCardSide

      +
      public void chooseInitialCardSide(Side side)
      +
      Communicates the chosen initial card side.
      +
      +
      Specified by:
      +
      chooseInitialCardSide in class NetworkHandler
      +
      Parameters:
      +
      side - The side on which play the initial card drawn using drawInitialCard()
      +
      +
      +
    • +
    • +
      +

      drawSecretObjectives

      +
      public void drawSecretObjectives()
      +
      Draws two secret objectives.
      +
      +
      Specified by:
      +
      drawSecretObjectives in class NetworkHandler
      +
      +
      +
    • +
    • +
      +

      chooseSecretObjective

      +
      public void chooseSecretObjective(Objective objective)
      +
      Communicates the chosen secret objective.
      +
      +
      Specified by:
      +
      chooseSecretObjective in class NetworkHandler
      +
      Parameters:
      +
      objective - The chosen objective
      +
      +
      +
    • +
    • +
      +

      playCard

      +
      public void playCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
      +
      Plays a card.
      +
      +
      Specified by:
      +
      playCard in class NetworkHandler
      +
      Parameters:
      +
      coords - The coordinates on which to place the card
      +
      card - The PlayableCard to play
      +
      side - The side on which to play the chosen card
      +
      +
      +
    • +
    • +
      +

      drawCard

      +
      public void drawCard(DrawSource source)
      +
      Draws a card.
      +
      +
      Specified by:
      +
      drawCard in class NetworkHandler
      +
      Parameters:
      +
      source - The drawing source to draw the card from
      +
      +
      +
    • +
    • +
      +

      sendBroadcastText

      +
      public void sendBroadcastText(String text)
      +
      Sends a message to all the match players
      +
      +
      Specified by:
      +
      sendBroadcastText in class NetworkHandler
      +
      Parameters:
      +
      text - The content of the message
      +
      +
      +
    • +
    • +
      +

      sendPrivateText

      +
      public void sendPrivateText(String recipient, + String text)
      +
      Sends a private message to a match player
      +
      +
      Specified by:
      +
      sendPrivateText in class NetworkHandler
      +
      Parameters:
      +
      recipient - The recipient username
      +
      text - The content of the message
      +
      +
      +
    • +
    • +
      +

      disconnect

      +
      public void disconnect()
      +
      Disconnects from the server.
      +
      +
      Specified by:
      +
      disconnect in class NetworkHandler
      +
      +
      +
    • +
    • +
      +

      ping

      +
      public boolean ping()
      +
      Checks for connectivity.
      +
      +
      Specified by:
      +
      ping in class NetworkHandler
      +
      Returns:
      +
      The status of the connection, true if active, false otherwise
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/network/RemoteViewInterface.html b/deliveries/Javadoc/it/polimi/ingsw/client/network/RemoteViewInterface.html new file mode 100644 index 00000000..8bcdea5b --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/network/RemoteViewInterface.html @@ -0,0 +1,549 @@ + + + + +RemoteViewInterface (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface RemoteViewInterface

+
+
+
+
All Superinterfaces:
+
Remote
+
+
+
All Known Implementing Classes:
+
NetworkHandler, NetworkHandlerRMI, NetworkHandlerTCP
+
+
+
public interface RemoteViewInterface +extends Remote
+
Network interface used to declare all and only the methods callable on a remote view instance implementing this interface or + by message listener for TCP. + Since it's a remote interface, all the methods here defined are meant to notify the occurrence of an event to the remote + object. Given this, all methods also contain some parameters specific to the happened event. + For security reasons, each method doesn't expose to the receiving view important objects (e.g. Player), but + rather values representing them (e.g. Player's username).
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      matchStarted

      +
      void matchStarted(Map<String,Color> playersUsernamesAndPawns, + Map<String,List<PlayableCard>> playersHands, + Pair<Objective,Objective> visibleObjectives, + Map<DrawSource,PlayableCard> visiblePlayableCards, + Pair<Symbol,Symbol> decksTopReigns) + throws RemoteException
      +
      Notifies that the match has just started. + Furthermore, gives to the receiving object all the information (parameters) needed to show to the current match + state.
      +
      +
      Parameters:
      +
      playersUsernamesAndPawns - Map that matches each pawn color to the corresponding player's username
      +
      playersHands - Map that matches each player's username to the corresponding List of cards in the hand
      +
      visibleObjectives - Pair of objectives visible to all players
      +
      visiblePlayableCards - Map having as values the visible common cards (the keys are just indexes).
      +
      decksTopReigns - Pair of reign symbols representing the two visible reigns symbols on top of the two decks; + the first one is the gold deck one, the second one the resource deck one
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable anymore and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      matchResumed

      +
      void matchResumed(Map<String,Color> playersUsernamesAndPawns, + Map<String,List<PlayableCard>> playersHands, + Pair<Objective,Objective> visibleObjectives, + Map<DrawSource,PlayableCard> visiblePlayableCards, + Pair<Symbol,Symbol> decksTopReigns, + Objective secretObjective, + Map<String,Map<Symbol,Integer>> availableResources, + Map<String,Map<Pair<Integer,Integer>,PlacedCard>> placedCards, + Map<String,Integer> playerPoints, + String currentPlayer, + boolean drawPhase) + throws RemoteException
      +
      Notifies that the match has resumed. + Furthermore, gives to the receiving object all the information (parameters) needed to restore to the current match + state.
      +
      +
      Parameters:
      +
      playersUsernamesAndPawns - Map that matches each pawn color to the corresponding player's username
      +
      playersHands - Map that matches each player's username to the corresponding List of cards in the hand
      +
      visibleObjectives - Pair of objectives visible to all players
      +
      visiblePlayableCards - Map having as values the visible common cards (the keys are just indexes).
      +
      decksTopReigns - Pair of reign symbols representing the two visible reigns symbols on top of the two decks; + the first one is the gold deck one, the second one the resource deck one
      +
      secretObjective - Secret objective of the current player
      +
      availableResources - Available resources of all the players
      +
      placedCards - Placed cards of all the players
      +
      playerPoints - Points of all the players
      +
      currentPlayer - The current player
      +
      drawPhase - If the match is resumed in draw phase
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable anymore and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      receiveAvailableMatches

      +
      void receiveAvailableMatches(List<AvailableMatch> availableMatches) + throws RemoteException
      +
      Gives to the receiving graphical view (the client) a list of the currently available matches.
      +
      +
      Parameters:
      +
      availableMatches - The available matches
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable anymore and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      giveInitialCard

      +
      void giveInitialCard(InitialCard initialCard) + throws RemoteException
      +
      Gives to the receiving graphical view (the client) its initial card.
      +
      +
      Parameters:
      +
      initialCard - The initial card to be given
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      giveSecretObjectives

      +
      void giveSecretObjectives(Pair<Objective,Objective> secretObjectives) + throws RemoteException
      +
      Gives to the remote object a pair of secret objectives to show them in the view and to choose one from them.
      +
      +
      Parameters:
      +
      secretObjectives - Pair of secret objectives to give
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      someoneDrewInitialCard

      +
      void someoneDrewInitialCard(String someoneUsername, + InitialCard card) + throws RemoteException
      +
      Notifies that someone (it may or may not be the receiving View instance) has drawn its initial card.
      +
      +
      Parameters:
      +
      someoneUsername - The username of the player who has drawn the card
      +
      card - The card drawn
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      someoneSetInitialSide

      +
      void someoneSetInitialSide(String someoneUsername, + Side side, + Map<Symbol,Integer> availableResources) + throws RemoteException
      +
      Notifies that someone (it may or may not be the receiving View instance) has decided (then set) its initial card side.
      +
      +
      Parameters:
      +
      someoneUsername - The username of the player who has set the initial card side
      +
      side - The chosen side
      +
      availableResources - The current available resources of the player having someoneUsername as username
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      someoneDrewSecretObjective

      +
      void someoneDrewSecretObjective(String someoneUsername) + throws RemoteException
      +
      Notifies that someone (it may or may not be the receiving View instance) has drawn a pair of secret objectives. + Mind that the objectives are not passed as arguments, since they are secret to all players but the one receiving + them. The one meant to receive them receives this message too but obtain the objectives through the + giveSecretObjective() method.
      +
      +
      Parameters:
      +
      someoneUsername - The username of the player who has drawn the card
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      someoneChoseSecretObjective

      +
      void someoneChoseSecretObjective(String someoneUsername) + throws RemoteException
      +
      Notifies that someone (it may or may not be the receiving View instance) has chosen theirs secret objective.
      +
      +
      Parameters:
      +
      someoneUsername - The username of the player who has chosen theirs secret objective
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      someonePlayedCard

      +
      void someonePlayedCard(String someoneUsername, + Pair<Integer,Integer> coords, + PlayableCard card, + Side side, + int points, + Map<Symbol,Integer> availableResources) + throws RemoteException
      +
      Notifies that someone (it may or may not be the receiving View instance) has played a card.
      +
      +
      Parameters:
      +
      someoneUsername - The username of the player who has played a card
      +
      coords - The coordinates where the card has been placed as a Pair of int
      +
      card - The card that has been played
      +
      side - The side on which the card has been played
      +
      points - The points of the player who played a card
      +
      availableResources - The current available resources of the player who played a card
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      someoneDrewCard

      +
      void someoneDrewCard(String someoneUsername, + DrawSource source, + PlayableCard card, + PlayableCard replacementCard, + Pair<Symbol,Symbol> deckTopReigns) + throws RemoteException
      +
      Notifies that someone (it may or may not be the receiving View instance) has drawn a card.
      +
      +
      Parameters:
      +
      someoneUsername - The username of the player who has played a card
      +
      source - The DrawSource from which the card has been drawn
      +
      card - The card that has been drawn
      +
      replacementCard - The card that replaced the drawn one
      +
      deckTopReigns - The decks top reigns
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      someoneJoined

      +
      void someoneJoined(String someoneUsername, + List<String> joinedPlayers) + throws RemoteException
      +
      Notifies that a player has joined the match.
      +
      +
      Parameters:
      +
      someoneUsername - The username of the player who has joined
      +
      joinedPlayers - The players currently in the match
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      someoneQuit

      +
      void someoneQuit(String someoneUsername) + throws RemoteException
      +
      Notifies that a player has quit from the match.
      +
      +
      Parameters:
      +
      someoneUsername - The username of the player who has quit
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      matchFinished

      +
      void matchFinished(List<LeaderboardEntry> ranking) + throws RemoteException
      +
      Notifies that the match has just finished.
      +
      +
      Parameters:
      +
      ranking - The match final ranking
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      someoneSentBroadcastText

      +
      void someoneSentBroadcastText(String someoneUsername, + String text) + throws RemoteException
      +
      Notifies that a new message in the global chat is sent
      +
      +
      Parameters:
      +
      someoneUsername - Username of the user that sent the message
      +
      text - Content of the message
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      someoneSentPrivateText

      +
      void someoneSentPrivateText(String someoneUsername, + String text) + throws RemoteException
      +
      Notifies that a new private message is sent in private chat to the current user
      +
      +
      Parameters:
      +
      someoneUsername - Username of the user that sent the message
      +
      text - Content of the message
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/NetworkHandler.html b/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/NetworkHandler.html new file mode 100644 index 00000000..230ace14 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/NetworkHandler.html @@ -0,0 +1,123 @@ + + + + +Uses of Class it.polimi.ingsw.client.network.NetworkHandler (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.network.NetworkHandler

+
+
Packages that use NetworkHandler
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/NetworkHandlerRMI.html b/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/NetworkHandlerRMI.html new file mode 100644 index 00000000..37c64e3d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/NetworkHandlerRMI.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.client.network.NetworkHandlerRMI (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.network.NetworkHandlerRMI

+
+No usage of it.polimi.ingsw.client.network.NetworkHandlerRMI
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/NetworkHandlerTCP.html b/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/NetworkHandlerTCP.html new file mode 100644 index 00000000..5fcc1e70 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/NetworkHandlerTCP.html @@ -0,0 +1,90 @@ + + + + +Uses of Class it.polimi.ingsw.client.network.NetworkHandlerTCP (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.client.network.NetworkHandlerTCP

+
+
Packages that use NetworkHandlerTCP
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/RemoteViewInterface.html b/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/RemoteViewInterface.html new file mode 100644 index 00000000..feda2f70 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/network/class-use/RemoteViewInterface.html @@ -0,0 +1,138 @@ + + + + +Uses of Interface it.polimi.ingsw.client.network.RemoteViewInterface (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Interface
it.polimi.ingsw.client.network.RemoteViewInterface

+
+
Packages that use RemoteViewInterface
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/network/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/client/network/package-summary.html new file mode 100644 index 00000000..695a8655 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/network/package-summary.html @@ -0,0 +1,116 @@ + + + + +it.polimi.ingsw.client.network (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.client.network

+
+
+
package it.polimi.ingsw.client.network
+
+
    +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    Class used by a generic client to receive from and transmit to a remote Server instance and a + remote PlayerController instance.
    +
    + +
    +
    Class used by a generic client to receive from and transmit to a remote Server instance and a + remote PlayerControllerRMI instance using the RMI protocol.
    +
    + +
    +
    Class used by a generic client to receive from and transmit to a remote Server instance + and a remote PlayerControllerTCP instance using the TCP protocol.
    +
    + +
    +
    Network interface used to declare all and only the methods callable on a remote view instance implementing this interface or + by message listener for TCP.
    +
    +
    +
    +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/network/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/client/network/package-tree.html new file mode 100644 index 00000000..a5260a0c --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/network/package-tree.html @@ -0,0 +1,91 @@ + + + + +it.polimi.ingsw.client.network Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.client.network

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/client/network/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/client/network/package-use.html new file mode 100644 index 00000000..99bded20 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/client/network/package-use.html @@ -0,0 +1,140 @@ + + + + +Uses of Package it.polimi.ingsw.client.network (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.client.network

+
+ + +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerController.html b/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerController.html new file mode 100644 index 00000000..e019cac1 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerController.html @@ -0,0 +1,296 @@ + + + + +PlayerController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PlayerController

+
+
java.lang.Object +
it.polimi.ingsw.controllers.PlayerController
+
+
+
+
All Implemented Interfaces:
+
MatchObserver
+
+
+
Direct Known Subclasses:
+
PlayerControllerRMI, PlayerControllerTCP
+
+
+
public abstract sealed class PlayerController +extends Object +implements MatchObserver +permits PlayerControllerRMI, PlayerControllerTCP
+
Controller for a match player, the only agent needing a view and so a controller in this + application. This class subclasses instances are given (in RMI case) / reachable (in TCP case) on + the network and collected by a corresponding view (RMI view or TCP view); then this class commits + its two subclasses PlayerControllerRMI and PlayerControllerTCP to implement all + the methods needed by a generic view to play in a match. This class implements + MatchObserver since its instances subscribe themselves to a Match, as mentioned in + PlayerController(String, Match); this is needed to allow this class to behave as a + bridge between a view and a match.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      player

      +
      protected Player player
      +
      +
    • +
    • +
      +

      match

      +
      protected final Match match
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PlayerController

      +
      public PlayerController(String username, + Match match)
      +
      Instantiates the internal Player with the given username and sets the internal Match reference to + the given one, furthermore add the new Player instance to the match and subscribe this class + instance to the match observers.
      +
      +
      Parameters:
      +
      username - The username of the new player of the Match
      +
      match - The match to which this PlayerClass must pertain
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerControllerRMI.html b/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerControllerRMI.html new file mode 100644 index 00000000..6578628c --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerControllerRMI.html @@ -0,0 +1,777 @@ + + + + +PlayerControllerRMI (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PlayerControllerRMI

+
+
java.lang.Object +
it.polimi.ingsw.controllers.PlayerController +
it.polimi.ingsw.controllers.PlayerControllerRMI
+
+
+
+
+
All Implemented Interfaces:
+
PlayerControllerRMIInterface, MatchObserver, Remote
+
+
+
public final class PlayerControllerRMI +extends PlayerController +implements PlayerControllerRMIInterface
+
Subclass of PlayerController that implements its abstract methods through RMI interactions. + Each instance of this class is supposed to be sent through Server.joinMatch(String, String)) + to an RMI View, this latter will then send its View instance to the PlayerController object, calling + registerView(RemoteViewInterface) on it.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PlayerControllerRMI

      +
      public PlayerControllerRMI(String username, + Match match) + throws AlreadyUsedUsernameException, +WrongStateException
      +
      Instantiates the internal Player with the given username and sets the internal Match reference to the given one, + add the new Player instance to the match and subscribe this class instance to the match observers.
      +
      +
      Parameters:
      +
      username - The username of the new player of the Match
      +
      match - The match to which this PlayerClass must pertain
      +
      Throws:
      +
      AlreadyUsedUsernameException - If the username is already taken by another player of the same match
      +
      WrongStateException - If a new player cannot be added on the current state of the Match
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      matchResumed

      +
      public void matchResumed()
      +
      Notifies the view that match has resumed after a server crash.
      +
      +
      Specified by:
      +
      matchResumed in class PlayerController
      +
      +
      +
    • +
    • +
      +

      registerView

      + +
      Sets the internal View attribute to the given argument; if it has already been called, it won't + do anything, since it's call is allowed once per PlayerController object. + It's used by a remote View having this class object to send itself over RMI to the PlayerControllerRMI + instance. + Note that this method is supposed to be called by a view.
      +
      +
      Specified by:
      +
      registerView in interface PlayerControllerRMIInterface
      +
      Parameters:
      +
      view - The View to save in the PlayerController internal state
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      ChosenMatchException - If there's an error with the chosen match
      +
      WrongStateException - If the current match state doesn't allow registering a view
      +
      AlreadyUsedUsernameException - If the player username is already taken
      +
      WrongNameException - If the player username doesn't meet the alphanumerical criteria
      +
      +
      +
    • +
    • +
      +

      drawInitialCard

      +
      public void drawInitialCard() + throws WrongStateException, +WrongTurnException, +RemoteException
      +
      Draws an initial card for the player. Since this is done through RMI, it just involves a call to + Player.drawInitialCard(). + Note that this method is supposed to be called by a view.
      +
      +
      Specified by:
      +
      drawInitialCard in interface PlayerControllerRMIInterface
      +
      Throws:
      +
      WrongStateException - If the current match state doesn't allow drawing an initial card
      +
      WrongTurnException - If the current turn it's not the one of this player
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      chooseInitialCardSide

      +
      public void chooseInitialCardSide(Side side) + throws WrongStateException, +WrongTurnException, +RemoteException
      +
      Communicates the chosen initial card side. Since this is done through RMI, it just involves a call to + Player.chooseInitialCardSide(Side). + Note that this method is supposed to be called by a view.
      +
      +
      Specified by:
      +
      chooseInitialCardSide in interface PlayerControllerRMIInterface
      +
      Parameters:
      +
      side - The side on which play the initial card drawn using drawInitialCard()
      +
      Throws:
      +
      WrongStateException - If the current match state doesn't allow setting the initial card side
      +
      WrongTurnException - If the current turn it's not the one of this player
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      drawSecretObjectives

      +
      public void drawSecretObjectives() + throws WrongStateException, +WrongTurnException, +RemoteException
      +
      Draws two secret objectives. Since this is done through RMI, it just involves a call to + Player.drawSecretObjectives(). + Note that this method is supposed to be called by a view.
      +
      +
      Specified by:
      +
      drawSecretObjectives in interface PlayerControllerRMIInterface
      +
      Throws:
      +
      WrongStateException - If the current match state doesn't allow drawing secret objectives
      +
      WrongTurnException - If the current turn it's not the one of this player
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      chooseSecretObjective

      +
      public void chooseSecretObjective(Objective objective) + throws WrongStateException, +WrongTurnException, +WrongChoiceException, +RemoteException
      +
      Communicates the chosen secret objective. Since this is done through RMI, it just involves a call to + Player.chooseSecretObjective(Objective). + Note that this method is supposed to be called by a view.
      +
      +
      Specified by:
      +
      chooseSecretObjective in interface PlayerControllerRMIInterface
      +
      Parameters:
      +
      objective - The chosen objective
      +
      Throws:
      +
      WrongStateException - If the current match state doesn't allow choosing a secret objective
      +
      WrongTurnException - If the current turn it's not the one of this player
      +
      WrongChoiceException - If the chosen objective is not one of the two drawn ones using drawSecretObjectives()
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      playCard

      +
      public void playCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side) + throws WrongStateException, +WrongTurnException, +WrongChoiceException, +RemoteException
      +
      Plays a card. Since this is done through RMI, it just involves a call to + Player.playCard(Pair, PlayableCard, Side). + Note that this method is supposed to be called by a view.
      +
      +
      Specified by:
      +
      playCard in interface PlayerControllerRMIInterface
      +
      Parameters:
      +
      coords - The coordinates on which to place the card
      +
      card - The PlayableCard to play
      +
      side - The side on which to play the chosen card
      +
      Throws:
      +
      WrongStateException - If the current match state doesn't allow playing cards
      +
      WrongTurnException - If the current turn it's not the one of this player
      +
      WrongChoiceException - If the chosen card is not one of those in the player's current hand
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      drawCard

      + +
      Draws a card. Since this is done through RMI, it just involves a call to + Player.drawCard(DrawSource). + Note that this method is supposed to be called by a view.
      +
      +
      Specified by:
      +
      drawCard in interface PlayerControllerRMIInterface
      +
      Parameters:
      +
      source - The drawing source to draw the card from
      +
      Throws:
      +
      HandException - If the player already has a full hand of cards (three cards)
      +
      WrongStateException - If the current match state doesn't allow drawing cards
      +
      WrongTurnException - If the current turn it's not the one of this player
      +
      WrongChoiceException - If the chosen DrawSource doesn't have any card left (i.e. it's empty)
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      sendBroadcastText

      +
      public void sendBroadcastText(String text) + throws RemoteException
      +
      Sends a broadcast in the chat. Since this is done through RMI, it just involves a call to + Player.sendBroadcastText(String). + Note that this method is supposed to be called by a view.
      +
      +
      Specified by:
      +
      sendBroadcastText in interface PlayerControllerRMIInterface
      +
      Parameters:
      +
      text - Text of the message
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      sendPrivateText

      +
      public void sendPrivateText(String recipient, + String text) + throws RemoteException
      +
      Sends a private message in the chat. Since this is done through RMI, it just involves a call to + Player.sendPrivateText(Player, String) )}. + Note that this method is supposed to be called by a view.
      +
      +
      Specified by:
      +
      sendPrivateText in interface PlayerControllerRMIInterface
      +
      Parameters:
      +
      recipient - username of the recipient
      +
      text - text of the message
      +
      Throws:
      +
      RemoteException - If the remote object is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      matchStarted

      +
      public void matchStarted()
      +
      Notifies that the match has just started. + Note that is supposed to be called by the match.
      +
      +
      Specified by:
      +
      matchStarted in interface MatchObserver
      +
      +
      +
    • +
    • +
      +

      someoneJoined

      +
      public void someoneJoined(Player someone)
      +
      Notifies that someone has joined the match. + Note that this method is supposed to be called by a match, moreover the match calls this method on all the + MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified. + If and only if the PlayerController receiving this method call is the one linked to given `someone`, it notifies + the view about the current lobby information.
      +
      +
      Specified by:
      +
      someoneJoined in interface MatchObserver
      +
      Parameters:
      +
      someone - The Player instance that has joined
      +
      +
      +
    • +
    • +
      +

      someoneQuit

      +
      public void someoneQuit(Player someone)
      +
      Notifies that someone has quit from the match. + Note that Match calls this method on all MatchObservers instance subscribed to itself, then + even the MatchObserver causing this event gets notified.
      +
      +
      Specified by:
      +
      someoneQuit in interface MatchObserver
      +
      Parameters:
      +
      someone - The Player instance that has quit
      +
      +
      +
    • +
    • +
      +

      someoneDrewInitialCard

      +
      public void someoneDrewInitialCard(Player someone, + InitialCard card)
      +
      Notifies that someone has drawn its initial card. + Note that this method is supposed to be called by a match, moreover the match calls this method on all the + MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified. + If and only if the PlayerController receiving this method call is the one linked to given `someone`, it notifies + the view that it received an initial card.
      +
      +
      Specified by:
      +
      someoneDrewInitialCard in interface MatchObserver
      +
      Parameters:
      +
      someone - The player instance that has drawn the card
      +
      card - The initial card that has been drawn
      +
      +
      +
    • +
    • +
      +

      someoneSetInitialSide

      +
      public void someoneSetInitialSide(Player someone, + Side side, + Map<Symbol,Integer> availableResources)
      +
      Notifies that someone has chosen its initial card side. + Note that this method is supposed to be called by a match, moreover the match calls this method on all the + MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified.
      +
      +
      Specified by:
      +
      someoneSetInitialSide in interface MatchObserver
      +
      Parameters:
      +
      someone - The player instance that has chosen the side
      +
      side - The chosen initial card side
      +
      availableResources - The resources available at the moment to the player that set its initial card side
      +
      +
      +
    • +
    • +
      +

      someoneDrewSecretObjective

      +
      public void someoneDrewSecretObjective(Player someone, + Pair<Objective,Objective> objectives)
      +
      Notifies that someone has drawn two secret objectives. + Note that this method is supposed to be called by a match, moreover the match calls this method on all the + MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified. + If and only if the PlayerController receiving this method call is the one linked to given `someone`, it notifies + the view about the proposed objectives, the other views will just receive a notification about the player's username.
      +
      +
      Specified by:
      +
      someoneDrewSecretObjective in interface MatchObserver
      +
      Parameters:
      +
      someone - The player instance that has drawn the objectives
      +
      objectives - The two proposed objectives
      +
      +
      +
    • +
    • +
      +

      someoneChoseSecretObjective

      +
      public void someoneChoseSecretObjective(Player someone, + Objective objective)
      +
      Notifies that someone has chosen the secret objective. + Note that this method is supposed to be called by a match, moreover the match calls this method on all the + MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified. + The view will just receive `someone` username, no the objective.
      +
      +
      Specified by:
      +
      someoneChoseSecretObjective in interface MatchObserver
      +
      Parameters:
      +
      someone - The player instance that has chosen the secret objective
      +
      objective - The chosen secret objective
      +
      +
      +
    • +
    • +
      +

      someonePlayedCard

      +
      public void someonePlayedCard(Player someone, + Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
      +
      Notifies that someone has played a card. + Note that this method is supposed to be called by a match, moreover the match calls this method on all the + MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified.
      +
      +
      Specified by:
      +
      someonePlayedCard in interface MatchObserver
      +
      Parameters:
      +
      someone - The Player instance that has played a card
      +
      coords - The coordinates on which the card has been placed
      +
      card - The PlayableCard that has been played
      +
      side - The side on which the card has been placed
      +
      +
      +
    • +
    • +
      +

      someoneDrewCard

      +
      public void someoneDrewCard(Player someone, + DrawSource source, + PlayableCard card, + PlayableCard replacementCard)
      +
      Notifies that someone has drawn a card. + The replacement card is the one that has taken the place of the drawn one, it's needed since observers have to + know the reign of the new card on top of the decks. + Note that this method is supposed to be called by a match, moreover the match calls this method on all the + MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified.
      +
      +
      Specified by:
      +
      someoneDrewCard in interface MatchObserver
      +
      Parameters:
      +
      someone - The Player instance that has drawn a card
      +
      source - The drawing source from which the card has been drawn
      +
      card - The card that has been drawn
      +
      replacementCard - The card that has replaced the drawn card, null if the draw source is a deck
      +
      +
      +
    • +
    • +
      +

      someoneSentBroadcastText

      +
      public void someoneSentBroadcastText(Player someone, + String text)
      +
      Notifies that someone sent a message in the public chat.
      +
      +
      Specified by:
      +
      someoneSentBroadcastText in interface MatchObserver
      +
      Parameters:
      +
      someone - The player that send the message
      +
      text - Content of the message
      +
      +
      +
    • +
    • +
      +

      someoneSentPrivateText

      +
      public void someoneSentPrivateText(Player someone, + Player recipient, + String text)
      +
      Notifies that someone sent a private message to another user. + If the recipient is the current player, then the view is notified, + otherwise the message is ignored.
      +
      +
      Specified by:
      +
      someoneSentPrivateText in interface MatchObserver
      +
      Parameters:
      +
      someone - The player that sent the message
      +
      recipient - The recipient of the message
      +
      text - Content of the message
      +
      +
      +
    • +
    • +
      +

      matchFinished

      +
      public void matchFinished()
      +
      Notifies that the match has just finished.
      +
      +
      Specified by:
      +
      matchFinished in interface MatchObserver
      +
      +
      +
    • +
    • +
      +

      getView

      +
      public RemoteViewInterface getView()
      +
      Getter for the view associated to this instance.
      +
      +
      Returns:
      +
      The RemoteViewInterface of this instance
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerControllerRMIInterface.html b/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerControllerRMIInterface.html new file mode 100644 index 00000000..2b80c1b2 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerControllerRMIInterface.html @@ -0,0 +1,367 @@ + + + + +PlayerControllerRMIInterface (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface PlayerControllerRMIInterface

+
+
+
+
All Superinterfaces:
+
Remote
+
+
+
All Known Implementing Classes:
+
PlayerControllerRMI
+
+
+
public interface PlayerControllerRMIInterface +extends Remote
+
RMI interface used to declare all and only the methods callable on a remote PlayerControllerRMI instance implementing + this interface. Since it's a remote interface, all the methods here defined are meant to notify the occurrence of an + event to the remote object. Given this, all methods also contain some parameters specific to the happened event (e.g. + a user clicked the button to play a card on the GUI view, then playCard(Pair, PlayableCard, Side)) is called.
+
+
+ +
+
+ +
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerControllerTCP.html b/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerControllerTCP.html new file mode 100644 index 00000000..463fad1c --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/controllers/PlayerControllerTCP.html @@ -0,0 +1,624 @@ + + + + +PlayerControllerTCP (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PlayerControllerTCP

+
+
java.lang.Object +
it.polimi.ingsw.controllers.PlayerController +
it.polimi.ingsw.controllers.PlayerControllerTCP
+
+
+
+
+
All Implemented Interfaces:
+
MatchObserver
+
+
+
public final class PlayerControllerTCP +extends PlayerController
+
Subclass of PlayerController that implements its abstract methods through TCP + interactions.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PlayerControllerTCP

      +
      public PlayerControllerTCP(String username, + Match match, + IOHandler io)
      +
      Instantiates the internal Player with the given username and sets the internal Match + reference to the given one, add the new Player instance to the match and subscribe this class + instance to the match observers.
      +
      +
      Parameters:
      +
      username - The username of the new player of the Match
      +
      match - The match to which this PlayerClass must pertain
      +
      io - The I/O handler to be attached to this instance
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      matchStarted

      +
      public void matchStarted()
      +
      Notifies that the match has just started. Note that is supposed to be called by the match.
      +
      +
    • +
    • +
      +

      someoneJoined

      +
      public void someoneJoined(Player someone)
      +
      Notifies that someone has joined the match. Note that this method is supposed to be called by + a match, moreover the match calls this method on all the MatchObservers instance subscribed + to itself, then even the MatchObserver causing this event gets notified. If and only if the + PlayerController receiving this method call is the one linked to given `someone`, it notifies + the view about the current lobby information.
      +
      +
      Parameters:
      +
      someone - The Player instance that has joined
      +
      +
      +
    • +
    • +
      +

      someoneQuit

      +
      public void someoneQuit(Player someone)
      +
      Notifies that someone has quit from the match. Note that Match calls this method on all + MatchObservers instance subscribed to itself, then even the MatchObserver causing this event + gets notified.
      +
      +
      Parameters:
      +
      someone - The Player instance that has quit
      +
      +
      +
    • +
    • +
      +

      someoneDrewInitialCard

      +
      public void someoneDrewInitialCard(Player someone, + InitialCard card)
      +
      Notifies that someone has drawn its initial card. Note that this method is supposed to be + called by a match, moreover the match calls this method on all the MatchObservers instance + subscribed to itself, then even the MatchObserver causing this event gets notified. If and + only if the PlayerController receiving this method call is the one linked to given `someone`, + it notifies the view that it received an initial card.
      +
      +
      Parameters:
      +
      someone - The player instance that has drawn the card
      +
      card - The initial card that has been drawn
      +
      +
      +
    • +
    • +
      +

      someoneSetInitialSide

      +
      public void someoneSetInitialSide(Player someone, + Side side, + Map<Symbol,Integer> availableResources)
      +
      Notifies that someone has chosen its initial card side. Note that this method is supposed to + be called by a match, moreover the match calls this method on all the MatchObservers instance + subscribed to itself, then even the MatchObserver causing this event gets notified.
      +
      +
      Parameters:
      +
      someone - The player instance that has chosen the side
      +
      side - The chosen initial card side
      +
      availableResources - The resources available at the moment to the player that set its initial card side
      +
      +
      +
    • +
    • +
      +

      someoneDrewSecretObjective

      +
      public void someoneDrewSecretObjective(Player someone, + Pair<Objective,Objective> objectives)
      +
      Notifies that someone has drawn two secret objectives. Note that this method is supposed to + be called by a match, moreover the match calls this method on all the MatchObservers instance + subscribed to itself, then even the MatchObserver causing this event gets notified. If and + only if the PlayerController receiving this method call is the one linked to given `someone`, + it notifies the view about the proposed objectives, the other views will just receive a + notification about the player's username.
      +
      +
      Parameters:
      +
      someone - The player instance that has drawn the objectives
      +
      objectives - The two proposed objectives
      +
      +
      +
    • +
    • +
      +

      someoneChoseSecretObjective

      +
      public void someoneChoseSecretObjective(Player someone, + Objective objective)
      +
      Notifies that someone has chosen the secret objective. Note that this method is supposed to + be called by a match, moreover the match calls this method on all the MatchObservers instance + subscribed to itself, then even the MatchObserver causing this event gets notified. The view + will just receive `someone` username, no the objective.
      +
      +
      Parameters:
      +
      someone - The player instance that has chosen the secret objective
      +
      objective - The chosen secret objective
      +
      +
      +
    • +
    • +
      +

      someonePlayedCard

      +
      public void someonePlayedCard(Player someone, + Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
      +
      Notifies that someone has played a card. Note that this method is supposed to be called by a + match, moreover the match calls this method on all the MatchObservers instance subscribed to + itself, then even the MatchObserver causing this event gets notified.
      +
      +
      Parameters:
      +
      someone - The Player instance that has played a card
      +
      coords - The coordinates on which the card has been placed
      +
      card - The PlayableCard that has been played
      +
      side - The side on which the card has been placed
      +
      +
      +
    • +
    • +
      +

      someoneDrewCard

      +
      public void someoneDrewCard(Player someone, + DrawSource source, + PlayableCard card, + PlayableCard replacementCard)
      +
      Notifies that someone has drawn a card. The replacement card is the one that has taken the + place of the drawn one, it's needed since observers have to know the reign of the new card on + top of the decks. Note that this method is supposed to be called by a match, moreover the + match calls this method on all the MatchObservers instance subscribed to itself, then even + the MatchObserver causing this event gets notified.
      +
      +
      Parameters:
      +
      someone - The Player instance that has drawn a card
      +
      source - The drawing source from which the card has been drawn
      +
      card - The card that has been drawn
      +
      replacementCard - The card that has replaced the drawn card, null if the draw source is + a deck
      +
      +
      +
    • +
    • +
      +

      someoneSentBroadcastText

      +
      public void someoneSentBroadcastText(Player someone, + String text)
      +
      Notifies that someone sent a message in the public chat.
      +
      +
      Parameters:
      +
      someone - The player that send the message
      +
      text - Content of the message
      +
      +
      +
    • +
    • +
      +

      someoneSentPrivateText

      +
      public void someoneSentPrivateText(Player someone, + Player recipient, + String text)
      +
      Notifies that someone sent a private message to another user. If the recipient is the current + player, then the view is notified, otherwise the message is ignored.
      +
      +
      Parameters:
      +
      someone - The player that sent the message
      +
      recipient - The recipient of the message
      +
      text - Content of the message
      +
      +
      +
    • +
    • +
      +

      matchFinished

      +
      public void matchFinished()
      +
      Notifies that the match has just finished.
      +
      +
    • +
    • +
      +

      drawInitialCard

      +
      public void drawInitialCard()
      +
      Tries to get the player initial card, unless there was a WrongTurnException or a + WrongStateException, in which case a new ErrorMessage is sent with the + exception content
      +
      +
    • +
    • +
      +

      chooseInitialCardSide

      +
      public void chooseInitialCardSide(Side side)
      +
      Tries to set the player's initial card's side, unless there was a WrongTurnException + or a WrongStateException, in which case a new ErrorMessage is sent with the + exception content
      +
      +
      Parameters:
      +
      side - The chosen card
      +
      +
      +
    • +
    • +
      +

      drawSecretObjectives

      +
      public void drawSecretObjectives()
      +
      Tries to get the player's secret objectives pair (from which he will have to choose one), + unless there was a WrongTurnException or a WrongStateException, in which case + a new ErrorMessage is sent with the exception content
      +
      +
    • +
    • +
      +

      chooseSecretObjective

      +
      public void chooseSecretObjective(Objective objective)
      +
      Tries to set the player's secret objective, unless there was a WrongTurnException or + a WrongStateException, in which case a new ErrorMessage is sent with the + exception content
      +
      +
      Parameters:
      +
      objective - The chosen objective
      +
      +
      +
    • +
    • +
      +

      playCard

      +
      public void playCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
      +
      Tries to place a card on the player's board, unless there was a WrongStateException, + in which case a new ErrorMessage is sent with the exception content
      +
      +
      Parameters:
      +
      coords - The chosen coordinates
      +
      card - The chosen card
      +
      side - The chosen side
      +
      +
      +
    • +
    • +
      +

      drawCard

      +
      public void drawCard(DrawSource source)
      +
      Tries to draw a card, unless there was a WrongStateException, in which case a new + ErrorMessage is sent with the exception content
      +
      +
      Parameters:
      +
      source - The chosen source
      +
      +
      +
    • +
    • +
      +

      sendBroadcastText

      +
      public void sendBroadcastText(String text)
      +
      Sends a broadcast in the chat.
      +
      +
      Parameters:
      +
      text - Text of the message
      +
      +
      +
    • +
    • +
      +

      sendPrivateText

      +
      public void sendPrivateText(String recipientUsername, + String text)
      +
      Sends a private message in the chat.
      +
      +
      Parameters:
      +
      recipientUsername - username of the recipient
      +
      text - text of the message
      +
      +
      +
    • +
    • +
      +

      matchResumed

      +
      public void matchResumed()
      +
      Notifies the view that match has resumed after a server crash.
      +
      +
      Specified by:
      +
      matchResumed in class PlayerController
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerController.html b/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerController.html new file mode 100644 index 00000000..14f7842a --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerController.html @@ -0,0 +1,95 @@ + + + + +Uses of Class it.polimi.ingsw.controllers.PlayerController (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.controllers.PlayerController

+
+
Packages that use PlayerController
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerControllerRMI.html b/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerControllerRMI.html new file mode 100644 index 00000000..40593f89 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerControllerRMI.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.controllers.PlayerControllerRMI (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.controllers.PlayerControllerRMI

+
+No usage of it.polimi.ingsw.controllers.PlayerControllerRMI
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerControllerRMIInterface.html b/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerControllerRMIInterface.html new file mode 100644 index 00000000..03376429 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerControllerRMIInterface.html @@ -0,0 +1,116 @@ + + + + +Uses of Interface it.polimi.ingsw.controllers.PlayerControllerRMIInterface (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Interface
it.polimi.ingsw.controllers.PlayerControllerRMIInterface

+
+ +
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerControllerTCP.html b/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerControllerTCP.html new file mode 100644 index 00000000..96ed7e75 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/controllers/class-use/PlayerControllerTCP.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.controllers.PlayerControllerTCP (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.controllers.PlayerControllerTCP

+
+No usage of it.polimi.ingsw.controllers.PlayerControllerTCP
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/controllers/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/controllers/package-summary.html new file mode 100644 index 00000000..ea6cfde1 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/controllers/package-summary.html @@ -0,0 +1,115 @@ + + + + +it.polimi.ingsw.controllers (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.controllers

+
+
+
package it.polimi.ingsw.controllers
+
+
    +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    Controller for a match player, the only agent needing a view and so a controller in this + application.
    +
    + +
    +
    Subclass of PlayerController that implements its abstract methods through RMI interactions.
    +
    + +
    +
    RMI interface used to declare all and only the methods callable on a remote PlayerControllerRMI instance implementing + this interface.
    +
    + +
    +
    Subclass of PlayerController that implements its abstract methods through TCP + interactions.
    +
    +
    +
    +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/controllers/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/controllers/package-tree.html new file mode 100644 index 00000000..cec9b845 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/controllers/package-tree.html @@ -0,0 +1,91 @@ + + + + +it.polimi.ingsw.controllers Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.controllers

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/controllers/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/controllers/package-use.html new file mode 100644 index 00000000..025fc363 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/controllers/package-use.html @@ -0,0 +1,108 @@ + + + + +Uses of Package it.polimi.ingsw.controllers (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.controllers

+
+
Packages that use it.polimi.ingsw.controllers
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/AlreadyUsedUsernameException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/AlreadyUsedUsernameException.html new file mode 100644 index 00000000..81fb0f9d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/AlreadyUsedUsernameException.html @@ -0,0 +1,169 @@ + + + + +AlreadyUsedUsernameException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AlreadyUsedUsernameException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.AlreadyUsedUsernameException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class AlreadyUsedUsernameException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AlreadyUsedUsernameException

      +
      public AlreadyUsedUsernameException(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/CardException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/CardException.html new file mode 100644 index 00000000..c7e7140e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/CardException.html @@ -0,0 +1,169 @@ + + + + +CardException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CardException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.CardException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class CardException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CardException

      +
      public CardException(String s)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/ChosenMatchException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/ChosenMatchException.html new file mode 100644 index 00000000..ac38096e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/ChosenMatchException.html @@ -0,0 +1,169 @@ + + + + +ChosenMatchException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ChosenMatchException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.ChosenMatchException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class ChosenMatchException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ChosenMatchException

      +
      public ChosenMatchException(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/DeckException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/DeckException.html new file mode 100644 index 00000000..69b541cb --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/DeckException.html @@ -0,0 +1,169 @@ + + + + +DeckException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DeckException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.DeckException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class DeckException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DeckException

      +
      public DeckException(String s)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/HandException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/HandException.html new file mode 100644 index 00000000..c9153c48 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/HandException.html @@ -0,0 +1,169 @@ + + + + +HandException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HandException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.HandException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class HandException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HandException

      +
      public HandException(String s)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/InvalidPlayerException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/InvalidPlayerException.html new file mode 100644 index 00000000..08039441 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/InvalidPlayerException.html @@ -0,0 +1,169 @@ + + + + +InvalidPlayerException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InvalidPlayerException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.InvalidPlayerException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class InvalidPlayerException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidPlayerException

      +
      public InvalidPlayerException(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/InvalidResourceException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/InvalidResourceException.html new file mode 100644 index 00000000..793983f4 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/InvalidResourceException.html @@ -0,0 +1,169 @@ + + + + +InvalidResourceException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InvalidResourceException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.InvalidResourceException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class InvalidResourceException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidResourceException

      +
      public InvalidResourceException(String s)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongChoiceException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongChoiceException.html new file mode 100644 index 00000000..17cba976 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongChoiceException.html @@ -0,0 +1,169 @@ + + + + +WrongChoiceException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WrongChoiceException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.WrongChoiceException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class WrongChoiceException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WrongChoiceException

      +
      public WrongChoiceException(String s)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongInputFormatException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongInputFormatException.html new file mode 100644 index 00000000..2af4867b --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongInputFormatException.html @@ -0,0 +1,170 @@ + + + + +WrongInputFormatException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WrongInputFormatException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.WrongInputFormatException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class WrongInputFormatException +extends Exception
+
WrongInputFormatException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WrongInputFormatException

      +
      public WrongInputFormatException(String msg)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongNameException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongNameException.html new file mode 100644 index 00000000..cf005d31 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongNameException.html @@ -0,0 +1,169 @@ + + + + +WrongNameException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WrongNameException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.WrongNameException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class WrongNameException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WrongNameException

      +
      public WrongNameException(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongStateException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongStateException.html new file mode 100644 index 00000000..4b5c6a59 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongStateException.html @@ -0,0 +1,169 @@ + + + + +WrongStateException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WrongStateException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.WrongStateException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class WrongStateException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WrongStateException

      +
      public WrongStateException(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongTurnException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongTurnException.html new file mode 100644 index 00000000..2408abe6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/WrongTurnException.html @@ -0,0 +1,169 @@ + + + + +WrongTurnException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WrongTurnException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
it.polimi.ingsw.exceptions.WrongTurnException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class WrongTurnException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WrongTurnException

      +
      public WrongTurnException(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/AlreadyUsedUsernameException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/AlreadyUsedUsernameException.html new file mode 100644 index 00000000..fb0d890a --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/AlreadyUsedUsernameException.html @@ -0,0 +1,160 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.AlreadyUsedUsernameException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.AlreadyUsedUsernameException

+
+ + +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/CardException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/CardException.html new file mode 100644 index 00000000..874d3b9f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/CardException.html @@ -0,0 +1,132 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.CardException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.CardException

+
+
Packages that use CardException
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/ChosenMatchException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/ChosenMatchException.html new file mode 100644 index 00000000..0f941d9d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/ChosenMatchException.html @@ -0,0 +1,141 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.ChosenMatchException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.ChosenMatchException

+
+
Packages that use ChosenMatchException
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/DeckException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/DeckException.html new file mode 100644 index 00000000..f264fb99 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/DeckException.html @@ -0,0 +1,89 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.DeckException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.DeckException

+
+
Packages that use DeckException
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/HandException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/HandException.html new file mode 100644 index 00000000..78cb6056 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/HandException.html @@ -0,0 +1,122 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.HandException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.HandException

+
+
Packages that use HandException
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/InvalidPlayerException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/InvalidPlayerException.html new file mode 100644 index 00000000..d3adf7e9 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/InvalidPlayerException.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.InvalidPlayerException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.InvalidPlayerException

+
+No usage of it.polimi.ingsw.exceptions.InvalidPlayerException
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/InvalidResourceException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/InvalidResourceException.html new file mode 100644 index 00000000..f3bc4efc --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/InvalidResourceException.html @@ -0,0 +1,116 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.InvalidResourceException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.InvalidResourceException

+
+
Packages that use InvalidResourceException
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongChoiceException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongChoiceException.html new file mode 100644 index 00000000..5d798909 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongChoiceException.html @@ -0,0 +1,168 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.WrongChoiceException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.WrongChoiceException

+
+
Packages that use WrongChoiceException
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongInputFormatException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongInputFormatException.html new file mode 100644 index 00000000..ea44e962 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongInputFormatException.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.WrongInputFormatException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.WrongInputFormatException

+
+No usage of it.polimi.ingsw.exceptions.WrongInputFormatException
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongNameException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongNameException.html new file mode 100644 index 00000000..81c50414 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongNameException.html @@ -0,0 +1,141 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.WrongNameException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.WrongNameException

+
+
Packages that use WrongNameException
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+
    +
  • +
    +

    Uses of WrongNameException in it.polimi.ingsw.controllers

    + +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    PlayerControllerRMI.registerView(RemoteViewInterface view)
    +
    +
    Sets the internal View attribute to the given argument; if it has already been called, it won't + do anything, since it's call is allowed once per PlayerController object.
    +
    +
    void
    +
    PlayerControllerRMIInterface.registerView(RemoteViewInterface view)
    +
    +
    Register the given view as the one attached to the remote PlayerControllerRMI instance; if it has already been + called, it won't do anything, since it's call is allowed once per PlayerController object.
    +
    +
    void
    +
    PlayerController.sendJoined()
    +
    +
    Tries to effectively join a match, adding himself to the list of observers and the corresponding + player to the match, if the username is valid.
    +
    +
    +
    +
  • +
  • +
    +

    Uses of WrongNameException in it.polimi.ingsw.server

    + +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    Server.createMatch(String matchName, + int maxPlayers)
    +
    +
    Create a new blank match.
    +
    +
    void
    +
    ServerRMIInterface.createMatch(String matchName, + int maxPlayers)
    +
    +
    Lets the calling view create a new match.
    +
    + +
    Server.joinMatch(String matchName, + String username)
    +
    +
    Lets the calling view join on a match with the given player username, if possible; gives back to the client + an instance of its PlayerControllerRMI, to start communicating through it with the match.
    +
    + +
    ServerRMIInterface.joinMatch(String matchName, + String username)
    +
    +
    Lets the calling view join on a match with the given player username, if possible; gives back to the client + an instance of its PlayerControllerRMI, to start communicating through it with the match.
    +
    +
    +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongStateException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongStateException.html new file mode 100644 index 00000000..5339f93d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongStateException.html @@ -0,0 +1,345 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.WrongStateException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.WrongStateException

+
+
Packages that use WrongStateException
+ +
+
    +
  • +
    +

    Uses of WrongStateException in it.polimi.ingsw.controllers

    + +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    PlayerControllerRMI.chooseInitialCardSide(Side side)
    +
    +
    Communicates the chosen initial card side.
    +
    +
    void
    +
    PlayerControllerRMIInterface.chooseInitialCardSide(Side side)
    +
    +
    Communicates the chosen initial card side.
    +
    +
    void
    +
    PlayerControllerRMI.chooseSecretObjective(Objective objective)
    +
    +
    Communicates the chosen secret objective.
    +
    +
    void
    +
    PlayerControllerRMIInterface.chooseSecretObjective(Objective objective)
    +
    +
    Communicates the chosen secret objective.
    +
    +
    void
    +
    PlayerControllerRMI.drawCard(DrawSource source)
    +
    +
    Draws a card.
    +
    +
    void
    +
    PlayerControllerRMIInterface.drawCard(DrawSource source)
    +
    +
    Draws a card.
    +
    +
    void
    +
    PlayerControllerRMI.drawInitialCard()
    +
    +
    Draws an initial card for the player.
    +
    +
    void
    +
    PlayerControllerRMIInterface.drawInitialCard()
    +
    +
    Draws an initial card for the player.
    +
    +
    void
    +
    PlayerControllerRMI.drawSecretObjectives()
    +
    +
    Draws two secret objectives.
    +
    +
    void
    +
    PlayerControllerRMIInterface.drawSecretObjectives()
    +
    +
    Draws two secret objectives.
    +
    +
    void
    +
    PlayerControllerRMI.playCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
    +
    +
    Plays a card.
    +
    +
    void
    +
    PlayerControllerRMIInterface.playCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
    +
    +
    Plays a card.
    +
    +
    void
    +
    PlayerControllerRMI.registerView(RemoteViewInterface view)
    +
    +
    Sets the internal View attribute to the given argument; if it has already been called, it won't + do anything, since it's call is allowed once per PlayerController object.
    +
    +
    void
    +
    PlayerControllerRMIInterface.registerView(RemoteViewInterface view)
    +
    +
    Register the given view as the one attached to the remote PlayerControllerRMI instance; if it has already been + called, it won't do anything, since it's call is allowed once per PlayerController object.
    +
    +
    void
    +
    PlayerController.sendJoined()
    +
    +
    Tries to effectively join a match, adding himself to the list of observers and the corresponding + player to the match, if the username is valid.
    +
    +
    + +
    +
    Modifier
    +
    Constructor
    +
    Description
    +
     
    +
    PlayerControllerRMI(String username, + Match match)
    +
    +
    Instantiates the internal Player with the given username and sets the internal Match reference to the given one, + add the new Player instance to the match and subscribe this class instance to the match observers.
    +
    +
    +
    +
  • +
  • +
    +

    Uses of WrongStateException in it.polimi.ingsw.gamemodel

    + +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    Match.addPlayer(Player player)
    +
    +
    Adds a new player to the match, assuming it's not null.
    +
    +
    void
    +
    MatchState.addPlayer()
    +
    +
    Checks dynamically if a player can be added in the current state, otherwise throws an exception.
    +
    +
    void
    + +
    +
    Chooses the initial card side.
    +
    +
    void
    +
    MatchState.chooseInitialSide()
    +
    +
    Checks dynamically if a player can choose the initial card side in the current state, otherwise throws an exception.
    +
    +
    void
    + +
    +
    Checks dynamically if a player can choose their secret objective in the current state, otherwise throws an exception.
    +
    +
    void
    +
    Player.chooseSecretObjective(Objective objective)
    +
    +
    Sets the player private objective (only at the start of the game).
    +
    +
    protected PlayableCard
    +
    Match.drawCard(DrawSource source)
    +
    +
    Draws a card from the passed source.
    +
    +
    void
    +
    MatchState.drawCard()
    +
    +
    Checks dynamically if a player can draw a playable card in the current state, otherwise throws an exception.
    +
    +
    void
    +
    Player.drawCard(DrawSource source)
    +
    +
    Adds a card to the player's hand, popping it from the required source
    +
    +
    protected InitialCard
    + +
    +
    Draws a card from the initial cards deck
    +
    +
    void
    +
    MatchState.drawInitialCard()
    +
    +
    Checks dynamically if an initial card can be drawn in the current state, otherwise throws an exception.
    +
    +
    void
    +
    NextTurnState.drawInitialCard()
    +
    +
    This method call is allowed by this class instances if and only if the initial card side choosing + hasn't finished yet.
    +
    + + +
    +
    Gets an initial card from the match.
    +
    + + +
    +
    Gets two objectives from the match objectives deck considered to be secret.
    +
    +
    protected void
    +
    Match.makeMove(Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
    +
    +
    Makes the chosen move on the board of the current player (known because of the internal Match state); + in particular, checks if the placement is valid, then places the card on the player's board and add points + to the player.
    +
    +
    void
    +
    MatchState.makeMove()
    +
    +
    Checks dynamically if a player can make a move in the current state, otherwise throws an exception.
    +
    +
    void
    +
    NextTurnState.makeMove()
    +
    +
    This method call is allowed by this class instances if and only if the match has already started.
    +
    +
    void
    +
    Player.playCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
    +
    +
    Places a card on the player's board, on the give side and in the given position, assuming it's valid.
    +
    + + +
    +
    Extracts two cards from the deck of objectives and returns them.
    +
    +
    void
    + +
    +
    Checks dynamically if a secret objective can be proposed to the current player in the current state, otherwise + throws an exception.
    +
    +
    void
    +
    NextTurnState.proposeSecretObjectives()
    +
    +
    This method call is allowed by this class instances if and only if the match hasn't started yet + and the initial card side choosing has already finished.
    +
    +
    protected void
    +
    Match.setInitialSide(Side side, + Map<Symbol,Integer> availableResources)
    +
    +
    Sets the current player's initial card side.
    +
    +
    protected void
    +
    Match.setSecretObjective(Objective objective)
    +
    +
    Checks that the given objective is one of the proposed ones to the current player + and put the discarded objective back in the objectives deck.
    +
    +
    +
    +
  • +
  • +
    +

    Uses of WrongStateException in it.polimi.ingsw.server

    + +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    Server.joinMatch(String matchName, + String username)
    +
    +
    Lets the calling view join on a match with the given player username, if possible; gives back to the client + an instance of its PlayerControllerRMI, to start communicating through it with the match.
    +
    + +
    ServerRMIInterface.joinMatch(String matchName, + String username)
    +
    +
    Lets the calling view join on a match with the given player username, if possible; gives back to the client + an instance of its PlayerControllerRMI, to start communicating through it with the match.
    +
    +
    +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongTurnException.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongTurnException.html new file mode 100644 index 00000000..c8672b2e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/class-use/WrongTurnException.html @@ -0,0 +1,193 @@ + + + + +Uses of Class it.polimi.ingsw.exceptions.WrongTurnException (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.exceptions.WrongTurnException

+
+
Packages that use WrongTurnException
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/package-summary.html new file mode 100644 index 00000000..72a45fe8 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/package-summary.html @@ -0,0 +1,120 @@ + + + + +it.polimi.ingsw.exceptions (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.exceptions

+
+
+
package it.polimi.ingsw.exceptions
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/package-tree.html new file mode 100644 index 00000000..507eb173 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/package-tree.html @@ -0,0 +1,95 @@ + + + + +it.polimi.ingsw.exceptions Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.exceptions

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/exceptions/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/exceptions/package-use.html new file mode 100644 index 00000000..6e8723a4 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/exceptions/package-use.html @@ -0,0 +1,155 @@ + + + + +Uses of Package it.polimi.ingsw.exceptions (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.exceptions

+
+
Packages that use it.polimi.ingsw.exceptions
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/AfterDrawState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/AfterDrawState.html new file mode 100644 index 00000000..9c74393b --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/AfterDrawState.html @@ -0,0 +1,219 @@ + + + + +AfterDrawState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AfterDrawState

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.MatchState +
it.polimi.ingsw.gamemodel.AfterDrawState
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class AfterDrawState +extends MatchState +implements Serializable
+
Subclass of MatchState. This is the state in which the match recognize if it's finished or it has to continue.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AfterDrawState

      +
      public AfterDrawState(Match match)
      +
      Initializes this instance.
      +
      +
      Parameters:
      +
      match - The match in this state
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/AfterMoveState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/AfterMoveState.html new file mode 100644 index 00000000..80faef69 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/AfterMoveState.html @@ -0,0 +1,235 @@ + + + + +AfterMoveState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AfterMoveState

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.MatchState +
it.polimi.ingsw.gamemodel.AfterMoveState
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class AfterMoveState +extends MatchState +implements Serializable
+
Subclass of MatchState. This is the state in which the match allows a player to draw a card.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AfterMoveState

      +
      public AfterMoveState(Match match)
      +
      Initializes this instance.
      +
      +
      Parameters:
      +
      match - The match in this state
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      drawCard

      +
      public void drawCard()
      +
      This method call is allowed by this class instances.
      +
      +
      Overrides:
      +
      drawCard in class MatchState
      +
      +
      +
    • +
    • +
      +

      transition

      +
      public void transition()
      +
      Transitions to AfterDrawState.
      +
      +
      Specified by:
      +
      transition in class MatchState
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Board.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Board.html new file mode 100644 index 00000000..fd3e3ce5 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Board.html @@ -0,0 +1,354 @@ + + + + +Board (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Board

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.Board
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class Board +extends Object +implements Serializable
+
Board is the class that contains all the information relative to a Player's status
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Board

      +
      public Board()
      +
      Class constructor. No inputs taken as the board starts empty
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAvailableResources

      +
      public Map<Symbol,Integer> getAvailableResources()
      +
      Getter for the total resources of a player
      +
      +
      Returns:
      +
      the resources of a player
      +
      +
      +
    • +
    • +
      +

      getPlacedCards

      +
      public Map<Pair<Integer,Integer>,PlacedCard> getPlacedCards()
      +
      Getter for the board's placed cards
      +
      +
      Returns:
      +
      map containing all the placed cards indexed by their coordinates
      +
      +
      +
    • +
    • +
      +

      getCurrentHand

      +
      public List<PlayableCard> getCurrentHand()
      +
      Getter for the hand of the player (which must be composed of three PlayableCard), which is visible + to every player
      +
      +
      Returns:
      +
      the player's hand
      +
      +
      +
    • +
    • +
      +

      removeHandCard

      +
      protected void removeHandCard(PlayableCard card) + throws HandException
      +
      Removes a card from the hand of the player
      +
      +
      Parameters:
      +
      card - the card that must be removed from the player's hand
      +
      Throws:
      +
      HandException - if the player does not have exactly 3 cards in his hand
      +
      +
      +
    • +
    • +
      +

      addHandCard

      +
      protected void addHandCard(PlayableCard card) + throws HandException
      +
      Adds a card to the player's hand (which is visible to every player)
      +
      +
      Parameters:
      +
      card - the card to put in the hand
      +
      Throws:
      +
      HandException - if the player already has 3 cards
      +
      +
      +
    • +
    • +
      +

      setInitialCard

      +
      protected void setInitialCard(InitialCard card, + Side side) + throws CardException
      +
      Places the initial card in the (0, 0) coordinates, on the desired side
      +
      +
      Parameters:
      +
      card - the initial card
      +
      side - the desired side
      +
      Throws:
      +
      CardException - if the (0, 0) position is already occupied
      +
      +
      +
    • +
    • +
      +

      placeCard

      +
      protected int placeCard(Pair<Integer,Integer> coord, + PlayableCard card, + Side side, + int turn) + throws CardException
      +
      This method will add to the board the given card (assuming the positioning is valid), and update the player's resources
      +
      +
      Parameters:
      +
      coord - the x and y coordinates in which the card must be placed
      +
      card - the card to be placed
      +
      side - the side of the card to be placed
      +
      turn - the turn of the game in which the card is played
      +
      Returns:
      +
      the points gained from playing card
      +
      Throws:
      +
      CardException - if the card type is not known (neither a ResourceCard nor a GoldCard)
      +
      +
      +
    • +
    • +
      +

      verifyCardPlacement

      +
      public PlacementOutcome verifyCardPlacement(Pair<Integer,Integer> coord, + Card card, + Side side) + throws CardException
      +
      Checks whether the positioning is valid: the card has to be in the player's hand (note that this method won't be called on the initial card), + the given coordinates must be valid, and if the card has a requirement it must be met
      +
      +
      Parameters:
      +
      coord - the coordinates in which the card should be played
      +
      card - the card to check on
      +
      side - the side of the card (needed for requirement check)
      +
      Returns:
      +
      the outcome for the placement, which is valid only if all conditions are met
      +
      Throws:
      +
      CardException - if the card is not in the player's hand
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Card.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Card.html new file mode 100644 index 00000000..ed789dd9 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Card.html @@ -0,0 +1,300 @@ + + + + +Card (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Card

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.Card
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
InitialCard, PlayableCard
+
+
+
public abstract class Card +extends Object +implements Serializable
+
Highest abstraction of the card object, with common aspects for every card in + the game (except objectives).
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      front

      +
      protected CardFace front
      +
      +
    • +
    • +
      +

      back

      +
      protected CardFace back
      +
      +
    • +
    • +
      +

      id

      +
      protected Integer id
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Card

      +
      public Card()
      +
      Empty constructor used for deserialization.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getSide

      +
      public CardFace getSide(Side side)
      +
      Getter for the required side of the card
      +
      +
      Parameters:
      +
      side - the required side
      +
      Returns:
      +
      the structure of the specified side
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      getId

      +
      public Integer getId()
      +
      +
      Returns:
      +
      The card ID
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/CardFace.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/CardFace.html new file mode 100644 index 00000000..b3cbe411 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/CardFace.html @@ -0,0 +1,238 @@ + + + + +CardFace (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CardFace

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.CardFace
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class CardFace +extends Object +implements Serializable
+
Topological definition of a card's side
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CardFace

      +
      public CardFace(Symbol topLeft, + Symbol topRight, + Symbol bottomLeft, + Symbol bottomRight, + Set<Symbol> center)
      +
      Class constructor.
      +
      +
      Parameters:
      +
      topLeft - Top left corner
      +
      topRight - Top right corner
      +
      bottomLeft - Bottom left corner
      +
      bottomRight - Bottom right corner
      +
      center - Center of the card
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCorner

      +
      public Symbol getCorner(Corner corner) + throws CardException
      +
      Used to get the symbol present in one of the four corners of a card
      +
      +
      Parameters:
      +
      corner - which of the four corners we want
      +
      Returns:
      +
      the symbol the specified corner contains
      +
      Throws:
      +
      CardException - if the specified corner does not exist
      +
      +
      +
    • +
    • +
      +

      getCenter

      +
      public Set<Symbol> getCenter()
      +
      Getter for the center of the card
      +
      +
      Returns:
      +
      the set containing all symbols the center of the card contains
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/ChooseInitialSideState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/ChooseInitialSideState.html new file mode 100644 index 00000000..72ad814d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/ChooseInitialSideState.html @@ -0,0 +1,236 @@ + + + + +ChooseInitialSideState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ChooseInitialSideState

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.MatchState +
it.polimi.ingsw.gamemodel.ChooseInitialSideState
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class ChooseInitialSideState +extends MatchState +implements Serializable
+
Subclass of MatchState. This is the state in which the match is giving an initial card to a player and + waiting him to choose its side.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ChooseInitialSideState

      +
      public ChooseInitialSideState(Match match)
      +
      Initializes this instance.
      +
      +
      Parameters:
      +
      match - The match in this state
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      chooseInitialSide

      +
      public void chooseInitialSide()
      +
      This method call is allowed by this class instances.
      +
      +
      Overrides:
      +
      chooseInitialSide in class MatchState
      +
      +
      +
    • +
    • +
      +

      transition

      +
      public void transition()
      +
      Transitions to NextTurnState
      +
      +
      Specified by:
      +
      transition in class MatchState
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/ChooseSecretObjectiveState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/ChooseSecretObjectiveState.html new file mode 100644 index 00000000..9e8afeb6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/ChooseSecretObjectiveState.html @@ -0,0 +1,236 @@ + + + + +ChooseSecretObjectiveState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ChooseSecretObjectiveState

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.MatchState +
it.polimi.ingsw.gamemodel.ChooseSecretObjectiveState
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class ChooseSecretObjectiveState +extends MatchState +implements Serializable
+
Subclass of MatchState. This is the state in which the match is giving two secret objectives to a player and + waiting him to choose one of them.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ChooseSecretObjectiveState

      +
      public ChooseSecretObjectiveState(Match match)
      +
      Initializes this instance.
      +
      +
      Parameters:
      +
      match - The match in this state
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Color.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Color.html new file mode 100644 index 00000000..8bec92f3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Color.html @@ -0,0 +1,253 @@ + + + + +Color (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Color

+
+
java.lang.Object +
java.lang.Enum<Color> +
it.polimi.ingsw.gamemodel.Color
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Color>, Constable
+
+
+
public enum Color +extends Enum<Color>
+
Represents pawns colors.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      RED

      +
      public static final Color RED
      +
      +
    • +
    • +
      +

      BLUE

      +
      public static final Color BLUE
      +
      +
    • +
    • +
      +

      GREEN

      +
      public static final Color GREEN
      +
      +
    • +
    • +
      +

      YELLOW

      +
      public static final Color YELLOW
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Color[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Color valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Corner.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Corner.html new file mode 100644 index 00000000..b4ddcde7 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Corner.html @@ -0,0 +1,253 @@ + + + + +Corner (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Corner

+
+
java.lang.Object +
java.lang.Enum<Corner> +
it.polimi.ingsw.gamemodel.Corner
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Corner>, Constable
+
+
+
public enum Corner +extends Enum<Corner>
+
All the corners of a card, which can contain a Symbol
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      TOP_LEFT

      +
      public static final Corner TOP_LEFT
      +
      +
    • +
    • +
      +

      TOP_RIGHT

      +
      public static final Corner TOP_RIGHT
      +
      +
    • +
    • +
      +

      BOTTOM_LEFT

      +
      public static final Corner BOTTOM_LEFT
      +
      +
    • +
    • +
      +

      BOTTOM_RIGHT

      +
      public static final Corner BOTTOM_RIGHT
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Corner[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Corner valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/DrawSource.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/DrawSource.html new file mode 100644 index 00000000..6ef33d4e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/DrawSource.html @@ -0,0 +1,287 @@ + + + + +DrawSource (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class DrawSource

+
+
java.lang.Object +
java.lang.Enum<DrawSource> +
it.polimi.ingsw.gamemodel.DrawSource
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<DrawSource>, Constable
+
+
+
public enum DrawSource +extends Enum<DrawSource>
+
All the sources a player can draw from: the decks and the four visible cards.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      GOLDS_DECK

      +
      public static final DrawSource GOLDS_DECK
      +
      Gold cards deck
      +
      +
    • +
    • +
      +

      RESOURCES_DECK

      +
      public static final DrawSource RESOURCES_DECK
      +
      Resource cards deck
      +
      +
    • +
    • +
      +

      FIRST_VISIBLE

      +
      public static final DrawSource FIRST_VISIBLE
      +
      First gold card (first among all)
      +
      +
    • +
    • +
      +

      SECOND_VISIBLE

      +
      public static final DrawSource SECOND_VISIBLE
      +
      Second gold card (second among all)
      +
      +
    • +
    • +
      +

      THIRD_VISIBLE

      +
      public static final DrawSource THIRD_VISIBLE
      +
      First resource card (third among all)
      +
      +
    • +
    • +
      +

      FOURTH_VISIBLE

      +
      public static final DrawSource FOURTH_VISIBLE
      +
      Second resource card (fourth among all)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static DrawSource[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static DrawSource valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/FinalState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/FinalState.html new file mode 100644 index 00000000..72aa2dc7 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/FinalState.html @@ -0,0 +1,236 @@ + + + + +FinalState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FinalState

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.MatchState +
it.polimi.ingsw.gamemodel.FinalState
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class FinalState +extends MatchState +implements Serializable
+
Subclass of MatchState. This is the state in which the match is when it's finished, so players are + allowed to leave.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      FinalState

      +
      public FinalState(Match match)
      +
      Initializes this instance.
      +
      +
      Parameters:
      +
      match - The match in this state
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      removePlayer

      +
      public void removePlayer()
      +
      This method call is allowed by this class instances.
      +
      +
      Overrides:
      +
      removePlayer in class MatchState
      +
      +
      +
    • +
    • +
      +

      transition

      +
      public void transition()
      +
      This call doesn't have any effect, apart from logging it to stderr.
      +
      +
      Specified by:
      +
      transition in class MatchState
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/GameDeck.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/GameDeck.html new file mode 100644 index 00000000..421d3ef0 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/GameDeck.html @@ -0,0 +1,300 @@ + + + + +GameDeck (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GameDeck<T>

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.GameDeck<T>
+
+
+
+
Type Parameters:
+
T - the type of deck, which can be a ResourceCard, GoldCard, InitialCard or Objective
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class GameDeck<T> +extends Object +implements Serializable
+
Generic used to create the decks for all the types of cards
+
+
See Also:
+
+ +
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Class constructor, takes no argument as the decks start empty
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    add(T card)
    +
    +
    Adds a card to the bottom of the deck
    +
    +
    int
    + +
    +
    Getter for the deck's size
    +
    +
    boolean
    + +
    +
    Checks whether the deck is empty or not
    +
    + + +
    +
    Returns a card from the deck's top without removing it (returns null if empty)
    +
    + + +
    +
    Removes a card from the deck's top (null if the deck is empty)
    +
    + +
    pop()
    +
    +
    Removes a card from the deck's top (throws exception if the deck is empty)
    +
    +
    void
    + +
    +
    Shuffles the deck
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GameDeck

      +
      public GameDeck()
      +
      Class constructor, takes no argument as the decks start empty
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      add

      +
      public void add(T card)
      +
      Adds a card to the bottom of the deck
      +
      +
      Parameters:
      +
      card - the card to add
      +
      +
      +
    • +
    • +
      +

      getSize

      +
      public int getSize()
      +
      Getter for the deck's size
      +
      +
      Returns:
      +
      the deck's size
      +
      +
      +
    • +
    • +
      +

      pop

      +
      public T pop() + throws DeckException
      +
      Removes a card from the deck's top (throws exception if the deck is empty)
      +
      +
      Returns:
      +
      the removed card
      +
      Throws:
      +
      DeckException - if the deck is empty
      +
      +
      +
    • +
    • +
      +

      peek

      +
      public T peek()
      +
      Returns a card from the deck's top without removing it (returns null if empty)
      +
      +
      Returns:
      +
      the card
      +
      +
      +
    • +
    • +
      +

      poll

      +
      public T poll()
      +
      Removes a card from the deck's top (null if the deck is empty)
      +
      +
      Returns:
      +
      the removed card (null if the deck is empty)
      +
      +
      +
    • +
    • +
      +

      shuffle

      +
      public void shuffle()
      +
      Shuffles the deck
      +
      +
    • +
    • +
      +

      isEmpty

      +
      public boolean isEmpty()
      +
      Checks whether the deck is empty or not
      +
      +
      Returns:
      +
      whether the deck is empty or not
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/GoldCard.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/GoldCard.html new file mode 100644 index 00000000..5731fceb --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/GoldCard.html @@ -0,0 +1,296 @@ + + + + +GoldCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GoldCard

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class GoldCard +extends PlayableCard
+
The front side of these cards always gives points, but needs a certain requirement to be met in order to be played
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GoldCard

      +
      public GoldCard(CardFace front, + Symbol reign, + Symbol multiplier, + int points, + QuantityRequirement req) + throws InvalidResourceException
      +
      Class constructor. It needs to only take the front as an argument, since the back is handled by its superclass PlayableCard
      +
      +
      Parameters:
      +
      front - the front side of the card
      +
      reign - the reign of the card
      +
      multiplier - the symbol whose number of resources multiplies the points parameter
      +
      points - the number every resource of the given type is worth
      +
      req - the requirement that must be met in order to be able to play the card
      +
      Throws:
      +
      InvalidResourceException - if the passed resource is not in Symbol.getReigns()
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getMultiplier

      +
      public Symbol getMultiplier()
      +
      Getter for the GoldCard class
      +
      +
      Returns:
      +
      the multiplier
      +
      +
      +
    • +
    • +
      +

      getRequirement

      +
      public QuantityRequirement getRequirement()
      +
      Getter for the GoldCard class
      +
      +
      Returns:
      +
      the quantity requirement for the gold card to be played
      +
      +
      +
    • +
    • +
      +

      getPoints

      +
      public int getPoints()
      +
      Getter for the GoldCard class
      +
      +
      Returns:
      +
      points held by the card
      +
      +
      +
    • +
    • +
      +

      calculatePoints

      +
      public int calculatePoints(Board board, + Pair<Integer,Integer> coord)
      +
      Will compute the total points this card gives based on the board it's played on. + It MUST be called AFTER the placement of the gold card
      +
      +
      Parameters:
      +
      board - the board on which we want to compute the points this card will give
      +
      coord - the coordinates of the card just placed (needed fot corner objectives)
      +
      Returns:
      +
      the points gained from playing the gold card
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/InitialCard.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/InitialCard.html new file mode 100644 index 00000000..7345a884 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/InitialCard.html @@ -0,0 +1,191 @@ + + + + +InitialCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InitialCard

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.Card +
it.polimi.ingsw.gamemodel.InitialCard
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class InitialCard +extends Card +implements Serializable
+
Every player has an initial card (which will automatically be placed in the + center of the board)
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InitialCard

      +
      public InitialCard(CardFace front, + CardFace back)
      +
      The initial card only gives corners and resources, never points, so we only + need to know its topological description
      +
      +
      Parameters:
      +
      front - the front side of the card
      +
      back - the back side of the card
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Match.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Match.html new file mode 100644 index 00000000..bce7c37f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Match.html @@ -0,0 +1,815 @@ + + + + +Match (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Match

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.Match
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class Match +extends Object +implements Serializable
+
Represents the match played by Player instances, therefore implements a slice of game logic + using drawCard(...), setInitialSide(...), setSecretObjective(...), proposeSecretObjective(...), etc. + Other methods serve the purpose of being called by MatchState subclasses in order to notify the change + of the current game state or trigger some changes in the match, such as setupBoards(...), + doStart(...), etc. + Few methods are called by the current player of the match, used to trigger a change in the match and so notify that + an event occurred, such as nextPlayer(...).
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Match

      +
      public Match(int maxPlayers, + GameDeck<InitialCard> initialsDeck, + GameDeck<ResourceCard> resourcesDeck, + GameDeck<GoldCard> goldsDeck, + GameDeck<Objective> objectivesDeck) + throws IllegalArgumentException
      +
      Initializes main Match attributes and allocate the attribute players List, assuming no parameter is null.
      +
      +
      Parameters:
      +
      maxPlayers - maximum number of players to be added to the match, chosen by the first player joining the match
      +
      initialsDeck - deck of initial cards
      +
      resourcesDeck - deck of resource cards
      +
      goldsDeck - deck of gold cards
      +
      objectivesDeck - deck of objectives
      +
      Throws:
      +
      IllegalArgumentException - if the decks provided do not have enough cards to start a game or maxPlayers are not 2,3,4
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addPlayer

      +
      public void addPlayer(Player player) + throws WrongStateException, +AlreadyUsedUsernameException
      +
      Adds a new player to the match, assuming it's not null. + Note: Called by the Controller when a player joins the match.
      +
      +
      Parameters:
      +
      player - player to be added to the match
      +
      Throws:
      +
      WrongStateException - if called while in a state that doesn't allow adding players
      +
      AlreadyUsedUsernameException - if there is already a player in the match that has the same username
      +
      +
      +
    • +
    • +
      +

      removePlayer

      +
      public void removePlayer(Player player)
      +
      Removes a player from the match, assuming the player is in the match. + Note: Called by the Controller when a player quits the match.
      +
      +
      Parameters:
      +
      player - player to be removed from the match
      +
      +
      +
    • +
    • +
      +

      isFull

      +
      public boolean isFull()
      +
      Verifies if the match is full, thus no more players can join. + Note: Used by the Controller
      +
      +
      Returns:
      +
      true if the match is full, false otherwise
      +
      +
      +
    • +
    • +
      +

      nextPlayer

      +
      protected void nextPlayer()
      +
      Modifies the current player according to the next turn: if it's the first turn, the current player is the first + one in the players List, the turn order then follows the players List order, in a circular way. + Ex. 1st -> 2nd -> 3rd ---> 1st -> 2nd etc. + Note: Called by NextTurnState every time a new turn starts.
      +
      +
    • +
    • +
      +

      isFinished

      +
      public boolean isFinished()
      +
      Verifies if the match is finished. + Note: Called by the Controller and NextTurnState.
      +
      +
      Returns:
      +
      true if the match is finished, false otherwise
      +
      +
      +
    • +
    • +
      +

      doInitialTurnFinish

      +
      protected void doInitialTurnFinish()
      +
      Marks the initial turn as finished, assuming the initial turn hasn't finished yet. + Called by ChooseInitialCardState once the initial turn is finished.
      +
      +
    • +
    • +
      +

      isInitialTurnFinished

      +
      public boolean isInitialTurnFinished()
      +
      Verifies if the initial turn is finished. + Note: Called by NextTurnState.
      +
      +
      Returns:
      +
      true if the initial turn is finished, false otherwise
      +
      +
      +
    • +
    • +
      +

      doStart

      +
      protected void doStart()
      +
      Marks the match as started, assuming the match hasn't started yet. + Note: Called by ChooseSecretObjectiveState once the match is ready to start.
      +
      +
    • +
    • +
      +

      isStarted

      +
      public boolean isStarted()
      +
      Verifies if the match is started. + Note: Called by NextTurnState to check when to effectively start the match.
      +
      +
      Returns:
      +
      true if the match is started, false otherwise
      +
      +
      +
    • +
    • +
      +

      getCurrentPlayer

      +
      public Player getCurrentPlayer()
      +
      Gets the player who's playing (or choosing the secret objective) at the moment. + Note: Used by the Controller.
      +
      +
      Returns:
      +
      the player playing at the moment, null if the match has never reached NextTurnState
      +
      +
      +
    • +
    • +
      +

      getPlayers

      +
      public List<Player> getPlayers()
      +
      Gets the match players.
      +
      +
      Returns:
      +
      the match players in a List, dynamically defined as an ArrayList
      +
      +
      +
    • +
    • +
      +

      setState

      +
      protected void setState(MatchState state)
      +
      Sets the current match state, assuming it's not null. + Note: Called by each state to let the match enter to the next state.
      +
      +
      Parameters:
      +
      state - the state in which the match has to be
      +
      +
      +
    • +
    • +
      +

      drawInitialCard

      +
      protected InitialCard drawInitialCard() + throws WrongStateException
      +
      Draws a card from the initial cards deck
      +
      +
      Returns:
      +
      the card drawn from the initial cards deck
      +
      Throws:
      +
      WrongStateException - if called while in a state that doesn't allow drawing an initial card
      +
      +
      +
    • +
    • +
      +

      proposeSecretObjectives

      +
      protected Pair<Objective,Objective> proposeSecretObjectives() + throws WrongStateException
      +
      Extracts two cards from the deck of objectives and returns them. + Note: Called by the Controller.
      +
      +
      Returns:
      +
      two objective cards extracted from the objectives deck
      +
      Throws:
      +
      WrongStateException
      +
      +
      +
    • +
    • +
      +

      setSecretObjective

      +
      protected void setSecretObjective(Objective objective) + throws WrongChoiceException, +WrongStateException
      +
      Checks that the given objective is one of the proposed ones to the current player + and put the discarded objective back in the objectives deck. + Note: Called by the current player
      +
      +
      Parameters:
      +
      objective - the accepted objective by the player (NOT the discarded one)
      +
      Throws:
      +
      WrongChoiceException
      +
      WrongStateException
      +
      +
      +
    • +
    • +
      +

      setupPlayers

      +
      protected void setupPlayers()
      +
      Shuffles the players turns order and gives them their pawn color. + Note: Called by SetupState.
      +
      +
    • +
    • +
      +

      setupDecks

      +
      protected void setupDecks()
      +
      Shuffles all thr cards decks and places the visible cards on the board + Note: Called by SetupState.
      +
      +
    • +
    • +
      +

      setupBoards

      +
      protected void setupBoards()
      +
      Gives one gold card and two resource cards to each player (hand) + and sets the initial card for each of them. + Note: Called by WaitState.
      +
      +
    • +
    • +
      +

      makeMove

      +
      protected void makeMove(Pair<Integer,Integer> coords, + PlayableCard card, + Side side) + throws WrongStateException, +WrongChoiceException
      +
      Makes the chosen move on the board of the current player (known because of the internal Match state); + in particular, checks if the placement is valid, then places the card on the player's board and add points + to the player. + Note: Called by the current player.
      +
      +
      Parameters:
      +
      coords - coordinates in which to place the card
      +
      card - card to place
      +
      side - side of the card to be placed
      +
      Throws:
      +
      WrongStateException - if called while in a state that doesn't allow making moves
      +
      WrongChoiceException - if the move is not allowed (placement not allowed, or not enough resources, or card + not in player's hand)
      +
      +
      +
    • +
    • +
      +

      drawCard

      +
      protected PlayableCard drawCard(DrawSource source) + throws WrongStateException, +WrongChoiceException
      +
      Draws a card from the passed source. If the caller wants to draw one of the four visible cards, a rule is applied: + the first and second visible cards (FIRST/SECOND_VISIBLE) will be substituted by a gold card if possible, if not, + by a resource card, if not again, they will be null (then not substituted); the first and second visible cards + (THIRD/FOURTH_VISIBLE) will be substituted by a resource card if possible, if not, by a gold card, if not again, + they will be null (then not substituted). + Note: Called by the current player.
      +
      +
      Parameters:
      +
      source - the source to draw a card from
      +
      Returns:
      +
      the card drawn
      +
      Throws:
      +
      WrongStateException - if called while in a state that doesn't allow making moves
      +
      WrongChoiceException - if the source does not have cards
      +
      +
      +
    • +
    • +
      +

      setInitialSide

      +
      protected void setInitialSide(Side side, + Map<Symbol,Integer> availableResources) + throws WrongStateException
      +
      Sets the current player's initial card side.
      +
      +
      Parameters:
      +
      side - the side to put the initial card on
      +
      Throws:
      +
      WrongStateException - if called while in a state that doesn't allow choosing the initial card side
      +
      +
      +
    • +
    • +
      +

      decideWinner

      +
      protected void decideWinner()
      +
      Calculates the winner (or winners)
      +
      +
    • +
    • +
      +

      getPlayersFinalRanking

      +
      public List<Pair<Player,Boolean>> getPlayersFinalRanking()
      +
      Getter for the final ranking of players. Return a valid result if and only if called when the match is in the + FinalState, so it's finished.
      +
      +
      Returns:
      +
      Players ranking of the match at the end of it; the List order represents the ranking order, the Boolean + represent if the related player is a winner; this is needed since the match can end in a tie, in such case the + first two/three players of the List will have a True flag
      +
      +
      +
    • +
    • +
      +

      getVisibleObjectives

      +
      public Pair<Objective,Objective> getVisibleObjectives()
      +
      Returns the visible objectives.
      +
      +
      Returns:
      +
      a Pair containing the two visible objectives
      +
      +
      +
    • +
    • +
      +

      getVisiblePlayableCards

      +
      public Map<DrawSource,PlayableCard> getVisiblePlayableCards()
      +
      Getter for the four visible playable cards (i.e. resource cards and gold cards, not objectives) on the common + table.
      +
      +
      Returns:
      +
      a Map that links each visible playable card to a DrawSource (restricted to FIRST_VISIBLE, SECOND_VISIBLE, + THIRD_VISIBLE, FOURTH_VISIBLE)
      +
      +
      +
    • +
    • +
      +

      getCurrentState

      +
      public MatchState getCurrentState()
      +
      Getter for the current match state.
      +
      +
      Returns:
      +
      the current state of the match
      +
      +
      +
    • +
    • +
      +

      getDecksTopReigns

      +
      public Pair<Symbol,Symbol> getDecksTopReigns()
      +
      Getter for the cards back on the top of the decks (i.e. those visible top cards). + Both of them always contain just a reign.
      +
      +
      Returns:
      +
      Pair of two reign Symbol (see Symbol.getReigns()), the first one regards the + top card of gold cards deck, the second one regards the top card of resource cards deck
      +
      +
      +
    • +
    • +
      +

      getMaxPlayers

      +
      public int getMaxPlayers()
      +
      Getter for the maximum number of player for the match
      +
      +
      Returns:
      +
      The maximum number of player
      +
      +
      +
    • +
    • +
      +

      subscribeObserver

      +
      public void subscribeObserver(MatchObserver observer)
      +
      Adds the given MatchObserver to those observers notified on match events.
      +
      +
      Parameters:
      +
      observer - The observer to be notified from now on when an event occurs
      +
      +
      +
    • +
    • +
      +

      unsubscribeObserver

      +
      public void unsubscribeObserver(MatchObserver observer)
      +
      Removes the given MatchObserver to those observers notified on match events.
      +
      +
      Parameters:
      +
      observer - The observer to be removed
      +
      +
      +
    • +
    • +
      +

      notifyMatchStart

      +
      protected void notifyMatchStart()
      +
      Notifies all match observers that the match has started. + It's called by WaitState methods after the match setup, that's why it needs to be protected.
      +
      +
    • +
    • +
      +

      sendBroadcastText

      +
      protected void sendBroadcastText(Player sender, + String text)
      +
      Sends a broadcast message in the chat. Notifies all observers of the event. + Called by Player
      +
      +
      Parameters:
      +
      sender - player that sends the message
      +
      text - content of the message
      +
      +
      +
    • +
    • +
      +

      sendPrivateText

      +
      protected void sendPrivateText(Player sender, + Player recipient, + String text)
      +
      Sends a private message to the recipient chat. Notifies all observers of the event. + Called by Player
      +
      +
      Parameters:
      +
      sender - player that sends the message
      +
      recipient - player that receives the message
      +
      text - content of the message
      +
      +
      +
    • +
    • +
      +

      isRejoinable

      +
      public boolean isRejoinable()
      +
      If the match is rejoinable (not every player is connected)
      +
      +
      Returns:
      +
      if the match is rejoinable
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/MatchObserver.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/MatchObserver.html new file mode 100644 index 00000000..c91dda13 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/MatchObserver.html @@ -0,0 +1,384 @@ + + + + +MatchObserver (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface MatchObserver

+
+
+
+
All Known Implementing Classes:
+
MatchStatusObserver, PlayerController, PlayerControllerRMI, PlayerControllerTCP
+
+
+
public interface MatchObserver
+
Interface to be implemented by any class that wants to be an observer of Match, so wants to be able to + get notified when an event occurs in a match (to which it's subscribed).
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      matchStarted

      +
      void matchStarted()
      +
      Notifies that the match has just started.
      +
      +
    • +
    • +
      +

      someoneJoined

      +
      void someoneJoined(Player someone)
      +
      Notifies that someone has joined the match. + Note that Match calls this method on all MatchObservers instance subscribed to itself, then + even the MatchObserver causing this event gets notified.
      +
      +
      Parameters:
      +
      someone - The Player instance that has joined
      +
      +
      +
    • +
    • +
      +

      someoneQuit

      +
      void someoneQuit(Player someone)
      +
      Notifies that someone has quit from the match. + Note that Match calls this method on all MatchObservers instance subscribed to itself, then + even the MatchObserver causing this event gets notified.
      +
      +
      Parameters:
      +
      someone - The Player instance that has quit
      +
      +
      +
    • +
    • +
      +

      someoneDrewInitialCard

      +
      void someoneDrewInitialCard(Player someone, + InitialCard card)
      +
      Notifies that someone has drawn its initial card. + Note that Match calls this method on all MatchObservers instance subscribed to itself, then + even the MatchObserver causing this event gets notified.
      +
      +
      Parameters:
      +
      someone - The player instance that has drawn the card
      +
      card - The initial card that has been drawn
      +
      +
      +
    • +
    • +
      +

      someoneSetInitialSide

      +
      void someoneSetInitialSide(Player someone, + Side side, + Map<Symbol,Integer> availableResources)
      +
      Notifies that someone has chosen its initial card side. + Note that Match calls this method on all MatchObservers instance subscribed to itself, then + even the MatchObserver causing this event gets notified.
      +
      +
      Parameters:
      +
      someone - The player instance that has chosen the side
      +
      side - The chosen initial card side
      +
      availableResources - The resources available at the moment to the player that set its initial card side
      +
      +
      +
    • +
    • +
      +

      someoneDrewSecretObjective

      +
      void someoneDrewSecretObjective(Player someone, + Pair<Objective,Objective> objectives)
      +
      Notifies that someone has drawn two secret objectives. + Note that Match calls this method on all MatchObservers instance subscribed to itself, then + even the MatchObserver causing this event gets notified.
      +
      +
      Parameters:
      +
      someone - The player instance that has drawn the objectives
      +
      objectives - The two proposed objectives
      +
      +
      +
    • +
    • +
      +

      someoneChoseSecretObjective

      +
      void someoneChoseSecretObjective(Player someone, + Objective objective)
      +
      Notifies that someone has chosen the secret objective. + Note that Match calls this method on all MatchObservers instance subscribed to itself, then + even the MatchObserver causing this event gets notified.
      +
      +
      Parameters:
      +
      someone - The player instance that has chosen the secret objective
      +
      objective - The chosen secret objective
      +
      +
      +
    • +
    • +
      +

      someonePlayedCard

      +
      void someonePlayedCard(Player someone, + Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
      +
      Notifies that someone has played a card. + Note that Match calls this method on all MatchObservers instance subscribed to itself, then + even the MatchObserver causing this event gets notified.
      +
      +
      Parameters:
      +
      someone - The Player instance that has played a card
      +
      coords - The coordinates on which the card has been placed
      +
      card - The PlayableCard that has been played
      +
      side - The side on which the card has been placed
      +
      +
      +
    • +
    • +
      +

      someoneDrewCard

      +
      void someoneDrewCard(Player someone, + DrawSource source, + PlayableCard card, + PlayableCard replacementCard)
      +
      Notifies that someone has drawn a card. + The replacement card is the one that has taken the place of the drawn one, it's needed since observers have to + know the reign of the new card on top of the decks. + Note that Match calls this method on all MatchObservers instance subscribed to itself, then + even the MatchObserver causing this event gets notified.
      +
      +
      Parameters:
      +
      someone - The Player instance that has drawn a card
      +
      source - The drawing source from which the card has been drawn
      +
      card - The card that has been drawn
      +
      replacementCard - The card that has replaced the drawn card
      +
      +
      +
    • +
    • +
      +

      someoneSentBroadcastText

      +
      void someoneSentBroadcastText(Player someone, + String text)
      +
      Notifies that someone has sent a broadcast message.
      +
      +
      Parameters:
      +
      someone - The sender username
      +
      text - The message content
      +
      +
      +
    • +
    • +
      +

      someoneSentPrivateText

      +
      void someoneSentPrivateText(Player someone, + Player recipient, + String text)
      +
      Notifies that someone has sent a private message to this player.
      +
      +
      Parameters:
      +
      someone - The sender username
      +
      recipient - The recipient username
      +
      text - The message content
      +
      +
      +
    • +
    • +
      +

      matchFinished

      +
      void matchFinished()
      +
      Notifies that the match has just finished.
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/MatchObserverCallable.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/MatchObserverCallable.html new file mode 100644 index 00000000..3084b110 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/MatchObserverCallable.html @@ -0,0 +1,156 @@ + + + + +MatchObserverCallable (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface MatchObserverCallable

+
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public interface MatchObserverCallable
+
Functional interface used to represents a method call (call(MatchObserver)) on a MatchObserver.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    call(MatchObserver matchObserver)
    +
    +
    Generic method call on a MatchObserver.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      call

      +
      void call(MatchObserver matchObserver)
      +
      Generic method call on a MatchObserver.
      +
      +
      Parameters:
      +
      matchObserver - The match observer on which to call a method
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/MatchState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/MatchState.html new file mode 100644 index 00000000..8e3760de --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/MatchState.html @@ -0,0 +1,402 @@ + + + + +MatchState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MatchState

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.MatchState
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
AfterDrawState, AfterMoveState, ChooseInitialSideState, ChooseSecretObjectiveState, FinalState, NextTurnState, WaitState
+
+
+
public abstract class MatchState +extends Object +implements Serializable
+
Represents an appendix of Match. + Match fully delegates to this class, through composition, the role of keeping track of the current game state: it + throws exceptions when a Match method is called while being in the wrong state and triggers some Match behavior + (calling match.someMethod(...)) when a certain transition has occurred. + Each method is supposed to be overridden by a subclass of MatchState if and only if it is allowed to be called from + that specific subclass; if not overridden, the MatchState version of the method will be called and thus an exception + will be thrown.
+
+
See Also:
+
+ +
+
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    protected Match
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Modifier
    +
    Constructor
    +
    Description
    +
     
    + +
    +
    Empty constructor needed for deserialization.
    +
    +
    protected
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Checks dynamically if a player can be added in the current state, otherwise throws an exception.
    +
    +
    void
    + +
    +
    Checks dynamically if a player can choose the initial card side in the current state, otherwise throws an exception.
    +
    +
    void
    + +
    +
    Checks dynamically if a player can choose their secret objective in the current state, otherwise throws an exception.
    +
    +
    void
    + +
    +
    Checks dynamically if a player can draw a playable card in the current state, otherwise throws an exception.
    +
    +
    void
    + +
    +
    Checks dynamically if an initial card can be drawn in the current state, otherwise throws an exception.
    +
    +
    void
    + +
    +
    Checks dynamically if a player can make a move in the current state, otherwise throws an exception.
    +
    +
    void
    + +
    +
    Checks dynamically if a secret objective can be proposed to the current player in the current state, otherwise + throws an exception.
    +
    +
    void
    + +
    +
    Checks dynamically if a player can be removed in the current state, otherwise it forces the Match to go to the + FinalState.
    +
    +
    abstract void
    + +
    +
    Triggers the transition in Match from the current state to the next one, this means changing the current Match's + MatchState instance to a new one, having the same static type (MatchState) but a different dynamic type (a subclass + of MatchState).
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      match

      +
      protected Match match
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MatchState

      +
      public MatchState()
      +
      Empty constructor needed for deserialization.
      +
      +
    • +
    • +
      +

      MatchState

      +
      protected MatchState(Match match)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      transition

      +
      public abstract void transition()
      +
      Triggers the transition in Match from the current state to the next one, this means changing the current Match's + MatchState instance to a new one, having the same static type (MatchState) but a different dynamic type (a subclass + of MatchState).
      +
      +
    • +
    • +
      +

      addPlayer

      +
      public void addPlayer() + throws WrongStateException
      +
      Checks dynamically if a player can be added in the current state, otherwise throws an exception. + The check is performed implicitly, since this version of the method is called if and only if it hasn't been + overridden by the MatchState object from which it's called.
      +
      +
      Throws:
      +
      WrongStateException - if the method cannot be called in the current state
      +
      +
      +
    • +
    • +
      +

      removePlayer

      +
      public void removePlayer()
      +
      Checks dynamically if a player can be removed in the current state, otherwise it forces the Match to go to the + FinalState. + The check is performed implicitly, since this version of the method is called if and only if it hasn't been + overridden by the MatchState instance from which it's called (just WaitState overrides it).
      +
      +
    • +
    • +
      +

      drawInitialCard

      +
      public void drawInitialCard() + throws WrongStateException
      +
      Checks dynamically if an initial card can be drawn in the current state, otherwise throws an exception. + The check is performed implicitly, since this version of the method is called if and only if it hasn't been + overridden by the MatchState object from which it's called.
      +
      +
      Throws:
      +
      WrongStateException - if the method cannot be called in the current state
      +
      +
      +
    • +
    • +
      +

      chooseInitialSide

      +
      public void chooseInitialSide() + throws WrongStateException
      +
      Checks dynamically if a player can choose the initial card side in the current state, otherwise throws an exception. + The check is performed implicitly, since this version of the method is called if and only if it hasn't been + overridden by the MatchState object from which it's called.
      +
      +
      Throws:
      +
      WrongStateException - if the method cannot be called in the current state
      +
      +
      +
    • +
    • +
      +

      makeMove

      +
      public void makeMove() + throws WrongStateException
      +
      Checks dynamically if a player can make a move in the current state, otherwise throws an exception. + The check is performed implicitly, since this version of the method is called if and only if it hasn't been + overridden by the MatchState object from which it's called.
      +
      +
      Throws:
      +
      WrongStateException - if the method cannot be called in the current state
      +
      +
      +
    • +
    • +
      +

      drawCard

      +
      public void drawCard() + throws WrongStateException
      +
      Checks dynamically if a player can draw a playable card in the current state, otherwise throws an exception. + The check is performed implicitly, since this version of the method is called if and only if it hasn't been + overridden by the MatchState object from which it's called.
      +
      +
      Throws:
      +
      WrongStateException - if the method cannot be called in the current state
      +
      +
      +
    • +
    • +
      +

      proposeSecretObjectives

      +
      public void proposeSecretObjectives() + throws WrongStateException
      +
      Checks dynamically if a secret objective can be proposed to the current player in the current state, otherwise + throws an exception. + The check is performed implicitly, since this version of the method is called if and only if it hasn't been + overridden by the MatchState object from which it's called.
      +
      +
      Throws:
      +
      WrongStateException - if the method cannot be called in the current state
      +
      +
      +
    • +
    • +
      +

      chooseSecretObjective

      +
      public void chooseSecretObjective() + throws WrongStateException
      +
      Checks dynamically if a player can choose their secret objective in the current state, otherwise throws an exception. + The check is performed implicitly, since this version of the method is called if and only if it hasn't been + overridden by the MatchState object from which it's called.
      +
      +
      Throws:
      +
      WrongStateException - if the method cannot be called in the current state
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/NextTurnState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/NextTurnState.html new file mode 100644 index 00000000..0733b4ee --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/NextTurnState.html @@ -0,0 +1,290 @@ + + + + +NextTurnState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NextTurnState

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.MatchState +
it.polimi.ingsw.gamemodel.NextTurnState
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class NextTurnState +extends MatchState +implements Serializable
+
Subclass of MatchState. This is the state in which the match decides whether it must give initial cards, give + secret objectives, or wait for someone to play a card, according to the current match flow.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NextTurnState

      +
      public NextTurnState(Match match)
      +
      Initializes this instance.
      +
      +
      Parameters:
      +
      match - The match in this state
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      proposeSecretObjectives

      +
      public void proposeSecretObjectives() + throws WrongStateException
      +
      This method call is allowed by this class instances if and only if the match hasn't started yet + and the initial card side choosing has already finished.
      +
      +
      Overrides:
      +
      proposeSecretObjectives in class MatchState
      +
      Throws:
      +
      WrongStateException - If called when the match has already started or the initial card side choosing + hasn't finished yet.
      +
      +
      +
    • +
    • +
      +

      makeMove

      +
      public void makeMove() + throws WrongStateException
      +
      This method call is allowed by this class instances if and only if the match has already started.
      +
      +
      Overrides:
      +
      makeMove in class MatchState
      +
      Throws:
      +
      WrongStateException - If called when the match hasn't started yet
      +
      +
      +
    • +
    • +
      +

      drawInitialCard

      +
      public void drawInitialCard() + throws WrongStateException
      +
      This method call is allowed by this class instances if and only if the initial card side choosing + hasn't finished yet.
      +
      +
      Overrides:
      +
      drawInitialCard in class MatchState
      +
      Throws:
      +
      WrongStateException - If called when the initial card side choosing has already finished.
      +
      +
      +
    • +
    • +
      +

      transition

      +
      public void transition()
      +
      Transitions to: + - AfterMoveState if the match has already started; + - ChooseInitialSideState if the initial card side choosing hasn't finished yet; + - ChooseSecretObjectiveState if the match hasn't started yet and the initial card side choosing has + already finished;
      +
      +
      Specified by:
      +
      transition in class MatchState
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Objective.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Objective.html new file mode 100644 index 00000000..39598404 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Objective.html @@ -0,0 +1,252 @@ + + + + +Objective (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Objective

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.Objective
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class Objective +extends Object +implements Serializable
+
Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen. The objective asks for a certain requirement to be satisfied and gives points only when + the game ends, and does not stack on itself (e.g. if an objective requires three feathers and a player has 6, he will receive the points only once)
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Objective

      +
      public Objective(int points, + Requirement req)
      +
      Class constructor. It is composed only of a requirement (using polymorphism) and the points it gives
      +
      +
      Parameters:
      +
      points - the number of points the objective will give (which is always an absolute number, it never depends on any resource)
      +
      req - the requirement to satisfy in order to receive the points
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPoints

      +
      public int getPoints()
      +
      Getter for the Objective class
      +
      +
      Returns:
      +
      the points held by the objective card.
      +
      +
      +
    • +
    • +
      +

      getReq

      +
      public Requirement getReq()
      +
      Getter for the Objective class
      +
      +
      Returns:
      +
      the requirement for the objective card to be placed.
      +
      +
      +
    • +
    • +
      +

      getID

      +
      public Integer getID()
      +
      +
      Returns:
      +
      the id of the objective card
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object obj)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PlacedCard.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PlacedCard.html new file mode 100644 index 00000000..9947ea58 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PlacedCard.html @@ -0,0 +1,260 @@ + + + + +PlacedCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PlacedCard

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.PlacedCard
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class PlacedCard +extends Object +implements Serializable
+
This class handles the card already placed on the board, since we need to remember which card covers which
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PlacedCard

      +
      public PlacedCard(Card card, + Side playedSide, + int turn)
      +
      Class constructor, which only needs to initialize the card and the turn it is played, as well as the side it was played on
      +
      +
      Parameters:
      +
      card - the Card played
      +
      playedSide - the side the card was played on
      +
      turn - the turn said card is played. Needed to know which card covers which, since a card played in a certain turn will + always cover one played before
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCard

      +
      public Card getCard()
      +
      Getter for the PlacedCard class
      +
      +
      Returns:
      +
      the card just placed.
      +
      +
      +
    • +
    • +
      +

      getTurn

      +
      public int getTurn()
      +
      Getter for the PlacedCard class
      +
      +
      Returns:
      +
      turn in which the card was just placed.
      +
      +
      +
    • +
    • +
      +

      getPlayedSide

      +
      public Side getPlayedSide()
      +
      Getter for the PlacedCard class
      +
      +
      Returns:
      +
      side the card was played
      +
      +
      +
    • +
    • +
      +

      getPlayedCardFace

      +
      public CardFace getPlayedCardFace()
      +
      Getter for the Card face
      +
      +
      Returns:
      +
      the topological description of the side the card was played on
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PlacementOutcome.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PlacementOutcome.html new file mode 100644 index 00000000..309a14f2 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PlacementOutcome.html @@ -0,0 +1,253 @@ + + + + +PlacementOutcome (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class PlacementOutcome

+
+
java.lang.Object +
java.lang.Enum<PlacementOutcome> +
it.polimi.ingsw.gamemodel.PlacementOutcome
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<PlacementOutcome>, Constable
+
+
+
public enum PlacementOutcome +extends Enum<PlacementOutcome>
+
Before placing a card, its placement must be verified. This enum is used to know if it is a valid one and, if it isn't, what went wrong
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      VALID

      +
      public static final PlacementOutcome VALID
      +
      +
    • +
    • +
      +

      INVALID_COORDS

      +
      public static final PlacementOutcome INVALID_COORDS
      +
      +
    • +
    • +
      +

      INVALID_ENOUGH_RESOURCES

      +
      public static final PlacementOutcome INVALID_ENOUGH_RESOURCES
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static PlacementOutcome[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static PlacementOutcome valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PlayableCard.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PlayableCard.html new file mode 100644 index 00000000..5f9ec0e0 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PlayableCard.html @@ -0,0 +1,280 @@ + + + + +PlayableCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PlayableCard

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.Card +
it.polimi.ingsw.gamemodel.PlayableCard
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
GoldCard, ResourceCard
+
+
+
public abstract sealed class PlayableCard +extends Card +implements Serializable +permits GoldCard, ResourceCard
+
Class that represents every kind of card that can be played during the game. + All these cards have at least a side (the back) that does not require any + resource to be played.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      points

      +
      protected int points
      +
      +
    • +
    • +
      +

      reign

      +
      protected Symbol reign
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PlayableCard

      +
      public PlayableCard(Symbol reign) + throws InvalidResourceException
      +
      Constructor for PlayableCard. Since the only common aspects are that they + have a reign and that the back is made up of + only full corners (no resources) and the center gives a resource of their + reign
      +
      +
      Parameters:
      +
      reign - the reign of the card
      +
      Throws:
      +
      InvalidResourceException - if the passed resource is not in + Symbol.getReigns()
      +
      +
      +
    • +
    • +
      +

      PlayableCard

      +
      public PlayableCard()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getReign

      +
      public Symbol getReign()
      +
      Getter for the card reign
      +
      +
      Returns:
      +
      the card's reign
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Player.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Player.html new file mode 100644 index 00000000..e743da8b --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Player.html @@ -0,0 +1,524 @@ + + + + +Player (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Player

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.Player
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class Player +extends Object +implements Serializable
+
Represents each in-game user, so acts also as a gateway receiving input by the Controller. + It's also responsible for the board's logic, which is a slice of the game logic.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Player

      +
      public Player(String username, + Match match)
      +
      Initializes the main player's attributes.
      +
      +
      Parameters:
      +
      username - the player's username
      +
      match - the match the player belongs to
      +
      +
      +
    • +
    • +
      +

      Player

      +
      public Player(Player player)
      +
      Initializes the current instance from a copy reference
      +
      +
      Parameters:
      +
      player - The player to make a copy of
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      playCard

      +
      public void playCard(Pair<Integer,Integer> coords, + PlayableCard card, + Side side) + throws WrongTurnException, +WrongStateException, +WrongChoiceException
      +
      Places a card on the player's board, on the give side and in the given position, assuming it's valid.
      +
      +
      Parameters:
      +
      coords - x and y position in which the card is played (where 0, 0 is the initial card)
      +
      card - the card to be placed
      +
      side - whether the card should be placed on the front or on the back
      +
      Throws:
      +
      WrongChoiceException - If the chosen card cannot be player (placement not allowed, or not enough resources, + or card not in the player's hand)
      +
      WrongStateException - If a card cannot be played in this match state
      +
      WrongTurnException - If it's the turn of this player.
      +
      +
      +
    • +
    • +
      +

      drawSecretObjectives

      +
      public Pair<Objective,Objective> drawSecretObjectives() + throws WrongStateException, +WrongTurnException
      +
      Gets two objectives from the match objectives deck considered to be secret.
      +
      +
      Returns:
      +
      a pair of objectives
      +
      Throws:
      +
      WrongStateException - if called during the wrong match state
      +
      WrongTurnException - if called by the player when it's not its turn
      +
      +
      +
    • +
    • +
      +

      drawInitialCard

      +
      public InitialCard drawInitialCard() + throws WrongTurnException, +WrongStateException
      +
      Gets an initial card from the match.
      +
      +
      Returns:
      +
      an initial card
      +
      Throws:
      +
      WrongTurnException - if called by the player when it's not its turn
      +
      WrongStateException - if called during the wrong match state
      +
      +
      +
    • +
    • +
      +

      chooseInitialCardSide

      +
      public void chooseInitialCardSide(Side side) + throws WrongTurnException, +WrongStateException
      +
      Chooses the initial card side.
      +
      +
      Parameters:
      +
      side - the side of the initial card
      +
      Throws:
      +
      WrongTurnException - if called by the player when it's not its turn
      +
      WrongStateException - if called during the wrong match state
      +
      +
      +
    • +
    • +
      +

      drawCard

      + +
      Adds a card to the player's hand, popping it from the required source
      +
      +
      Parameters:
      +
      source - represents the source of the draw, which can be either one of the two decks or one of the four cards on the table
      +
      Throws:
      +
      WrongTurnException - if called by the player when it's not its turn
      +
      WrongChoiceException - if called on a drawing source which is empty (e.g. empty deck)
      +
      WrongStateException - if called during the wrong match state
      +
      HandException - if the player already has three cards in their hand
      +
      +
      +
    • +
    • +
      +

      chooseSecretObjective

      +
      public void chooseSecretObjective(Objective objective) + throws WrongTurnException, +WrongStateException, +WrongChoiceException
      +
      Sets the player private objective (only at the start of the game).
      +
      +
      Parameters:
      +
      objective - the chosen objective between the two proposed
      +
      Throws:
      +
      WrongTurnException - if called by the player when it's not its turn
      +
      WrongStateException - if called during the wrong match state
      +
      WrongChoiceException - if called on an objective which is not one of the proposed ones
      +
      +
      +
    • +
    • +
      +

      sendBroadcastText

      +
      public void sendBroadcastText(String text)
      +
      Sends a message in public chat
      +
      +
      Parameters:
      +
      text - content of the message
      +
      +
      +
    • +
    • +
      +

      sendPrivateText

      +
      public void sendPrivateText(Player recipient, + String text)
      +
      Sends a private message to the specified recipient
      +
      +
      Parameters:
      +
      recipient - recipient of the message
      +
      text - content of the message
      +
      +
      +
    • +
    • +
      +

      getBoard

      +
      public Board getBoard()
      +
      Getter for the player's board.
      +
      +
    • +
    • +
      +

      getPoints

      +
      public int getPoints()
      +
      Getter for the player's points.
      +
      +
    • +
    • +
      +

      getPawnColor

      +
      public Color getPawnColor()
      +
      Getter for the player's pawn color.
      +
      +
    • +
    • +
      +

      setColor

      +
      protected void setColor(Color color)
      +
      Setter for the player's color.
      +
      +
    • +
    • +
      +

      getSecretObjective

      +
      public Objective getSecretObjective()
      +
      Getter for the player's secret objective.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      addPoints

      +
      protected void addPoints(int points)
      +
      Adds points to the player.
      +
      +
      Parameters:
      +
      points - number of points to add to the player
      +
      +
      +
    • +
    • +
      +

      getUsername

      +
      public String getUsername()
      +
      Getter for the player's username.
      +
      +
    • +
    • +
      +

      isConnected

      +
      public boolean isConnected()
      +
      +
    • +
    • +
      +

      setConnected

      +
      public void setConnected(boolean connected)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PositionRequirement.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PositionRequirement.html new file mode 100644 index 00000000..3bfabcb8 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/PositionRequirement.html @@ -0,0 +1,232 @@ + + + + +PositionRequirement (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PositionRequirement

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.Requirement +
it.polimi.ingsw.gamemodel.PositionRequirement
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class PositionRequirement +extends Requirement +implements Serializable
+
This class handles requirements involving relative positioning of cards, e.g. three red cards placed in the top right corner of each other
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PositionRequirement

      +
      public PositionRequirement(Map<Pair<Integer,Integer>,Symbol> reqs) + throws InvalidResourceException
      +
      Note that, since this requirement only cares about relative positioning, there must always be + an element whose key is (0, 0)
      +
      +
      Parameters:
      +
      reqs - The relative positioning of the cards (of which we only care about the faction).
      +
      Throws:
      +
      InvalidResourceException
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      timesMet

      +
      public int timesMet(Board board)
      +
      The requirement will be satisfied if the board has cards of the specified faction in the correct relative positions
      +
      +
      Specified by:
      +
      timesMet in class Requirement
      +
      Parameters:
      +
      board - the Board on which the requirement must be checked
      +
      Returns:
      +
      whether the board actually meets the requirement or not
      +
      +
      +
    • +
    • +
      +

      getReqs

      +
      public Map<Pair<Integer,Integer>,Symbol> getReqs()
      +
      Getter for the PositionRequirement class
      +
      +
      Returns:
      +
      the positioning requirement for the objective card to be activated
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/QuantityRequirement.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/QuantityRequirement.html new file mode 100644 index 00000000..6e30e5e3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/QuantityRequirement.html @@ -0,0 +1,230 @@ + + + + +QuantityRequirement (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class QuantityRequirement

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.Requirement +
it.polimi.ingsw.gamemodel.QuantityRequirement
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class QuantityRequirement +extends Requirement +implements Serializable
+
This class handles requirements involving relative positioning of cards, e.g. three red cards placed in the top right corner of each other
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      timesMet

      +
      public int timesMet(Board board)
      +
      The requirement will be satisfied if the board has enough resources of the specified type
      +
      +
      Specified by:
      +
      timesMet in class Requirement
      +
      Parameters:
      +
      board - the board on which we check the requirement
      +
      Returns:
      +
      whether the requirement is satisfied or not
      +
      +
      +
    • +
    • +
      +

      getReqs

      +
      public Map<Symbol,Integer> getReqs()
      +
      Getter for the QuantityRequirement class
      +
      +
      Returns:
      +
      Map representing the card's placement requirements
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Requirement.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Requirement.html new file mode 100644 index 00000000..e508dca3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Requirement.html @@ -0,0 +1,216 @@ + + + + +Requirement (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Requirement

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.Requirement
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
PositionRequirement, QuantityRequirement
+
+
+
public abstract class Requirement +extends Object +implements Serializable
+
A condition must be met in order to play a golden card and to get points from the objectives. Those requirements are both represented by this class
+
+
See Also:
+
+ +
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Empty class constructor.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    abstract int
    +
    timesMet(Board board)
    +
    +
    Will be implemented on the concrete classes, as they have different kind of conditions
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Requirement

      +
      public Requirement()
      +
      Empty class constructor. The actual constructor resides in the subclasses, but this method is used to know + what to expect when creating a new Requirement, allowing the use of polymorphism
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      timesMet

      +
      public abstract int timesMet(Board board)
      +
      Will be implemented on the concrete classes, as they have different kind of conditions
      +
      +
      Parameters:
      +
      board - the board that will be used to check if the requirement is met
      +
      Returns:
      +
      whether the requirement is met or not
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/ResourceCard.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/ResourceCard.html new file mode 100644 index 00000000..b25435c4 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/ResourceCard.html @@ -0,0 +1,236 @@ + + + + +ResourceCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ResourceCard

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class ResourceCard +extends PlayableCard +implements Serializable
+
Card that does not require any conditions to be played.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ResourceCard

      +
      public ResourceCard(CardFace front, + Symbol reign, + int points) + throws InvalidResourceException
      +
      Class constructor. It needs to only take the front as an argument, since the back is handled by its superclass PlayableCard
      +
      +
      Parameters:
      +
      front - the front side of the card
      +
      reign - the reign of the card
      +
      points - the number of points the card gives (must be an absolute value)
      +
      Throws:
      +
      InvalidResourceException - if the passed resource is not in Symbol.getReigns()
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPoints

      +
      public int getPoints()
      +
      Getter for the ResourceCard class
      +
      +
      Returns:
      +
      points held by the card
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Side.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Side.html new file mode 100644 index 00000000..cce372cd --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Side.html @@ -0,0 +1,268 @@ + + + + +Side (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Side

+
+
java.lang.Object +
java.lang.Enum<Side> +
it.polimi.ingsw.gamemodel.Side
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Side>, Constable
+
+
+
public enum Side +extends Enum<Side>
+
Represents a card side.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      FRONT

      +
      public static final Side FRONT
      +
      +
    • +
    • +
      +

      BACK

      +
      public static final Side BACK
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Side[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Side valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Enum<Side>
      +
      +
      +
    • +
    • +
      +

      fromString

      +
      public Side fromString(String sideString)
      +
      Return a instance of this enum from its corresponding string representation.
      +
      +
      Parameters:
      +
      sideString - The side represented as a string
      +
      Returns:
      +
      The side instance
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Symbol.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Symbol.html new file mode 100644 index 00000000..3ae5ffa3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/Symbol.html @@ -0,0 +1,376 @@ + + + + +Symbol (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Symbol

+
+
java.lang.Object +
java.lang.Enum<Symbol> +
it.polimi.ingsw.gamemodel.Symbol
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Symbol>, Constable
+
+
+
public enum Symbol +extends Enum<Symbol>
+
Contains all the possible symbols a corner can store or a multiplier can have. + Besides the basic 4 factions and 3 symbols, there is also EMPTY_CORNER, which represents a corner without the + possibility of placing another card on top of it (missing slot), FULL_CORNER which represents a valid corner without any symbol and + CORNER_OBJ which represents a QuantityRequirement in which the multiplier is how many corners the card covered
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      ANIMAL

      +
      public static final Symbol ANIMAL
      +
      +
    • +
    • +
      +

      PLANT

      +
      public static final Symbol PLANT
      +
      +
    • +
    • +
      +

      INSECT

      +
      public static final Symbol INSECT
      +
      +
    • +
    • +
      +

      FUNGUS

      +
      public static final Symbol FUNGUS
      +
      +
    • +
    • +
      +

      FEATHER

      +
      public static final Symbol FEATHER
      +
      +
    • +
    • +
      +

      INKWELL

      +
      public static final Symbol INKWELL
      +
      +
    • +
    • +
      +

      PARCHMENT

      +
      public static final Symbol PARCHMENT
      +
      +
    • +
    • +
      +

      EMPTY_CORNER

      +
      public static final Symbol EMPTY_CORNER
      +
      +
    • +
    • +
      +

      FULL_CORNER

      +
      public static final Symbol FULL_CORNER
      +
      +
    • +
    • +
      +

      NO_MULT

      +
      public static final Symbol NO_MULT
      +
      +
    • +
    • +
      +

      CORNER_OBJ

      +
      public static final Symbol CORNER_OBJ
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Symbol[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Symbol valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      getReigns

      +
      public static EnumSet<Symbol> getReigns()
      +
      Generates subset containing only the four basic reigns
      +
      +
      Returns:
      +
      the subset containing only the four basic reigns
      +
      +
      +
    • +
    • +
      +

      getBasicResources

      +
      public static EnumSet<Symbol> getBasicResources()
      +
      Generates subset containing only the basic resources (4 reigns and 3 "symbols")
      +
      +
      Returns:
      +
      the subset containing only the basic resources (4 reigns and 3 "symbols")
      +
      +
      +
    • +
    • +
      +

      getValidCorner

      +
      public static EnumSet<Symbol> getValidCorner()
      +
      Generates subset containing all the valid Symbols a corner can contain
      +
      +
      Returns:
      +
      the subset containing all the valid Symbols a corner can contain
      +
      +
      +
    • +
    • +
      +

      getValidMultiplier

      +
      public static EnumSet<Symbol> getValidMultiplier()
      +
      Generates subset containing all the symbols a GoldCard multiplier can be
      +
      +
      Returns:
      +
      the subset containing all the symbols a GoldCard multiplier can be
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/WaitState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/WaitState.html new file mode 100644 index 00000000..74c93cbb --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/WaitState.html @@ -0,0 +1,252 @@ + + + + +WaitState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WaitState

+
+
java.lang.Object +
it.polimi.ingsw.gamemodel.MatchState +
it.polimi.ingsw.gamemodel.WaitState
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class WaitState +extends MatchState +implements Serializable
+
Subclass of MatchState. This is the state in which the match is when accepting new players or them leaving, + that is to say: before the match is full and so it starts.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WaitState

      +
      public WaitState(Match match)
      +
      Initializes this instance.
      +
      +
      Parameters:
      +
      match - The match in this state
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      transition

      +
      public void transition()
      +
      Transitions to NextTurnState.
      +
      +
      Specified by:
      +
      transition in class MatchState
      +
      +
      +
    • +
    • +
      +

      removePlayer

      +
      public void removePlayer()
      +
      This method call is allowed by this class instances.
      +
      +
      Overrides:
      +
      removePlayer in class MatchState
      +
      +
      +
    • +
    • +
      +

      addPlayer

      +
      public void addPlayer()
      +
      This method call is allowed by this class instances.
      +
      +
      Overrides:
      +
      addPlayer in class MatchState
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/AfterDrawState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/AfterDrawState.html new file mode 100644 index 00000000..d57cfc51 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/AfterDrawState.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.AfterDrawState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.AfterDrawState

+
+No usage of it.polimi.ingsw.gamemodel.AfterDrawState
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/AfterMoveState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/AfterMoveState.html new file mode 100644 index 00000000..23852620 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/AfterMoveState.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.AfterMoveState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.AfterMoveState

+
+No usage of it.polimi.ingsw.gamemodel.AfterMoveState
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Board.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Board.html new file mode 100644 index 00000000..22df304c --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Board.html @@ -0,0 +1,116 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.Board (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.Board

+
+
Packages that use Board
+
+
Package
+
Description
+ +
 
+
+
+
    +
  • +
    +

    Uses of Board in it.polimi.ingsw.gamemodel

    +
    Methods in it.polimi.ingsw.gamemodel that return Board
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    Player.getBoard()
    +
    +
    Getter for the player's board.
    +
    +
    +
    Methods in it.polimi.ingsw.gamemodel with parameters of type Board
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    int
    +
    GoldCard.calculatePoints(Board board, + Pair<Integer,Integer> coord)
    +
    +
    Will compute the total points this card gives based on the board it's played on.
    +
    +
    int
    +
    PositionRequirement.timesMet(Board board)
    +
    +
    The requirement will be satisfied if the board has cards of the specified faction in the correct relative positions
    +
    +
    int
    +
    QuantityRequirement.timesMet(Board board)
    +
    +
    The requirement will be satisfied if the board has enough resources of the specified type
    +
    +
    abstract int
    +
    Requirement.timesMet(Board board)
    +
    +
    Will be implemented on the concrete classes, as they have different kind of conditions
    +
    +
    +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Card.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Card.html new file mode 100644 index 00000000..b16efd0e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Card.html @@ -0,0 +1,195 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.Card (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.Card

+
+
Packages that use Card
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/CardFace.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/CardFace.html new file mode 100644 index 00000000..de54cb75 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/CardFace.html @@ -0,0 +1,135 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.CardFace (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.CardFace

+
+
Packages that use CardFace
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/ChooseInitialSideState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/ChooseInitialSideState.html new file mode 100644 index 00000000..408fc5bc --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/ChooseInitialSideState.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.ChooseInitialSideState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.ChooseInitialSideState

+
+No usage of it.polimi.ingsw.gamemodel.ChooseInitialSideState
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/ChooseSecretObjectiveState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/ChooseSecretObjectiveState.html new file mode 100644 index 00000000..b6de0e20 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/ChooseSecretObjectiveState.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.ChooseSecretObjectiveState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.ChooseSecretObjectiveState

+
+No usage of it.polimi.ingsw.gamemodel.ChooseSecretObjectiveState
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Color.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Color.html new file mode 100644 index 00000000..0cdb34d9 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Color.html @@ -0,0 +1,370 @@ + + + + +Uses of Enum Class it.polimi.ingsw.gamemodel.Color (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum Class
it.polimi.ingsw.gamemodel.Color

+
+
Packages that use Color
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Corner.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Corner.html new file mode 100644 index 00000000..e0bc2d09 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Corner.html @@ -0,0 +1,152 @@ + + + + +Uses of Enum Class it.polimi.ingsw.gamemodel.Corner (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum Class
it.polimi.ingsw.gamemodel.Corner

+
+
Packages that use Corner
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/DrawSource.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/DrawSource.html new file mode 100644 index 00000000..100ff3d6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/DrawSource.html @@ -0,0 +1,418 @@ + + + + +Uses of Enum Class it.polimi.ingsw.gamemodel.DrawSource (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum Class
it.polimi.ingsw.gamemodel.DrawSource

+
+
Packages that use DrawSource
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/FinalState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/FinalState.html new file mode 100644 index 00000000..36ffed8a --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/FinalState.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.FinalState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.FinalState

+
+No usage of it.polimi.ingsw.gamemodel.FinalState
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/GameDeck.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/GameDeck.html new file mode 100644 index 00000000..b23ac196 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/GameDeck.html @@ -0,0 +1,126 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.GameDeck (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.GameDeck

+
+
Packages that use GameDeck
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/GoldCard.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/GoldCard.html new file mode 100644 index 00000000..cd668739 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/GoldCard.html @@ -0,0 +1,94 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.GoldCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.GoldCard

+
+
Packages that use GoldCard
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/InitialCard.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/InitialCard.html new file mode 100644 index 00000000..6ea77f85 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/InitialCard.html @@ -0,0 +1,384 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.InitialCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.InitialCard

+
+
Packages that use InitialCard
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Match.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Match.html new file mode 100644 index 00000000..48c76065 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Match.html @@ -0,0 +1,240 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.Match (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.Match

+
+
Packages that use Match
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/MatchObserver.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/MatchObserver.html new file mode 100644 index 00000000..6f70b0d5 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/MatchObserver.html @@ -0,0 +1,148 @@ + + + + +Uses of Interface it.polimi.ingsw.gamemodel.MatchObserver (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Interface
it.polimi.ingsw.gamemodel.MatchObserver

+
+
Packages that use MatchObserver
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/MatchObserverCallable.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/MatchObserverCallable.html new file mode 100644 index 00000000..e6ceaf11 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/MatchObserverCallable.html @@ -0,0 +1,62 @@ + + + + +Uses of Interface it.polimi.ingsw.gamemodel.MatchObserverCallable (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Interface
it.polimi.ingsw.gamemodel.MatchObserverCallable

+
+No usage of it.polimi.ingsw.gamemodel.MatchObserverCallable
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/MatchState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/MatchState.html new file mode 100644 index 00000000..e243ab1a --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/MatchState.html @@ -0,0 +1,141 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.MatchState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.MatchState

+
+
Packages that use MatchState
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/NextTurnState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/NextTurnState.html new file mode 100644 index 00000000..a0a99699 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/NextTurnState.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.NextTurnState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.NextTurnState

+
+No usage of it.polimi.ingsw.gamemodel.NextTurnState
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Objective.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Objective.html new file mode 100644 index 00000000..5c10b16c --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Objective.html @@ -0,0 +1,807 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.Objective (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.Objective

+
+
Packages that use Objective
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PlacedCard.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PlacedCard.html new file mode 100644 index 00000000..4f739401 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PlacedCard.html @@ -0,0 +1,89 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.PlacedCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.PlacedCard

+
+
Packages that use PlacedCard
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PlacementOutcome.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PlacementOutcome.html new file mode 100644 index 00000000..2d9751ca --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PlacementOutcome.html @@ -0,0 +1,103 @@ + + + + +Uses of Enum Class it.polimi.ingsw.gamemodel.PlacementOutcome (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum Class
it.polimi.ingsw.gamemodel.PlacementOutcome

+
+
Packages that use PlacementOutcome
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PlayableCard.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PlayableCard.html new file mode 100644 index 00000000..446017ff --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PlayableCard.html @@ -0,0 +1,638 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.PlayableCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.PlayableCard

+
+
Packages that use PlayableCard
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Player.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Player.html new file mode 100644 index 00000000..cc6ab252 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Player.html @@ -0,0 +1,482 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.Player (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.Player

+
+
Packages that use Player
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PositionRequirement.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PositionRequirement.html new file mode 100644 index 00000000..1e7a0260 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/PositionRequirement.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.PositionRequirement (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.PositionRequirement

+
+No usage of it.polimi.ingsw.gamemodel.PositionRequirement
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/QuantityRequirement.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/QuantityRequirement.html new file mode 100644 index 00000000..5b3ef9be --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/QuantityRequirement.html @@ -0,0 +1,104 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.QuantityRequirement (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.QuantityRequirement

+
+
Packages that use QuantityRequirement
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Requirement.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Requirement.html new file mode 100644 index 00000000..2658d5c3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Requirement.html @@ -0,0 +1,117 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.Requirement (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.Requirement

+
+
Packages that use Requirement
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/ResourceCard.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/ResourceCard.html new file mode 100644 index 00000000..0f661914 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/ResourceCard.html @@ -0,0 +1,94 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.ResourceCard (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.ResourceCard

+
+
Packages that use ResourceCard
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Side.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Side.html new file mode 100644 index 00000000..a94fab06 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Side.html @@ -0,0 +1,737 @@ + + + + +Uses of Enum Class it.polimi.ingsw.gamemodel.Side (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum Class
it.polimi.ingsw.gamemodel.Side

+
+
Packages that use Side
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Symbol.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Symbol.html new file mode 100644 index 00000000..03fc04e8 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/Symbol.html @@ -0,0 +1,719 @@ + + + + +Uses of Enum Class it.polimi.ingsw.gamemodel.Symbol (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum Class
it.polimi.ingsw.gamemodel.Symbol

+
+
Packages that use Symbol
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/WaitState.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/WaitState.html new file mode 100644 index 00000000..0235d9cd --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/class-use/WaitState.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.gamemodel.WaitState (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.gamemodel.WaitState

+
+No usage of it.polimi.ingsw.gamemodel.WaitState
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/package-summary.html new file mode 100644 index 00000000..9c144135 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/package-summary.html @@ -0,0 +1,225 @@ + + + + +it.polimi.ingsw.gamemodel (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.gamemodel

+
+
+
package it.polimi.ingsw.gamemodel
+
+
    +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    Subclass of MatchState.
    +
    + +
    +
    Subclass of MatchState.
    +
    + +
    +
    Board is the class that contains all the information relative to a Player's status
    +
    + +
    +
    Highest abstraction of the card object, with common aspects for every card in + the game (except objectives).
    +
    + +
    +
    Topological definition of a card's side
    +
    + +
    +
    Subclass of MatchState.
    +
    + +
    +
    Subclass of MatchState.
    +
    + +
    +
    Represents pawns colors.
    +
    + +
    +
    All the corners of a card, which can contain a Symbol
    +
    + +
    +
    All the sources a player can draw from: the decks and the four visible cards.
    +
    + +
    +
    Subclass of MatchState.
    +
    + +
    +
    Generic used to create the decks for all the types of cards
    +
    + +
    +
    The front side of these cards always gives points, but needs a certain requirement to be met in order to be played
    +
    + +
    +
    Every player has an initial card (which will automatically be placed in the + center of the board)
    +
    + +
    +
    Represents the match played by Player instances, therefore implements a slice of game logic + using drawCard(...), setInitialSide(...), setSecretObjective(...), proposeSecretObjective(...), etc.
    +
    + +
    +
    Interface to be implemented by any class that wants to be an observer of Match, so wants to be able to + get notified when an event occurs in a match (to which it's subscribed).
    +
    + +
    +
    Functional interface used to represents a method call (MatchObserverCallable.call(MatchObserver)) on a MatchObserver.
    +
    + +
    +
    Represents an appendix of Match.
    +
    + +
    +
    Subclass of MatchState.
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    This class handles the card already placed on the board, since we need to remember which card covers which
    +
    + +
    +
    Before placing a card, its placement must be verified.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Represents each in-game user, so acts also as a gateway receiving input by the Controller.
    +
    + +
    +
    This class handles requirements involving relative positioning of cards, e.g.
    +
    + +
    +
    This class handles requirements involving relative positioning of cards, e.g.
    +
    + +
    +
    A condition must be met in order to play a golden card and to get points from the objectives.
    +
    + +
    +
    Card that does not require any conditions to be played.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    + +
    +
    Subclass of MatchState.
    +
    +
    +
    +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/package-tree.html new file mode 100644 index 00000000..616b0cf5 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/package-tree.html @@ -0,0 +1,136 @@ + + + + +it.polimi.ingsw.gamemodel Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.gamemodel

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/gamemodel/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/package-use.html new file mode 100644 index 00000000..7aaa50c6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/gamemodel/package-use.html @@ -0,0 +1,634 @@ + + + + +Uses of Package it.polimi.ingsw.gamemodel (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.gamemodel

+
+
Packages that use it.polimi.ingsw.gamemodel
+ +
+
    +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    Highest abstraction of the card object, with common aspects for every card in + the game (except objectives).
    +
    + +
    +
    Represents pawns colors.
    +
    + +
    +
    All the sources a player can draw from: the decks and the four visible cards.
    +
    + +
    +
    Every player has an initial card (which will automatically be placed in the + center of the board)
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    +
    +
    +
  • +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    All the sources a player can draw from: the decks and the four visible cards.
    +
    + +
    +
    Every player has an initial card (which will automatically be placed in the + center of the board)
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    +
    +
    +
  • +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    Represents pawns colors.
    +
    + +
    +
    All the sources a player can draw from: the decks and the four visible cards.
    +
    + +
    +
    Every player has an initial card (which will automatically be placed in the + center of the board)
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    +
    +
    +
  • +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    Represents pawns colors.
    +
    + +
    +
    Every player has an initial card (which will automatically be placed in the + center of the board)
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    +
    +
    +
  • +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    Represents pawns colors.
    +
    + +
    +
    All the corners of a card, which can contain a Symbol
    +
    + +
    +
    All the sources a player can draw from: the decks and the four visible cards.
    +
    + +
    +
    Every player has an initial card (which will automatically be placed in the + center of the board)
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    +
    +
    +
  • +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    Represents pawns colors.
    +
    + +
    +
    All the sources a player can draw from: the decks and the four visible cards.
    +
    + +
    +
    Every player has an initial card (which will automatically be placed in the + center of the board)
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    +
    +
    +
  • +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    All the sources a player can draw from: the decks and the four visible cards.
    +
    + +
    +
    Every player has an initial card (which will automatically be placed in the + center of the board)
    +
    + +
    +
    Represents the match played by Player instances, therefore implements a slice of game logic + using drawCard(...), setInitialSide(...), setSecretObjective(...), proposeSecretObjective(...), etc.
    +
    + +
    +
    Interface to be implemented by any class that wants to be an observer of Match, so wants to be able to + get notified when an event occurs in a match (to which it's subscribed).
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Represents each in-game user, so acts also as a gateway receiving input by the Controller.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    +
    +
    +
  • +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    Board is the class that contains all the information relative to a Player's status
    +
    + +
    +
    Highest abstraction of the card object, with common aspects for every card in + the game (except objectives).
    +
    + +
    +
    Topological definition of a card's side
    +
    + +
    +
    Represents pawns colors.
    +
    + +
    +
    All the corners of a card, which can contain a Symbol
    +
    + +
    +
    All the sources a player can draw from: the decks and the four visible cards.
    +
    + +
    +
    Generic used to create the decks for all the types of cards
    +
    + +
    +
    Every player has an initial card (which will automatically be placed in the + center of the board)
    +
    + +
    +
    Represents the match played by Player instances, therefore implements a slice of game logic + using drawCard(...), setInitialSide(...), setSecretObjective(...), proposeSecretObjective(...), etc.
    +
    + +
    +
    Interface to be implemented by any class that wants to be an observer of Match, so wants to be able to + get notified when an event occurs in a match (to which it's subscribed).
    +
    + +
    +
    Represents an appendix of Match.
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    This class handles the card already placed on the board, since we need to remember which card covers which
    +
    + +
    +
    Before placing a card, its placement must be verified.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Represents each in-game user, so acts also as a gateway receiving input by the Controller.
    +
    + +
    +
    This class handles requirements involving relative positioning of cards, e.g.
    +
    + +
    +
    A condition must be met in order to play a golden card and to get points from the objectives.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    +
    +
    +
  • +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    All the sources a player can draw from: the decks and the four visible cards.
    +
    + +
    +
    Represents a card side.
    +
    +
    +
    +
  • +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    Represents pawns colors.
    +
    + +
    +
    All the sources a player can draw from: the decks and the four visible cards.
    +
    + +
    +
    Represents the match played by Player instances, therefore implements a slice of game logic + using drawCard(...), setInitialSide(...), setSecretObjective(...), proposeSecretObjective(...), etc.
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Represents each in-game user, so acts also as a gateway receiving input by the Controller.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    +
    +
    +
  • +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    All the sources a player can draw from: the decks and the four visible cards.
    +
    + +
    +
    Every player has an initial card (which will automatically be placed in the + center of the board)
    +
    + +
    +
    Represents the match played by Player instances, therefore implements a slice of game logic + using drawCard(...), setInitialSide(...), setSecretObjective(...), proposeSecretObjective(...), etc.
    +
    + +
    +
    Interface to be implemented by any class that wants to be an observer of Match, so wants to be able to + get notified when an event occurs in a match (to which it's subscribed).
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Represents each in-game user, so acts also as a gateway receiving input by the Controller.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    +
    +
    +
  • +
  • +
    + +
    +
    Class
    +
    Description
    + +
    +
    Highest abstraction of the card object, with common aspects for every card in + the game (except objectives).
    +
    + +
    +
    Represents pawns colors.
    +
    + +
    +
    Generic used to create the decks for all the types of cards
    +
    + +
    +
    The front side of these cards always gives points, but needs a certain requirement to be met in order to be played
    +
    + +
    +
    Every player has an initial card (which will automatically be placed in the + center of the board)
    +
    + +
    +
    Every player has a secret objective, and at the start of the game two objectives common to every + player get randomly chosen.
    +
    + +
    +
    Class that represents every kind of card that can be played during the game.
    +
    + +
    +
    Card that does not require any conditions to be played.
    +
    + +
    +
    Represents a card side.
    +
    + +
    +
    Contains all the possible symbols a corner can store or a multiplier can have.
    +
    +
    +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/Message.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/Message.html new file mode 100644 index 00000000..5a8c4559 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/Message.html @@ -0,0 +1,155 @@ + + + + +Message (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Message

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message
+
+
+
+
Direct Known Subclasses:
+
ActionMessage, ErrorMessage, ResponseMessage
+
+
+
public abstract class Message +extends Object
+
Message
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Message

      +
      public Message()
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/ActionMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/ActionMessage.html new file mode 100644 index 00000000..c5cb0ace --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/ActionMessage.html @@ -0,0 +1,210 @@ + + + + +ActionMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ActionMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.actions.ActionMessage
+
+
+
+
+
Direct Known Subclasses:
+
ChooseInitialCardSideMessage, ChooseSecretObjectiveMessage, CreateMatchMessage, DrawCardMessage, DrawInitialCardMessage, DrawSecretObjectivesMessage, GetAvailableMatchesMessage, JoinMatchMessage, PlayCardMessage, SendBroadcastTextMessage, SendPrivateTextMessage
+
+
+ +
Messages sent by clients to the server to express a user intention to do an + action
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ActionMessage

      +
      public ActionMessage(String username)
      +
      Class constructor.
      +
      +
      Parameters:
      +
      username - The player who wants to perform the action
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAction

      +
      public String getAction()
      +
      +
      Returns:
      +
      name of the action
      +
      +
      +
    • +
    • +
      +

      getUsername

      +
      public String getUsername()
      +
      +
      Returns:
      +
      username of the player
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/ChooseInitialCardSideMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/ChooseInitialCardSideMessage.html new file mode 100644 index 00000000..5db71b8f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/ChooseInitialCardSideMessage.html @@ -0,0 +1,200 @@ + + + + +ChooseInitialCardSideMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ChooseInitialCardSideMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.actions.ActionMessage +
it.polimi.ingsw.network.messages.actions.ChooseInitialCardSideMessage
+
+
+
+
+
+
public final class ChooseInitialCardSideMessage +extends ActionMessage
+
The action communicates the player's choice of the initial card's side. It can only happen before the first turn of the game. + If the action is successful, SomeoneDrewCardMessage response is sent to every client.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ChooseInitialCardSideMessage

      +
      public ChooseInitialCardSideMessage(String username, + Side side)
      +
      Class constructor.
      +
      +
      Parameters:
      +
      username - The username of the player that wants to choose the initial card side
      +
      side - The chosen card side
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getSide

      +
      public Side getSide()
      +
      +
      Returns:
      +
      chosen side
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/ChooseSecretObjectiveMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/ChooseSecretObjectiveMessage.html new file mode 100644 index 00000000..1a939747 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/ChooseSecretObjectiveMessage.html @@ -0,0 +1,200 @@ + + + + +ChooseSecretObjectiveMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ChooseSecretObjectiveMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.actions.ActionMessage +
it.polimi.ingsw.network.messages.actions.ChooseSecretObjectiveMessage
+
+
+
+
+
+
public final class ChooseSecretObjectiveMessage +extends ActionMessage
+
The action communicates the intention of a player to choose his secret objective. It can only happen before the first turn of the game. + If the action is successful, a SomeoneChoseSecretObjectiveMessage response is sent to every client.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ChooseSecretObjectiveMessage

      +
      public ChooseSecretObjectiveMessage(String username, + Integer objectiveID)
      +
      Class constructor.
      +
      +
      Parameters:
      +
      username - The username of the player that wants to choose secret objective
      +
      objectiveID - The chosen objective's ID
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getObjectiveID

      +
      public Integer getObjectiveID()
      +
      +
      Returns:
      +
      Chosen objective
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/CreateMatchMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/CreateMatchMessage.html new file mode 100644 index 00000000..b6ed8214 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/CreateMatchMessage.html @@ -0,0 +1,206 @@ + + + + +CreateMatchMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CreateMatchMessage

+
+ +
+
+
public final class CreateMatchMessage +extends ActionMessage
+
The action communicates (to the server) the intention of a client to create a new match.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CreateMatchMessage

      +
      public CreateMatchMessage(String username, + String matchName, + int maxPlayers)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getMatchName

      +
      public String getMatchName()
      +
      +
      Returns:
      +
      Name of the match
      +
      +
      +
    • +
    • +
      +

      getMaxPlayers

      +
      public int getMaxPlayers()
      +
      +
      Returns:
      +
      Number of maximum players (must be between 2 and 4)
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/DrawCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/DrawCardMessage.html new file mode 100644 index 00000000..8445a776 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/DrawCardMessage.html @@ -0,0 +1,192 @@ + + + + +DrawCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DrawCardMessage

+
+ +
+
+
public final class DrawCardMessage +extends ActionMessage
+
The action communicates the intention of a player to draw a card. It can only happen during the player's own turn. + If the action is successful, a SomeoneDrewInitialCardMessage response is sent to every client.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DrawCardMessage

      +
      public DrawCardMessage(String username, + DrawSource source)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getSource

      +
      public DrawSource getSource()
      +
      +
      Returns:
      +
      chosen source for the draw
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/DrawInitialCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/DrawInitialCardMessage.html new file mode 100644 index 00000000..9e3e57b7 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/DrawInitialCardMessage.html @@ -0,0 +1,159 @@ + + + + +DrawInitialCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DrawInitialCardMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.actions.ActionMessage +
it.polimi.ingsw.network.messages.actions.DrawInitialCardMessage
+
+
+
+
+
+
public final class DrawInitialCardMessage +extends ActionMessage
+
It communicates the intention of a player to draw the initial card. It can only happen before the first turn of the game. + - If the action is successful, a SomeoneDrewInitialCardMessage response is sent to every client.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DrawInitialCardMessage

      +
      public DrawInitialCardMessage(String username)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/DrawSecretObjectivesMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/DrawSecretObjectivesMessage.html new file mode 100644 index 00000000..4ab2a6a8 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/DrawSecretObjectivesMessage.html @@ -0,0 +1,159 @@ + + + + +DrawSecretObjectivesMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DrawSecretObjectivesMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.actions.ActionMessage +
it.polimi.ingsw.network.messages.actions.DrawSecretObjectivesMessage
+
+
+
+
+
+
public final class DrawSecretObjectivesMessage +extends ActionMessage
+
It communicates the intention of a player to draw the (2) secret objectives. It can only happen before the first turn of the game. + If the action is successful, a SomeoneDrewSecretObjectivesMessage response is sent to every client.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DrawSecretObjectivesMessage

      +
      public DrawSecretObjectivesMessage(String username)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/GetAvailableMatchesMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/GetAvailableMatchesMessage.html new file mode 100644 index 00000000..b6d006cc --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/GetAvailableMatchesMessage.html @@ -0,0 +1,159 @@ + + + + +GetAvailableMatchesMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GetAvailableMatchesMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.actions.ActionMessage +
it.polimi.ingsw.network.messages.actions.GetAvailableMatchesMessage
+
+
+
+
+
+
public final class GetAvailableMatchesMessage +extends ActionMessage
+
The client asks for an updated version of the lobby; + The server returns an AvailableMatchesMessage response.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GetAvailableMatchesMessage

      +
      public GetAvailableMatchesMessage(String username)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/JoinMatchMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/JoinMatchMessage.html new file mode 100644 index 00000000..3a0f28b2 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/JoinMatchMessage.html @@ -0,0 +1,191 @@ + + + + +JoinMatchMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class JoinMatchMessage

+
+ +
+
+
public final class JoinMatchMessage +extends ActionMessage
+
The action communicates the intention of a client to join a match.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      JoinMatchMessage

      +
      public JoinMatchMessage(String username, + String matchName)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getMatchName

      +
      public String getMatchName()
      +
      +
      Returns:
      +
      Name of the match to join
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/PlayCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/PlayCardMessage.html new file mode 100644 index 00000000..e31b99f3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/PlayCardMessage.html @@ -0,0 +1,235 @@ + + + + +PlayCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PlayCardMessage

+
+ +
+
+
public final class PlayCardMessage +extends ActionMessage
+
The action communicates the intention of the player to place a card on its board. It can only happen during the player's own turn. + If the action is successful, a SomeonePlayedCardMessage response is sent to every client.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getX

      +
      public Integer getX()
      +
      +
      Returns:
      +
      x coordinate of the played card
      +
      +
      +
    • +
    • +
      +

      getY

      +
      public Integer getY()
      +
      +
      Returns:
      +
      y coordinate of the played card
      +
      +
      +
    • +
    • +
      +

      getCardID

      +
      public Integer getCardID()
      +
      +
      Returns:
      +
      id of the played card
      +
      +
      +
    • +
    • +
      +

      getSide

      +
      public Side getSide()
      +
      +
      Returns:
      +
      side of the played card
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/SendBroadcastTextMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/SendBroadcastTextMessage.html new file mode 100644 index 00000000..ae56f33d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/SendBroadcastTextMessage.html @@ -0,0 +1,187 @@ + + + + +SendBroadcastTextMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SendBroadcastTextMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.actions.ActionMessage +
it.polimi.ingsw.network.messages.actions.SendBroadcastTextMessage
+
+
+
+
+
+
public final class SendBroadcastTextMessage +extends ActionMessage
+
SendBroadcastTextMessage
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SendBroadcastTextMessage

      +
      public SendBroadcastTextMessage(String username, + String text)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getText

      +
      public String getText()
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/SendPrivateTextMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/SendPrivateTextMessage.html new file mode 100644 index 00000000..0a301b65 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/SendPrivateTextMessage.html @@ -0,0 +1,198 @@ + + + + +SendPrivateTextMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SendPrivateTextMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.actions.ActionMessage +
it.polimi.ingsw.network.messages.actions.SendPrivateTextMessage
+
+
+
+
+
+
public final class SendPrivateTextMessage +extends ActionMessage
+
SendPrivateTextMessage
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SendPrivateTextMessage

      +
      public SendPrivateTextMessage(String username, + String recipient, + String text)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getRecipient

      +
      public String getRecipient()
      +
      +
    • +
    • +
      +

      getText

      +
      public String getText()
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/ActionMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/ActionMessage.html new file mode 100644 index 00000000..ea9d2d3f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/ActionMessage.html @@ -0,0 +1,140 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.ActionMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.ActionMessage

+
+
Packages that use ActionMessage
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/ChooseInitialCardSideMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/ChooseInitialCardSideMessage.html new file mode 100644 index 00000000..c481fda4 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/ChooseInitialCardSideMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.ChooseInitialCardSideMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.ChooseInitialCardSideMessage

+
+No usage of it.polimi.ingsw.network.messages.actions.ChooseInitialCardSideMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/ChooseSecretObjectiveMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/ChooseSecretObjectiveMessage.html new file mode 100644 index 00000000..afa700c2 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/ChooseSecretObjectiveMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.ChooseSecretObjectiveMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.ChooseSecretObjectiveMessage

+
+No usage of it.polimi.ingsw.network.messages.actions.ChooseSecretObjectiveMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/CreateMatchMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/CreateMatchMessage.html new file mode 100644 index 00000000..59924450 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/CreateMatchMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.CreateMatchMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.CreateMatchMessage

+
+No usage of it.polimi.ingsw.network.messages.actions.CreateMatchMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/DrawCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/DrawCardMessage.html new file mode 100644 index 00000000..68580eec --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/DrawCardMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.DrawCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.DrawCardMessage

+
+No usage of it.polimi.ingsw.network.messages.actions.DrawCardMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/DrawInitialCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/DrawInitialCardMessage.html new file mode 100644 index 00000000..1aba3d1e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/DrawInitialCardMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.DrawInitialCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.DrawInitialCardMessage

+
+No usage of it.polimi.ingsw.network.messages.actions.DrawInitialCardMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/DrawSecretObjectivesMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/DrawSecretObjectivesMessage.html new file mode 100644 index 00000000..1baabf2f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/DrawSecretObjectivesMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.DrawSecretObjectivesMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.DrawSecretObjectivesMessage

+
+No usage of it.polimi.ingsw.network.messages.actions.DrawSecretObjectivesMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/GetAvailableMatchesMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/GetAvailableMatchesMessage.html new file mode 100644 index 00000000..52ef083a --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/GetAvailableMatchesMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.GetAvailableMatchesMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.GetAvailableMatchesMessage

+
+No usage of it.polimi.ingsw.network.messages.actions.GetAvailableMatchesMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/JoinMatchMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/JoinMatchMessage.html new file mode 100644 index 00000000..5a252958 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/JoinMatchMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.JoinMatchMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.JoinMatchMessage

+
+No usage of it.polimi.ingsw.network.messages.actions.JoinMatchMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/PlayCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/PlayCardMessage.html new file mode 100644 index 00000000..ac3a9d22 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/PlayCardMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.PlayCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.PlayCardMessage

+
+No usage of it.polimi.ingsw.network.messages.actions.PlayCardMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/SendBroadcastTextMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/SendBroadcastTextMessage.html new file mode 100644 index 00000000..0c950975 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/SendBroadcastTextMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.SendBroadcastTextMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.SendBroadcastTextMessage

+
+No usage of it.polimi.ingsw.network.messages.actions.SendBroadcastTextMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/SendPrivateTextMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/SendPrivateTextMessage.html new file mode 100644 index 00000000..323c9237 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/class-use/SendPrivateTextMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.actions.SendPrivateTextMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.actions.SendPrivateTextMessage

+
+No usage of it.polimi.ingsw.network.messages.actions.SendPrivateTextMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/package-summary.html new file mode 100644 index 00000000..a6987e6d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/package-summary.html @@ -0,0 +1,159 @@ + + + + +it.polimi.ingsw.network.messages.actions (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.network.messages.actions

+
+
+
package it.polimi.ingsw.network.messages.actions
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/package-tree.html new file mode 100644 index 00000000..14915ce9 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/package-tree.html @@ -0,0 +1,94 @@ + + + + +it.polimi.ingsw.network.messages.actions Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.network.messages.actions

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/package-use.html new file mode 100644 index 00000000..480db8c1 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/actions/package-use.html @@ -0,0 +1,87 @@ + + + + +Uses of Package it.polimi.ingsw.network.messages.actions (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.network.messages.actions

+
+ +
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/class-use/Message.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/class-use/Message.html new file mode 100644 index 00000000..944af6f3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/class-use/Message.html @@ -0,0 +1,312 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.Message (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.Message

+
+
Packages that use Message
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/ErrorMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/ErrorMessage.html new file mode 100644 index 00000000..dad232a8 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/ErrorMessage.html @@ -0,0 +1,205 @@ + + + + +ErrorMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ErrorMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.errors.ErrorMessage
+
+
+
+
+
public class ErrorMessage +extends Message
+
Sent to the clients when an error happens
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ErrorMessage

      +
      public ErrorMessage(String message, + String error)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getError

      +
      public String getError()
      +
      Getter for the error code of the message
      +
      +
      Returns:
      +
      error code of the message
      +
      +
      +
    • +
    • +
      +

      getMessage

      +
      public String getMessage()
      +
      Getter for the message in human language
      +
      +
      Returns:
      +
      the mesage
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/class-use/ErrorMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/class-use/ErrorMessage.html new file mode 100644 index 00000000..f2a3d1ea --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/class-use/ErrorMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.errors.ErrorMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.errors.ErrorMessage

+
+No usage of it.polimi.ingsw.network.messages.errors.ErrorMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/package-summary.html new file mode 100644 index 00000000..d0034eb6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/package-summary.html @@ -0,0 +1,113 @@ + + + + +it.polimi.ingsw.network.messages.errors (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.network.messages.errors

+
+
+
package it.polimi.ingsw.network.messages.errors
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/package-tree.html new file mode 100644 index 00000000..377547be --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/package-tree.html @@ -0,0 +1,80 @@ + + + + +it.polimi.ingsw.network.messages.errors Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.network.messages.errors

+
+Package Hierarchies: + +
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • it.polimi.ingsw.network.messages.Message + +
    • +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/package-use.html new file mode 100644 index 00000000..17d2245c --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/errors/package-use.html @@ -0,0 +1,62 @@ + + + + +Uses of Package it.polimi.ingsw.network.messages.errors (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.network.messages.errors

+
+No usage of it.polimi.ingsw.network.messages.errors
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/package-summary.html new file mode 100644 index 00000000..0318e0e6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/package-summary.html @@ -0,0 +1,113 @@ + + + + +it.polimi.ingsw.network.messages (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.network.messages

+
+
+
package it.polimi.ingsw.network.messages
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/package-tree.html new file mode 100644 index 00000000..2413b79e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/package-tree.html @@ -0,0 +1,76 @@ + + + + +it.polimi.ingsw.network.messages Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.network.messages

+
+Package Hierarchies: + +
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • it.polimi.ingsw.network.messages.Message
    • +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/package-use.html new file mode 100644 index 00000000..0430dea6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/package-use.html @@ -0,0 +1,146 @@ + + + + +Uses of Package it.polimi.ingsw.network.messages (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.network.messages

+
+ + +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/AvailableMatchesMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/AvailableMatchesMessage.html new file mode 100644 index 00000000..43c52f9e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/AvailableMatchesMessage.html @@ -0,0 +1,199 @@ + + + + +AvailableMatchesMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AvailableMatchesMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.responses.ResponseMessage +
it.polimi.ingsw.network.messages.responses.AvailableMatchesMessage
+
+
+
+
+
+
public final class AvailableMatchesMessage +extends ResponseMessage
+
This response is sent when a user is connected to the server.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AvailableMatchesMessage

      +
      public AvailableMatchesMessage(Map<String,Match> availableMatches)
      +
      Class constructor.
      +
      +
      Parameters:
      +
      availableMatches - The available matches present on server
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getMatches

      +
      public List<AvailableMatch> getMatches()
      +
      +
      Returns:
      +
      a list containing a JsonObject for each match with properties: + name - name of the match + maxPlayers - maximum number of players + joinedPlayers - number of players in the match
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/MatchFinishedMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/MatchFinishedMessage.html new file mode 100644 index 00000000..bdf2a7a3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/MatchFinishedMessage.html @@ -0,0 +1,192 @@ + + + + +MatchFinishedMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MatchFinishedMessage

+
+ +
+
+
public final class MatchFinishedMessage +extends ResponseMessage
+
This response is sent to each player when the match is finished
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getRanking

      +
      public List<LeaderboardEntry> getRanking()
      +
      +
      Returns:
      +
      a list of JSONObject with properties + username (String) - username of the current player + points (Integer) - total number of points gained during the match + winner (boolean) - if the current player is also the winner of the game
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/MatchResumedMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/MatchResumedMessage.html new file mode 100644 index 00000000..32a64da3 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/MatchResumedMessage.html @@ -0,0 +1,340 @@ + + + + +MatchResumedMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MatchResumedMessage

+
+ +
+
+
public final class MatchResumedMessage +extends ResponseMessage
+
This response is sent to the user who just rejoined a match. All the parameters refer to the + status of the match before the server crashed
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPlayersUsernamesAndPawns

      +
      public Map<String,Color> getPlayersUsernamesAndPawns()
      +
      +
      Returns:
      +
      A map from players' username to pawn color
      +
      +
      +
    • +
    • +
      +

      getPlayersHands

      +
      public Map<String,List<Integer>> getPlayersHands()
      +
      +
      Returns:
      +
      A map from players' username to their hand
      +
      +
      +
    • +
    • +
      +

      getVisibleObjectives

      +
      public Pair<Integer,Integer> getVisibleObjectives()
      +
      +
      Returns:
      +
      The two visible objectives common to every player
      +
      +
      +
    • +
    • +
      +

      getVisiblePlayableCards

      +
      public Map<DrawSource,Integer> getVisiblePlayableCards()
      +
      +
      Returns:
      +
      The four drawable cards visible to everyone
      +
      +
      +
    • +
    • +
      +

      getDecksTopReigns

      +
      public Pair<Symbol,Symbol> getDecksTopReigns()
      +
      +
      Returns:
      +
      The reign of the two decks (resource and gold)
      +
      +
      +
    • +
    • +
      +

      getSecretObjective

      +
      public Integer getSecretObjective()
      +
      +
      Returns:
      +
      The secret objective ID of the player
      +
      +
      +
    • +
    • +
      +

      getAvailableResources

      +
      public Map<String,Map<Symbol,Integer>> getAvailableResources()
      +
      +
      Returns:
      +
      A map from players' username to their available resources
      +
      +
      +
    • +
    • +
      +

      getPlacedCards

      +
      public Map<String,Map<Integer,PlacedCardRecord>> getPlacedCards()
      +
      +
      Returns:
      +
      A map from players' username to their board
      +
      +
      +
    • +
    • +
      +

      getPlayerPoints

      +
      public Map<String,Integer> getPlayerPoints()
      +
      +
      Returns:
      +
      A map from players' username to their points
      +
      +
      +
    • +
    • +
      +

      getCurrentPlayer

      +
      public String getCurrentPlayer()
      +
      +
      Returns:
      +
      Username of the player currently playing his turn
      +
      +
      +
    • +
    • +
      +

      isDrawPhase

      +
      public boolean isDrawPhase()
      +
      +
      Returns:
      +
      Whether the current player should play or draw a card
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/MatchStartedMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/MatchStartedMessage.html new file mode 100644 index 00000000..97c6247d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/MatchStartedMessage.html @@ -0,0 +1,259 @@ + + + + +MatchStartedMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MatchStartedMessage

+
+ +
+
+
public final class MatchStartedMessage +extends ResponseMessage
+
Sent when the required amount of players is reached and the match is about to start.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MatchStartedMessage

      +
      public MatchStartedMessage(Pair<Objective,Objective> objectives, + Map<DrawSource,PlayableCard> cards, + Pair<Symbol,Symbol> deckReigns, + List<Player> players)
      +
      Calculates the needed parameters given some information from the match
      +
      +
      Parameters:
      +
      objectives - Pair containing the two visible objectives
      +
      cards - Map that for each visible draw source maps the visible card
      +
      deckReigns - Pair containing the reign of the two visible cards on top of the deck. + The first is for the Golds deck, while the second for the resources deck.
      +
      players - List of the players in the match
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getVisibleObjectives

      +
      public Integer[] getVisibleObjectives()
      +
      +
      Returns:
      +
      IDs of the visible objectives
      +
      +
      +
    • +
    • +
      +

      getVisibleCards

      +
      public Map<DrawSource,Integer> getVisibleCards()
      +
      +
      Returns:
      +
      a Map that maps to each visible draw source the ID of the card
      +
      +
      +
    • +
    • +
      +

      getVisibleDeckReigns

      +
      public Symbol[] getVisibleDeckReigns()
      +
      +
      Returns:
      +
      Array of Symbol that contains the reign of top-card + of both the gold and the resource deck, in the first and second slot respectively
      +
      +
      +
    • +
    • +
      +

      getPlayerHands

      +
      public Map<String,Integer[]> getPlayerHands()
      +
      +
      Returns:
      +
      Map mapping to each player username, the list of the cards they have in the hand
      +
      +
      +
    • +
    • +
      +

      getPlayerPawnColors

      +
      public Map<String,Color> getPlayerPawnColors()
      +
      +
      Returns:
      +
      Map containing for each palyer username, the Color of their pawn
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/ResponseMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/ResponseMessage.html new file mode 100644 index 00000000..38560071 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/ResponseMessage.html @@ -0,0 +1,204 @@ + + + + +ResponseMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ResponseMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.responses.ResponseMessage
+
+
+
+
+
Direct Known Subclasses:
+
AvailableMatchesMessage, MatchFinishedMessage, MatchResumedMessage, MatchStartedMessage, SomeoneChoseSecretObjectiveMessage, SomeoneDrewCardMessage, SomeoneDrewInitialCardMessage, SomeoneDrewSecretObjectivesMessage, SomeoneJoinedMessage, SomeonePlayedCardMessage, SomeoneQuitMessage, SomeoneSentBroadcastTextMessage, SomeoneSentPrivateTextMessage, SomeoneSetInitialSideMessage
+
+
+ +
Messages sent from the server to the clients to update them about another + user's move or to the consequence of their action
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ResponseMessage

      +
      public ResponseMessage(String username)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getUsername

      +
      public String getUsername()
      +
      +
      Returns:
      +
      username of the user that did the action + null if not specified by the protocol
      +
      +
      +
    • +
    • +
      +

      getResponse

      +
      public String getResponse()
      +
      +
      Returns:
      +
      repsonse type
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneChoseSecretObjectiveMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneChoseSecretObjectiveMessage.html new file mode 100644 index 00000000..c00a2e3e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneChoseSecretObjectiveMessage.html @@ -0,0 +1,191 @@ + + + + +SomeoneChoseSecretObjectiveMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SomeoneChoseSecretObjectiveMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.responses.ResponseMessage +
it.polimi.ingsw.network.messages.responses.SomeoneChoseSecretObjectiveMessage
+
+
+
+
+
+
public final class SomeoneChoseSecretObjectiveMessage +extends ResponseMessage
+
This response is sent to each user in the match when a user chooses his secret objective.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SomeoneChoseSecretObjectiveMessage

      +
      public SomeoneChoseSecretObjectiveMessage(String username, + Integer objectiveID)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getObjectiveID

      +
      public Integer getObjectiveID()
      +
      +
      Returns:
      +
      ID of the chosen objective. Is null if the player it is sent to not the current player
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneDrewCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneDrewCardMessage.html new file mode 100644 index 00000000..394ffb26 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneDrewCardMessage.html @@ -0,0 +1,236 @@ + + + + +SomeoneDrewCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SomeoneDrewCardMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.responses.ResponseMessage +
it.polimi.ingsw.network.messages.responses.SomeoneDrewCardMessage
+
+
+
+
+
+
public final class SomeoneDrewCardMessage +extends ResponseMessage
+
This response is sent to each user in the match when a user draws a card.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getDrawSource

      +
      public DrawSource getDrawSource()
      +
      +
      Returns:
      +
      Source from which the card is drawn.
      +
      +
      +
    • +
    • +
      +

      getCardID

      +
      public Integer getCardID()
      +
      +
      Returns:
      +
      ID of the card drawn by the player
      +
      +
      +
    • +
    • +
      +

      getReplacementCardID

      +
      public Integer getReplacementCardID()
      +
      +
      Returns:
      +
      ID of the card that replaced the drawn card. Not available if the source is GOLDS_DECK or RESOURCES_DECK
      +
      +
      +
    • +
    • +
      +

      getDeckTopReigns

      +
      public Pair<Symbol,Symbol> getDeckTopReigns()
      +
      +
      Returns:
      +
      Reign of the replaced card
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneDrewInitialCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneDrewInitialCardMessage.html new file mode 100644 index 00000000..a34f6573 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneDrewInitialCardMessage.html @@ -0,0 +1,187 @@ + + + + +SomeoneDrewInitialCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SomeoneDrewInitialCardMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.responses.ResponseMessage +
it.polimi.ingsw.network.messages.responses.SomeoneDrewInitialCardMessage
+
+
+
+
+
+
public final class SomeoneDrewInitialCardMessage +extends ResponseMessage
+
This response is sent to each user in the match when a user draws an initial card.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SomeoneDrewInitialCardMessage

      +
      public SomeoneDrewInitialCardMessage(String username, + Integer initialCardID)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getInitialCardID

      +
      public Integer getInitialCardID()
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneDrewSecretObjectivesMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneDrewSecretObjectivesMessage.html new file mode 100644 index 00000000..57c92854 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneDrewSecretObjectivesMessage.html @@ -0,0 +1,204 @@ + + + + +SomeoneDrewSecretObjectivesMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SomeoneDrewSecretObjectivesMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.responses.ResponseMessage +
it.polimi.ingsw.network.messages.responses.SomeoneDrewSecretObjectivesMessage
+
+
+
+
+
+
public final class SomeoneDrewSecretObjectivesMessage +extends ResponseMessage
+
This response is sent to each user in the match when a user draws the two secret objectives.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SomeoneDrewSecretObjectivesMessage

      +
      public SomeoneDrewSecretObjectivesMessage(String username, + Pair<Integer,Integer> IDs)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getFirstID

      +
      public Integer getFirstID()
      +
      +
      Returns:
      +
      ID of the first objective card drawn. Is null if the player it is sent to not the current player
      +
      +
      +
    • +
    • +
      +

      getSecondID

      +
      public Integer getSecondID()
      +
      +
      Returns:
      +
      ID of the second objective card drawn. Is null if the player it is sent to not the current player
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneJoinedMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneJoinedMessage.html new file mode 100644 index 00000000..8a034f52 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneJoinedMessage.html @@ -0,0 +1,206 @@ + + + + +SomeoneJoinedMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SomeoneJoinedMessage

+
+ +
+
+
public final class SomeoneJoinedMessage +extends ResponseMessage
+
This response is sent when a player joins the current match.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SomeoneJoinedMessage

      +
      public SomeoneJoinedMessage(String username, + List<Player> joinedPlayers, + int maxPlayers)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getJoinedPlayers

      +
      public List<String> getJoinedPlayers()
      +
      +
      Returns:
      +
      Usernames of players currently in the match
      +
      +
      +
    • +
    • +
      +

      getMaxPlayers

      +
      public int getMaxPlayers()
      +
      +
      Returns:
      +
      Maximum amount of players the match can hold
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeonePlayedCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeonePlayedCardMessage.html new file mode 100644 index 00000000..9ab307cc --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeonePlayedCardMessage.html @@ -0,0 +1,264 @@ + + + + +SomeonePlayedCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SomeonePlayedCardMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.responses.ResponseMessage +
it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage
+
+
+
+
+
+
public final class SomeonePlayedCardMessage +extends ResponseMessage
+
SomeonePlayedCardMessage
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getX

      +
      public Integer getX()
      +
      +
      Returns:
      +
      x coordinate of the played card
      +
      +
      +
    • +
    • +
      +

      getY

      +
      public Integer getY()
      +
      +
      Returns:
      +
      y coordinate of the played card
      +
      +
      +
    • +
    • +
      +

      getCardID

      +
      public Integer getCardID()
      +
      +
      Returns:
      +
      ID of the played card
      +
      +
      +
    • +
    • +
      +

      getSide

      +
      public Side getSide()
      +
      +
      Returns:
      +
      Side in which the card has been played. It can be either FRONT or BACK
      +
      +
      +
    • +
    • +
      +

      getPoints

      +
      public Integer getPoints()
      +
      +
      Returns:
      +
      Total points of the player after he placed the card
      +
      +
      +
    • +
    • +
      +

      getAvailableResources

      +
      public Map<Symbol,Integer> getAvailableResources()
      +
      +
      Returns:
      +
      Resources possessed by the player after he placed the card
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneQuitMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneQuitMessage.html new file mode 100644 index 00000000..fd7de2c1 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneQuitMessage.html @@ -0,0 +1,206 @@ + + + + +SomeoneQuitMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SomeoneQuitMessage

+
+ +
+
+
public final class SomeoneQuitMessage +extends ResponseMessage
+
This response is sent when a player quits the current match.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SomeoneQuitMessage

      +
      public SomeoneQuitMessage(String username, + int joinedPlayers, + boolean endMatch)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getJoinedPlayers

      +
      public int getJoinedPlayers()
      +
      +
      Returns:
      +
      Username of the player that just quit the match
      +
      +
      +
    • +
    • +
      +

      isEndMatch

      +
      public boolean isEndMatch()
      +
      +
      Returns:
      +
      true if the quit caused the match to interrupt, false otherwise
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneSentBroadcastTextMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneSentBroadcastTextMessage.html new file mode 100644 index 00000000..e7781cec --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneSentBroadcastTextMessage.html @@ -0,0 +1,187 @@ + + + + +SomeoneSentBroadcastTextMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SomeoneSentBroadcastTextMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.responses.ResponseMessage +
it.polimi.ingsw.network.messages.responses.SomeoneSentBroadcastTextMessage
+
+
+
+
+
+
public final class SomeoneSentBroadcastTextMessage +extends ResponseMessage
+
SomeoneSentBroadcastTextMessage
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SomeoneSentBroadcastTextMessage

      +
      public SomeoneSentBroadcastTextMessage(String username, + String text)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getText

      +
      public String getText()
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneSentPrivateTextMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneSentPrivateTextMessage.html new file mode 100644 index 00000000..3351ce61 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneSentPrivateTextMessage.html @@ -0,0 +1,198 @@ + + + + +SomeoneSentPrivateTextMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SomeoneSentPrivateTextMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.responses.ResponseMessage +
it.polimi.ingsw.network.messages.responses.SomeoneSentPrivateTextMessage
+
+
+
+
+
+
public final class SomeoneSentPrivateTextMessage +extends ResponseMessage
+
SomeoneSentPrivateTextMessage
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SomeoneSentPrivateTextMessage

      +
      public SomeoneSentPrivateTextMessage(String sender, + String recipient, + String text)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getRecipient

      +
      public String getRecipient()
      +
      +
    • +
    • +
      +

      getText

      +
      public String getText()
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneSetInitialSideMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneSetInitialSideMessage.html new file mode 100644 index 00000000..509e26ca --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/SomeoneSetInitialSideMessage.html @@ -0,0 +1,206 @@ + + + + +SomeoneSetInitialSideMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SomeoneSetInitialSideMessage

+
+
java.lang.Object +
it.polimi.ingsw.network.messages.Message +
it.polimi.ingsw.network.messages.responses.ResponseMessage +
it.polimi.ingsw.network.messages.responses.SomeoneSetInitialSideMessage
+
+
+
+
+
+
public final class SomeoneSetInitialSideMessage +extends ResponseMessage
+
This response is sent to each user in the match when a user chosees the initial side of a card.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SomeoneSetInitialSideMessage

      +
      public SomeoneSetInitialSideMessage(String username, + Side side, + Map<Symbol,Integer> availableResources)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAvailableResources

      +
      public Map<Symbol,Integer> getAvailableResources()
      +
      +
      Returns:
      +
      Available resources of player after setting the initial card
      +
      +
      +
    • +
    • +
      +

      getSide

      +
      public Side getSide()
      +
      +
      Returns:
      +
      Side of the initial card.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/AvailableMatchesMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/AvailableMatchesMessage.html new file mode 100644 index 00000000..8b8313bf --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/AvailableMatchesMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.AvailableMatchesMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.AvailableMatchesMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.AvailableMatchesMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/MatchFinishedMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/MatchFinishedMessage.html new file mode 100644 index 00000000..5f8a86b0 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/MatchFinishedMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.MatchFinishedMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.MatchFinishedMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.MatchFinishedMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/MatchResumedMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/MatchResumedMessage.html new file mode 100644 index 00000000..084bbf75 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/MatchResumedMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.MatchResumedMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.MatchResumedMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.MatchResumedMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/MatchStartedMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/MatchStartedMessage.html new file mode 100644 index 00000000..22db3743 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/MatchStartedMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.MatchStartedMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.MatchStartedMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.MatchStartedMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/ResponseMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/ResponseMessage.html new file mode 100644 index 00000000..9b86f227 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/ResponseMessage.html @@ -0,0 +1,154 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.ResponseMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.ResponseMessage

+
+
Packages that use ResponseMessage
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneChoseSecretObjectiveMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneChoseSecretObjectiveMessage.html new file mode 100644 index 00000000..9842d2ab --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneChoseSecretObjectiveMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.SomeoneChoseSecretObjectiveMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.SomeoneChoseSecretObjectiveMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.SomeoneChoseSecretObjectiveMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneDrewCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneDrewCardMessage.html new file mode 100644 index 00000000..1e085002 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneDrewCardMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.SomeoneDrewCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.SomeoneDrewCardMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.SomeoneDrewCardMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneDrewInitialCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneDrewInitialCardMessage.html new file mode 100644 index 00000000..c4577623 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneDrewInitialCardMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.SomeoneDrewInitialCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.SomeoneDrewInitialCardMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.SomeoneDrewInitialCardMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneDrewSecretObjectivesMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneDrewSecretObjectivesMessage.html new file mode 100644 index 00000000..0efd2fbe --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneDrewSecretObjectivesMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.SomeoneDrewSecretObjectivesMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.SomeoneDrewSecretObjectivesMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.SomeoneDrewSecretObjectivesMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneJoinedMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneJoinedMessage.html new file mode 100644 index 00000000..e3ad5f0d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneJoinedMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.SomeoneJoinedMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.SomeoneJoinedMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.SomeoneJoinedMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeonePlayedCardMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeonePlayedCardMessage.html new file mode 100644 index 00000000..e24df106 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeonePlayedCardMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneQuitMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneQuitMessage.html new file mode 100644 index 00000000..8e34b8e1 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneQuitMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.SomeoneQuitMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.SomeoneQuitMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.SomeoneQuitMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneSentBroadcastTextMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneSentBroadcastTextMessage.html new file mode 100644 index 00000000..703f782b --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneSentBroadcastTextMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.SomeoneSentBroadcastTextMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.SomeoneSentBroadcastTextMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.SomeoneSentBroadcastTextMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneSentPrivateTextMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneSentPrivateTextMessage.html new file mode 100644 index 00000000..7c735f10 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneSentPrivateTextMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.SomeoneSentPrivateTextMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.SomeoneSentPrivateTextMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.SomeoneSentPrivateTextMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneSetInitialSideMessage.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneSetInitialSideMessage.html new file mode 100644 index 00000000..6d3c786d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/class-use/SomeoneSetInitialSideMessage.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.messages.responses.SomeoneSetInitialSideMessage (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.messages.responses.SomeoneSetInitialSideMessage

+
+No usage of it.polimi.ingsw.network.messages.responses.SomeoneSetInitialSideMessage
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/package-summary.html new file mode 100644 index 00000000..e383a48b --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/package-summary.html @@ -0,0 +1,170 @@ + + + + +it.polimi.ingsw.network.messages.responses (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.network.messages.responses

+
+
+
package it.polimi.ingsw.network.messages.responses
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/package-tree.html new file mode 100644 index 00000000..4d2820d0 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/package-tree.html @@ -0,0 +1,97 @@ + + + + +it.polimi.ingsw.network.messages.responses Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.network.messages.responses

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/package-use.html new file mode 100644 index 00000000..dc4fb079 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/messages/responses/package-use.html @@ -0,0 +1,87 @@ + + + + +Uses of Package it.polimi.ingsw.network.messages.responses (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.network.messages.responses

+
+ +
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/tcp/ClientListener.html b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/ClientListener.html new file mode 100644 index 00000000..2984af6f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/ClientListener.html @@ -0,0 +1,249 @@ + + + + +ClientListener (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ClientListener

+
+
java.lang.Object +
java.lang.Thread +
it.polimi.ingsw.network.tcp.ClientListener
+
+
+
+
+
All Implemented Interfaces:
+
Runnable
+
+
+
public class ClientListener +extends Thread
+
Every time a socket gets accepted by the TCP server, a new ClientListener will be created with + it, and it will: +
    +
  • Acquire the client's username +
  • Make the client (which is still not a Player) choose/create a Match to join +
  • Create its PlayerControllerTCP, which will also make him join such Match +
  • Listen for any message received and, execute the corresponding action. +
+ + Note that this will just require the action to be executed, but it's PlayerControllerTCP + that actually calls the Player methods
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ClientListener

      +
      public ClientListener(Socket socket, + Server server)
      +
      Class constructor. Needs to have a reference to the server instance since it needs to handle + the match assignment
      +
      +
      Parameters:
      +
      socket - the socket that required a connection
      +
      server - the instance of Server that's running
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      listen

      +
      public void listen()
      +
      Main loop. This will just wait for anything to be put on the input stream and then call + executeRequest(String)
      +
      +
    • +
    • +
      +

      run

      +
      public void run()
      +
      Since the class extends Thread it needs to implement Thread.run(). + Specifically, this will just run listen()
      +
      +
      Specified by:
      +
      run in interface Runnable
      +
      Overrides:
      +
      run in class Thread
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/tcp/ClientReceiver.html b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/ClientReceiver.html new file mode 100644 index 00000000..1580d1e8 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/ClientReceiver.html @@ -0,0 +1,203 @@ + + + + +ClientReceiver (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ClientReceiver

+
+
java.lang.Object +
it.polimi.ingsw.network.tcp.ClientReceiver
+
+
+
+
All Implemented Interfaces:
+
Runnable
+
+
+
public class ClientReceiver +extends Object +implements Runnable
+
Receives messages from server to client
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ClientReceiver

      +
      public ClientReceiver(NetworkHandlerTCP networkHandler, + Socket socket) + throws IOException
      +
      Class constructor.
      +
      +
      Parameters:
      +
      networkHandler - The network view that should call the GraphicalView methods
      +
      socket - The socket opened
      +
      Throws:
      +
      IOException - If there was an error with the socket's streams
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      run

      +
      public void run()
      +
      Receives answers from the server and tries to parse it (in a new thread)
      +
      +
      Specified by:
      +
      run in interface Runnable
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/tcp/IOHandler.html b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/IOHandler.html new file mode 100644 index 00000000..1d3db163 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/IOHandler.html @@ -0,0 +1,300 @@ + + + + +IOHandler (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class IOHandler

+
+
java.lang.Object +
it.polimi.ingsw.network.tcp.IOHandler
+
+
+
+
public class IOHandler +extends Object
+
This class will handle all the IO operations for a certain socket.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      readMsg

      +
      public String readMsg() + throws IOException, +ClassNotFoundException
      +
      Acquires a Message from the socket's input stream.
      +
      +
      Returns:
      +
      the string representing the message
      +
      Throws:
      +
      IOException - if the remote communication failed
      +
      ClassNotFoundException - if the class of the received object could not be found
      +
      +
      +
    • +
    • +
      +

      writeMsg

      +
      public void writeMsg(String msg) + throws IOException
      +
      Writes a Message to the socket's output stream.
      +
      +
      Parameters:
      +
      msg - The (parsed) message to write
      +
      Throws:
      +
      IOException - if the remote communication failed
      +
      +
      +
    • +
    • +
      +

      writeMsg

      +
      public void writeMsg(Message msg) + throws IOException
      +
      Writes a Message to the socket's output stream.
      +
      +
      Parameters:
      +
      msg - The (not yet parsed) message to write
      +
      Throws:
      +
      IOException - if the remote communication failed
      +
      +
      +
    • +
    • +
      +

      msgToString

      +
      public String msgToString(Message msg)
      +
      Converts a Message to its corresponding Json.
      +
      +
      Parameters:
      +
      msg - The message to be parsed
      +
      Returns:
      +
      the corresponding Json
      +
      +
      +
    • +
    • +
      +

      stringToMsg

      +
      public Message stringToMsg(String msg)
      +
      Converts a Json string to its corresponding Message.
      +
      +
      Parameters:
      +
      msg - The Json to be parsed
      +
      Returns:
      +
      the corresponding object
      +
      +
      +
    • +
    • +
      +

      close

      +
      public void close() + throws IOException
      +
      Closes the input and output streams, if not null.
      +
      +
      Throws:
      +
      IOException - if the streams could not be accessed
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/tcp/TCPServer.html b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/TCPServer.html new file mode 100644 index 00000000..4fdadcef --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/TCPServer.html @@ -0,0 +1,195 @@ + + + + +TCPServer (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TCPServer

+
+
java.lang.Object +
it.polimi.ingsw.network.tcp.TCPServer
+
+
+
+
public class TCPServer +extends Object
+
Class containing the ServerSocket. This will just accept sockets and + start the ClientListener with it
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TCPServer

      +
      public TCPServer(Integer port, + Server server)
      +
      Class constructor. It will open a ServerSocket on the specified port
      +
      +
      Parameters:
      +
      port - the port on which the server should be started
      +
      server - the Server object that contains all the Match + objects
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      listen

      +
      public void listen()
      +
      Main loop. Until the ServerSocket is not closed, it will listen for + any Socket that tries to connect and accept them. Finally, it will + start a new ClientListener with it
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/ClientListener.html b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/ClientListener.html new file mode 100644 index 00000000..adb60e15 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/ClientListener.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.tcp.ClientListener (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.tcp.ClientListener

+
+No usage of it.polimi.ingsw.network.tcp.ClientListener
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/ClientReceiver.html b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/ClientReceiver.html new file mode 100644 index 00000000..120f682d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/ClientReceiver.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.tcp.ClientReceiver (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.tcp.ClientReceiver

+
+No usage of it.polimi.ingsw.network.tcp.ClientReceiver
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/IOHandler.html b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/IOHandler.html new file mode 100644 index 00000000..e2968881 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/IOHandler.html @@ -0,0 +1,111 @@ + + + + +Uses of Class it.polimi.ingsw.network.tcp.IOHandler (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.tcp.IOHandler

+
+
Packages that use IOHandler
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/TCPServer.html b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/TCPServer.html new file mode 100644 index 00000000..ad357abe --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/class-use/TCPServer.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.network.tcp.TCPServer (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.network.tcp.TCPServer

+
+No usage of it.polimi.ingsw.network.tcp.TCPServer
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/tcp/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/package-summary.html new file mode 100644 index 00000000..dec63109 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/package-summary.html @@ -0,0 +1,116 @@ + + + + +it.polimi.ingsw.network.tcp (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.network.tcp

+
+
+
package it.polimi.ingsw.network.tcp
+
+
    +
  • +
    +
    Classes
    +
    +
    Class
    +
    Description
    + +
    +
    Every time a socket gets accepted by the TCP server, a new ClientListener will be created with + it, and it will: + + Acquire the client's username + Make the client (which is still not a Player) choose/create a Match to join + Create its PlayerControllerTCP, which will also make him join such Match + Listen for any message received and, execute the corresponding action.
    +
    + +
    +
    Receives messages from server to client
    +
    + +
    +
    This class will handle all the IO operations for a certain socket.
    +
    + +
    +
    Class containing the ServerSocket.
    +
    +
    +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/tcp/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/package-tree.html new file mode 100644 index 00000000..3269203a --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/package-tree.html @@ -0,0 +1,83 @@ + + + + +it.polimi.ingsw.network.tcp Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.network.tcp

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/network/tcp/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/package-use.html new file mode 100644 index 00000000..9d42a895 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/network/tcp/package-use.html @@ -0,0 +1,101 @@ + + + + +Uses of Package it.polimi.ingsw.network.tcp (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.network.tcp

+
+
Packages that use it.polimi.ingsw.network.tcp
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/server/MatchStatusObserver.html b/deliveries/Javadoc/it/polimi/ingsw/server/MatchStatusObserver.html new file mode 100644 index 00000000..593964fb --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/server/MatchStatusObserver.html @@ -0,0 +1,442 @@ + + + + +MatchStatusObserver (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MatchStatusObserver

+
+
java.lang.Object +
it.polimi.ingsw.server.MatchStatusObserver
+
+
+
+
All Implemented Interfaces:
+
MatchObserver
+
+
+
public class MatchStatusObserver +extends Object +implements MatchObserver
+
Subclass of MatchObserver supposed to perform routine actions, which means actions that are to be + performed when there's a state transition, BUT that are not related to a specific player. + It's current main function is to serialize the match from which it receives notifications.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MatchStatusObserver

      +
      public MatchStatusObserver(String matchName, + Map<String,Match> matches)
      +
      Initializes this instance main attributes.
      +
      +
      Parameters:
      +
      matchName - The match name to which this instance is attached and listens to.
      +
      matches - All the matches of the server
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      matchStarted

      +
      public void matchStarted()
      +
      Does nothing.
      +
      +
      Specified by:
      +
      matchStarted in interface MatchObserver
      +
      +
      +
    • +
    • +
      +

      someoneJoined

      +
      public void someoneJoined(Player someone)
      +
      Does nothing.
      +
      +
      Specified by:
      +
      someoneJoined in interface MatchObserver
      +
      Parameters:
      +
      someone - The Player instance that has joined
      +
      +
      +
    • +
    • +
      +

      someoneQuit

      +
      public void someoneQuit(Player someone)
      +
      Does nothing.
      +
      +
      Specified by:
      +
      someoneQuit in interface MatchObserver
      +
      Parameters:
      +
      someone - The Player instance that has quit
      +
      +
      +
    • +
    • +
      +

      someoneDrewInitialCard

      +
      public void someoneDrewInitialCard(Player someone, + InitialCard card)
      +
      Does nothing.
      +
      +
      Specified by:
      +
      someoneDrewInitialCard in interface MatchObserver
      +
      Parameters:
      +
      someone - The player instance that has drawn the card
      +
      card - The initial card that has been drawn
      +
      +
      +
    • +
    • +
      +

      someoneSetInitialSide

      +
      public void someoneSetInitialSide(Player someone, + Side side, + Map<Symbol,Integer> availableResources)
      +
      Does nothing.
      +
      +
      Specified by:
      +
      someoneSetInitialSide in interface MatchObserver
      +
      Parameters:
      +
      someone - The player instance that has chosen the side
      +
      side - The chosen initial card side
      +
      availableResources - The resources available at the moment to the player that set its initial card side
      +
      +
      +
    • +
    • +
      +

      someoneDrewSecretObjective

      +
      public void someoneDrewSecretObjective(Player someone, + Pair<Objective,Objective> objectives)
      +
      Does nothing.
      +
      +
      Specified by:
      +
      someoneDrewSecretObjective in interface MatchObserver
      +
      Parameters:
      +
      someone - The player instance that has drawn the objectives
      +
      objectives - The two proposed objectives
      +
      +
      +
    • +
    • +
      +

      someoneChoseSecretObjective

      +
      public void someoneChoseSecretObjective(Player someone, + Objective objective)
      +
      Does nothing.
      +
      +
      Specified by:
      +
      someoneChoseSecretObjective in interface MatchObserver
      +
      Parameters:
      +
      someone - The player instance that has chosen the secret objective
      +
      objective - The chosen secret objective
      +
      +
      +
    • +
    • +
      +

      someonePlayedCard

      +
      public void someonePlayedCard(Player someone, + Pair<Integer,Integer> coords, + PlayableCard card, + Side side)
      +
      Serializes the match and saves it in the disk. This method parameters are not used.
      +
      +
      Specified by:
      +
      someonePlayedCard in interface MatchObserver
      +
      Parameters:
      +
      someone - Not used by this method.
      +
      coords - Not used by this method.
      +
      card - Not used by this method.
      +
      side - Not used by this method.
      +
      +
      +
    • +
    • +
      +

      someoneDrewCard

      +
      public void someoneDrewCard(Player someone, + DrawSource source, + PlayableCard card, + PlayableCard replacementCard)
      +
      Serializes the match and saves it in the disk. This method parameters are not used.
      +
      +
      Specified by:
      +
      someoneDrewCard in interface MatchObserver
      +
      Parameters:
      +
      someone - Not used by this method.
      +
      source - The drawing source from which the card has been drawn
      +
      card - Not used by this method.
      +
      replacementCard - The card that has replaced the drawn card
      +
      +
      +
    • +
    • +
      +

      someoneSentBroadcastText

      +
      public void someoneSentBroadcastText(Player someone, + String text)
      +
      Does nothing.
      +
      +
      Specified by:
      +
      someoneSentBroadcastText in interface MatchObserver
      +
      Parameters:
      +
      someone - The sender username
      +
      text - The message content
      +
      +
      +
    • +
    • +
      +

      someoneSentPrivateText

      +
      public void someoneSentPrivateText(Player someone, + Player recipient, + String text)
      +
      Does nothing.
      +
      +
      Specified by:
      +
      someoneSentPrivateText in interface MatchObserver
      +
      Parameters:
      +
      someone - The sender username
      +
      recipient - The recipient username
      +
      text - The message content
      +
      +
      +
    • +
    • +
      +

      matchFinished

      +
      public void matchFinished()
      +
      Removes this match serialization file from the disk and removes this match instance from the list of matches + available in the Server.
      +
      +
      Specified by:
      +
      matchFinished in interface MatchObserver
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/server/Server.html b/deliveries/Javadoc/it/polimi/ingsw/server/Server.html new file mode 100644 index 00000000..d735b6d9 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/server/Server.html @@ -0,0 +1,400 @@ + + + + +Server (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Server

+
+ +
+
+
All Implemented Interfaces:
+
ServerRMIInterface, Serializable, Remote
+
+
+
public class Server +extends UnicastRemoteObject +implements ServerRMIInterface
+
The server class of this application. It's appointed with managing remote interactions with clients + (NetworkHandler) before the match starts, after that PlayerController will ensure the + communication. + To be specific, it stores all the Match instances available (not full) or being played at the moment, + creates them when requested by clients and restores them from disk (since periodically serialized) after a + Server crash.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Server

      +
      public Server(int portRMI, + int portTCP) + throws RemoteException
      +
      Initializes this Server instance and its attributes.
      +
      +
      Parameters:
      +
      portRMI - The RMI port to listen to
      +
      portTCP - The TCP port to listen to
      +
      Throws:
      +
      RemoteException - If this instance couldn't be exported on the public RMI registry, so there's been a + connection error
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getJoinableMatches

      +
      public List<AvailableMatch> getJoinableMatches()
      +
      Returns the available matches as AvailableMatch instances. + This method is called just by remote NetworkHandlerRMI instances.
      +
      +
      Specified by:
      +
      getJoinableMatches in interface ServerRMIInterface
      +
      Returns:
      +
      The list of Match which are not full yet.
      +
      +
      +
    • +
    • +
      +

      joinMatch

      + +
      Lets the calling view join on a match with the given player username, if possible; gives back to the client + an instance of its PlayerControllerRMI, to start communicating through it with the match. + This method is called just by remote NetworkHandlerRMI instances.
      +
      +
      Specified by:
      +
      joinMatch in interface ServerRMIInterface
      +
      Parameters:
      +
      matchName - The unique name of the match to join to
      +
      username - The chosen player username
      +
      Returns:
      +
      An instance of PlayerControllerRMI, used exclusively by the calling view
      +
      Throws:
      +
      ChosenMatchException - If the chosen match is either already full or doesn't exist
      +
      AlreadyUsedUsernameException - If the given username is already taken
      +
      WrongStateException - If the match is in a state during which doesn't allow players to join any more
      +
      WrongNameException - If the name is not valid
      +
      RemoteException - If the exportation of this object in the RMI registry failed
      +
      +
      +
    • +
    • +
      +

      createMatch

      +
      public void createMatch(String matchName, + int maxPlayers) + throws ChosenMatchException, +WrongNameException
      +
      Create a new blank match.
      +
      +
      Specified by:
      +
      createMatch in interface ServerRMIInterface
      +
      Parameters:
      +
      matchName - The unique name to give to the new match
      +
      maxPlayers - The maximum number of player allowed on the new match
      +
      Throws:
      +
      ChosenMatchException - If the given match name is already taken
      +
      WrongNameException - If the chosen player username doesn't meet the alphanumerical criteria
      +
      +
      +
    • +
    • +
      +

      ping

      +
      public boolean ping()
      +
      Pings the server in order to perceive if the connection is still alive and working. + Always return true, since the false is implicit in returning a RemoteException + when the connection is not working anymore.
      +
      +
      Specified by:
      +
      ping in interface ServerRMIInterface
      +
      Returns:
      +
      True if the connection is alive, false otherwise
      +
      +
      +
    • +
    • +
      +

      getJoinableMatchesMap

      +
      public Map<String,Match> getJoinableMatchesMap()
      +
      +
      Returns:
      +
      +
      +
    • +
    • +
      +

      getMatch

      +
      public Match getMatch(String name)
      +
      Gets a Match from those saved in the server.
      +
      +
      Parameters:
      +
      name - The unique name of the match
      +
      Returns:
      +
      The match instance
      +
      +
      +
    • +
    • +
      +

      startRMIServer

      +
      public void startRMIServer() + throws RemoteException
      +
      Start the RMI server.
      +
      +
      Throws:
      +
      RemoteException - If the remote registry couldn't be exported or the communication with it failed.
      +
      +
      +
    • +
    • +
      +

      startTCPServer

      +
      public void startTCPServer()
      +
      Starts the TCP server.
      +
      +
    • +
    • +
      +

      main

      +
      public static void main(String[] args) + throws RemoteException
      +
      +
      Throws:
      +
      RemoteException
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/server/ServerRMIInterface.html b/deliveries/Javadoc/it/polimi/ingsw/server/ServerRMIInterface.html new file mode 100644 index 00000000..3b028696 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/server/ServerRMIInterface.html @@ -0,0 +1,245 @@ + + + + +ServerRMIInterface (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface ServerRMIInterface

+
+
+
+
All Superinterfaces:
+
Remote
+
+
+
All Known Implementing Classes:
+
Server
+
+
+
public interface ServerRMIInterface +extends Remote
+
RMI interface used to declare all and only the methods callable on a remote Server instance implementing this + interface by a client. + For security reasons, each method doesn't expose to the receiving view important objects (e.g. Match), but + rather values representing them (e.g. Match unique name).
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    createMatch(String matchName, + int maxPlayers)
    +
    +
    Lets the calling view create a new match.
    +
    + + +
    +
    Returns the available matches as AvailableMatch instances.
    +
    + +
    joinMatch(String matchName, + String username)
    +
    +
    Lets the calling view join on a match with the given player username, if possible; gives back to the client + an instance of its PlayerControllerRMI, to start communicating through it with the match.
    +
    +
    boolean
    + +
    +
    Pings the server in order to perceive if the connection is still alive and working.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getJoinableMatches

      +
      List<AvailableMatch> getJoinableMatches() + throws RemoteException
      +
      Returns the available matches as AvailableMatch instances.
      +
      +
      Returns:
      +
      The list of Match which are not full yet.
      +
      Throws:
      +
      RemoteException - If the remote server is considered not to be reachable any more and cannot return as usual
      +
      +
      +
    • +
    • +
      +

      joinMatch

      + +
      Lets the calling view join on a match with the given player username, if possible; gives back to the client + an instance of its PlayerControllerRMI, to start communicating through it with the match.
      +
      +
      Parameters:
      +
      matchName - The unique name of the match to join to
      +
      username - The chosen player username
      +
      Returns:
      +
      An instance of PlayerControllerRMI, used exclusively by the calling view
      +
      Throws:
      +
      RemoteException - If the remote server is considered not to be reachable any more and cannot return as usual
      +
      ChosenMatchException - If the chosen match is either already full or doesn't exist
      +
      AlreadyUsedUsernameException - If the given username is already taken
      +
      WrongStateException - If the match is in a state during which doesn't allow players to join any more
      +
      WrongNameException - If the name is not valid
      +
      +
      +
    • +
    • +
      +

      createMatch

      +
      void createMatch(String matchName, + int maxPlayers) + throws RemoteException, +ChosenMatchException, +WrongNameException
      +
      Lets the calling view create a new match.
      +
      +
      Parameters:
      +
      matchName - The unique name to give to the new match
      +
      maxPlayers - The maximum number of player allowed on the new match
      +
      Throws:
      +
      RemoteException - If the remote server is considered not to be reachable any more and cannot return as usual
      +
      ChosenMatchException - If the given match name is already taken
      +
      WrongNameException - If the chosen player username doesn't meet the alphanumerical criteria
      +
      +
      +
    • +
    • +
      +

      ping

      +
      boolean ping() + throws RemoteException
      +
      Pings the server in order to perceive if the connection is still alive and working.
      +
      +
      Returns:
      +
      True if the connection is alive, false otherwise
      +
      Throws:
      +
      RemoteException - If the connection to this class instance is not alive anymore
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/server/class-use/MatchStatusObserver.html b/deliveries/Javadoc/it/polimi/ingsw/server/class-use/MatchStatusObserver.html new file mode 100644 index 00000000..243372a2 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/server/class-use/MatchStatusObserver.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.server.MatchStatusObserver (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.server.MatchStatusObserver

+
+No usage of it.polimi.ingsw.server.MatchStatusObserver
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/server/class-use/Server.html b/deliveries/Javadoc/it/polimi/ingsw/server/class-use/Server.html new file mode 100644 index 00000000..a67c0913 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/server/class-use/Server.html @@ -0,0 +1,96 @@ + + + + +Uses of Class it.polimi.ingsw.server.Server (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.server.Server

+
+
Packages that use Server
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/server/class-use/ServerRMIInterface.html b/deliveries/Javadoc/it/polimi/ingsw/server/class-use/ServerRMIInterface.html new file mode 100644 index 00000000..7f806c2b --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/server/class-use/ServerRMIInterface.html @@ -0,0 +1,89 @@ + + + + +Uses of Interface it.polimi.ingsw.server.ServerRMIInterface (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Interface
it.polimi.ingsw.server.ServerRMIInterface

+
+
Packages that use ServerRMIInterface
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/server/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/server/package-summary.html new file mode 100644 index 00000000..6cb9636e --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/server/package-summary.html @@ -0,0 +1,110 @@ + + + + +it.polimi.ingsw.server (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.server

+
+
+
package it.polimi.ingsw.server
+
+
    +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    Subclass of MatchObserver supposed to perform routine actions, which means actions that are to be + performed when there's a state transition, BUT that are not related to a specific player.
    +
    + +
    +
    The server class of this application.
    +
    + +
    +
    RMI interface used to declare all and only the methods callable on a remote Server instance implementing this + interface by a client.
    +
    +
    +
    +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/server/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/server/package-tree.html new file mode 100644 index 00000000..7c49dd19 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/server/package-tree.html @@ -0,0 +1,99 @@ + + + + +it.polimi.ingsw.server Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.server

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/server/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/server/package-use.html new file mode 100644 index 00000000..cc3a382a --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/server/package-use.html @@ -0,0 +1,102 @@ + + + + +Uses of Package it.polimi.ingsw.server (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.server

+
+
Packages that use it.polimi.ingsw.server
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/AvailableMatch.html b/deliveries/Javadoc/it/polimi/ingsw/utils/AvailableMatch.html new file mode 100644 index 00000000..82ed7aa6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/AvailableMatch.html @@ -0,0 +1,327 @@ + + + + +AvailableMatch (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Record Class AvailableMatch

+
+
java.lang.Object +
java.lang.Record +
it.polimi.ingsw.utils.AvailableMatch
+
+
+
+
+
Record Components:
+
name - The match name
+
maxPlayers - The max number of players allowed in the match
+
currentPlayers - The number of currently joined players
+
isRejoinable - Whether the match has been resumed after a server crash
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public record AvailableMatch(String name, Integer maxPlayers, Integer currentPlayers, boolean isRejoinable) +extends Record +implements Serializable
+
AvailableMatches
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AvailableMatch

      +
      public AvailableMatch(String name, + Integer maxPlayers, + Integer currentPlayers, + boolean isRejoinable)
      +
      Creates an instance of a AvailableMatch record class.
      +
      +
      Parameters:
      +
      name - the value for the name record component
      +
      maxPlayers - the value for the maxPlayers record component
      +
      currentPlayers - the value for the currentPlayers record component
      +
      isRejoinable - the value for the isRejoinable record component
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      name

      +
      public String name()
      +
      Returns the value of the name record component.
      +
      +
      Returns:
      +
      the value of the name record component
      +
      +
      +
    • +
    • +
      +

      maxPlayers

      +
      public Integer maxPlayers()
      +
      Returns the value of the maxPlayers record component.
      +
      +
      Returns:
      +
      the value of the maxPlayers record component
      +
      +
      +
    • +
    • +
      +

      currentPlayers

      +
      public Integer currentPlayers()
      +
      Returns the value of the currentPlayers record component.
      +
      +
      Returns:
      +
      the value of the currentPlayers record component
      +
      +
      +
    • +
    • +
      +

      isRejoinable

      +
      public boolean isRejoinable()
      +
      Returns the value of the isRejoinable record component.
      +
      +
      Returns:
      +
      the value of the isRejoinable record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/CardJsonParser.html b/deliveries/Javadoc/it/polimi/ingsw/utils/CardJsonParser.html new file mode 100644 index 00000000..4921ddba --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/CardJsonParser.html @@ -0,0 +1,184 @@ + + + + +CardJsonParser (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CardJsonParser

+
+
java.lang.Object +
it.polimi.ingsw.utils.CardJsonParser
+
+
+
+
public class CardJsonParser +extends Object
+
Parser of Cards, implements a custom parser for Requirement
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CardJsonParser

      +
      public CardJsonParser()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCardBuilder

      +
      public com.google.gson.Gson getCardBuilder()
      +
      Returns a Gson builder with pretty print and custom Requirement deserializer
      +
      +
      Returns:
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/CardsManager.html b/deliveries/Javadoc/it/polimi/ingsw/utils/CardsManager.html new file mode 100644 index 00000000..e1fe0246 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/CardsManager.html @@ -0,0 +1,241 @@ + + + + +CardsManager (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CardsManager

+
+
java.lang.Object +
it.polimi.ingsw.utils.CardsManager
+
+
+
+
public final class CardsManager +extends Object
+
Singleton that represents a collection of all cards actually existing in the Game, so only those used + in the Match instances. + It's appointed to initialise them with instances to be de-serialized from a file and make them available + through getters.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getInstance

      +
      public static CardsManager getInstance()
      +
      Getter for the only possible instance available of this class, so used instead of a constructor.
      +
      +
      Returns:
      +
      Always the same CardsManager instance
      +
      +
      +
    • +
    • +
      +

      getInitialCards

      +
      public Map<Integer,InitialCard> getInitialCards()
      +
      Getter for the initial cards
      +
      +
      Returns:
      +
      Map that matches an int ID to the corresponding initial card
      +
      +
      +
    • +
    • +
      +

      getGoldCards

      +
      public Map<Integer,GoldCard> getGoldCards()
      +
      Getter for the gold cards
      +
      +
      Returns:
      +
      Map that matches an int ID to the corresponding gold card
      +
      +
      +
    • +
    • +
      +

      getResourceCards

      +
      public Map<Integer,ResourceCard> getResourceCards()
      +
      Getter for the resource cards
      +
      +
      Returns:
      +
      Map that matches an int ID to the corresponding resource card
      +
      +
      +
    • +
    • +
      +

      getObjectives

      +
      public Map<Integer,Objective> getObjectives()
      +
      Getter for the objectives
      +
      +
      Returns:
      +
      Map that matches an int ID to the corresponding objective
      +
      +
      +
    • +
    • +
      +

      getPlayableCards

      +
      public Map<Integer,PlayableCard> getPlayableCards()
      +
      Getter for the playable cards
      +
      +
      Returns:
      +
      Map that matches an int ID to the corresponding playable card
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/CardsSerializer.html b/deliveries/Javadoc/it/polimi/ingsw/utils/CardsSerializer.html new file mode 100644 index 00000000..cb2ea24d --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/CardsSerializer.html @@ -0,0 +1,185 @@ + + + + +CardsSerializer (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CardsSerializer

+
+
java.lang.Object +
it.polimi.ingsw.utils.CardsSerializer
+
+
+
+
public class CardsSerializer +extends Object
+
Serialize game cards into json
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CardsSerializer

      +
      public CardsSerializer()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      main

      +
      public static void main(String[] args)
      +
      Function that serializes the cards
      +
      +
      Parameters:
      +
      args - arguments
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/DeckCreator.html b/deliveries/Javadoc/it/polimi/ingsw/utils/DeckCreator.html new file mode 100644 index 00000000..51967684 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/DeckCreator.html @@ -0,0 +1,234 @@ + + + + +DeckCreator (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DeckCreator

+
+
java.lang.Object +
it.polimi.ingsw.utils.DeckCreator
+
+
+
+
public class DeckCreator +extends Object
+
This is a temporary class, used to have all the logic related to deck creation in a single place, so that + when it will be implemented correctly we know where to modify it
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DeckCreator

      +
      public DeckCreator()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      createInitialDeck

      +
      public GameDeck<InitialCard> createInitialDeck()
      +
      Create the deck of initial cards
      +
      +
      Returns:
      +
      a gamedeck of initial cards
      +
      +
      +
    • +
    • +
      +

      createResourceDeck

      +
      public GameDeck<ResourceCard> createResourceDeck()
      +
      Create the deck of resource cards
      +
      +
      Returns:
      +
      a gamedeck of resource cards
      +
      +
      +
    • +
    • +
      +

      createGoldDeck

      +
      public GameDeck<GoldCard> createGoldDeck()
      +
      Create the deck of gold cards
      +
      +
      Returns:
      +
      a gamedeck of gold cards
      +
      +
      +
    • +
    • +
      +

      createObjectiveDeck

      +
      public GameDeck<Objective> createObjectiveDeck()
      +
      Create the deck of objective cards
      +
      +
      Returns:
      +
      a gamedeck of objective cards
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/GuiUtil.html b/deliveries/Javadoc/it/polimi/ingsw/utils/GuiUtil.html new file mode 100644 index 00000000..715b0dca --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/GuiUtil.html @@ -0,0 +1,473 @@ + + + + +GuiUtil (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GuiUtil

+
+
java.lang.Object +
it.polimi.ingsw.utils.GuiUtil
+
+
+
+
public class GuiUtil +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      playableCardsPath

      +
      public static String playableCardsPath
      +
      +
    • +
    • +
      +

      objectivesPath

      +
      public static String objectivesPath
      +
      +
    • +
    • +
      +

      initialsPath

      +
      public static String initialsPath
      +
      +
    • +
    • +
      +

      pawnsPath

      +
      public static String pawnsPath
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GuiUtil

      +
      public GuiUtil()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getFromFXML

      +
      public static <T> T getFromFXML(String path) + throws IOException
      +
      Get a node from the given FXML
      +
      +
      Type Parameters:
      +
      T - type of the expected node
      +
      Parameters:
      +
      path - path of the fxml
      +
      Returns:
      +
      the requested node
      +
      Throws:
      +
      IOException - if there are errors reading the file
      +
      +
      +
    • +
    • +
      +

      isValidName

      +
      public static boolean isValidName(String name)
      +
      Check if the username/match name is valid + The name must be alphanumeric and between 1 and 32 characters
      +
      +
      Parameters:
      +
      name - string to check
      +
      Returns:
      +
      if the name is valid
      +
      +
      +
    • +
    • +
      +

      getLoader

      +
      public static javafx.fxml.FXMLLoader getLoader(String path)
      +
      Get the loader from the specified path
      +
      +
      Parameters:
      +
      path - file path of fxml
      +
      Returns:
      +
      loader
      +
      +
      +
    • +
    • +
      +

      applyCSS

      +
      public static void applyCSS(javafx.scene.Parent w, + String path)
      +
      Applies the specified CSS to a javafx scene parent
      +
      +
      Parameters:
      +
      w - The parent to apply the css to
      +
      path - Path of the css file
      +
      +
      +
    • +
    • +
      +

      getImagePath

      +
      public static String getImagePath(PlayableCard card, + Side side)
      +
      Get the image path of a playable card
      +
      +
      Parameters:
      +
      card - card to get the image
      +
      side - side of the card
      +
      Returns:
      +
      the path as a string
      +
      +
      +
    • +
    • +
      +

      getResourcesBack

      +
      public static String getResourcesBack(Symbol symbol)
      +
      Get the back of a resource card
      +
      +
      Parameters:
      +
      symbol - symbol of the resource card
      +
      Returns:
      +
      the path as a string
      +
      +
      +
    • +
    • +
      +

      getGoldsBack

      +
      public static String getGoldsBack(Symbol symbol)
      +
      Get the back of a gold card
      +
      +
      Parameters:
      +
      symbol - symbol of the gold card
      +
      Returns:
      +
      the path as a string
      +
      +
      +
    • +
    • +
      +

      getImagePath

      +
      public static String getImagePath(InitialCard card, + Side side)
      +
      Get the image path of an intial card
      +
      +
      Parameters:
      +
      card - card to get the image
      +
      side - side of the card
      +
      Returns:
      +
      the path as a string
      +
      +
      +
    • +
    • +
      +

      getImagePath

      +
      public static String getImagePath(Objective obj, + Side side)
      +
      Get the image path of an objective card
      +
      +
      Parameters:
      +
      obj - card to get the image
      +
      side - side of the card
      +
      Returns:
      +
      the path as a string
      +
      +
      +
    • +
    • +
      +

      getPawnImagePath

      +
      public static String getPawnImagePath(Color color)
      +
      Get image path of a pawn
      +
      +
      Parameters:
      +
      color - color of the pawn
      +
      Returns:
      +
      the path as a string
      +
      +
      +
    • +
    • +
      +

      getBlackPawnImagePath

      +
      public static String getBlackPawnImagePath()
      +
      Get image path of the black pawn
      +
      +
      Returns:
      +
      the path as a string
      +
      +
      +
    • +
    • +
      +

      getHexFromColor

      +
      public static String getHexFromColor(Color color)
      +
      Get the hex code of the given color
      +
      +
      Parameters:
      +
      color - color to convert
      +
      Returns:
      +
      the hex code of color
      +
      +
      +
    • +
    • +
      +

      getExceptionTitle

      +
      public static String getExceptionTitle(Exception e)
      +
      Translate exception type into human-readable titles
      +
      +
      Parameters:
      +
      e - exception to translate
      +
      Returns:
      +
      human-readable title
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/LeaderboardEntry.html b/deliveries/Javadoc/it/polimi/ingsw/utils/LeaderboardEntry.html new file mode 100644 index 00000000..72bc7586 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/LeaderboardEntry.html @@ -0,0 +1,307 @@ + + + + +LeaderboardEntry (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Record Class LeaderboardEntry

+
+
java.lang.Object +
java.lang.Record +
it.polimi.ingsw.utils.LeaderboardEntry
+
+
+
+
+
Record Components:
+
username - The username of the player corresponding to this entry
+
points - the points obtained by the player during the game
+
winner - wheter the player is the winner or not (in case of draw, only the player with most objectives fullfilled wins)
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public record LeaderboardEntry(String username, Integer points, boolean winner) +extends Record +implements Serializable
+
LeaderboardEntry
+
+
See Also:
+
+ +
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    LeaderboardEntry(String username, + Integer points, + boolean winner)
    +
    +
    Creates an instance of a LeaderboardEntry record class.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    + + +
    +
    Returns the value of the points record component.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    + + +
    +
    Returns the value of the username record component.
    +
    +
    boolean
    + +
    +
    Returns the value of the winner record component.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      LeaderboardEntry

      +
      public LeaderboardEntry(String username, + Integer points, + boolean winner)
      +
      Creates an instance of a LeaderboardEntry record class.
      +
      +
      Parameters:
      +
      username - the value for the username record component
      +
      points - the value for the points record component
      +
      winner - the value for the winner record component
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      username

      +
      public String username()
      +
      Returns the value of the username record component.
      +
      +
      Returns:
      +
      the value of the username record component
      +
      +
      +
    • +
    • +
      +

      points

      +
      public Integer points()
      +
      Returns the value of the points record component.
      +
      +
      Returns:
      +
      the value of the points record component
      +
      +
      +
    • +
    • +
      +

      winner

      +
      public boolean winner()
      +
      Returns the value of the winner record component.
      +
      +
      Returns:
      +
      the value of the winner record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/MessageJsonParser.html b/deliveries/Javadoc/it/polimi/ingsw/utils/MessageJsonParser.html new file mode 100644 index 00000000..2ff383f1 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/MessageJsonParser.html @@ -0,0 +1,195 @@ + + + + +MessageJsonParser (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MessageJsonParser

+
+
java.lang.Object +
it.polimi.ingsw.utils.MessageJsonParser
+
+
+
+
public class MessageJsonParser +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MessageJsonParser

      +
      public MessageJsonParser()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getMessageBuilder

      +
      public com.google.gson.Gson getMessageBuilder()
      +
      +
    • +
    • +
      +

      toMessage

      +
      public Message toMessage(String json)
      +
      +
    • +
    • +
      +

      toJson

      +
      public String toJson(Message m)
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/Pair.html b/deliveries/Javadoc/it/polimi/ingsw/utils/Pair.html new file mode 100644 index 00000000..01eb4f95 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/Pair.html @@ -0,0 +1,290 @@ + + + + +Pair (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Record Class Pair<T,U>

+
+
java.lang.Object +
java.lang.Record +
it.polimi.ingsw.utils.Pair<T,U>
+
+
+
+
+
Type Parameters:
+
T - The type of the first value
+
U - The type of the second value
+
Record Components:
+
first - The first value of the pair
+
second - The second value of the pair
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public record Pair<T,U>(T first, U second) +extends Record +implements Serializable
+
Represents a pair of generic values.
+
+
See Also:
+
+ +
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    Pair(T first, + U second)
    +
    +
    Creates an instance of a Pair record class.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    + + +
    +
    Returns the value of the first record component.
    +
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    + + +
    +
    Returns the value of the second record component.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Pair

      +
      public Pair(T first, + U second)
      +
      Creates an instance of a Pair record class.
      +
      +
      Parameters:
      +
      first - the value for the first record component
      +
      second - the value for the second record component
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      first

      +
      public T first()
      +
      Returns the value of the first record component.
      +
      +
      Returns:
      +
      the value of the first record component
      +
      +
      +
    • +
    • +
      +

      second

      +
      public U second()
      +
      Returns the value of the second record component.
      +
      +
      Returns:
      +
      the value of the second record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/PlacedCardRecord.html b/deliveries/Javadoc/it/polimi/ingsw/utils/PlacedCardRecord.html new file mode 100644 index 00000000..5c82f413 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/PlacedCardRecord.html @@ -0,0 +1,314 @@ + + + + +PlacedCardRecord (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Record Class PlacedCardRecord

+
+
java.lang.Object +
java.lang.Record +
it.polimi.ingsw.utils.PlacedCardRecord
+
+
+
+
+
Record Components:
+
cardID - The card ID
+
x - The x coordinate
+
y - The y coordinate
+
side - The chosen side
+
+
+
public record PlacedCardRecord(Integer cardID, Integer x, Integer y, Side side) +extends Record
+
PlacedCardRecord
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    PlacedCardRecord(Integer cardID, + Integer x, + Integer y, + Side side)
    +
    +
    Creates an instance of a PlacedCardRecord record class.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Returns the value of the cardID record component.
    +
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    + + +
    +
    Returns the value of the side record component.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    + +
    x()
    +
    +
    Returns the value of the x record component.
    +
    + +
    y()
    +
    +
    Returns the value of the y record component.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PlacedCardRecord

      +
      public PlacedCardRecord(Integer cardID, + Integer x, + Integer y, + Side side)
      +
      Creates an instance of a PlacedCardRecord record class.
      +
      +
      Parameters:
      +
      cardID - the value for the cardID record component
      +
      x - the value for the x record component
      +
      y - the value for the y record component
      +
      side - the value for the side record component
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      cardID

      +
      public Integer cardID()
      +
      Returns the value of the cardID record component.
      +
      +
      Returns:
      +
      the value of the cardID record component
      +
      +
      +
    • +
    • +
      +

      x

      +
      public Integer x()
      +
      Returns the value of the x record component.
      +
      +
      Returns:
      +
      the value of the x record component
      +
      +
      +
    • +
    • +
      +

      y

      +
      public Integer y()
      +
      Returns the value of the y record component.
      +
      +
      Returns:
      +
      the value of the y record component
      +
      +
      +
    • +
    • +
      +

      side

      +
      public Side side()
      +
      Returns the value of the side record component.
      +
      +
      Returns:
      +
      the value of the side record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/RequestStatus.html b/deliveries/Javadoc/it/polimi/ingsw/utils/RequestStatus.html new file mode 100644 index 00000000..e83d8447 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/RequestStatus.html @@ -0,0 +1,245 @@ + + + + +RequestStatus (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class RequestStatus

+
+
java.lang.Object +
java.lang.Enum<RequestStatus> +
it.polimi.ingsw.utils.RequestStatus
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<RequestStatus>, Constable
+
+
+
public enum RequestStatus +extends Enum<RequestStatus>
+
Represents the status of a remote request sent to a remove Server or PlayerController.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static RequestStatus[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static RequestStatus valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/TUICardParser.html b/deliveries/Javadoc/it/polimi/ingsw/utils/TUICardParser.html new file mode 100644 index 00000000..bef2e1a5 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/TUICardParser.html @@ -0,0 +1,256 @@ + + + + +TUICardParser (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TUICardParser

+
+
java.lang.Object +
it.polimi.ingsw.utils.TUICardParser
+
+
+
+
public class TUICardParser +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TUICardParser

      +
      public TUICardParser()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getGenericBack

      +
      public String getGenericBack(Symbol reign, + Pair<Integer,Integer> coord)
      +
      +
    • +
    • +
      +

      parseCard

      +
      public String parseCard(Card card, + Pair<Integer,Integer> coord, + Pair<Integer,Integer> displayCoord, + Boolean isFacingUp) + throws CardException
      +
      Generates a printable string representing a Card of any type
      +
      +
      Parameters:
      +
      card - the card to be parsed
      +
      coord - where to place the card (relative to the terminal, not Board)
      +
      displayCoord - coordinates to display on the card (null if none should be displayed)
      +
      isFacingUp - wheter the card is facing up or down
      +
      Returns:
      +
      The parsed card
      +
      Throws:
      +
      CardException
      +
      +
      +
    • +
    • +
      +

      parseObjective

      +
      public String parseObjective(Objective card, + Pair<Integer,Integer> coord)
      +
      +
    • +
    • +
      +

      getRightColor

      +
      public String getRightColor(Symbol symbol)
      +
      The method is a getter for the TUI-relative color of a specific symbol.
      +
      +
      Parameters:
      +
      symbol - the specified symbol
      +
      Returns:
      +
      the color code as String
      +
      +
      +
    • +
    • +
      +

      getRightIcon

      +
      public String getRightIcon(Symbol symbol)
      +
      The method is a getter for the TUI-relative icon of a specific symbol.
      +
      +
      Parameters:
      +
      symbol - the specified symbol
      +
      Returns:
      +
      the symbol icon as String
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/AvailableMatch.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/AvailableMatch.html new file mode 100644 index 00000000..432c1d7c --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/AvailableMatch.html @@ -0,0 +1,214 @@ + + + + +Uses of Record Class it.polimi.ingsw.utils.AvailableMatch (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Record Class
it.polimi.ingsw.utils.AvailableMatch

+
+
Packages that use AvailableMatch
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/CardJsonParser.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/CardJsonParser.html new file mode 100644 index 00000000..764a3d87 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/CardJsonParser.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.utils.CardJsonParser (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.utils.CardJsonParser

+
+No usage of it.polimi.ingsw.utils.CardJsonParser
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/CardsManager.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/CardsManager.html new file mode 100644 index 00000000..c4ce2d36 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/CardsManager.html @@ -0,0 +1,89 @@ + + + + +Uses of Class it.polimi.ingsw.utils.CardsManager (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.utils.CardsManager

+
+
Packages that use CardsManager
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/CardsSerializer.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/CardsSerializer.html new file mode 100644 index 00000000..6998b8e6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/CardsSerializer.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.utils.CardsSerializer (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.utils.CardsSerializer

+
+No usage of it.polimi.ingsw.utils.CardsSerializer
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/DeckCreator.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/DeckCreator.html new file mode 100644 index 00000000..113b2b41 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/DeckCreator.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.utils.DeckCreator (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.utils.DeckCreator

+
+No usage of it.polimi.ingsw.utils.DeckCreator
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/GuiUtil.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/GuiUtil.html new file mode 100644 index 00000000..f815c29f --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/GuiUtil.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.utils.GuiUtil (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.utils.GuiUtil

+
+No usage of it.polimi.ingsw.utils.GuiUtil
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/LeaderboardEntry.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/LeaderboardEntry.html new file mode 100644 index 00000000..f430cca5 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/LeaderboardEntry.html @@ -0,0 +1,186 @@ + + + + +Uses of Record Class it.polimi.ingsw.utils.LeaderboardEntry (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Record Class
it.polimi.ingsw.utils.LeaderboardEntry

+
+
Packages that use LeaderboardEntry
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/MessageJsonParser.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/MessageJsonParser.html new file mode 100644 index 00000000..693cd6bf --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/MessageJsonParser.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.utils.MessageJsonParser (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.utils.MessageJsonParser

+
+No usage of it.polimi.ingsw.utils.MessageJsonParser
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/Pair.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/Pair.html new file mode 100644 index 00000000..73fc5a88 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/Pair.html @@ -0,0 +1,853 @@ + + + + +Uses of Record Class it.polimi.ingsw.utils.Pair (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Record Class
it.polimi.ingsw.utils.Pair

+
+
Packages that use Pair
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/PlacedCardRecord.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/PlacedCardRecord.html new file mode 100644 index 00000000..307fafa6 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/PlacedCardRecord.html @@ -0,0 +1,87 @@ + + + + +Uses of Record Class it.polimi.ingsw.utils.PlacedCardRecord (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Record Class
it.polimi.ingsw.utils.PlacedCardRecord

+
+
Packages that use PlacedCardRecord
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/RequestStatus.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/RequestStatus.html new file mode 100644 index 00000000..a04be1cd --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/RequestStatus.html @@ -0,0 +1,145 @@ + + + + +Uses of Enum Class it.polimi.ingsw.utils.RequestStatus (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum Class
it.polimi.ingsw.utils.RequestStatus

+
+
Packages that use RequestStatus
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/TUICardParser.html b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/TUICardParser.html new file mode 100644 index 00000000..1f43a3c8 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/class-use/TUICardParser.html @@ -0,0 +1,62 @@ + + + + +Uses of Class it.polimi.ingsw.utils.TUICardParser (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
it.polimi.ingsw.utils.TUICardParser

+
+No usage of it.polimi.ingsw.utils.TUICardParser
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/package-summary.html b/deliveries/Javadoc/it/polimi/ingsw/utils/package-summary.html new file mode 100644 index 00000000..acb6e594 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/package-summary.html @@ -0,0 +1,140 @@ + + + + +it.polimi.ingsw.utils (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package it.polimi.ingsw.utils

+
+
+
package it.polimi.ingsw.utils
+
+
    +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    AvailableMatches
    +
    + +
    +
    Parser of Cards, implements a custom parser for Requirement
    +
    + +
    +
    Singleton that represents a collection of all cards actually existing in the Game, so only those used + in the Match instances.
    +
    + +
    +
    Serialize game cards into json
    +
    + +
    +
    This is a temporary class, used to have all the logic related to deck creation in a single place, so that + when it will be implemented correctly we know where to modify it
    +
    + +
     
    + +
    +
    LeaderboardEntry
    +
    + +
     
    +
    Pair<T,U>
    +
    +
    Represents a pair of generic values.
    +
    + +
    +
    PlacedCardRecord
    +
    + +
    +
    Represents the status of a remote request sent to a remove Server or PlayerController.
    +
    + +
     
    +
    +
    +
    +
  • +
+
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/package-tree.html b/deliveries/Javadoc/it/polimi/ingsw/utils/package-tree.html new file mode 100644 index 00000000..f0a92b25 --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/package-tree.html @@ -0,0 +1,113 @@ + + + + +it.polimi.ingsw.utils Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package it.polimi.ingsw.utils

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+

Record Class Hierarchy

+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/it/polimi/ingsw/utils/package-use.html b/deliveries/Javadoc/it/polimi/ingsw/utils/package-use.html new file mode 100644 index 00000000..742befae --- /dev/null +++ b/deliveries/Javadoc/it/polimi/ingsw/utils/package-use.html @@ -0,0 +1,324 @@ + + + + +Uses of Package it.polimi.ingsw.utils (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
it.polimi.ingsw.utils

+
+
Packages that use it.polimi.ingsw.utils
+ +
+ +
+
+ +
+
+ + diff --git a/deliveries/Javadoc/legal/ADDITIONAL_LICENSE_INFO b/deliveries/Javadoc/legal/ADDITIONAL_LICENSE_INFO new file mode 100644 index 00000000..ff700cd0 --- /dev/null +++ b/deliveries/Javadoc/legal/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/deliveries/Javadoc/legal/ASSEMBLY_EXCEPTION b/deliveries/Javadoc/legal/ASSEMBLY_EXCEPTION new file mode 100644 index 00000000..42966666 --- /dev/null +++ b/deliveries/Javadoc/legal/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.org ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + https://openjdk.org/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/deliveries/Javadoc/legal/LICENSE b/deliveries/Javadoc/legal/LICENSE new file mode 100644 index 00000000..8b400c7a --- /dev/null +++ b/deliveries/Javadoc/legal/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/deliveries/Javadoc/legal/jquery.md b/deliveries/Javadoc/legal/jquery.md new file mode 100644 index 00000000..d468b318 --- /dev/null +++ b/deliveries/Javadoc/legal/jquery.md @@ -0,0 +1,72 @@ +## jQuery v3.6.1 + +### jQuery License +``` +jQuery v 3.6.1 +Copyright OpenJS Foundation and other contributors, https://openjsf.org/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +****************************************** + +The jQuery JavaScript Library v3.6.1 also includes Sizzle.js + +Sizzle.js includes the following license: + +Copyright JS Foundation and other contributors, https://js.foundation/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/sizzle + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +********************* + +``` diff --git a/deliveries/Javadoc/legal/jqueryUI.md b/deliveries/Javadoc/legal/jqueryUI.md new file mode 100644 index 00000000..8bda9d7a --- /dev/null +++ b/deliveries/Javadoc/legal/jqueryUI.md @@ -0,0 +1,49 @@ +## jQuery UI v1.13.2 + +### jQuery UI License +``` +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +``` diff --git a/deliveries/Javadoc/link.svg b/deliveries/Javadoc/link.svg new file mode 100644 index 00000000..7ccc5ed0 --- /dev/null +++ b/deliveries/Javadoc/link.svg @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/deliveries/Javadoc/member-search-index.js b/deliveries/Javadoc/member-search-index.js new file mode 100644 index 00000000..2010453b --- /dev/null +++ b/deliveries/Javadoc/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"it.polimi.ingsw.network.messages.actions","c":"ActionMessage","l":"ActionMessage(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"GameDeck","l":"add(T)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"BoardPane","l":"addCard(Pair, InitialCard, Side)","u":"addCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.InitialCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"BoardPane","l":"addCard(Pair, PlayableCard, Side)","u":"addCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"ValidPositions","l":"addCard(ShownCard)","u":"addCard(it.polimi.ingsw.client.frontend.ShownCard)"},{"p":"it.polimi.ingsw.gamemodel","c":"Board","l":"addHandCard(PlayableCard)","u":"addHandCard(it.polimi.ingsw.gamemodel.PlayableCard)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"LobbySceneController","l":"addMatchCard(String, int, int, boolean)","u":"addMatchCard(java.lang.String,int,int,boolean)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"addPlayer()"},{"p":"it.polimi.ingsw.gamemodel","c":"WaitState","l":"addPlayer()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"addPlayer(Player)","u":"addPlayer(it.polimi.ingsw.gamemodel.Player)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ChatPaneController","l":"addPlayer(String)","u":"addPlayer(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"addPlayer(String)","u":"addPlayer(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"addPlayerTab(String, Color)","u":"addPlayerTab(java.lang.String,it.polimi.ingsw.gamemodel.Color)"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"addPoints(int)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"RankingSceneController","l":"addRanking(LeaderboardEntry)","u":"addRanking(it.polimi.ingsw.utils.LeaderboardEntry)"},{"p":"it.polimi.ingsw.gamemodel","c":"AfterDrawState","l":"AfterDrawState(Match)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Match)"},{"p":"it.polimi.ingsw.gamemodel","c":"AfterMoveState","l":"AfterMoveState(Match)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Match)"},{"p":"it.polimi.ingsw.exceptions","c":"AlreadyUsedUsernameException","l":"AlreadyUsedUsernameException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"ANIMAL"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"applyCSS(Parent, String)","u":"applyCSS(javafx.scene.Parent,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"InputHandler","l":"askUser()"},{"p":"it.polimi.ingsw.utils","c":"AvailableMatch","l":"AvailableMatch(String, Integer, Integer, boolean)","u":"%3Cinit%3E(java.lang.String,java.lang.Integer,java.lang.Integer,boolean)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"availableMatches"},{"p":"it.polimi.ingsw.network.messages.responses","c":"AvailableMatchesMessage","l":"AvailableMatchesMessage(Map)","u":"%3Cinit%3E(java.util.Map)"},{"p":"it.polimi.ingsw.gamemodel","c":"Card","l":"back"},{"p":"it.polimi.ingsw.gamemodel","c":"Side","l":"BACK"},{"p":"it.polimi.ingsw.gamemodel","c":"Color","l":"BLUE"},{"p":"it.polimi.ingsw.gamemodel","c":"Board","l":"Board()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"BoardPane","l":"BoardPane()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"BoardPosition","l":"BoardPosition(boolean, Optional)","u":"%3Cinit%3E(boolean,java.util.Optional)"},{"p":"it.polimi.ingsw.gamemodel","c":"Corner","l":"BOTTOM_LEFT"},{"p":"it.polimi.ingsw.gamemodel","c":"Corner","l":"BOTTOM_RIGHT"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"bottomLeftCorner"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"bottomRightCorner"},{"p":"it.polimi.ingsw.gamemodel","c":"GoldCard","l":"calculatePoints(Board, Pair)","u":"calculatePoints(it.polimi.ingsw.gamemodel.Board,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserverCallable","l":"call(MatchObserver)","u":"call(it.polimi.ingsw.gamemodel.MatchObserver)"},{"p":"it.polimi.ingsw.client.frontend","c":"ShownCard","l":"card()"},{"p":"it.polimi.ingsw.gamemodel","c":"Card","l":"Card()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"BoardPane","l":"cardBorderH"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"cardBorderH"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"BoardPane","l":"cardBorderW"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"cardBorderW"},{"p":"it.polimi.ingsw.exceptions","c":"CardException","l":"CardException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"CardFace","l":"CardFace(Symbol, Symbol, Symbol, Symbol, Set)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Symbol,it.polimi.ingsw.gamemodel.Symbol,it.polimi.ingsw.gamemodel.Symbol,it.polimi.ingsw.gamemodel.Symbol,java.util.Set)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"BoardPane","l":"cardHeight"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"cardHeight"},{"p":"it.polimi.ingsw.utils","c":"PlacedCardRecord","l":"cardID()"},{"p":"it.polimi.ingsw.utils","c":"CardJsonParser","l":"CardJsonParser()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.utils","c":"CardsSerializer","l":"CardsSerializer()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"CardView()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"CardView(InitialCard, Side)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.InitialCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"CardView(Objective, Side)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Objective,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"CardView(PlayableCard, Side)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"BoardPane","l":"cardWidth"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"cardWidth"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"changePlayer()"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"changePlayer()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"changePlayer()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ChatPaneController","l":"chatContainer"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ChatPaneController","l":"chatHistoryScrollPane"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"chatPane"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ChatPaneController","l":"ChatPaneController()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"chooseInitialCardSide(Side)","u":"chooseInitialCardSide(it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"chooseInitialCardSide(Side)","u":"chooseInitialCardSide(it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"chooseInitialCardSide(Side)","u":"chooseInitialCardSide(it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"chooseInitialCardSide(Side)","u":"chooseInitialCardSide(it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"chooseInitialCardSide(Side)","u":"chooseInitialCardSide(it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMIInterface","l":"chooseInitialCardSide(Side)","u":"chooseInitialCardSide(it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"chooseInitialCardSide(Side)","u":"chooseInitialCardSide(it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"chooseInitialCardSide(Side)","u":"chooseInitialCardSide(it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.network.messages.actions","c":"ChooseInitialCardSideMessage","l":"ChooseInitialCardSideMessage(String, Side)","u":"%3Cinit%3E(java.lang.String,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.gamemodel","c":"ChooseInitialSideState","l":"chooseInitialSide()"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"chooseInitialSide()"},{"p":"it.polimi.ingsw.gamemodel","c":"ChooseInitialSideState","l":"ChooseInitialSideState(Match)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Match)"},{"p":"it.polimi.ingsw.gamemodel","c":"ChooseSecretObjectiveState","l":"chooseSecretObjective()"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"chooseSecretObjective()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"chooseSecretObjective(Objective)","u":"chooseSecretObjective(it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"chooseSecretObjective(Objective)","u":"chooseSecretObjective(it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"chooseSecretObjective(Objective)","u":"chooseSecretObjective(it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"chooseSecretObjective(Objective)","u":"chooseSecretObjective(it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"chooseSecretObjective(Objective)","u":"chooseSecretObjective(it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMIInterface","l":"chooseSecretObjective(Objective)","u":"chooseSecretObjective(it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"chooseSecretObjective(Objective)","u":"chooseSecretObjective(it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"chooseSecretObjective(Objective)","u":"chooseSecretObjective(it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.network.messages.actions","c":"ChooseSecretObjectiveMessage","l":"ChooseSecretObjectiveMessage(String, Integer)","u":"%3Cinit%3E(java.lang.String,java.lang.Integer)"},{"p":"it.polimi.ingsw.gamemodel","c":"ChooseSecretObjectiveState","l":"ChooseSecretObjectiveState(Match)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Match)"},{"p":"it.polimi.ingsw.exceptions","c":"ChosenMatchException","l":"ChosenMatchException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"clearTerminal()"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"ClientBoard(Color, List)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Color,java.util.List)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"clientBoards"},{"p":"it.polimi.ingsw.network.tcp","c":"ClientListener","l":"ClientListener(Socket, Server)","u":"%3Cinit%3E(java.net.Socket,it.polimi.ingsw.server.Server)"},{"p":"it.polimi.ingsw.network.tcp","c":"ClientReceiver","l":"ClientReceiver(NetworkHandlerTCP, Socket)","u":"%3Cinit%3E(it.polimi.ingsw.client.network.NetworkHandlerTCP,java.net.Socket)"},{"p":"it.polimi.ingsw.network.tcp","c":"IOHandler","l":"close()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ChatPaneController","l":"confirmSubmitBroadcastMessage(String)","u":"confirmSubmitBroadcastMessage(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ChatPaneController","l":"confirmSubmitPrivateMessage(String)","u":"confirmSubmitPrivateMessage(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"connected"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ConnectionSceneController","l":"ConnectionSceneController()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"BoardPane","l":"convertCoordinates(Pair)","u":"convertCoordinates(it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.frontend","c":"ShownCard","l":"coords()"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"CORNER_OBJ"},{"p":"it.polimi.ingsw.utils","c":"DeckCreator","l":"createGoldDeck()"},{"p":"it.polimi.ingsw.utils","c":"DeckCreator","l":"createInitialDeck()"},{"p":"it.polimi.ingsw.server","c":"Server","l":"createMatch(String, int)","u":"createMatch(java.lang.String,int)"},{"p":"it.polimi.ingsw.server","c":"ServerRMIInterface","l":"createMatch(String, int)","u":"createMatch(java.lang.String,int)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"createMatch(String, Integer)","u":"createMatch(java.lang.String,java.lang.Integer)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"createMatch(String, Integer)","u":"createMatch(java.lang.String,java.lang.Integer)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"createMatch(String, Integer)","u":"createMatch(java.lang.String,java.lang.Integer)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"createMatch(String, Integer)","u":"createMatch(java.lang.String,java.lang.Integer)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"createMatch(String, Integer)","u":"createMatch(java.lang.String,java.lang.Integer)"},{"p":"it.polimi.ingsw.network.messages.actions","c":"CreateMatchMessage","l":"CreateMatchMessage(String, String, int)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int)"},{"p":"it.polimi.ingsw.utils","c":"DeckCreator","l":"createObjectiveDeck()"},{"p":"it.polimi.ingsw.utils","c":"DeckCreator","l":"createResourceDeck()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"LobbySceneController","l":"createUsername"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"currentPlayer"},{"p":"it.polimi.ingsw.utils","c":"AvailableMatch","l":"currentPlayers()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"decideWinner()"},{"p":"it.polimi.ingsw.utils","c":"DeckCreator","l":"DeckCreator()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.exceptions","c":"DeckException","l":"DeckException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"decksTopReign"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"PlayerControls","l":"disable()"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"disconnect()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"disconnect()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"disconnect()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"disconnect()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"doInitialTurnFinish()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"doStart()"},{"p":"it.polimi.ingsw.gamemodel","c":"AfterMoveState","l":"drawCard()"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"drawCard()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"drawCard(DrawSource)","u":"drawCard(it.polimi.ingsw.gamemodel.DrawSource)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"drawCard(DrawSource)","u":"drawCard(it.polimi.ingsw.gamemodel.DrawSource)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"drawCard(DrawSource)","u":"drawCard(it.polimi.ingsw.gamemodel.DrawSource)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"drawCard(DrawSource)","u":"drawCard(it.polimi.ingsw.gamemodel.DrawSource)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"drawCard(DrawSource)","u":"drawCard(it.polimi.ingsw.gamemodel.DrawSource)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMIInterface","l":"drawCard(DrawSource)","u":"drawCard(it.polimi.ingsw.gamemodel.DrawSource)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"drawCard(DrawSource)","u":"drawCard(it.polimi.ingsw.gamemodel.DrawSource)"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"drawCard(DrawSource)","u":"drawCard(it.polimi.ingsw.gamemodel.DrawSource)"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"drawCard(DrawSource)","u":"drawCard(it.polimi.ingsw.gamemodel.DrawSource)"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"drawCard(PlayableCard)","u":"drawCard(it.polimi.ingsw.gamemodel.PlayableCard)"},{"p":"it.polimi.ingsw.network.messages.actions","c":"DrawCardMessage","l":"DrawCardMessage(String, DrawSource)","u":"%3Cinit%3E(java.lang.String,it.polimi.ingsw.gamemodel.DrawSource)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"drawInitialCard()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"drawInitialCard()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"drawInitialCard()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"drawInitialCard()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"drawInitialCard()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMIInterface","l":"drawInitialCard()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"drawInitialCard()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"drawInitialCard()"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"drawInitialCard()"},{"p":"it.polimi.ingsw.gamemodel","c":"NextTurnState","l":"drawInitialCard()"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"drawInitialCard()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"DrawInitialCardMessage","l":"DrawInitialCardMessage(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"drawSecretObjectives()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"drawSecretObjectives()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"drawSecretObjectives()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"drawSecretObjectives()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"drawSecretObjectives()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMIInterface","l":"drawSecretObjectives()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"drawSecretObjectives()"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"drawSecretObjectives()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"DrawSecretObjectivesMessage","l":"DrawSecretObjectivesMessage(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"EMPTY_CORNER"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"PlayerControls","l":"enable()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"enableDrawSourcesInteractions(boolean)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"enablePlaceCardInteractions(boolean)"},{"p":"it.polimi.ingsw.client.frontend","c":"ShownCard","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"BoardPosition","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"it.polimi.ingsw.gamemodel","c":"Card","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"it.polimi.ingsw.gamemodel","c":"Objective","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"it.polimi.ingsw.utils","c":"AvailableMatch","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"it.polimi.ingsw.utils","c":"LeaderboardEntry","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"it.polimi.ingsw.utils","c":"Pair","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"it.polimi.ingsw.utils","c":"PlacedCardRecord","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"it.polimi.ingsw.network.messages.errors","c":"ErrorMessage","l":"ErrorMessage(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ErrorSceneController","l":"ErrorSceneController()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ErrorSceneController","l":"errorTitle"},{"p":"it.polimi.ingsw.utils","c":"RequestStatus","l":"FAILED"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"FEATHER"},{"p":"it.polimi.ingsw.gamemodel","c":"FinalState","l":"FinalState(Match)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Match)"},{"p":"it.polimi.ingsw.gamemodel","c":"DrawSource","l":"FIRST_VISIBLE"},{"p":"it.polimi.ingsw.utils","c":"Pair","l":"first()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"firstObjective"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"firstVisible"},{"p":"it.polimi.ingsw.gamemodel","c":"DrawSource","l":"FOURTH_VISIBLE"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"fourthVisible"},{"p":"it.polimi.ingsw.gamemodel","c":"Side","l":"fromString(String)","u":"fromString(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Card","l":"front"},{"p":"it.polimi.ingsw.gamemodel","c":"Side","l":"FRONT"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"FULL_CORNER"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"FUNGUS"},{"p":"it.polimi.ingsw.gamemodel","c":"GameDeck","l":"GameDeck()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"ActionMessage","l":"getAction()"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"getAvailableMatches()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"getAvailableMatches()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"getAvailableMatches()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"getAvailableMatches()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"GetAvailableMatchesMessage","l":"GetAvailableMatchesMessage(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"getAvailableResources()"},{"p":"it.polimi.ingsw.gamemodel","c":"Board","l":"getAvailableResources()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"getAvailableResources()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeonePlayedCardMessage","l":"getAvailableResources()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneSetInitialSideMessage","l":"getAvailableResources()"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"getBasicResources()"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"getBlackPawnImagePath()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"getBoard()"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"getBoard()"},{"p":"it.polimi.ingsw.gamemodel","c":"PlacedCard","l":"getCard()"},{"p":"it.polimi.ingsw.utils","c":"CardJsonParser","l":"getCardBuilder()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"PlayCardMessage","l":"getCardID()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneDrewCardMessage","l":"getCardID()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeonePlayedCardMessage","l":"getCardID()"},{"p":"it.polimi.ingsw.gamemodel","c":"CardFace","l":"getCenter()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"getChatPane()"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"getColor()"},{"p":"it.polimi.ingsw.gamemodel","c":"CardFace","l":"getCorner(Corner)","u":"getCorner(it.polimi.ingsw.gamemodel.Corner)"},{"p":"it.polimi.ingsw.gamemodel","c":"Board","l":"getCurrentHand()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"getCurrentPlayer()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"getCurrentPlayer()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"getCurrentPlayers()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"getCurrentState()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"getDecksTopReigns()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"getDecksTopReigns()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneDrewCardMessage","l":"getDeckTopReigns()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneDrewCardMessage","l":"getDrawSource()"},{"p":"it.polimi.ingsw.network.messages.errors","c":"ErrorMessage","l":"getError()"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"getExceptionTitle(Exception)","u":"getExceptionTitle(java.lang.Exception)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneDrewSecretObjectivesMessage","l":"getFirstID()"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"getFromFXML(String)","u":"getFromFXML(java.lang.String)"},{"p":"it.polimi.ingsw.utils","c":"TUICardParser","l":"getGenericBack(Symbol, Pair)","u":"getGenericBack(it.polimi.ingsw.gamemodel.Symbol,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.utils","c":"CardsManager","l":"getGoldCards()"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"getGoldsBack(Symbol)","u":"getGoldsBack(it.polimi.ingsw.gamemodel.Symbol)"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"getHand()"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"getHexFromColor(Color)","u":"getHexFromColor(it.polimi.ingsw.gamemodel.Color)"},{"p":"it.polimi.ingsw.gamemodel","c":"Card","l":"getId()"},{"p":"it.polimi.ingsw.gamemodel","c":"Objective","l":"getID()"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"getImagePath(InitialCard, Side)","u":"getImagePath(it.polimi.ingsw.gamemodel.InitialCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"getImagePath(Objective, Side)","u":"getImagePath(it.polimi.ingsw.gamemodel.Objective,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"getImagePath(PlayableCard, Side)","u":"getImagePath(it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"getInitialCard()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneDrewInitialCardMessage","l":"getInitialCardID()"},{"p":"it.polimi.ingsw.utils","c":"CardsManager","l":"getInitialCards()"},{"p":"it.polimi.ingsw.utils","c":"CardsManager","l":"getInstance()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"getIO()"},{"p":"it.polimi.ingsw.server","c":"Server","l":"getJoinableMatches()"},{"p":"it.polimi.ingsw.server","c":"ServerRMIInterface","l":"getJoinableMatches()"},{"p":"it.polimi.ingsw.server","c":"Server","l":"getJoinableMatchesMap()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneJoinedMessage","l":"getJoinedPlayers()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneQuitMessage","l":"getJoinedPlayers()"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"getLoader(String)","u":"getLoader(java.lang.String)"},{"p":"it.polimi.ingsw.server","c":"Server","l":"getMatch(String)","u":"getMatch(java.lang.String)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"AvailableMatchesMessage","l":"getMatches()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"CreateMatchMessage","l":"getMatchName()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"JoinMatchMessage","l":"getMatchName()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"getMaxPlayers()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"CreateMatchMessage","l":"getMaxPlayers()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneJoinedMessage","l":"getMaxPlayers()"},{"p":"it.polimi.ingsw.network.messages.errors","c":"ErrorMessage","l":"getMessage()"},{"p":"it.polimi.ingsw.utils","c":"MessageJsonParser","l":"getMessageBuilder()"},{"p":"it.polimi.ingsw.gamemodel","c":"GoldCard","l":"getMultiplier()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"InputHandler","l":"getNextLine()"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"getObjective()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"ChooseSecretObjectiveMessage","l":"getObjectiveID()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneChoseSecretObjectiveMessage","l":"getObjectiveID()"},{"p":"it.polimi.ingsw.utils","c":"CardsManager","l":"getObjectives()"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"getPawnColor()"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"getPawnImagePath(Color)","u":"getPawnImagePath(it.polimi.ingsw.gamemodel.Color)"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"getPlaced()"},{"p":"it.polimi.ingsw.gamemodel","c":"Board","l":"getPlacedCards()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"getPlacedCards()"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"getPlacementNumber()"},{"p":"it.polimi.ingsw.utils","c":"CardsManager","l":"getPlayableCards()"},{"p":"it.polimi.ingsw.gamemodel","c":"PlacedCard","l":"getPlayedCardFace()"},{"p":"it.polimi.ingsw.gamemodel","c":"PlacedCard","l":"getPlayedSide()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerController","l":"getPlayer()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchStartedMessage","l":"getPlayerHands()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchStartedMessage","l":"getPlayerPawnColors()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"getPlayerPoints()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"getPlayers()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"getPlayersFinalRanking()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"getPlayersHands()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"getPlayersUsernamesAndPawns()"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"getPoints()"},{"p":"it.polimi.ingsw.gamemodel","c":"GoldCard","l":"getPoints()"},{"p":"it.polimi.ingsw.gamemodel","c":"Objective","l":"getPoints()"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"getPoints()"},{"p":"it.polimi.ingsw.gamemodel","c":"ResourceCard","l":"getPoints()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeonePlayedCardMessage","l":"getPoints()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchFinishedMessage","l":"getRanking()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"SendPrivateTextMessage","l":"getRecipient()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneSentPrivateTextMessage","l":"getRecipient()"},{"p":"it.polimi.ingsw.gamemodel","c":"PlayableCard","l":"getReign()"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"getReigns()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneDrewCardMessage","l":"getReplacementCardID()"},{"p":"it.polimi.ingsw.gamemodel","c":"Objective","l":"getReq()"},{"p":"it.polimi.ingsw.gamemodel","c":"PositionRequirement","l":"getReqs()"},{"p":"it.polimi.ingsw.gamemodel","c":"QuantityRequirement","l":"getReqs()"},{"p":"it.polimi.ingsw.gamemodel","c":"GoldCard","l":"getRequirement()"},{"p":"it.polimi.ingsw.utils","c":"CardsManager","l":"getResourceCards()"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"getResourcesBack(Symbol)","u":"getResourcesBack(it.polimi.ingsw.gamemodel.Symbol)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"ResponseMessage","l":"getResponse()"},{"p":"it.polimi.ingsw.utils","c":"TUICardParser","l":"getRightColor(Symbol)","u":"getRightColor(it.polimi.ingsw.gamemodel.Symbol)"},{"p":"it.polimi.ingsw.utils","c":"TUICardParser","l":"getRightIcon(Symbol)","u":"getRightIcon(it.polimi.ingsw.gamemodel.Symbol)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneDrewSecretObjectivesMessage","l":"getSecondID()"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"getSecretObjective()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"getSecretObjective()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"ChooseInitialCardSideMessage","l":"getSide()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"PlayCardMessage","l":"getSide()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeonePlayedCardMessage","l":"getSide()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneSetInitialSideMessage","l":"getSide()"},{"p":"it.polimi.ingsw.gamemodel","c":"Card","l":"getSide(Side)","u":"getSide(it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.gamemodel","c":"GameDeck","l":"getSize()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"DrawCardMessage","l":"getSource()"},{"p":"it.polimi.ingsw.client.frontend","c":"LastRequest","l":"getStatus()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"SendBroadcastTextMessage","l":"getText()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"SendPrivateTextMessage","l":"getText()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneSentBroadcastTextMessage","l":"getText()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneSentPrivateTextMessage","l":"getText()"},{"p":"it.polimi.ingsw.gamemodel","c":"PlacedCard","l":"getTurn()"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"getUsername()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"getUsername()"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"getUsername()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"ActionMessage","l":"getUsername()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"ResponseMessage","l":"getUsername()"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"getValidCorner()"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"getValidMultiplier()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"ValidPositions","l":"getValidPlaces()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"getView()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchStartedMessage","l":"getVisibleCards()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchStartedMessage","l":"getVisibleDeckReigns()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"getVisibleObjectives()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"getVisibleObjectives()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchStartedMessage","l":"getVisibleObjectives()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"getVisiblePlayableCards()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"getVisiblePlayableCards()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"PlayCardMessage","l":"getX()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeonePlayedCardMessage","l":"getX()"},{"p":"it.polimi.ingsw.network.messages.actions","c":"PlayCardMessage","l":"getY()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeonePlayedCardMessage","l":"getY()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"giveInitialCard(InitialCard)","u":"giveInitialCard(it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"giveInitialCard(InitialCard)","u":"giveInitialCard(it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"giveInitialCard(InitialCard)","u":"giveInitialCard(it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"giveInitialCard(InitialCard)","u":"giveInitialCard(it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"giveInitialCard(InitialCard)","u":"giveInitialCard(it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"giveInitialCard(InitialCard)","u":"giveInitialCard(it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"giveSecretObjectives(Pair)","u":"giveSecretObjectives(it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"giveSecretObjectives(Pair)","u":"giveSecretObjectives(it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"giveSecretObjectives(Pair)","u":"giveSecretObjectives(it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"giveSecretObjectives(Pair)","u":"giveSecretObjectives(it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"giveSecretObjectives(Pair)","u":"giveSecretObjectives(it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"giveSecretObjectives(Pair)","u":"giveSecretObjectives(it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.gamemodel","c":"GoldCard","l":"GoldCard(CardFace, Symbol, Symbol, int, QuantityRequirement)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.CardFace,it.polimi.ingsw.gamemodel.Symbol,it.polimi.ingsw.gamemodel.Symbol,int,it.polimi.ingsw.gamemodel.QuantityRequirement)"},{"p":"it.polimi.ingsw.gamemodel","c":"DrawSource","l":"GOLDS_DECK"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"goldsDeck"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalApplication","l":"GraphicalApplication()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"graphicalView"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"GraphicalView()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"GraphicalViewGUI(Stage)","u":"%3Cinit%3E(javafx.stage.Stage)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"GraphicalViewTUI()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.gamemodel","c":"Color","l":"GREEN"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"GuiUtil()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"handCards"},{"p":"it.polimi.ingsw.exceptions","c":"HandException","l":"HandException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"ShownCard","l":"hashCode()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"BoardPosition","l":"hashCode()"},{"p":"it.polimi.ingsw.gamemodel","c":"Card","l":"hashCode()"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"hashCode()"},{"p":"it.polimi.ingsw.utils","c":"AvailableMatch","l":"hashCode()"},{"p":"it.polimi.ingsw.utils","c":"LeaderboardEntry","l":"hashCode()"},{"p":"it.polimi.ingsw.utils","c":"Pair","l":"hashCode()"},{"p":"it.polimi.ingsw.utils","c":"PlacedCardRecord","l":"hashCode()"},{"p":"it.polimi.ingsw.gamemodel","c":"Card","l":"id"},{"p":"it.polimi.ingsw.gamemodel","c":"InitialCard","l":"InitialCard(CardFace, CardFace)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.CardFace,it.polimi.ingsw.gamemodel.CardFace)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ChatPaneController","l":"initialize()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ConnectionSceneController","l":"initialize()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ErrorSceneController","l":"initialize()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"LobbySceneController","l":"initialize()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"initialize()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"initialize()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"RankingSceneController","l":"initialize()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"SceneController","l":"initialize()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"initialize()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"LobbySceneController","l":"initializePostController()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"initializePostController()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"RankingSceneController","l":"initializePostController()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"SceneController","l":"initializePostController()"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"initialsPath"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"INKWELL"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"InputHandler","l":"InputHandler(TuiPrinter)","u":"%3Cinit%3E(it.polimi.ingsw.client.frontend.tui.TuiPrinter)"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"INSECT"},{"p":"it.polimi.ingsw.gamemodel","c":"PlacementOutcome","l":"INVALID_COORDS"},{"p":"it.polimi.ingsw.gamemodel","c":"PlacementOutcome","l":"INVALID_ENOUGH_RESOURCES"},{"p":"it.polimi.ingsw.exceptions","c":"InvalidPlayerException","l":"InvalidPlayerException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.exceptions","c":"InvalidResourceException","l":"InvalidResourceException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.network.tcp","c":"IOHandler","l":"IOHandler(Socket)","u":"%3Cinit%3E(java.net.Socket)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"ipAddress"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"isConnected()"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"isConnected()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"isDrawPhase()"},{"p":"it.polimi.ingsw.gamemodel","c":"GameDeck","l":"isEmpty()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"PlayerControls","l":"isEnabled()"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneQuitMessage","l":"isEndMatch()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"isFinished()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"isFull()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"isInitialTurnFinished()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"isLastTurn()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"isRejoinable()"},{"p":"it.polimi.ingsw.utils","c":"AvailableMatch","l":"isRejoinable()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"isStarted()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"BoardPosition","l":"isValid()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"ValidPositions","l":"isValid(Pair)","u":"isValid(it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"isValidName(String)","u":"isValidName(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"joinMatch(String)","u":"joinMatch(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"joinMatch(String)","u":"joinMatch(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"joinMatch(String)","u":"joinMatch(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"joinMatch(String)","u":"joinMatch(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"joinMatch(String)","u":"joinMatch(java.lang.String)"},{"p":"it.polimi.ingsw.server","c":"Server","l":"joinMatch(String, String)","u":"joinMatch(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.server","c":"ServerRMIInterface","l":"joinMatch(String, String)","u":"joinMatch(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.network.messages.actions","c":"JoinMatchMessage","l":"JoinMatchMessage(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"LobbySceneController","l":"joinTitle"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"lastRequest"},{"p":"it.polimi.ingsw.client.frontend","c":"LastRequest","l":"LastRequest()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"lastTurn"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"RankingSceneController","l":"leaderboardContainer"},{"p":"it.polimi.ingsw.utils","c":"LeaderboardEntry","l":"LeaderboardEntry(String, Integer, boolean)","u":"%3Cinit%3E(java.lang.String,java.lang.Integer,boolean)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"BoardPosition","l":"link()"},{"p":"it.polimi.ingsw.network.tcp","c":"ClientListener","l":"listen()"},{"p":"it.polimi.ingsw.network.tcp","c":"TCPServer","l":"listen()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"SceneController","l":"loadScene(String)","u":"loadScene(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"MatchStatus","l":"LOBBY"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"LobbySceneController","l":"LobbySceneController()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalApplication","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"it.polimi.ingsw.server","c":"Server","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"it.polimi.ingsw.utils","c":"CardsSerializer","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"makeMove()"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"makeMove()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"makeMove()"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"makeMove()"},{"p":"it.polimi.ingsw.gamemodel","c":"NextTurnState","l":"makeMove()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"makeMove(Pair, PlayableCard, Side)","u":"makeMove(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerController","l":"match"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"match"},{"p":"it.polimi.ingsw.client.frontend","c":"MatchStatus","l":"MATCH_STATE"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"Match(int, GameDeck, GameDeck, GameDeck, GameDeck)","u":"%3Cinit%3E(int,it.polimi.ingsw.gamemodel.GameDeck,it.polimi.ingsw.gamemodel.GameDeck,it.polimi.ingsw.gamemodel.GameDeck,it.polimi.ingsw.gamemodel.GameDeck)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"matchFinished()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"matchFinished()"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"matchFinished()"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"matchFinished()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"matchFinished(List)","u":"matchFinished(java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"matchFinished(List)","u":"matchFinished(java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"matchFinished(List)","u":"matchFinished(java.util.List)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"matchFinished(List)","u":"matchFinished(java.util.List)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"matchFinished(List)","u":"matchFinished(java.util.List)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchFinishedMessage","l":"MatchFinishedMessage(List>)","u":"%3Cinit%3E(java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"LobbySceneController","l":"matchName"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"matchName"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"LobbySceneController","l":"matchNumberContainer"},{"p":"it.polimi.ingsw.controllers","c":"PlayerController","l":"matchResumed()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"matchResumed()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"matchResumed()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"matchResumed(Map, Map>, Pair, Map, Pair, Objective, Map>, Map, PlacedCard>>, Map, String, boolean)","u":"matchResumed(java.util.Map,java.util.Map,it.polimi.ingsw.utils.Pair,java.util.Map,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.Objective,java.util.Map,java.util.Map,java.util.Map,java.lang.String,boolean)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"matchResumed(Map, Map>, Pair, Map, Pair, Objective, Map>, Map, PlacedCard>>, Map, String, boolean)","u":"matchResumed(java.util.Map,java.util.Map,it.polimi.ingsw.utils.Pair,java.util.Map,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.Objective,java.util.Map,java.util.Map,java.util.Map,java.lang.String,boolean)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchResumedMessage","l":"MatchResumedMessage(Map, Map>, Pair, Map, Pair, Integer, Map>, Map>, Map, String, boolean)","u":"%3Cinit%3E(java.util.Map,java.util.Map,it.polimi.ingsw.utils.Pair,java.util.Map,it.polimi.ingsw.utils.Pair,java.lang.Integer,java.util.Map,java.util.Map,java.util.Map,java.lang.String,boolean)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"MatchSceneController()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"matchStarted()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"matchStarted()"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"matchStarted()"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"matchStarted()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"matchStarted(Map, Map>, Pair, Map, Pair)","u":"matchStarted(java.util.Map,java.util.Map,it.polimi.ingsw.utils.Pair,java.util.Map,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"matchStarted(Map, Map>, Pair, Map, Pair)","u":"matchStarted(java.util.Map,java.util.Map,it.polimi.ingsw.utils.Pair,java.util.Map,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"matchStarted(Map, Map>, Pair, Map, Pair)","u":"matchStarted(java.util.Map,java.util.Map,it.polimi.ingsw.utils.Pair,java.util.Map,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"MatchStartedMessage","l":"MatchStartedMessage(Pair, Map, Pair, List)","u":"%3Cinit%3E(it.polimi.ingsw.utils.Pair,java.util.Map,it.polimi.ingsw.utils.Pair,java.util.List)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"MatchState()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"MatchState(Match)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Match)"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"MatchStatusObserver(String, Map)","u":"%3Cinit%3E(java.lang.String,java.util.Map)"},{"p":"it.polimi.ingsw.utils","c":"AvailableMatch","l":"maxPlayers()"},{"p":"it.polimi.ingsw.network.messages","c":"Message","l":"Message()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.utils","c":"MessageJsonParser","l":"MessageJsonParser()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.network.tcp","c":"IOHandler","l":"msgToString(Message)","u":"msgToString(it.polimi.ingsw.network.messages.Message)"},{"p":"it.polimi.ingsw.utils","c":"AvailableMatch","l":"name()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"networkHandler"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"NetworkHandler(GraphicalView, String, int)","u":"%3Cinit%3E(it.polimi.ingsw.client.frontend.GraphicalView,java.lang.String,int)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"NetworkHandlerRMI(GraphicalView, String, int)","u":"%3Cinit%3E(it.polimi.ingsw.client.frontend.GraphicalView,java.lang.String,int)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"NetworkHandlerTCP(GraphicalView, String, Integer)","u":"%3Cinit%3E(it.polimi.ingsw.client.frontend.GraphicalView,java.lang.String,java.lang.Integer)"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"nextPlayer()"},{"p":"it.polimi.ingsw.gamemodel","c":"NextTurnState","l":"NextTurnState(Match)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Match)"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"NO_MULT"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"noCardPath"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"notifyConnectionLost()"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"notifyConnectionLost()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"notifyConnectionLost()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"notifyError(Exception)","u":"notifyError(java.lang.Exception)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"notifyError(Exception)","u":"notifyError(java.lang.Exception)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"notifyError(Exception)","u":"notifyError(java.lang.Exception)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"notifyError(Exception)","u":"notifyError(java.lang.Exception)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"notifyError(String, String)","u":"notifyError(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"notifyLastTurn()"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"notifyLastTurn()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"notifyMatchResumed(boolean)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"notifyMatchResumed(boolean)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"notifyMatchResumed(boolean)"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"notifyMatchStart()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"notifyMatchStarted()"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"notifyMatchStarted()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"notifyMatchStarted()"},{"p":"it.polimi.ingsw.gamemodel","c":"Objective","l":"Objective(int, Requirement)","u":"%3Cinit%3E(int,it.polimi.ingsw.gamemodel.Requirement)"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"objectivesPath"},{"p":"it.polimi.ingsw.utils","c":"Pair","l":"Pair(T, U)","u":"%3Cinit%3E(T,U)"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"PARCHMENT"},{"p":"it.polimi.ingsw.utils","c":"TUICardParser","l":"parseCard(Card, Pair, Pair, Boolean)","u":"parseCard(it.polimi.ingsw.gamemodel.Card,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.utils.Pair,java.lang.Boolean)"},{"p":"it.polimi.ingsw.utils","c":"TUICardParser","l":"parseObjective(Objective, Pair)","u":"parseObjective(it.polimi.ingsw.gamemodel.Objective,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"PlateauPane","l":"pawnSize"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"pawnsPath"},{"p":"it.polimi.ingsw.gamemodel","c":"GameDeck","l":"peek()"},{"p":"it.polimi.ingsw.utils","c":"RequestStatus","l":"PENDING"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"ping()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"ping()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"ping()"},{"p":"it.polimi.ingsw.server","c":"Server","l":"ping()"},{"p":"it.polimi.ingsw.server","c":"ServerRMIInterface","l":"ping()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"placeCard(Pair, PlayableCard, Side)","u":"placeCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.gamemodel","c":"Board","l":"placeCard(Pair, PlayableCard, Side, int)","u":"placeCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side,int)"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"placeCard(Pair, PlayableCard, Side, Integer, Map)","u":"placeCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side,java.lang.Integer,java.util.Map)"},{"p":"it.polimi.ingsw.gamemodel","c":"PlacedCard","l":"PlacedCard(Card, Side, int)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Card,it.polimi.ingsw.gamemodel.Side,int)"},{"p":"it.polimi.ingsw.utils","c":"PlacedCardRecord","l":"PlacedCardRecord(Integer, Integer, Integer, Side)","u":"%3Cinit%3E(java.lang.Integer,java.lang.Integer,java.lang.Integer,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"placeInitial(Side, Map)","u":"placeInitial(it.polimi.ingsw.gamemodel.Side,java.util.Map)"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"PLANT"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"plateauPane"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"PlateauPane","l":"PlateauPane()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.gamemodel","c":"PlayableCard","l":"PlayableCard()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.gamemodel","c":"PlayableCard","l":"PlayableCard(Symbol)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Symbol)"},{"p":"it.polimi.ingsw.utils","c":"GuiUtil","l":"playableCardsPath"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"RankingSceneController","l":"playAgainButton"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"playCard(Pair, PlayableCard, Side)","u":"playCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"playCard(Pair, PlayableCard, Side)","u":"playCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"playCard(Pair, PlayableCard, Side)","u":"playCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"playCard(Pair, PlayableCard, Side)","u":"playCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"playCard(Pair, PlayableCard, Side)","u":"playCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMIInterface","l":"playCard(Pair, PlayableCard, Side)","u":"playCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"playCard(Pair, PlayableCard, Side)","u":"playCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"playCard(Pair, PlayableCard, Side)","u":"playCard(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.network.messages.actions","c":"PlayCardMessage","l":"PlayCardMessage(String, Pair, Integer, Side)","u":"%3Cinit%3E(java.lang.String,it.polimi.ingsw.utils.Pair,java.lang.Integer,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerController","l":"player"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"Player(Player)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Player)"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"Player(String, Match)","u":"%3Cinit%3E(java.lang.String,it.polimi.ingsw.gamemodel.Match)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerController","l":"PlayerController(String, Match)","u":"%3Cinit%3E(java.lang.String,it.polimi.ingsw.gamemodel.Match)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"PlayerControllerRMI(String, Match)","u":"%3Cinit%3E(java.lang.String,it.polimi.ingsw.gamemodel.Match)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"PlayerControllerTCP(String, Match, IOHandler)","u":"%3Cinit%3E(java.lang.String,it.polimi.ingsw.gamemodel.Match,it.polimi.ingsw.network.tcp.IOHandler)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"PlayerControls","l":"PlayerControls()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"players"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"playersContainer"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"PlayerTabController()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.gamemodel","c":"PlayableCard","l":"points"},{"p":"it.polimi.ingsw.utils","c":"LeaderboardEntry","l":"points()"},{"p":"it.polimi.ingsw.gamemodel","c":"GameDeck","l":"poll()"},{"p":"it.polimi.ingsw.gamemodel","c":"GameDeck","l":"pop()"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"port"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"PlateauPane","l":"positionOffset"},{"p":"it.polimi.ingsw.gamemodel","c":"PositionRequirement","l":"PositionRequirement(Map, Symbol>)","u":"%3Cinit%3E(java.util.Map)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printAvailableResources(Map, Integer)","u":"printAvailableResources(java.util.Map,java.lang.Integer)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printCard(ShownCard)","u":"printCard(it.polimi.ingsw.client.frontend.ShownCard)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printCenteredMessage(String, int)","u":"printCenteredMessage(java.lang.String,int)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printChat(List)","u":"printChat(java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printDrawingScreen(Pair, Map)","u":"printDrawingScreen(it.polimi.ingsw.utils.Pair,java.util.Map)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printEndScreen(List, String)","u":"printEndScreen(java.util.List,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printHand(String, Color, List)","u":"printHand(java.lang.String,it.polimi.ingsw.gamemodel.Color,java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printHandAtBottom(List)","u":"printHandAtBottom(java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printInitialSideBySide(InitialCard, int)","u":"printInitialSideBySide(it.polimi.ingsw.gamemodel.InitialCard,int)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printListReverse(List)","u":"printListReverse(java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printMatchesLobby(List, List, int)","u":"printMatchesLobby(java.util.List,java.util.List,int)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printMessage(String)","u":"printMessage(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printMessages(List)","u":"printMessages(java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printObjectivePair(String, Pair, int)","u":"printObjectivePair(java.lang.String,it.polimi.ingsw.utils.Pair,int)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printObjectives(String, Color, Objective, Pair)","u":"printObjectives(java.lang.String,it.polimi.ingsw.gamemodel.Color,it.polimi.ingsw.gamemodel.Objective,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printPlayableFrontAndBack(PlayableCard, int)","u":"printPlayableFrontAndBack(it.polimi.ingsw.gamemodel.PlayableCard,int)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printPlayerBoard(String, ClientBoard)","u":"printPlayerBoard(java.lang.String,it.polimi.ingsw.client.frontend.ClientBoard)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printPrompt(String)","u":"printPrompt(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printScoreboard(Map, int)","u":"printScoreboard(java.util.Map,int)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printSimpleList(List, Boolean, Boolean)","u":"printSimpleList(java.util.List,java.lang.Boolean,java.lang.Boolean)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printStringsBoxed(List, String, Color, Boolean)","u":"printStringsBoxed(java.util.List,java.lang.String,it.polimi.ingsw.gamemodel.Color,java.lang.Boolean)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printValidPlaces(Map, Pair>)","u":"printValidPlaces(java.util.Map)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"printWelcomeScreen()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"proposeSecretObjectives()"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"proposeSecretObjectives()"},{"p":"it.polimi.ingsw.gamemodel","c":"NextTurnState","l":"proposeSecretObjectives()"},{"p":"it.polimi.ingsw.gamemodel","c":"QuantityRequirement","l":"QuantityRequirement(Map)","u":"%3Cinit%3E(java.util.Map)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"RankingSceneController","l":"RankingSceneController()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.network.tcp","c":"IOHandler","l":"readMsg()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"receiveAvailableMatches(List)","u":"receiveAvailableMatches(java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"receiveAvailableMatches(List)","u":"receiveAvailableMatches(java.util.List)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"receiveAvailableMatches(List)","u":"receiveAvailableMatches(java.util.List)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"receiveAvailableMatches(List)","u":"receiveAvailableMatches(java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ChatPaneController","l":"receiveBroadcastMessage(String, String)","u":"receiveBroadcastMessage(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ChatPaneController","l":"receivePrivateMessage(String, String)","u":"receivePrivateMessage(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Color","l":"RED"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"registerView(RemoteViewInterface)","u":"registerView(it.polimi.ingsw.client.network.RemoteViewInterface)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMIInterface","l":"registerView(RemoteViewInterface)","u":"registerView(it.polimi.ingsw.client.network.RemoteViewInterface)"},{"p":"it.polimi.ingsw.gamemodel","c":"PlayableCard","l":"reign"},{"p":"it.polimi.ingsw.gamemodel","c":"Board","l":"removeHandCard(PlayableCard)","u":"removeHandCard(it.polimi.ingsw.gamemodel.PlayableCard)"},{"p":"it.polimi.ingsw.gamemodel","c":"FinalState","l":"removePlayer()"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"removePlayer()"},{"p":"it.polimi.ingsw.gamemodel","c":"WaitState","l":"removePlayer()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"removePlayer(Player)","u":"removePlayer(it.polimi.ingsw.gamemodel.Player)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"removePlayer(String)","u":"removePlayer(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"removePlayerChoiceContainer()"},{"p":"it.polimi.ingsw.gamemodel","c":"Requirement","l":"Requirement()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.gamemodel","c":"ResourceCard","l":"ResourceCard(CardFace, Symbol, int)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.CardFace,it.polimi.ingsw.gamemodel.Symbol,int)"},{"p":"it.polimi.ingsw.gamemodel","c":"DrawSource","l":"RESOURCES_DECK"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"resourcesDeck"},{"p":"it.polimi.ingsw.network.messages.responses","c":"ResponseMessage","l":"ResponseMessage(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"resumeMatch(Map, Map>, Pair, Map, Pair, Objective, Map>, Map, PlacedCard>>, Map, String, boolean)","u":"resumeMatch(java.util.Map,java.util.Map,it.polimi.ingsw.utils.Pair,java.util.Map,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.Objective,java.util.Map,java.util.Map,java.util.Map,java.lang.String,boolean)"},{"p":"it.polimi.ingsw.network.tcp","c":"ClientListener","l":"run()"},{"p":"it.polimi.ingsw.network.tcp","c":"ClientReceiver","l":"run()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"SceneController","l":"SceneController()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalApplication","l":"screenHeight"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalApplication","l":"screenWidth"},{"p":"it.polimi.ingsw.gamemodel","c":"DrawSource","l":"SECOND_VISIBLE"},{"p":"it.polimi.ingsw.utils","c":"Pair","l":"second()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"secondObjective"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"secondVisible"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"sendBroadcastText(Player, String)","u":"sendBroadcastText(it.polimi.ingsw.gamemodel.Player,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"sendBroadcastText(String)","u":"sendBroadcastText(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"sendBroadcastText(String)","u":"sendBroadcastText(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"sendBroadcastText(String)","u":"sendBroadcastText(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"sendBroadcastText(String)","u":"sendBroadcastText(java.lang.String)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"sendBroadcastText(String)","u":"sendBroadcastText(java.lang.String)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMIInterface","l":"sendBroadcastText(String)","u":"sendBroadcastText(java.lang.String)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"sendBroadcastText(String)","u":"sendBroadcastText(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"sendBroadcastText(String)","u":"sendBroadcastText(java.lang.String)"},{"p":"it.polimi.ingsw.network.messages.actions","c":"SendBroadcastTextMessage","l":"SendBroadcastTextMessage(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerController","l":"sendJoined()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"sendPrivateText(Player, Player, String)","u":"sendPrivateText(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Player,java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"sendPrivateText(Player, String)","u":"sendPrivateText(it.polimi.ingsw.gamemodel.Player,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"sendPrivateText(String, String)","u":"sendPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"sendPrivateText(String, String)","u":"sendPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerRMI","l":"sendPrivateText(String, String)","u":"sendPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandlerTCP","l":"sendPrivateText(String, String)","u":"sendPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"sendPrivateText(String, String)","u":"sendPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMIInterface","l":"sendPrivateText(String, String)","u":"sendPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"sendPrivateText(String, String)","u":"sendPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.network.messages.actions","c":"SendPrivateTextMessage","l":"SendPrivateTextMessage(String, String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.server","c":"Server","l":"Server(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ConnectionSceneController","l":"serverAddress"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ConnectionSceneController","l":"serverPort"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"setArc(double)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"setCard(InitialCard, Side)","u":"setCard(it.polimi.ingsw.gamemodel.InitialCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"setCard(Objective, Side)","u":"setCard(it.polimi.ingsw.gamemodel.Objective,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"setCard(PlayableCard, Side)","u":"setCard(it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"setColor(Color)","u":"setColor(it.polimi.ingsw.gamemodel.Color)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"PlateauPane","l":"setColor(String, Color)","u":"setColor(java.lang.String,it.polimi.ingsw.gamemodel.Color)"},{"p":"it.polimi.ingsw.gamemodel","c":"Player","l":"setConnected(boolean)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"SceneController","l":"setControllerAttributes(FXMLLoader)","u":"setControllerAttributes(javafx.fxml.FXMLLoader)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"SceneController","l":"setControllerAttributes(FXMLLoader, Node)","u":"setControllerAttributes(javafx.fxml.FXMLLoader,javafx.scene.Node)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"setCurrentPlayer(boolean)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"setCurrentPlayers(int)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"setDrawSource(DrawSource, PlayableCard, Symbol)","u":"setDrawSource(it.polimi.ingsw.gamemodel.DrawSource,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Symbol)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ErrorSceneController","l":"setErrror(Exception)","u":"setErrror(java.lang.Exception)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"setFocus(String)","u":"setFocus(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"setFocusToTable()"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"setGoldsCardBack(Symbol)","u":"setGoldsCardBack(it.polimi.ingsw.gamemodel.Symbol)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"SceneController","l":"setGraphicalView(GraphicalViewGUI)","u":"setGraphicalView(it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"setHandCards(List)","u":"setHandCards(java.util.List)"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"setInitial(InitialCard)","u":"setInitial(it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.gamemodel","c":"Board","l":"setInitialCard(InitialCard, Side)","u":"setInitialCard(it.polimi.ingsw.gamemodel.InitialCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"setInitialSide(Side, Map)","u":"setInitialSide(it.polimi.ingsw.gamemodel.Side,java.util.Map)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"setLastRequestStatus(RequestStatus)","u":"setLastRequestStatus(it.polimi.ingsw.utils.RequestStatus)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"setLastRequestStatus(RequestStatus)","u":"setLastRequestStatus(it.polimi.ingsw.utils.RequestStatus)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"setLobbySceneController(LobbySceneController)","u":"setLobbySceneController(it.polimi.ingsw.client.frontend.gui.controllers.LobbySceneController)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"setMatchName(String)","u":"setMatchName(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"setMaxPlayers(int)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"setNetworkHandler(NetworkHandler)","u":"setNetworkHandler(it.polimi.ingsw.client.network.NetworkHandler)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"setObjectives(Pair)","u":"setObjectives(it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"setPlateauPoints(String, int)","u":"setPlateauPoints(java.lang.String,int)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"setPoints(int)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"PlateauPane","l":"setPoints(String, int)","u":"setPoints(java.lang.String,int)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"InputHandler","l":"setPrompt(String)","u":"setPrompt(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"setResources(Map)","u":"setResources(java.util.Map)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"setResourcesCardBack(Symbol)","u":"setResourcesCardBack(it.polimi.ingsw.gamemodel.Symbol)"},{"p":"it.polimi.ingsw.client.frontend","c":"ClientBoard","l":"setSecretObjective(Objective)","u":"setSecretObjective(it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"setSecretObjective(Objective)","u":"setSecretObjective(it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"setSecretObjective(Objective)","u":"setSecretObjective(it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"SceneController","l":"setStage(Stage)","u":"setStage(javafx.stage.Stage)"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"setState(MatchState)","u":"setState(it.polimi.ingsw.gamemodel.MatchState)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"setStateTitle(String)","u":"setStateTitle(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"setStateTitle(String)","u":"setStateTitle(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"LastRequest","l":"setStatus(RequestStatus)","u":"setStatus(it.polimi.ingsw.utils.RequestStatus)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ErrorSceneController","l":"setText(String)","u":"setText(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ErrorSceneController","l":"setTitle(String)","u":"setTitle(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"setToken(Color)","u":"setToken(it.polimi.ingsw.gamemodel.Color)"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"setupBoards()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"setupDecks()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"setupPlayers()"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"setUsername(String)","u":"setUsername(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"setUsername(String)","u":"setUsername(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"setUsername(String)","u":"setUsername(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"setUsername(String)","u":"setUsername(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"RankingSceneController","l":"setVictory(boolean)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"RankingSceneController","l":"showConnectionScene()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"showMatch()"},{"p":"it.polimi.ingsw.client.frontend","c":"ShownCard","l":"ShownCard(Card, Side, Pair)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Card,it.polimi.ingsw.gamemodel.Side,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"InputHandler","l":"showPrompt()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"showRankingScene()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"LobbySceneController","l":"showWaitScene()"},{"p":"it.polimi.ingsw.gamemodel","c":"GameDeck","l":"shuffle()"},{"p":"it.polimi.ingsw.client.frontend","c":"ShownCard","l":"side()"},{"p":"it.polimi.ingsw.utils","c":"PlacedCardRecord","l":"side()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"someoneChoseSecretObjective(Player, Objective)","u":"someoneChoseSecretObjective(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"someoneChoseSecretObjective(Player, Objective)","u":"someoneChoseSecretObjective(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"someoneChoseSecretObjective(Player, Objective)","u":"someoneChoseSecretObjective(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"someoneChoseSecretObjective(Player, Objective)","u":"someoneChoseSecretObjective(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Objective)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"someoneChoseSecretObjective(String)","u":"someoneChoseSecretObjective(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"someoneChoseSecretObjective(String)","u":"someoneChoseSecretObjective(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"someoneChoseSecretObjective(String)","u":"someoneChoseSecretObjective(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"someoneChoseSecretObjective(String)","u":"someoneChoseSecretObjective(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"someoneChoseSecretObjective(String)","u":"someoneChoseSecretObjective(java.lang.String)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneChoseSecretObjectiveMessage","l":"SomeoneChoseSecretObjectiveMessage(String, Integer)","u":"%3Cinit%3E(java.lang.String,java.lang.Integer)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard)","u":"someoneDrewCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.DrawSource,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.PlayableCard)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard)","u":"someoneDrewCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.DrawSource,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.PlayableCard)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard)","u":"someoneDrewCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.DrawSource,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.PlayableCard)"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard)","u":"someoneDrewCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.DrawSource,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.PlayableCard)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"someoneDrewCard(String, DrawSource, PlayableCard, PlayableCard, Pair)","u":"someoneDrewCard(java.lang.String,it.polimi.ingsw.gamemodel.DrawSource,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"someoneDrewCard(String, DrawSource, PlayableCard, PlayableCard, Pair)","u":"someoneDrewCard(java.lang.String,it.polimi.ingsw.gamemodel.DrawSource,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"someoneDrewCard(String, DrawSource, PlayableCard, PlayableCard, Pair)","u":"someoneDrewCard(java.lang.String,it.polimi.ingsw.gamemodel.DrawSource,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"someoneDrewCard(String, DrawSource, PlayableCard, PlayableCard, Pair)","u":"someoneDrewCard(java.lang.String,it.polimi.ingsw.gamemodel.DrawSource,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneDrewCardMessage","l":"SomeoneDrewCardMessage(String, DrawSource, Integer, Integer, Pair)","u":"%3Cinit%3E(java.lang.String,it.polimi.ingsw.gamemodel.DrawSource,java.lang.Integer,java.lang.Integer,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"someoneDrewInitialCard(InitialCard)","u":"someoneDrewInitialCard(it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"someoneDrewInitialCard(Player, InitialCard)","u":"someoneDrewInitialCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"someoneDrewInitialCard(Player, InitialCard)","u":"someoneDrewInitialCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"someoneDrewInitialCard(Player, InitialCard)","u":"someoneDrewInitialCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"someoneDrewInitialCard(Player, InitialCard)","u":"someoneDrewInitialCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"someoneDrewInitialCard(String, InitialCard)","u":"someoneDrewInitialCard(java.lang.String,it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"someoneDrewInitialCard(String, InitialCard)","u":"someoneDrewInitialCard(java.lang.String,it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"someoneDrewInitialCard(String, InitialCard)","u":"someoneDrewInitialCard(java.lang.String,it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"someoneDrewInitialCard(String, InitialCard)","u":"someoneDrewInitialCard(java.lang.String,it.polimi.ingsw.gamemodel.InitialCard)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneDrewInitialCardMessage","l":"SomeoneDrewInitialCardMessage(String, Integer)","u":"%3Cinit%3E(java.lang.String,java.lang.Integer)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"PlayerTabController","l":"someoneDrewSecretObjective()"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"someoneDrewSecretObjective(Player, Pair)","u":"someoneDrewSecretObjective(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"someoneDrewSecretObjective(Player, Pair)","u":"someoneDrewSecretObjective(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"someoneDrewSecretObjective(Player, Pair)","u":"someoneDrewSecretObjective(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"someoneDrewSecretObjective(Player, Pair)","u":"someoneDrewSecretObjective(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"someoneDrewSecretObjective(String)","u":"someoneDrewSecretObjective(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"someoneDrewSecretObjective(String)","u":"someoneDrewSecretObjective(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"someoneDrewSecretObjective(String)","u":"someoneDrewSecretObjective(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"someoneDrewSecretObjective(String)","u":"someoneDrewSecretObjective(java.lang.String)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneDrewSecretObjectivesMessage","l":"SomeoneDrewSecretObjectivesMessage(String, Pair)","u":"%3Cinit%3E(java.lang.String,it.polimi.ingsw.utils.Pair)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"someoneJoined(Player)","u":"someoneJoined(it.polimi.ingsw.gamemodel.Player)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"someoneJoined(Player)","u":"someoneJoined(it.polimi.ingsw.gamemodel.Player)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"someoneJoined(Player)","u":"someoneJoined(it.polimi.ingsw.gamemodel.Player)"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"someoneJoined(Player)","u":"someoneJoined(it.polimi.ingsw.gamemodel.Player)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"someoneJoined(String, List)","u":"someoneJoined(java.lang.String,java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"someoneJoined(String, List)","u":"someoneJoined(java.lang.String,java.util.List)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"someoneJoined(String, List)","u":"someoneJoined(java.lang.String,java.util.List)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"someoneJoined(String, List)","u":"someoneJoined(java.lang.String,java.util.List)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"someoneJoined(String, List)","u":"someoneJoined(java.lang.String,java.util.List)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneJoinedMessage","l":"SomeoneJoinedMessage(String, List, int)","u":"%3Cinit%3E(java.lang.String,java.util.List,int)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"someonePlayedCard(Player, Pair, PlayableCard, Side)","u":"someonePlayedCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"someonePlayedCard(Player, Pair, PlayableCard, Side)","u":"someonePlayedCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"someonePlayedCard(Player, Pair, PlayableCard, Side)","u":"someonePlayedCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"someonePlayedCard(Player, Pair, PlayableCard, Side)","u":"someonePlayedCard(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"someonePlayedCard(String, Pair, PlayableCard, Side, int, Map)","u":"someonePlayedCard(java.lang.String,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side,int,java.util.Map)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"someonePlayedCard(String, Pair, PlayableCard, Side, int, Map)","u":"someonePlayedCard(java.lang.String,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side,int,java.util.Map)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"someonePlayedCard(String, Pair, PlayableCard, Side, int, Map)","u":"someonePlayedCard(java.lang.String,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side,int,java.util.Map)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"someonePlayedCard(String, Pair, PlayableCard, Side, int, Map)","u":"someonePlayedCard(java.lang.String,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side,int,java.util.Map)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"someonePlayedCard(String, Pair, PlayableCard, Side, int, Map)","u":"someonePlayedCard(java.lang.String,it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.PlayableCard,it.polimi.ingsw.gamemodel.Side,int,java.util.Map)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeonePlayedCardMessage","l":"SomeonePlayedCardMessage(String, Pair, Integer, Side, int, Map)","u":"%3Cinit%3E(java.lang.String,it.polimi.ingsw.utils.Pair,java.lang.Integer,it.polimi.ingsw.gamemodel.Side,int,java.util.Map)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"someoneQuit(Player)","u":"someoneQuit(it.polimi.ingsw.gamemodel.Player)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"someoneQuit(Player)","u":"someoneQuit(it.polimi.ingsw.gamemodel.Player)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"someoneQuit(Player)","u":"someoneQuit(it.polimi.ingsw.gamemodel.Player)"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"someoneQuit(Player)","u":"someoneQuit(it.polimi.ingsw.gamemodel.Player)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"someoneQuit(String)","u":"someoneQuit(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"someoneQuit(String)","u":"someoneQuit(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"someoneQuit(String)","u":"someoneQuit(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"someoneQuit(String)","u":"someoneQuit(java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"someoneQuit(String)","u":"someoneQuit(java.lang.String)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneQuitMessage","l":"SomeoneQuitMessage(String, int, boolean)","u":"%3Cinit%3E(java.lang.String,int,boolean)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"someoneSentBroadcastText(Player, String)","u":"someoneSentBroadcastText(it.polimi.ingsw.gamemodel.Player,java.lang.String)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"someoneSentBroadcastText(Player, String)","u":"someoneSentBroadcastText(it.polimi.ingsw.gamemodel.Player,java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"someoneSentBroadcastText(Player, String)","u":"someoneSentBroadcastText(it.polimi.ingsw.gamemodel.Player,java.lang.String)"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"someoneSentBroadcastText(Player, String)","u":"someoneSentBroadcastText(it.polimi.ingsw.gamemodel.Player,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"someoneSentBroadcastText(String, String)","u":"someoneSentBroadcastText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"someoneSentBroadcastText(String, String)","u":"someoneSentBroadcastText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"someoneSentBroadcastText(String, String)","u":"someoneSentBroadcastText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"someoneSentBroadcastText(String, String)","u":"someoneSentBroadcastText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"someoneSentBroadcastText(String, String)","u":"someoneSentBroadcastText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneSentBroadcastTextMessage","l":"SomeoneSentBroadcastTextMessage(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"someoneSentPrivateText(Player, Player, String)","u":"someoneSentPrivateText(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Player,java.lang.String)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"someoneSentPrivateText(Player, Player, String)","u":"someoneSentPrivateText(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Player,java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"someoneSentPrivateText(Player, Player, String)","u":"someoneSentPrivateText(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Player,java.lang.String)"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"someoneSentPrivateText(Player, Player, String)","u":"someoneSentPrivateText(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Player,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"someoneSentPrivateText(String, String)","u":"someoneSentPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"someoneSentPrivateText(String, String)","u":"someoneSentPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"GraphicalViewTUI","l":"someoneSentPrivateText(String, String)","u":"someoneSentPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"someoneSentPrivateText(String, String)","u":"someoneSentPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"someoneSentPrivateText(String, String)","u":"someoneSentPrivateText(java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneSentPrivateTextMessage","l":"SomeoneSentPrivateTextMessage(String, String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String,java.lang.String)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerRMI","l":"someoneSetInitialSide(Player, Side, Map)","u":"someoneSetInitialSide(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Side,java.util.Map)"},{"p":"it.polimi.ingsw.controllers","c":"PlayerControllerTCP","l":"someoneSetInitialSide(Player, Side, Map)","u":"someoneSetInitialSide(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Side,java.util.Map)"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchObserver","l":"someoneSetInitialSide(Player, Side, Map)","u":"someoneSetInitialSide(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Side,java.util.Map)"},{"p":"it.polimi.ingsw.server","c":"MatchStatusObserver","l":"someoneSetInitialSide(Player, Side, Map)","u":"someoneSetInitialSide(it.polimi.ingsw.gamemodel.Player,it.polimi.ingsw.gamemodel.Side,java.util.Map)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"someoneSetInitialSide(String, Side, Map)","u":"someoneSetInitialSide(java.lang.String,it.polimi.ingsw.gamemodel.Side,java.util.Map)"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalViewGUI","l":"someoneSetInitialSide(String, Side, Map)","u":"someoneSetInitialSide(java.lang.String,it.polimi.ingsw.gamemodel.Side,java.util.Map)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"someoneSetInitialSide(String, Side, Map)","u":"someoneSetInitialSide(java.lang.String,it.polimi.ingsw.gamemodel.Side,java.util.Map)"},{"p":"it.polimi.ingsw.client.network","c":"RemoteViewInterface","l":"someoneSetInitialSide(String, Side, Map)","u":"someoneSetInitialSide(java.lang.String,it.polimi.ingsw.gamemodel.Side,java.util.Map)"},{"p":"it.polimi.ingsw.network.messages.responses","c":"SomeoneSetInitialSideMessage","l":"SomeoneSetInitialSideMessage(String, Side, Map)","u":"%3Cinit%3E(java.lang.String,it.polimi.ingsw.gamemodel.Side,java.util.Map)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"SceneController","l":"stage"},{"p":"it.polimi.ingsw.client.frontend.gui","c":"GraphicalApplication","l":"start(Stage)","u":"start(javafx.stage.Stage)"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"startConnectionCheck()"},{"p":"it.polimi.ingsw.server","c":"Server","l":"startRMIServer()"},{"p":"it.polimi.ingsw.server","c":"Server","l":"startTCPServer()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"stateTitle"},{"p":"it.polimi.ingsw.network.tcp","c":"IOHandler","l":"stringToMsg(String)","u":"stringToMsg(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"subscribeObserver(MatchObserver)","u":"subscribeObserver(it.polimi.ingsw.gamemodel.MatchObserver)"},{"p":"it.polimi.ingsw.utils","c":"RequestStatus","l":"SUCCESSFUL"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"RankingSceneController","l":"tableSize"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"tableTab"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"BoardPane","l":"takenSpots"},{"p":"it.polimi.ingsw.network.tcp","c":"TCPServer","l":"TCPServer(Integer, Server)","u":"%3Cinit%3E(java.lang.Integer,it.polimi.ingsw.server.Server)"},{"p":"it.polimi.ingsw.gamemodel","c":"DrawSource","l":"THIRD_VISIBLE"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"MatchSceneController","l":"thirdVisible"},{"p":"it.polimi.ingsw.gamemodel","c":"PositionRequirement","l":"timesMet(Board)","u":"timesMet(it.polimi.ingsw.gamemodel.Board)"},{"p":"it.polimi.ingsw.gamemodel","c":"QuantityRequirement","l":"timesMet(Board)","u":"timesMet(it.polimi.ingsw.gamemodel.Board)"},{"p":"it.polimi.ingsw.gamemodel","c":"Requirement","l":"timesMet(Board)","u":"timesMet(it.polimi.ingsw.gamemodel.Board)"},{"p":"it.polimi.ingsw.utils","c":"MessageJsonParser","l":"toJson(Message)","u":"toJson(it.polimi.ingsw.network.messages.Message)"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"tokenRadius"},{"p":"it.polimi.ingsw.utils","c":"MessageJsonParser","l":"toMessage(String)","u":"toMessage(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Corner","l":"TOP_LEFT"},{"p":"it.polimi.ingsw.gamemodel","c":"Corner","l":"TOP_RIGHT"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"topLeftCorner"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","c":"CardView","l":"topRightCorner"},{"p":"it.polimi.ingsw.client.frontend","c":"ShownCard","l":"toString()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"BoardPosition","l":"toString()"},{"p":"it.polimi.ingsw.gamemodel","c":"Side","l":"toString()"},{"p":"it.polimi.ingsw.utils","c":"AvailableMatch","l":"toString()"},{"p":"it.polimi.ingsw.utils","c":"LeaderboardEntry","l":"toString()"},{"p":"it.polimi.ingsw.utils","c":"Pair","l":"toString()"},{"p":"it.polimi.ingsw.utils","c":"PlacedCardRecord","l":"toString()"},{"p":"it.polimi.ingsw.gamemodel","c":"AfterDrawState","l":"transition()"},{"p":"it.polimi.ingsw.gamemodel","c":"AfterMoveState","l":"transition()"},{"p":"it.polimi.ingsw.gamemodel","c":"ChooseInitialSideState","l":"transition()"},{"p":"it.polimi.ingsw.gamemodel","c":"ChooseSecretObjectiveState","l":"transition()"},{"p":"it.polimi.ingsw.gamemodel","c":"FinalState","l":"transition()"},{"p":"it.polimi.ingsw.gamemodel","c":"MatchState","l":"transition()"},{"p":"it.polimi.ingsw.gamemodel","c":"NextTurnState","l":"transition()"},{"p":"it.polimi.ingsw.gamemodel","c":"WaitState","l":"transition()"},{"p":"it.polimi.ingsw.utils","c":"TUICardParser","l":"TUICardParser()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"TuiPrinter","l":"TuiPrinter()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.gamemodel","c":"Match","l":"unsubscribeObserver(MatchObserver)","u":"unsubscribeObserver(it.polimi.ingsw.gamemodel.MatchObserver)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"updateLabel()"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"LobbySceneController","l":"updateMatches(List)","u":"updateMatches(java.util.List)"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"username"},{"p":"it.polimi.ingsw.client.network","c":"NetworkHandler","l":"username"},{"p":"it.polimi.ingsw.utils","c":"LeaderboardEntry","l":"username()"},{"p":"it.polimi.ingsw.gamemodel","c":"PlacementOutcome","l":"VALID"},{"p":"it.polimi.ingsw.client.frontend.tui","c":"ValidPositions","l":"ValidPositions()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.client.frontend","c":"MatchStatus","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Color","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Corner","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"DrawSource","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"PlacementOutcome","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Side","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"it.polimi.ingsw.utils","c":"RequestStatus","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"it.polimi.ingsw.client.frontend","c":"MatchStatus","l":"values()"},{"p":"it.polimi.ingsw.gamemodel","c":"Color","l":"values()"},{"p":"it.polimi.ingsw.gamemodel","c":"Corner","l":"values()"},{"p":"it.polimi.ingsw.gamemodel","c":"DrawSource","l":"values()"},{"p":"it.polimi.ingsw.gamemodel","c":"PlacementOutcome","l":"values()"},{"p":"it.polimi.ingsw.gamemodel","c":"Side","l":"values()"},{"p":"it.polimi.ingsw.gamemodel","c":"Symbol","l":"values()"},{"p":"it.polimi.ingsw.utils","c":"RequestStatus","l":"values()"},{"p":"it.polimi.ingsw.gamemodel","c":"Board","l":"verifyCardPlacement(Pair, Card, Side)","u":"verifyCardPlacement(it.polimi.ingsw.utils.Pair,it.polimi.ingsw.gamemodel.Card,it.polimi.ingsw.gamemodel.Side)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"RankingSceneController","l":"victoryLabel"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"SceneController","l":"view"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"visibleObjectives"},{"p":"it.polimi.ingsw.client.frontend","c":"GraphicalView","l":"visiblePlayableCards"},{"p":"it.polimi.ingsw.client.frontend","c":"MatchStatus","l":"WAIT_STATE"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"WaitingSceneController","l":"WaitingSceneController()","u":"%3Cinit%3E()"},{"p":"it.polimi.ingsw.gamemodel","c":"WaitState","l":"WaitState(Match)","u":"%3Cinit%3E(it.polimi.ingsw.gamemodel.Match)"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ErrorSceneController","l":"windowHeight"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","c":"ErrorSceneController","l":"windowWidth"},{"p":"it.polimi.ingsw.utils","c":"LeaderboardEntry","l":"winner()"},{"p":"it.polimi.ingsw.network.tcp","c":"IOHandler","l":"writeMsg(Message)","u":"writeMsg(it.polimi.ingsw.network.messages.Message)"},{"p":"it.polimi.ingsw.network.tcp","c":"IOHandler","l":"writeMsg(String)","u":"writeMsg(java.lang.String)"},{"p":"it.polimi.ingsw.exceptions","c":"WrongChoiceException","l":"WrongChoiceException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.exceptions","c":"WrongInputFormatException","l":"WrongInputFormatException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.exceptions","c":"WrongNameException","l":"WrongNameException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.exceptions","c":"WrongStateException","l":"WrongStateException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.exceptions","c":"WrongTurnException","l":"WrongTurnException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"it.polimi.ingsw.utils","c":"PlacedCardRecord","l":"x()"},{"p":"it.polimi.ingsw.utils","c":"PlacedCardRecord","l":"y()"},{"p":"it.polimi.ingsw.gamemodel","c":"Color","l":"YELLOW"}];updateSearchResults(); \ No newline at end of file diff --git a/deliveries/Javadoc/module-search-index.js b/deliveries/Javadoc/module-search-index.js new file mode 100644 index 00000000..0d59754f --- /dev/null +++ b/deliveries/Javadoc/module-search-index.js @@ -0,0 +1 @@ +moduleSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/deliveries/Javadoc/overview-summary.html b/deliveries/Javadoc/overview-summary.html new file mode 100644 index 00000000..0da0f90f --- /dev/null +++ b/deliveries/Javadoc/overview-summary.html @@ -0,0 +1,26 @@ + + + + +AM08 1.0-SNAPSHOT API + + + + + + + + + + + +
+ +

index.html

+
+ + diff --git a/deliveries/Javadoc/overview-tree.html b/deliveries/Javadoc/overview-tree.html new file mode 100644 index 00000000..9ffa4347 --- /dev/null +++ b/deliveries/Javadoc/overview-tree.html @@ -0,0 +1,326 @@ + + + + +Class Hierarchy (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For All Packages

+
+Package Hierarchies: + +
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+

Record Class Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/deliveries/Javadoc/package-search-index.js b/deliveries/Javadoc/package-search-index.js new file mode 100644 index 00000000..9aa83154 --- /dev/null +++ b/deliveries/Javadoc/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"it.polimi.ingsw.client.frontend"},{"l":"it.polimi.ingsw.client.frontend.gui"},{"l":"it.polimi.ingsw.client.frontend.gui.controllers"},{"l":"it.polimi.ingsw.client.frontend.gui.nodes"},{"l":"it.polimi.ingsw.client.frontend.tui"},{"l":"it.polimi.ingsw.client.network"},{"l":"it.polimi.ingsw.controllers"},{"l":"it.polimi.ingsw.exceptions"},{"l":"it.polimi.ingsw.gamemodel"},{"l":"it.polimi.ingsw.network.messages"},{"l":"it.polimi.ingsw.network.messages.actions"},{"l":"it.polimi.ingsw.network.messages.errors"},{"l":"it.polimi.ingsw.network.messages.responses"},{"l":"it.polimi.ingsw.network.tcp"},{"l":"it.polimi.ingsw.server"},{"l":"it.polimi.ingsw.utils"}];updateSearchResults(); \ No newline at end of file diff --git a/deliveries/Javadoc/resources/glass.png b/deliveries/Javadoc/resources/glass.png new file mode 100644 index 00000000..a7f591f4 Binary files /dev/null and b/deliveries/Javadoc/resources/glass.png differ diff --git a/deliveries/Javadoc/resources/x.png b/deliveries/Javadoc/resources/x.png new file mode 100644 index 00000000..30548a75 Binary files /dev/null and b/deliveries/Javadoc/resources/x.png differ diff --git a/deliveries/Javadoc/script-dir/jquery-3.6.1.min.js b/deliveries/Javadoc/script-dir/jquery-3.6.1.min.js new file mode 100644 index 00000000..2c69bc90 --- /dev/null +++ b/deliveries/Javadoc/script-dir/jquery-3.6.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=x.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthC(E(s),E(n))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),l.offset(x.extend(u,{using:t}))})},x.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,l=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=x(t.target),i=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=x(t.target).closest(".ui-menu-item"),i=x(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=x(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(t);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case x.ui.keyCode.HOME:this._move("first","first",t);break;case x.ui.keyCode.END:this._move("last","last",t);break;case x.ui.keyCode.UP:this.previous(t);break;case x.ui.keyCode.DOWN:this.next(t);break;case x.ui.keyCode.LEFT:this.collapse(t);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(t);break;case x.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=x(this),e=t.prev(),i=x("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=x(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=x("
    ").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){x(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(x("
    ").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==x.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=x("
    ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||x.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?x(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(x.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=x.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(x("
    ").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),x.extend(x.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(x.ui.autocomplete.escapeRegex(e),"i");return x.grep(t,function(t){return i.test(t.label||t.value||t)})}}),x.widget("ui.autocomplete",x.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1").text(e))},100))}});x.ui.autocomplete}); \ No newline at end of file diff --git a/deliveries/Javadoc/script.js b/deliveries/Javadoc/script.js new file mode 100644 index 00000000..bb9c8a24 --- /dev/null +++ b/deliveries/Javadoc/script.js @@ -0,0 +1,253 @@ +/* + * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; + +var oddRowColor = "odd-row-color"; +var evenRowColor = "even-row-color"; +var sortAsc = "sort-asc"; +var sortDesc = "sort-desc"; +var tableTab = "table-tab"; +var activeTableTab = "active-table-tab"; + +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +// Helper for making content containing release names comparable lexicographically +function makeComparable(s) { + return s.toLowerCase().replace(/(\d+)/g, + function(n, m) { + return ("000" + m).slice(-4); + }); +} + +// Switches between two styles depending on a condition +function toggleStyle(classList, condition, trueStyle, falseStyle) { + if (condition) { + classList.remove(falseStyle); + classList.add(trueStyle); + } else { + classList.remove(trueStyle); + classList.add(falseStyle); + } +} + +// Sorts the rows in a table lexicographically by the content of a specific column +function sortTable(header, columnIndex, columns) { + var container = header.parentElement; + var descending = header.classList.contains(sortAsc); + container.querySelectorAll("div.table-header").forEach( + function(header) { + header.classList.remove(sortAsc); + header.classList.remove(sortDesc); + } + ) + var cells = container.children; + var rows = []; + for (var i = columns; i < cells.length; i += columns) { + rows.push(Array.prototype.slice.call(cells, i, i + columns)); + } + var comparator = function(a, b) { + var ka = makeComparable(a[columnIndex].textContent); + var kb = makeComparable(b[columnIndex].textContent); + if (ka < kb) + return descending ? 1 : -1; + if (ka > kb) + return descending ? -1 : 1; + return 0; + }; + var sorted = rows.sort(comparator); + var visible = 0; + sorted.forEach(function(row) { + if (row[0].style.display !== 'none') { + var isEvenRow = visible++ % 2 === 0; + } + row.forEach(function(cell) { + toggleStyle(cell.classList, isEvenRow, evenRowColor, oddRowColor); + container.appendChild(cell); + }) + }); + toggleStyle(header.classList, descending, sortDesc, sortAsc); +} + +// Toggles the visibility of a table category in all tables in a page +function toggleGlobal(checkbox, selected, columns) { + var display = checkbox.checked ? '' : 'none'; + document.querySelectorAll("div.table-tabs").forEach(function(t) { + var id = t.parentElement.getAttribute("id"); + var selectedClass = id + "-tab" + selected; + // if selected is empty string it selects all uncategorized entries + var selectUncategorized = !Boolean(selected); + var visible = 0; + document.querySelectorAll('div.' + id) + .forEach(function(elem) { + if (selectUncategorized) { + if (elem.className.indexOf(selectedClass) === -1) { + elem.style.display = display; + } + } else if (elem.classList.contains(selectedClass)) { + elem.style.display = display; + } + if (elem.style.display === '') { + var isEvenRow = visible++ % (columns * 2) < columns; + toggleStyle(elem.classList, isEvenRow, evenRowColor, oddRowColor); + } + }); + var displaySection = visible === 0 ? 'none' : ''; + t.parentElement.style.display = displaySection; + document.querySelector("li#contents-" + id).style.display = displaySection; + }) +} + +// Shows the elements of a table belonging to a specific category +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + toggleStyle(elem.classList, isEvenRow, evenRowColor, oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.getElementById(tableId + '.tabpanel') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} +// Copy the contents of the local snippet to the clipboard +function copySnippet(button) { + copyToClipboard(button.nextElementSibling.innerText); + switchCopyLabel(button, button.firstElementChild); +} +function copyToClipboard(content) { + var textarea = document.createElement("textarea"); + textarea.style.height = 0; + document.body.appendChild(textarea); + textarea.value = content; + textarea.select(); + document.execCommand("copy"); + document.body.removeChild(textarea); +} +function switchCopyLabel(button, span) { + var copied = span.getAttribute("data-copied"); + button.classList.add("visible"); + var initialLabel = span.innerHTML; + span.innerHTML = copied; + setTimeout(function() { + button.classList.remove("visible"); + setTimeout(function() { + if (initialLabel !== copied) { + span.innerHTML = initialLabel; + } + }, 100); + }, 1900); +} +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + var timeoutId; + contentDiv.addEventListener("scroll", function(e) { + if (timeoutId) { + clearTimeout(timeoutId); + } + timeoutId = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + }, 100); + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/deliveries/Javadoc/search-page.js b/deliveries/Javadoc/search-page.js new file mode 100644 index 00000000..540c90f5 --- /dev/null +++ b/deliveries/Javadoc/search-page.js @@ -0,0 +1,284 @@ +/* + * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +"use strict"; +$(function() { + var copy = $("#page-search-copy"); + var expand = $("#page-search-expand"); + var searchLink = $("span#page-search-link"); + var redirect = $("input#search-redirect"); + function setSearchUrlTemplate() { + var href = document.location.href.split(/[#?]/)[0]; + href += "?q=" + "%s"; + if (redirect.is(":checked")) { + href += "&r=1"; + } + searchLink.html(href); + copy[0].onmouseenter(); + } + function copyLink(e) { + copyToClipboard(this.previousSibling.innerText); + switchCopyLabel(this, this.lastElementChild); + } + copy.click(copyLink); + copy[0].onmouseenter = function() {}; + redirect.click(setSearchUrlTemplate); + setSearchUrlTemplate(); + copy.prop("disabled", false); + redirect.prop("disabled", false); + expand.click(function (e) { + var searchInfo = $("div.page-search-info"); + if(this.parentElement.hasAttribute("open")) { + searchInfo.attr("style", "border-width: 0;"); + } else { + searchInfo.attr("style", "border-width: 1px;").height(searchInfo.prop("scrollHeight")); + } + }); +}); +$(window).on("load", function() { + var input = $("#page-search-input"); + var reset = $("#page-search-reset"); + var notify = $("#page-search-notify"); + var resultSection = $("div#result-section"); + var resultContainer = $("div#result-container"); + var searchTerm = ""; + var activeTab = ""; + var fixedTab = false; + var visibleTabs = []; + var feelingLucky = false; + function renderResults(result) { + if (!result.length) { + notify.html(messages.noResult); + } else if (result.length === 1) { + notify.html(messages.oneResult); + } else { + notify.html(messages.manyResults.replace("{0}", result.length)); + } + resultContainer.empty(); + var r = { + "types": [], + "members": [], + "packages": [], + "modules": [], + "searchTags": [] + }; + for (var i in result) { + var item = result[i]; + var arr = r[item.category]; + arr.push(item); + } + if (!activeTab || r[activeTab].length === 0 || !fixedTab) { + Object.keys(r).reduce(function(prev, curr) { + if (r[curr].length > 0 && r[curr][0].score > prev) { + activeTab = curr; + return r[curr][0].score; + } + return prev; + }, 0); + } + if (feelingLucky && activeTab) { + notify.html(messages.redirecting) + var firstItem = r[activeTab][0]; + window.location = getURL(firstItem.indexItem, firstItem.category); + return; + } + if (result.length > 20) { + if (searchTerm[searchTerm.length - 1] === ".") { + if (activeTab === "types" && r["members"].length > r["types"].length) { + activeTab = "members"; + } else if (activeTab === "packages" && r["types"].length > r["packages"].length) { + activeTab = "types"; + } + } + } + var categoryCount = Object.keys(r).reduce(function(prev, curr) { + return prev + (r[curr].length > 0 ? 1 : 0); + }, 0); + visibleTabs = []; + var tabContainer = $("
    ").appendTo(resultContainer); + for (var key in r) { + var id = "#result-tab-" + key.replace("searchTags", "search_tags"); + if (r[key].length) { + var count = r[key].length >= 1000 ? "999+" : r[key].length; + if (result.length > 20 && categoryCount > 1) { + var button = $("").appendTo(tabContainer); + button.click(key, function(e) { + fixedTab = true; + renderResult(e.data, $(this)); + }); + visibleTabs.push(key); + } else { + $("" + categories[key] + + " (" + count + ")").appendTo(tabContainer); + renderTable(key, r[key]).appendTo(resultContainer); + tabContainer = $("
    ").appendTo(resultContainer); + + } + } + } + if (activeTab && result.length > 20 && categoryCount > 1) { + $("button#result-tab-" + activeTab).addClass("active-table-tab"); + renderTable(activeTab, r[activeTab]).appendTo(resultContainer); + } + resultSection.show(); + function renderResult(category, button) { + activeTab = category; + setSearchUrl(); + resultContainer.find("div.summary-table").remove(); + renderTable(activeTab, r[activeTab]).appendTo(resultContainer); + button.siblings().removeClass("active-table-tab"); + button.addClass("active-table-tab"); + } + } + function selectTab(category) { + $("button#result-tab-" + category).click(); + } + function renderTable(category, items) { + var table = $("
    ") + .addClass(category === "modules" + ? "one-column-search-results" + : "two-column-search-results"); + var col1, col2; + if (category === "modules") { + col1 = "Module"; + } else if (category === "packages") { + col1 = "Module"; + col2 = "Package"; + } else if (category === "types") { + col1 = "Package"; + col2 = "Class" + } else if (category === "members") { + col1 = "Class"; + col2 = "Member"; + } else if (category === "searchTags") { + col1 = "Location"; + col2 = "Name"; + } + $("
    " + col1 + "
    ").appendTo(table); + if (category !== "modules") { + $("
    " + col2 + "
    ").appendTo(table); + } + $.each(items, function(index, item) { + var rowColor = index % 2 ? "odd-row-color" : "even-row-color"; + renderItem(item, table, rowColor); + }); + return table; + } + function renderItem(item, table, rowColor) { + var label = getHighlightedText(item.input, item.boundaries, item.prefix.length, item.input.length); + var link = $("") + .attr("href", getURL(item.indexItem, item.category)) + .attr("tabindex", "0") + .addClass("search-result-link") + .html(label); + var container = getHighlightedText(item.input, item.boundaries, 0, item.prefix.length - 1); + if (item.category === "searchTags") { + container = item.indexItem.h || ""; + } + if (item.category !== "modules") { + $("
    ").html(container).addClass("col-plain").addClass(rowColor).appendTo(table); + } + $("
    ").html(link).addClass("col-last").addClass(rowColor).appendTo(table); + } + var timeout; + function schedulePageSearch() { + if (timeout) { + clearTimeout(timeout); + } + timeout = setTimeout(function () { + doPageSearch() + }, 100); + } + function doPageSearch() { + setSearchUrl(); + var term = searchTerm = input.val().trim(); + if (term === "") { + notify.html(messages.enterTerm); + activeTab = ""; + fixedTab = false; + resultContainer.empty(); + resultSection.hide(); + } else { + notify.html(messages.searching); + doSearch({ term: term, maxResults: 1200 }, renderResults); + } + } + function setSearchUrl() { + var query = input.val().trim(); + var url = document.location.pathname; + if (query) { + url += "?q=" + encodeURI(query); + if (activeTab && fixedTab) { + url += "&c=" + activeTab; + } + } + history.replaceState({query: query}, "", url); + } + input.on("input", function(e) { + feelingLucky = false; + schedulePageSearch(); + }); + $(document).keydown(function(e) { + if ((e.ctrlKey || e.metaKey) && (e.key === "ArrowLeft" || e.key === "ArrowRight")) { + if (activeTab && visibleTabs.length > 1) { + var idx = visibleTabs.indexOf(activeTab); + idx += e.key === "ArrowLeft" ? visibleTabs.length - 1 : 1; + selectTab(visibleTabs[idx % visibleTabs.length]); + return false; + } + } + }); + reset.click(function() { + notify.html(messages.enterTerm); + resultSection.hide(); + activeTab = ""; + fixedTab = false; + resultContainer.empty(); + input.val('').focus(); + setSearchUrl(); + }); + input.prop("disabled", false); + reset.prop("disabled", false); + + var urlParams = new URLSearchParams(window.location.search); + if (urlParams.has("q")) { + input.val(urlParams.get("q")) + } + if (urlParams.has("c")) { + activeTab = urlParams.get("c"); + fixedTab = true; + } + if (urlParams.get("r")) { + feelingLucky = true; + } + if (input.val()) { + doPageSearch(); + } else { + notify.html(messages.enterTerm); + } + input.select().focus(); +}); diff --git a/deliveries/Javadoc/search.html b/deliveries/Javadoc/search.html new file mode 100644 index 00000000..b98af84b --- /dev/null +++ b/deliveries/Javadoc/search.html @@ -0,0 +1,77 @@ + + + + +Search (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
    + +
    +
    +

    Search

    +
    + + +
    +Additional resources +
    +
    +
    +

    The help page provides an introduction to the scope and syntax of JavaDoc search.

    +

    You can use the <ctrl> or <cmd> keys in combination with the left and right arrow keys to switch between result tabs in this page.

    +

    The URL template below may be used to configure this page as a search engine in browsers that support this feature. It has been tested to work in Google Chrome and Mozilla Firefox. Note that other browsers may not support this feature or require a different URL format.

    +link +

    + +

    +
    +

    Loading search index...

    + +
    +
    +
    + +
    +
    +
    + + diff --git a/deliveries/Javadoc/search.js b/deliveries/Javadoc/search.js new file mode 100644 index 00000000..d3986705 --- /dev/null +++ b/deliveries/Javadoc/search.js @@ -0,0 +1,458 @@ +/* + * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +"use strict"; +const messages = { + enterTerm: "Enter a search term", + noResult: "No results found", + oneResult: "Found one result", + manyResults: "Found {0} results", + loading: "Loading search index...", + searching: "Searching...", + redirecting: "Redirecting to first result...", + linkIcon: "Link icon", + linkToSection: "Link to this section" +} +const categories = { + modules: "Modules", + packages: "Packages", + types: "Classes and Interfaces", + members: "Members", + searchTags: "Search Tags" +}; +const highlight = "$&"; +const NO_MATCH = {}; +const MAX_RESULTS = 300; +function checkUnnamed(name, separator) { + return name === "" || !name ? "" : name + separator; +} +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(str, boundaries, from, to) { + var start = from; + var text = ""; + for (var i = 0; i < boundaries.length; i += 2) { + var b0 = boundaries[i]; + var b1 = boundaries[i + 1]; + if (b0 >= to || b1 <= from) { + continue; + } + text += escapeHtml(str.slice(start, Math.max(start, b0))); + text += ""; + text += escapeHtml(str.slice(Math.max(start, b0), Math.min(to, b1))); + text += ""; + start = Math.min(to, b1); + } + text += escapeHtml(str.slice(start, to)); + return text; +} +function getURLPrefix(item, category) { + var urlPrefix = ""; + var slash = "/"; + if (category === "modules") { + return item.l + slash; + } else if (category === "packages" && item.m) { + return item.m + slash; + } else if (category === "types" || category === "members") { + if (item.m) { + urlPrefix = item.m + slash; + } else { + $.each(packageSearchIndex, function(index, it) { + if (it.m && item.p === it.l) { + urlPrefix = it.m + slash; + } + }); + } + } + return urlPrefix; +} +function getURL(item, category) { + if (item.url) { + return item.url; + } + var url = getURLPrefix(item, category); + if (category === "modules") { + url += "module-summary.html"; + } else if (category === "packages") { + if (item.u) { + url = item.u; + } else { + url += item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (category === "types") { + if (item.u) { + url = item.u; + } else { + url += checkUnnamed(item.p, "/").replace(/\./g, '/') + item.l + ".html"; + } + } else if (category === "members") { + url += checkUnnamed(item.p, "/").replace(/\./g, '/') + item.c + ".html" + "#"; + if (item.u) { + url += item.u; + } else { + url += item.l; + } + } else if (category === "searchTags") { + url += item.u; + } + item.url = url; + return url; +} +function createMatcher(term, camelCase) { + if (camelCase && !isUpperCase(term)) { + return null; // no need for camel-case matcher for lower case query + } + var pattern = ""; + var upperCase = []; + term.trim().split(/\s+/).forEach(function(w, index, array) { + var tokens = w.split(/(?=[A-Z,.()<>?[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + // ',' and '?' are the only delimiters commonly followed by space in java signatures + pattern += "(" + $.ui.autocomplete.escapeRegex(s).replace(/[,?]/g, "$&\\s*?") + ")"; + upperCase.push(false); + var isWordToken = /\w$/.test(s); + if (isWordToken) { + if (i === tokens.length - 1 && index < array.length - 1) { + // space in query string matches all delimiters + pattern += "(.*?)"; + upperCase.push(isUpperCase(s[0])); + } else { + if (!camelCase && isUpperCase(s) && s.length === 1) { + pattern += "()"; + } else { + pattern += "([a-z0-9$<>?[\\]]*?)"; + } + upperCase.push(isUpperCase(s[0])); + } + } else { + pattern += "()"; + upperCase.push(false); + } + } + }); + var re = new RegExp(pattern, "gi"); + re.upperCase = upperCase; + return re; +} +function findMatch(matcher, input, startOfName, endOfName) { + var from = startOfName; + matcher.lastIndex = from; + var match = matcher.exec(input); + // Expand search area until we get a valid result or reach the beginning of the string + while (!match || match.index + match[0].length < startOfName || endOfName < match.index) { + if (from === 0) { + return NO_MATCH; + } + from = input.lastIndexOf(".", from - 2) + 1; + matcher.lastIndex = from; + match = matcher.exec(input); + } + var boundaries = []; + var matchEnd = match.index + match[0].length; + var score = 5; + var start = match.index; + var prevEnd = -1; + for (var i = 1; i < match.length; i += 2) { + var isUpper = isUpperCase(input[start]); + var isMatcherUpper = matcher.upperCase[i]; + // capturing groups come in pairs, match and non-match + boundaries.push(start, start + match[i].length); + // make sure groups are anchored on a left word boundary + var prevChar = input[start - 1] || ""; + var nextChar = input[start + 1] || ""; + if (start !== 0 && !/[\W_]/.test(prevChar) && !/[\W_]/.test(input[start])) { + if (isUpper && (isLowerCase(prevChar) || isLowerCase(nextChar))) { + score -= 0.1; + } else if (isMatcherUpper && start === prevEnd) { + score -= isUpper ? 0.1 : 1.0; + } else { + return NO_MATCH; + } + } + prevEnd = start + match[i].length; + start += match[i].length + match[i + 1].length; + + // lower score for parts of the name that are missing + if (match[i + 1] && prevEnd < endOfName) { + score -= rateNoise(match[i + 1]); + } + } + // lower score if a type name contains unmatched camel-case parts + if (input[matchEnd - 1] !== "." && endOfName > matchEnd) + score -= rateNoise(input.slice(matchEnd, endOfName)); + score -= rateNoise(input.slice(0, Math.max(startOfName, match.index))); + + if (score <= 0) { + return NO_MATCH; + } + return { + input: input, + score: score, + boundaries: boundaries + }; +} +function isUpperCase(s) { + return s !== s.toLowerCase(); +} +function isLowerCase(s) { + return s !== s.toUpperCase(); +} +function rateNoise(str) { + return (str.match(/([.(])/g) || []).length / 5 + + (str.match(/([A-Z]+)/g) || []).length / 10 + + str.length / 20; +} +function doSearch(request, response) { + var term = request.term.trim(); + var maxResults = request.maxResults || MAX_RESULTS; + if (term.length === 0) { + return this.close(); + } + var matcher = { + plainMatcher: createMatcher(term, false), + camelCaseMatcher: createMatcher(term, true) + } + var indexLoaded = indexFilesLoaded(); + + function getPrefix(item, category) { + switch (category) { + case "packages": + return checkUnnamed(item.m, "/"); + case "types": + return checkUnnamed(item.p, "."); + case "members": + return checkUnnamed(item.p, ".") + item.c + "."; + default: + return ""; + } + } + function useQualifiedName(category) { + switch (category) { + case "packages": + return /[\s/]/.test(term); + case "types": + case "members": + return /[\s.]/.test(term); + default: + return false; + } + } + function searchIndex(indexArray, category) { + var matches = []; + if (!indexArray) { + if (!indexLoaded) { + matches.push({ l: messages.loading, category: category }); + } + return matches; + } + $.each(indexArray, function (i, item) { + var prefix = getPrefix(item, category); + var simpleName = item.l; + var qualifiedName = prefix + simpleName; + var useQualified = useQualifiedName(category); + var input = useQualified ? qualifiedName : simpleName; + var startOfName = useQualified ? prefix.length : 0; + var endOfName = category === "members" && input.indexOf("(", startOfName) > -1 + ? input.indexOf("(", startOfName) : input.length; + var m = findMatch(matcher.plainMatcher, input, startOfName, endOfName); + if (m === NO_MATCH && matcher.camelCaseMatcher) { + m = findMatch(matcher.camelCaseMatcher, input, startOfName, endOfName); + } + if (m !== NO_MATCH) { + m.indexItem = item; + m.prefix = prefix; + m.category = category; + if (!useQualified) { + m.input = qualifiedName; + m.boundaries = m.boundaries.map(function(b) { + return b + prefix.length; + }); + } + matches.push(m); + } + return true; + }); + return matches.sort(function(e1, e2) { + return e2.score - e1.score; + }).slice(0, maxResults); + } + + var result = searchIndex(moduleSearchIndex, "modules") + .concat(searchIndex(packageSearchIndex, "packages")) + .concat(searchIndex(typeSearchIndex, "types")) + .concat(searchIndex(memberSearchIndex, "members")) + .concat(searchIndex(tagSearchIndex, "searchTags")); + + if (!indexLoaded) { + updateSearchResults = function() { + doSearch(request, response); + } + } else { + updateSearchResults = function() {}; + } + response(result); +} +// JQuery search menu implementation +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> .result-item"); + // workaround for search result scrolling + this.menu._scrollIntoView = function _scrollIntoView( item ) { + var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; + if ( this._hasScroll() ) { + borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0; + paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0; + offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; + scroll = this.activeMenu.scrollTop(); + elementHeight = this.activeMenu.height() - 26; + itemHeight = item.outerHeight(); + + if ( offset < 0 ) { + this.activeMenu.scrollTop( scroll + offset ); + } else if ( offset + itemHeight > elementHeight ) { + this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); + } + } + }; + }, + _renderMenu: function(ul, items) { + var currentCategory = ""; + var widget = this; + widget.menu.bindings = $(); + $.each(items, function(index, item) { + if (item.category && item.category !== currentCategory) { + ul.append("
  • " + categories[item.category] + "
  • "); + currentCategory = item.category; + } + var li = widget._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", categories[item.category] + " : " + item.l); + } else { + li.attr("aria-label", item.l); + } + li.attr("class", "result-item"); + }); + ul.append(""); + }, + _renderItem: function(ul, item) { + var li = $("
  • ").appendTo(ul); + var div = $("
    ").appendTo(li); + var label = item.l + ? item.l + : getHighlightedText(item.input, item.boundaries, 0, item.input.length); + var idx = item.indexItem; + if (item.category === "searchTags" && idx && idx.h) { + if (idx.d) { + div.html(label + " (" + idx.h + ")
    " + + idx.d + "
    "); + } else { + div.html(label + " (" + idx.h + ")"); + } + } else { + div.html(label); + } + return li; + } +}); +$(function() { + var expanded = false; + var windowWidth; + function collapse() { + if (expanded) { + $("div#navbar-top").removeAttr("style"); + $("button#navbar-toggle-button") + .removeClass("expanded") + .attr("aria-expanded", "false"); + expanded = false; + } + } + $("button#navbar-toggle-button").click(function (e) { + if (expanded) { + collapse(); + } else { + var navbar = $("div#navbar-top"); + navbar.height(navbar.prop("scrollHeight")); + $("button#navbar-toggle-button") + .addClass("expanded") + .attr("aria-expanded", "true"); + expanded = true; + windowWidth = window.innerWidth; + } + }); + $("ul.sub-nav-list-small li a").click(collapse); + $("input#search-input").focus(collapse); + $("main").click(collapse); + $("section[id] > :header, :header[id], :header:has(a[id])").each(function(idx, el) { + // Create anchor links for headers with an associated id attribute + var hdr = $(el); + var id = hdr.attr("id") || hdr.parent("section").attr("id") || hdr.children("a").attr("id"); + if (id) { + hdr.append(" " + messages.linkIcon +""); + } + }); + $(window).on("orientationchange", collapse).on("resize", function(e) { + if (expanded && windowWidth !== window.innerWidth) collapse(); + }); + var search = $("#search-input"); + var reset = $("#reset-button"); + search.catcomplete({ + minLength: 1, + delay: 200, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push({ l: messages.noResult }); + } else { + $("#search-input").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.indexItem) { + var url = getURL(ui.item.indexItem, ui.item.category); + window.location.href = pathtoroot + url; + $("#search-input").focus(); + } + } + }); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + reset.click(function() { + search.val('').focus(); + }); + search.focus(); +}); diff --git a/deliveries/Javadoc/serialized-form.html b/deliveries/Javadoc/serialized-form.html new file mode 100644 index 00000000..24001064 --- /dev/null +++ b/deliveries/Javadoc/serialized-form.html @@ -0,0 +1,833 @@ + + + + +Serialized Form (AM08 1.0-SNAPSHOT API) + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Serialized Form

    +
    + +
    +
    +
    + +
    +
    +
    + + diff --git a/deliveries/Javadoc/stylesheet.css b/deliveries/Javadoc/stylesheet.css new file mode 100644 index 00000000..f71489f8 --- /dev/null +++ b/deliveries/Javadoc/stylesheet.css @@ -0,0 +1,1272 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * These CSS custom properties (variables) define the core color and font + * properties used in this stylesheet. + */ +:root { + /* body, block and code fonts */ + --body-font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + --block-font-family: 'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + --code-font-family: 'DejaVu Sans Mono', monospace; + /* Base font sizes for body and code elements */ + --body-font-size: 14px; + --code-font-size: 14px; + /* Text colors for body and block elements */ + --body-text-color: #353833; + --block-text-color: #474747; + /* Background colors for various structural elements */ + --body-background-color: #ffffff; + --section-background-color: #f8f8f8; + --detail-background-color: #ffffff; + /* Colors for navigation bar and table captions */ + --navbar-background-color: #4D7A97; + --navbar-text-color: #ffffff; + /* Background color for subnavigation and various headers */ + --subnav-background-color: #dee3e9; + /* Background and text colors for selected tabs and navigation items */ + --selected-background-color: #f8981d; + --selected-text-color: #253441; + --selected-link-color: #1f389c; + /* Background colors for generated tables */ + --even-row-color: #ffffff; + --odd-row-color: #eeeeef; + /* Text color for page title */ + --title-color: #2c4557; + /* Text colors for links */ + --link-color: #4A6782; + --link-color-active: #bb7a2a; + /* Snippet colors */ + --snippet-background-color: #ebecee; + --snippet-text-color: var(--block-text-color); + --snippet-highlight-color: #f7c590; + /* Border colors for structural elements and user defined tables */ + --border-color: #ededed; + --table-border-color: #000000; + /* Search input colors */ + --search-input-background-color: #ffffff; + --search-input-text-color: #000000; + --search-input-placeholder-color: #909090; + /* Highlight color for active search tag target */ + --search-tag-highlight-color: #ffff00; + /* Adjustments for icon and active background colors of copy-to-clipboard buttons */ + --copy-icon-brightness: 100%; + --copy-button-background-color-active: rgba(168, 168, 176, 0.3); + /* Colors for invalid tag notifications */ + --invalid-tag-background-color: #ffe6e6; + --invalid-tag-text-color: #000000; +} +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ +body { + background-color:var(--body-background-color); + color:var(--body-text-color); + font-family:var(--body-font-family); + font-size:var(--body-font-size); + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:var(--link-color); +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:var(--link-color-active); +} +pre { + font-family:var(--code-font-family); + font-size:1em; +} +h1 { + font-size:1.428em; +} +h2 { + font-size:1.285em; +} +h3 { + font-size:1.14em; +} +h4 { + font-size:1.072em; +} +h5 { + font-size:1.001em; +} +h6 { + font-size:0.93em; +} +/* Disable font boosting for selected elements */ +h1, h2, h3, h4, h5, h6, div.member-signature { + max-height: 1000em; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:var(--code-font-family); +} +:not(h1, h2, h3, h4, h5, h6) > code, +:not(h1, h2, h3, h4, h5, h6) > tt { + font-size:var(--code-font-size); + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:var(--code-font-family); + font-size:1em; + padding-top:4px; +} +.summary-table dt code { + font-family:var(--code-font-family); + font-size:1em; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: var(--body-font-family); + font-size: 1em; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:0.915em; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +/* + * Styles for navigation bar. + */ +@media screen { + div.flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + header.flex-header { + flex: 0 0 auto; + } + div.flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:var(--navbar-background-color); + color:var(--navbar-text-color); + float:left; + width:100%; + clear:right; + min-height:2.8em; + padding:10px 0 0 0; + overflow:hidden; + font-size:0.857em; +} +button#navbar-toggle-button { + display:none; +} +ul.sub-nav-list-small { + display: none; +} +.sub-nav { + background-color:var(--subnav-background-color); + float:left; + width:100%; + overflow:hidden; + font-size:0.857em; +} +.sub-nav div { + clear:left; + float:left; + padding:6px; + text-transform:uppercase; +} +.sub-nav .sub-nav-list { + padding-top:4px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0; + padding:6px; + clear:none; + text-align:right; + position:relative; +} +ul.sub-nav-list li { + list-style:none; + float:left; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:var(--navbar-text-color); + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + color:var(--link-color-active); +} +.nav-bar-cell1-rev { + background-color:var(--selected-background-color); + color:var(--selected-text-color); + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header. + */ +.title { + color:var(--title-color); + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +ul.contents-list { + margin: 0 0 15px 0; + padding: 0; + list-style: none; +} +ul.contents-list li { + font-size:0.93em; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:var(--subnav-background-color); + border:1px solid var(--border-color); + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: var(--body-font-family); + font-size:0.856em; + font-weight:bold; + margin:10px 0 0 0; + color:var(--body-text-color); +} +dl.notes > dd { + margin:5px 10px 10px 0; + font-size:1em; + font-family:var(--block-font-family) +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.ref-list { + padding:0; + margin:0; +} +ul.ref-list > li { + list-style:none; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +ul.tag-list, ul.tag-list-long { + padding-left: 0; + list-style: none; +} +ul.tag-list li { + display: inline; +} +ul.tag-list li:not(:last-child):after, +ul.tag-list-long li:not(:last-child):after +{ + content: ", "; + white-space: pre-wrap; +} +ul.preview-feature-list { + list-style: none; + margin:0; + padding:0.1em; + line-height: 1.6em; +} +/* + * Styles for tables. + */ +.summary-table, .details-table { + width:100%; + border-spacing:0; + border:1px solid var(--border-color); + border-top:0; + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:var(--selected-text-color); + clear:none; + overflow:hidden; + padding: 10px 0 0 1px; + margin:0; +} +.caption a:link, .caption a:visited { + color:var(--selected-link-color); +} +.caption a:hover, +.caption a:active { + color:var(--navbar-text-color); +} +.caption span { + font-weight:bold; + white-space:nowrap; + padding:5px 12px 7px 12px; + display:inline-block; + float:left; + background-color:var(--selected-background-color); + border: none; + height:16px; +} +div.table-tabs { + padding:10px 0 0 1px; + margin:10px 0 0 0; +} +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 8px; +} +div.table-tabs > .active-table-tab { + background: var(--selected-background-color); + color: var(--selected-text-color); +} +div.table-tabs > button.table-tab { + background: var(--navbar-background-color); + color: var(--navbar-text-color); +} +.two-column-search-results { + display: grid; + grid-template-columns: minmax(400px, max-content) minmax(400px, auto); +} +div.checkboxes { + line-height: 2em; +} +div.checkboxes > span { + margin-left: 10px; +} +div.checkboxes > label { + margin-left: 8px; + white-space: nowrap; +} +div.checkboxes > label > input { + margin: 0 2px; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(25%, max-content) minmax(25%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(20%, max-content) minmax(20%, auto); +} +.three-column-release-summary { + display: grid; + grid-template-columns: minmax(40%, max-content) minmax(10%, max-content) minmax(40%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +@media screen and (max-width: 800px) { + .two-column-search-results { + display: grid; + grid-template-columns: minmax(40%, max-content) minmax(40%, auto); + } + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-release-summary { + display: grid; + grid-template-columns: minmax(70%, max-content) minmax(30%, max-content) + } + .three-column-summary .col-last, + .three-column-release-summary .col-last{ + grid-column-end: span 2; + } +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +.summary-table > div, .details-table > div { + text-align:left; + padding: 8px 3px 3px 7px; + overflow-x: auto; + scrollbar-width: thin; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:var(--subnav-background-color); + font-weight: bold; +} +/* Sortable table columns */ +.table-header[onclick] { + cursor: pointer; +} +.table-header[onclick]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + '); + background-size:100% 100%; + width:9px; + height:14px; + margin-left:4px; + margin-bottom:-3px; +} +.table-header[onclick].sort-asc::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + +} +.table-header[onclick].sort-desc::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} +.col-first, .col-first { + font-size:0.93em; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { + font-size:0.93em; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-summary-item-name a:link, .col-summary-item-name a:visited { + font-weight:bold; +} +.even-row-color, .even-row-color .table-header { + background-color:var(--even-row-color); +} +.odd-row-color, .odd-row-color .table-header { + background-color:var(--odd-row-color); +} +/* + * Styles for contents. + */ +div.block { + font-size:var(--body-font-size); + font-family:var(--block-font-family); +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:var(--code-font-family); + font-size:1em; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + /* Color of line numbers in source pages can be set via custom property below */ + color:var(--source-linenumber-color, green); + padding:0 30px 0 0; +} +.block { + display:block; + margin:0 10px 5px 0; + color:var(--block-text-color); +} +.deprecated-label, .description-from-type-label, .implementation-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .preview-comment { + font-style:italic; +} +.deprecation-block { + font-size:1em; + font-family:var(--block-font-family); + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +.preview-block { + font-size:1em; + font-family:var(--block-font-family); + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment { + font-style:normal; +} +details.invalid-tag, span.invalid-tag { + font-size:1em; + font-family:var(--block-font-family); + color: var(--invalid-tag-text-color); + background: var(--invalid-tag-background-color); + border: thin solid var(--table-border-color); + border-radius:2px; + padding: 2px 4px; + display:inline-block; +} +details summary { + cursor: pointer; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-state-active { + /* Overrides the color of selection used in jQuery UI */ + background: var(--selected-background-color); + border: 1px solid var(--selected-background-color); + color: var(--selected-text-color); +} +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:var(--navbar-background-color); + color:var(--navbar-text-color); +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:auto; + overflow-x:auto; + scrollbar-width: thin; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:1; + background-color: var(--body-background-color); +} +ul.ui-autocomplete li { + float:left; + clear:both; + min-width:100%; +} +ul.ui-autocomplete li.ui-static-link { + position:sticky; + bottom:0; + left:0; + background: var(--subnav-background-color); + padding: 5px 0; + font-family: var(--body-font-family); + font-size: 0.93em; + font-weight: bolder; + z-index: 2; +} +li.ui-static-link a, li.ui-static-link a:visited { + text-decoration:none; + color:var(--link-color); + float:right; + margin-right:20px; +} +.ui-autocomplete .result-item { + font-size: inherit; +} +.ui-autocomplete .result-highlight { + font-weight:bold; +} +#search-input, #page-search-input { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + background-color: var(--search-input-background-color); + color: var(--search-input-text-color); + border-color: var(--border-color); + padding-left:20px; + width: 250px; + margin: 0; +} +#search-input { + margin-left: 4px; +} +#reset-button { + background-color: transparent; + background-image:url('resources/x.png'); + background-repeat:no-repeat; + background-size:contain; + border:0; + border-radius:0; + width:12px; + height:12px; + position:absolute; + right:12px; + top:10px; + font-size:0; +} +::placeholder { + color:var(--search-input-placeholder-color); + opacity: 1; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:var(--search-tag-highlight-color); +} +details.page-search-details { + display: inline-block; +} +div#result-container { + font-size: 1em; +} +div#result-container a.search-result-link { + padding: 0; + margin: 4px 0; + width: 100%; +} +#result-container .result-highlight { + font-weight:bolder; +} +.page-search-info { + background-color: var(--subnav-background-color); + border-radius: 3px; + border: 0 solid var(--border-color); + padding: 0 8px; + overflow: hidden; + height: 0; + transition: all 0.2s ease; +} +div.table-tabs > button.table-tab { + background: var(--navbar-background-color); + color: var(--navbar-text-color); +} +.page-search-header { + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; + background-color:var(--navbar-background-color); + color:var(--navbar-text-color); + display: inline-block; +} +button.page-search-header { + border: none; + cursor: pointer; +} +span#page-search-link { + text-decoration: underline; +} +.module-graph span, .sealed-graph span { + display:none; + position:absolute; +} +.module-graph:hover span, .sealed-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.class-description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0 20px 5px 10px; + border: 1px solid var(--border-color); + background-color: var(--section-background-color); +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:var(--detail-background-color); + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +ul.help-subtoc > li { + display: inline-block; + padding-right: 5px; + font-size: smaller; +} +ul.help-subtoc > li::before { + content: "\2022" ; + padding-right:2px; +} +.help-note { + font-style: italic; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} +/* + * Styles for header/section anchor links + */ +a.anchor-link { + opacity: 0; + transition: opacity 0.1s; +} +:hover > a.anchor-link { + opacity: 80%; +} +a.anchor-link:hover, +a.anchor-link:focus-visible, +a.anchor-link.visible { + opacity: 100%; +} +a.anchor-link > img { + width: 0.9em; + height: 0.9em; +} +/* + * Styles for copy-to-clipboard buttons + */ +button.copy { + opacity: 70%; + border: none; + border-radius: 3px; + position: relative; + background:none; + transition: opacity 0.3s; + cursor: pointer; +} +:hover > button.copy { + opacity: 80%; +} +button.copy:hover, +button.copy:active, +button.copy:focus-visible, +button.copy.visible { + opacity: 100%; +} +button.copy img { + position: relative; + background: none; + filter: brightness(var(--copy-icon-brightness)); +} +button.copy:active { + background-color: var(--copy-button-background-color-active); +} +button.copy span { + color: var(--body-text-color); + position: relative; + top: -0.1em; + transition: all 0.1s; + font-size: 0.76rem; + line-height: 1.2em; + opacity: 0; +} +button.copy:hover span, +button.copy:focus-visible span, +button.copy.visible span { + opacity: 100%; +} +/* search page copy button */ +button#page-search-copy { + margin-left: 0.4em; + padding:0.3em; + top:0.13em; +} +button#page-search-copy img { + width: 1.2em; + height: 1.2em; + padding: 0.01em 0; + top: 0.15em; +} +button#page-search-copy span { + color: var(--body-text-color); + line-height: 1.2em; + padding: 0.2em; + top: -0.18em; +} +div.page-search-info:hover button#page-search-copy span { + opacity: 100%; +} +/* snippet copy button */ +button.snippet-copy { + position: absolute; + top: 6px; + right: 6px; + height: 1.7em; + padding: 2px; +} +button.snippet-copy img { + width: 18px; + height: 18px; + padding: 0.05em 0; +} +button.snippet-copy span { + line-height: 1.2em; + padding: 0.2em; + position: relative; + top: -0.5em; +} +div.snippet-container:hover button.snippet-copy span { + opacity: 100%; +} +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid var(--table-border-color); +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid var(--table-border-color); +} +table.striped { + border-collapse: collapse; + border: 1px solid var(--table-border-color); +} +table.striped > thead { + background-color: var(--subnav-background-color); +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid var(--table-border-color); +} +table.striped > tbody > tr:nth-child(even) { + background-color: var(--odd-row-color) +} +table.striped > tbody > tr:nth-child(odd) { + background-color: var(--even-row-color) +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid var(--table-border-color); + border-right: 1px solid var(--table-border-color); +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak style for small screens. + */ +@media screen and (max-width: 920px) { + header.flex-header { + max-height: 100vh; + overflow-y: auto; + } + div#navbar-top { + height: 2.8em; + transition: height 0.35s ease; + } + ul.nav-list { + display: block; + width: 40%; + float:left; + clear: left; + margin: 10px 0 0 0; + padding: 0; + } + ul.nav-list li { + float: none; + padding: 6px; + margin-left: 10px; + margin-top: 2px; + } + ul.sub-nav-list-small { + display:block; + height: 100%; + width: 50%; + float: right; + clear: right; + background-color: var(--subnav-background-color); + color: var(--body-text-color); + margin: 6px 0 0 0; + padding: 0; + } + ul.sub-nav-list-small ul { + padding-left: 20px; + } + ul.sub-nav-list-small a:link, ul.sub-nav-list-small a:visited { + color:var(--link-color); + } + ul.sub-nav-list-small a:hover { + color:var(--link-color-active); + } + ul.sub-nav-list-small li { + list-style:none; + float:none; + padding: 6px; + margin-top: 1px; + text-transform:uppercase; + } + ul.sub-nav-list-small > li { + margin-left: 10px; + } + ul.sub-nav-list-small li p { + margin: 5px 0; + } + div#navbar-sub-list { + display: none; + } + .top-nav a:link, .top-nav a:active, .top-nav a:visited { + display: block; + } + button#navbar-toggle-button { + width: 3.4em; + height: 2.8em; + background-color: transparent; + display: block; + float: left; + border: 0; + margin: 0 10px; + cursor: pointer; + font-size: 10px; + } + button#navbar-toggle-button .nav-bar-toggle-icon { + display: block; + width: 24px; + height: 3px; + margin: 1px 0 4px 0; + border-radius: 2px; + transition: all 0.1s; + background-color: var(--navbar-text-color); + } + button#navbar-toggle-button.expanded span.nav-bar-toggle-icon:nth-child(1) { + transform: rotate(45deg); + transform-origin: 10% 10%; + width: 26px; + } + button#navbar-toggle-button.expanded span.nav-bar-toggle-icon:nth-child(2) { + opacity: 0; + } + button#navbar-toggle-button.expanded span.nav-bar-toggle-icon:nth-child(3) { + transform: rotate(-45deg); + transform-origin: 10% 90%; + width: 26px; + } +} +@media screen and (max-width: 800px) { + .about-language { + padding-right: 16px; + } + ul.nav-list li { + margin-left: 5px; + } + ul.sub-nav-list-small > li { + margin-left: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 400px) { + .about-language { + font-size: 10px; + padding-right: 12px; + } +} +@media screen and (max-width: 400px) { + .nav-list-search { + width: 94%; + } + #search-input, #page-search-input { + width: 70%; + } +} +@media screen and (max-width: 320px) { + .nav-list-search > label { + display: none; + } + .nav-list-search { + width: 90%; + } + #search-input, #page-search-input { + width: 80%; + } +} + +pre.snippet { + background-color: var(--snippet-background-color); + color: var(--snippet-text-color); + padding: 10px; + margin: 12px 0; + overflow: auto; + white-space: pre; +} +div.snippet-container { + position: relative; +} +@media screen and (max-width: 800px) { + pre.snippet { + padding-top: 26px; + } + button.snippet-copy { + top: 4px; + right: 4px; + } +} +pre.snippet .italic { + font-style: italic; +} +pre.snippet .bold { + font-weight: bold; +} +pre.snippet .highlighted { + background-color: var(--snippet-highlight-color); + border-radius: 10%; +} diff --git a/deliveries/Javadoc/tag-search-index.js b/deliveries/Javadoc/tag-search-index.js new file mode 100644 index 00000000..f38b3cb3 --- /dev/null +++ b/deliveries/Javadoc/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults(); \ No newline at end of file diff --git a/deliveries/Javadoc/type-search-index.js b/deliveries/Javadoc/type-search-index.js new file mode 100644 index 00000000..b8e5f9dc --- /dev/null +++ b/deliveries/Javadoc/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"p":"it.polimi.ingsw.network.messages.actions","l":"ActionMessage"},{"p":"it.polimi.ingsw.gamemodel","l":"AfterDrawState"},{"p":"it.polimi.ingsw.gamemodel","l":"AfterMoveState"},{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"it.polimi.ingsw.exceptions","l":"AlreadyUsedUsernameException"},{"p":"it.polimi.ingsw.utils","l":"AvailableMatch"},{"p":"it.polimi.ingsw.network.messages.responses","l":"AvailableMatchesMessage"},{"p":"it.polimi.ingsw.gamemodel","l":"Board"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","l":"BoardPane"},{"p":"it.polimi.ingsw.client.frontend.tui","l":"BoardPosition"},{"p":"it.polimi.ingsw.gamemodel","l":"Card"},{"p":"it.polimi.ingsw.exceptions","l":"CardException"},{"p":"it.polimi.ingsw.gamemodel","l":"CardFace"},{"p":"it.polimi.ingsw.utils","l":"CardJsonParser"},{"p":"it.polimi.ingsw.utils","l":"CardsManager"},{"p":"it.polimi.ingsw.utils","l":"CardsSerializer"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","l":"CardView"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","l":"ChatPaneController"},{"p":"it.polimi.ingsw.network.messages.actions","l":"ChooseInitialCardSideMessage"},{"p":"it.polimi.ingsw.gamemodel","l":"ChooseInitialSideState"},{"p":"it.polimi.ingsw.network.messages.actions","l":"ChooseSecretObjectiveMessage"},{"p":"it.polimi.ingsw.gamemodel","l":"ChooseSecretObjectiveState"},{"p":"it.polimi.ingsw.exceptions","l":"ChosenMatchException"},{"p":"it.polimi.ingsw.client.frontend","l":"ClientBoard"},{"p":"it.polimi.ingsw.network.tcp","l":"ClientListener"},{"p":"it.polimi.ingsw.network.tcp","l":"ClientReceiver"},{"p":"it.polimi.ingsw.gamemodel","l":"Color"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","l":"ConnectionSceneController"},{"p":"it.polimi.ingsw.gamemodel","l":"Corner"},{"p":"it.polimi.ingsw.network.messages.actions","l":"CreateMatchMessage"},{"p":"it.polimi.ingsw.utils","l":"DeckCreator"},{"p":"it.polimi.ingsw.exceptions","l":"DeckException"},{"p":"it.polimi.ingsw.network.messages.actions","l":"DrawCardMessage"},{"p":"it.polimi.ingsw.network.messages.actions","l":"DrawInitialCardMessage"},{"p":"it.polimi.ingsw.network.messages.actions","l":"DrawSecretObjectivesMessage"},{"p":"it.polimi.ingsw.gamemodel","l":"DrawSource"},{"p":"it.polimi.ingsw.network.messages.errors","l":"ErrorMessage"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","l":"ErrorSceneController"},{"p":"it.polimi.ingsw.gamemodel","l":"FinalState"},{"p":"it.polimi.ingsw.gamemodel","l":"GameDeck"},{"p":"it.polimi.ingsw.network.messages.actions","l":"GetAvailableMatchesMessage"},{"p":"it.polimi.ingsw.gamemodel","l":"GoldCard"},{"p":"it.polimi.ingsw.client.frontend.gui","l":"GraphicalApplication"},{"p":"it.polimi.ingsw.client.frontend","l":"GraphicalView"},{"p":"it.polimi.ingsw.client.frontend.gui","l":"GraphicalViewGUI"},{"p":"it.polimi.ingsw.client.frontend.tui","l":"GraphicalViewTUI"},{"p":"it.polimi.ingsw.utils","l":"GuiUtil"},{"p":"it.polimi.ingsw.exceptions","l":"HandException"},{"p":"it.polimi.ingsw.gamemodel","l":"InitialCard"},{"p":"it.polimi.ingsw.client.frontend.tui","l":"InputHandler"},{"p":"it.polimi.ingsw.exceptions","l":"InvalidPlayerException"},{"p":"it.polimi.ingsw.exceptions","l":"InvalidResourceException"},{"p":"it.polimi.ingsw.network.tcp","l":"IOHandler"},{"p":"it.polimi.ingsw.network.messages.actions","l":"JoinMatchMessage"},{"p":"it.polimi.ingsw.client.frontend","l":"LastRequest"},{"p":"it.polimi.ingsw.utils","l":"LeaderboardEntry"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","l":"LobbySceneController"},{"p":"it.polimi.ingsw.gamemodel","l":"Match"},{"p":"it.polimi.ingsw.network.messages.responses","l":"MatchFinishedMessage"},{"p":"it.polimi.ingsw.gamemodel","l":"MatchObserver"},{"p":"it.polimi.ingsw.gamemodel","l":"MatchObserverCallable"},{"p":"it.polimi.ingsw.network.messages.responses","l":"MatchResumedMessage"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","l":"MatchSceneController"},{"p":"it.polimi.ingsw.network.messages.responses","l":"MatchStartedMessage"},{"p":"it.polimi.ingsw.gamemodel","l":"MatchState"},{"p":"it.polimi.ingsw.client.frontend","l":"MatchStatus"},{"p":"it.polimi.ingsw.server","l":"MatchStatusObserver"},{"p":"it.polimi.ingsw.network.messages","l":"Message"},{"p":"it.polimi.ingsw.utils","l":"MessageJsonParser"},{"p":"it.polimi.ingsw.client.network","l":"NetworkHandler"},{"p":"it.polimi.ingsw.client.network","l":"NetworkHandlerRMI"},{"p":"it.polimi.ingsw.client.network","l":"NetworkHandlerTCP"},{"p":"it.polimi.ingsw.gamemodel","l":"NextTurnState"},{"p":"it.polimi.ingsw.gamemodel","l":"Objective"},{"p":"it.polimi.ingsw.utils","l":"Pair"},{"p":"it.polimi.ingsw.gamemodel","l":"PlacedCard"},{"p":"it.polimi.ingsw.utils","l":"PlacedCardRecord"},{"p":"it.polimi.ingsw.gamemodel","l":"PlacementOutcome"},{"p":"it.polimi.ingsw.client.frontend.gui.nodes","l":"PlateauPane"},{"p":"it.polimi.ingsw.gamemodel","l":"PlayableCard"},{"p":"it.polimi.ingsw.network.messages.actions","l":"PlayCardMessage"},{"p":"it.polimi.ingsw.gamemodel","l":"Player"},{"p":"it.polimi.ingsw.controllers","l":"PlayerController"},{"p":"it.polimi.ingsw.controllers","l":"PlayerControllerRMI"},{"p":"it.polimi.ingsw.controllers","l":"PlayerControllerRMIInterface"},{"p":"it.polimi.ingsw.controllers","l":"PlayerControllerTCP"},{"p":"it.polimi.ingsw.client.frontend.tui","l":"PlayerControls"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","l":"PlayerTabController"},{"p":"it.polimi.ingsw.gamemodel","l":"PositionRequirement"},{"p":"it.polimi.ingsw.gamemodel","l":"QuantityRequirement"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","l":"RankingSceneController"},{"p":"it.polimi.ingsw.client.network","l":"RemoteViewInterface"},{"p":"it.polimi.ingsw.utils","l":"RequestStatus"},{"p":"it.polimi.ingsw.gamemodel","l":"Requirement"},{"p":"it.polimi.ingsw.gamemodel","l":"ResourceCard"},{"p":"it.polimi.ingsw.network.messages.responses","l":"ResponseMessage"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","l":"SceneController"},{"p":"it.polimi.ingsw.network.messages.actions","l":"SendBroadcastTextMessage"},{"p":"it.polimi.ingsw.network.messages.actions","l":"SendPrivateTextMessage"},{"p":"it.polimi.ingsw.server","l":"Server"},{"p":"it.polimi.ingsw.server","l":"ServerRMIInterface"},{"p":"it.polimi.ingsw.client.frontend","l":"ShownCard"},{"p":"it.polimi.ingsw.gamemodel","l":"Side"},{"p":"it.polimi.ingsw.network.messages.responses","l":"SomeoneChoseSecretObjectiveMessage"},{"p":"it.polimi.ingsw.network.messages.responses","l":"SomeoneDrewCardMessage"},{"p":"it.polimi.ingsw.network.messages.responses","l":"SomeoneDrewInitialCardMessage"},{"p":"it.polimi.ingsw.network.messages.responses","l":"SomeoneDrewSecretObjectivesMessage"},{"p":"it.polimi.ingsw.network.messages.responses","l":"SomeoneJoinedMessage"},{"p":"it.polimi.ingsw.network.messages.responses","l":"SomeonePlayedCardMessage"},{"p":"it.polimi.ingsw.network.messages.responses","l":"SomeoneQuitMessage"},{"p":"it.polimi.ingsw.network.messages.responses","l":"SomeoneSentBroadcastTextMessage"},{"p":"it.polimi.ingsw.network.messages.responses","l":"SomeoneSentPrivateTextMessage"},{"p":"it.polimi.ingsw.network.messages.responses","l":"SomeoneSetInitialSideMessage"},{"p":"it.polimi.ingsw.gamemodel","l":"Symbol"},{"p":"it.polimi.ingsw.network.tcp","l":"TCPServer"},{"p":"it.polimi.ingsw.utils","l":"TUICardParser"},{"p":"it.polimi.ingsw.client.frontend.tui","l":"TuiPrinter"},{"p":"it.polimi.ingsw.client.frontend.tui","l":"ValidPositions"},{"p":"it.polimi.ingsw.client.frontend.gui.controllers","l":"WaitingSceneController"},{"p":"it.polimi.ingsw.gamemodel","l":"WaitState"},{"p":"it.polimi.ingsw.exceptions","l":"WrongChoiceException"},{"p":"it.polimi.ingsw.exceptions","l":"WrongInputFormatException"},{"p":"it.polimi.ingsw.exceptions","l":"WrongNameException"},{"p":"it.polimi.ingsw.exceptions","l":"WrongStateException"},{"p":"it.polimi.ingsw.exceptions","l":"WrongTurnException"}];updateSearchResults(); \ No newline at end of file diff --git a/deliveries/PeerReview/PeerReview1-UML.md b/deliveries/Peer reviews/Peer-Review1-UML.md similarity index 72% rename from deliveries/PeerReview/PeerReview1-UML.md rename to deliveries/Peer reviews/Peer-Review1-UML.md index 40120739..178077d8 100644 --- a/deliveries/PeerReview/PeerReview1-UML.md +++ b/deliveries/Peer reviews/Peer-Review1-UML.md @@ -6,8 +6,8 @@ Valutazione del class diagram UML del gruppo AM17. ## Lati positivi ### Generali - Nel modello è stata prevista a livello concettuale, tramite la classe `GameResources`, la presenza di carte che esistono nel gioco indipendentemente dall'istanza di `GameModel` che le utilizza. -La differenza è evidenziata dal fatto che `GameResources` presenta liste di `PlaceableCard`, mentre il `GameModel` presenta dei deck di carte separati -(che supponiamo prendere le carta proprio da quelle List). + La differenza è evidenziata dal fatto che `GameResources` presenta liste di `PlaceableCard`, mentre il `GameModel` presenta dei deck di carte separati + (che supponiamo prendere le carta proprio da quelle List). ### GameController - `GameController` rende molto chiaro quali metodi sono mostrati all'esterno e delinea chiaramente le interazioni dell'utente con il gioco. @@ -23,7 +23,7 @@ La differenza è evidenziata dal fatto che `GameResources` presenta liste di `Pl ### ObjectiveCard - La scelta di creare una sottoclasse per ogni possibile obiettivo risulta troppo frammentaria (infatti sono presenti 8 classi con differenze marginali). -Inoltre troviamo la soluzione poco scalabile (l'inserimento di nuove carte obiettivo implicherebbe la creazione di classi ex novo). + Inoltre troviamo la soluzione poco scalabile (l'inserimento di nuove carte obiettivo implicherebbe la creazione di classi ex novo). - L'attributo `points` è presente in tutte le sottoclassi di `ObjectiveCard`, e quindi potrebbe essere spostato nella sopraclasse. ### CardCorner @@ -32,13 +32,13 @@ Inoltre troviamo la soluzione poco scalabile (l'inserimento di nuove carte obiet ### PlaceableCard - Supponiamo che esista il metodo `getPermanentResources(...)` in `Back`, solo a fine esemplificativo. -Gli attributi `front` e `back` di `PlaceableCard` sono di tipo statico `Side` dunque non è possibile accedere ai metodi unici delle sottoclassi senza effettuare. -un casting (in Back non sarebbe possibile, invocare getPermanentResources(...)). Una possibile soluzione a questo problema è rendere gli attributi di `PlaceableCard` -(e relativi getter) `front` e `back` rispettivamente di tipo statico `Front` e `Back`. + Gli attributi `front` e `back` di `PlaceableCard` sono di tipo statico `Side` dunque non è possibile accedere ai metodi unici delle sottoclassi senza effettuare. + un casting (in Back non sarebbe possibile, invocare getPermanentResources(...)). Una possibile soluzione a questo problema è rendere gli attributi di `PlaceableCard` + (e relativi getter) `front` e `back` rispettivamente di tipo statico `Front` e `Back`. - Ci sentiamo di condividere un'osservazione: la classe `PlaceableCard` sembra abbia un po' mischiato in sé la struttura -di una carta generica e di una carta piazzata; come denotato dalla presenza degli attributi `front` e `back` (appartenenti al concetto di carta generica) -e `currSide` (appartenente al concetto di carta piazzata). + di una carta generica e di una carta piazzata; come denotato dalla presenza degli attributi `front` e `back` (appartenenti al concetto di carta generica) + e `currSide` (appartenente al concetto di carta piazzata). - In `GoldenCard` non abbiamo identificato con quale meccanismo vengono calcolati i punti in base al numero di angoli coperti. ### GameModel @@ -47,7 +47,7 @@ e `currSide` (appartenente al concetto di carta piazzata). ### PlayerModel - La scelta di utilizzare la classe `Token` per rappresentare il colore del player (o la sua posizione, non risulta molto chiaro dal solo UML), non ci è sembrata una soluzione efficace -in quanto tale classe ha solo un attributo, che potrebbe essere messo all'interno di `Player`. + in quanto tale classe ha solo un attributo, che potrebbe essere messo all'interno di `Player`. - L'attributo `objectiveToChoose` risulta non necessario, in quanto esiste già l'attributo `secretObjective`. ### GameController @@ -58,13 +58,13 @@ A differenza dalla soluzione adottata dal gruppo AM17, noi abbiamo preferito opt - Nella nostra architettura non abbiamo fatto utilizzo di ID per le varie entità del gioco, tuttavia riteniamo probabile che l'introduzione di questi possa tornare utile nelle fasi successive dello sviluppo. Soprattutto nella comunicazione client-server, potrà tornare utile al fine di evitare il trasferimento di interi oggetti durante ogni transazione (e.g. ogni player deve comunicare al server quale carta ha piazzato inviando l'intero oggetto carta, oppure, specificatamente nella nostra architettura, inviando l'intero oggetto `Board`); tale scambio di oggetti potrebbe essere fatto durante la sola prima interazione fra client e server. - Per maggiore scalabilità e chiarezza, abbiamo utilizzato in maniera più intensiva le `Enumeration`, sfruttando la possibilità di generare subset tramite metodi statici. -Ad esempio, l'enumeration `Symbol` contiene tutti i simboli presenti nel gioco, e definisce dei metodi per ottenere i subset validi per ciascuna occasione + Ad esempio, l'enumeration `Symbol` contiene tutti i simboli presenti nel gioco, e definisce dei metodi per ottenere i subset validi per ciascuna occasione - Abbiamo implementato una gestione della partita di gioco attraverso un modello a macchina a stati finiti (design pattern `State`), al fine di distinguere nettamente le fasi di gioco. - Nella nostra architettura gli obiettivi richiedono un `Requirement` (utilizzato anche per il piazzamento delle carte oro), che si suddivide in due sottoclassi: -`QuantityRequirement` per i requisiti relativi alle risorse e `PositionRequirement` per i requisiti posizionali, evitando così di creare una classe per ogni posizione possibile. + `QuantityRequirement` per i requisiti relativi alle risorse e `PositionRequirement` per i requisiti posizionali, evitando così di creare una classe per ogni posizione possibile. - Abbiamo deciso di esporre all'esterno del model le classi `Match` e `Player`. In questo modo i Controller relativi ai giocatori interagiscono con il solo oggetto `Player`, -mentre il gioco viene gestito in `Match`. + mentre il gioco viene gestito in `Match`. - Il concetto di "carta piazzata" e "carta giocabile" sono da noi considerati diversi e vengono pertanto divisi: abbiamo creato una classe `Card`, -da cui ereditano `InitialCard`, `GoldCard` e `ResourceCard`, e una classe `PlacedCard` composta dal turno in cui viene piazzata e dalla carta che rappresenta. -In questo modo le istanze di `Card` non dipendono da un particolare `Match`, mentre le `PlacedCard` fungono da wrapper di `Card` strettamente dipendenti dal `Match`. + da cui ereditano `InitialCard`, `GoldCard` e `ResourceCard`, e una classe `PlacedCard` composta dal turno in cui viene piazzata e dalla carta che rappresenta. + In questo modo le istanze di `Card` non dipendono da un particolare `Match`, mentre le `PlacedCard` fungono da wrapper di `Card` strettamente dipendenti dal `Match`. - Per la gestione dei deck abbiamo utilizzato un generic: in questo modo si evita duplicazione di codice, in quanto i mazzi hano tutti lo stesso funzionamento. diff --git a/deliveries/PeerReview/PeerReview2-SequenceDiagram.md b/deliveries/Peer reviews/PeerReview2-SequenceDiagram.md similarity index 100% rename from deliveries/PeerReview/PeerReview2-SequenceDiagram.md rename to deliveries/Peer reviews/PeerReview2-SequenceDiagram.md diff --git a/deliveries/PeerReview/UML_peer_review.pdf b/deliveries/PeerReview/UML_peer_review.pdf deleted file mode 100644 index 2ec6289e..00000000 Binary files a/deliveries/PeerReview/UML_peer_review.pdf and /dev/null differ diff --git a/deliveries/Protocol/RMI_protocol.md b/deliveries/Protocol/RMI_protocol.md index 2943914f..ca7a7250 100644 --- a/deliveries/Protocol/RMI_protocol.md +++ b/deliveries/Protocol/RMI_protocol.md @@ -5,7 +5,7 @@ This document is intended to describe how a client must be implemented and behav - [General notes](#general-notes) - [Obtain remote server object](#obtain-remote-server-object) - [Obtain remote controller object](#obtain-remote-controller-object) -- [Implement a commont interface](#implement-a-common-interface) +- [Implement a common interface](#implement-a-common-interface) ## Content @@ -13,11 +13,11 @@ This document is intended to describe how a client must be implemented and behav - Keep in mind that this application has been designed and implemented with a distributed MVC architecture in mind, in particular having the view as the only remote part of the architecture. It goes without saying that a client hereby is considered to be a view too. - As usual on a network communication, the client must know the socket on which the server listens (i.e. IP and port). -- It won't be described here how to access a RMI registry, since it's inherent to any RMI connection, not this specific protocol. +- It won't be described here how to access an RMI registry, since it's inherent to any RMI connection, not this specific protocol. ### Obtain remote server object The first step to be able to create a functioning ```Client``` class is to add to its ```main``` method everything needed to listen -to the server remote RMI registry. The server will export itself to the registry as an object that implements the interface ```ServerRMIInterface```, then the received object must be casted to this interface: +to the server remote RMI registry. The server will export itself to the registry as an object that implements the interface ```ServerRMIInterface```, then the received object must be cast to this interface: ```Java /** * RMI interface used to declare all and only the methods callable on a remote Server instance implementing this @@ -27,38 +27,49 @@ to the server remote RMI registry. The server will export itself to the registry */ public interface ServerRMIInterface extends Remote { /** - * Returns the unique names of the available matches (those not full yet). + * Returns the available matches (those not full yet) as {@link AvailableMatch} instances. + * * @return The list of Match which are not full yet. * @throws RemoteException If the remote server is considered not to be reachable any more and cannot return as usual */ - List getJoinableMatches() throws RemoteException; + List getJoinableMatches() throws RemoteException; /** - * Lets the calling view join on a match with the given player nickname, if possible; gives back to the client + * Lets the calling view join on a match with the given player username, if possible; gives back to the client * an instance of its PlayerControllerRMI, to start communicating through it with the match. + * * @param matchName The unique name of the match to join to - * @param nickname The chosen player nickname + * @param username The chosen player username * @return An instance of PlayerControllerRMI, used exclusively by the calling view - * @throws RemoteException If the remote server is considered not to be reachable any more and cannot return as usual - * @throws ChosenMatchException If the chosen match is either already full or doesn't exist - * @throws AlreadyUsedNicknameException If the given nickname is already taken - * @throws WrongStateException If the match is in a state during which doesn't allow players to join any more + * @throws RemoteException If the remote server is considered not to be reachable any more and cannot return as usual + * @throws ChosenMatchException If the chosen match is either already full or doesn't exist + * @throws AlreadyUsedUsernameException If the given username is already taken + * @throws WrongStateException If the match is in a state during which doesn't allow players to join any more + * @throws WrongNameException If the name is not valid */ - PlayerControllerRMI joinMatch(String matchName, String nickname) throws RemoteException, ChosenMatchException, AlreadyUsedNicknameException, WrongStateException; + PlayerControllerRMIInterface joinMatch(String matchName, String username) throws RemoteException, ChosenMatchException, AlreadyUsedUsernameException, WrongStateException, WrongNameException; /** * Lets the calling view create a new match. - * @param matchName The unique name to give to the new match + * + * @param matchName The unique name to give to the new match * @param maxPlayers The maximum number of player allowed on the new match - * @throws RemoteException If the remote server is considered not to be reachable any more and cannot return as usual + * @throws RemoteException If the remote server is considered not to be reachable any more and cannot return as usual * @throws ChosenMatchException If the given match name is already taken */ - void createMatch(String matchName, int maxPlayers) throws RemoteException, ChosenMatchException; + void createMatch(String matchName, int maxPlayers) throws RemoteException, ChosenMatchException, WrongNameException; + + /** + * Pings the server in order to perceive if the connection is still alive and working. + * + * @throws RemoteException If the connection to this class instance is not alive anymore + */ + boolean ping() throws RemoteException; } ``` ### Obtain remote controller object -Having received the ```ServerRMIInterface``` object allows the client to request a controller, it can be done calling the ```joinMatch(...)``` method. The received object is obviously remote too and must be casted to a common RMI interface (as usual with RMI): the ```PlayerControllerRMIInterface```: +Having received the ```ServerRMIInterface``` object allows the client to request a controller, it can be done calling the ```joinMatch(...)``` method. The received object is obviously remote too and must be cast to a common RMI interface (as usual with RMI): the ```PlayerControllerRMIInterface```: ```Java /** * RMI interface used to declare all and only the methods callable on a remote PlayerControllerRMI instance implementing @@ -72,61 +83,83 @@ public interface PlayerControllerRMIInterface extends Remote { * called, it won't do anything, since it's call is allowed once per PlayerController object. * It's used by a remote View having this class object to send itself over RMI to the PlayerControllerRMI * instance. + * * @param view The View to save in the PlayerController internal state */ - void registerView(ViewRMIInterface view) throws RemoteException; + void registerView(RemoteViewInterface view) throws RemoteException, ChosenMatchException, WrongStateException, AlreadyUsedUsernameException, WrongNameException; /** * Draws an initial card for the player. + * * @throws WrongStateException If the current match state doesn't allow drawing an initial card - * @throws WrongTurnException If the current turn it's not the one of this player + * @throws WrongTurnException If the current turn it's not the one of this player */ void drawInitialCard() throws RemoteException, WrongStateException, WrongTurnException; /** * Communicates the chosen initial card side. + * * @param side The side on which play the initial card drawn using {@link #drawInitialCard()} * @throws WrongStateException If the current match state doesn't allow setting the initial card side - * @throws WrongTurnException If the current turn it's not the one of this player + * @throws WrongTurnException If the current turn it's not the one of this player */ void chooseInitialCardSide(Side side) throws RemoteException, WrongStateException, WrongTurnException; /** * Draws two secret objectives. + * * @throws WrongStateException If the current match state doesn't allow drawing secret objectives - * @throws WrongTurnException If the current turn it's not the one of this player + * @throws WrongTurnException If the current turn it's not the one of this player */ void drawSecretObjectives() throws RemoteException, WrongStateException, WrongTurnException; /** * Communicates the chosen secret objective. + * * @param objective The chosen objective - * @throws WrongStateException If the current match state doesn't allow choosing a secret objective - * @throws WrongTurnException If the current turn it's not the one of this player + * @throws WrongStateException If the current match state doesn't allow choosing a secret objective + * @throws WrongTurnException If the current turn it's not the one of this player * @throws WrongChoiceException If the chosen objective is not one of the two drawn ones using {@link #drawSecretObjectives()} */ - void chooseSecretObjective(Objective objective) throweffectivelys RemoteException, WrongStateException, WrongTurnException, WrongChoiceException; + void chooseSecretObjective(Objective objective) throws RemoteException, WrongStateException, WrongTurnException, WrongChoiceException; /** * Plays a card. + * * @param coords The coordinates on which to place the card - * @param card The PlayableCard to play - * @param side The side on which to play the chosen card - * @throws WrongStateException If the current match state doesn't allow playing cards - * @throws WrongTurnException If the current turn it's not the one of this player + * @param card The PlayableCard to play + * @param side The side on which to play the chosen card + * @throws WrongStateException If the current match state doesn't allow playing cards + * @throws WrongTurnException If the current turn it's not the one of this player * @throws WrongChoiceException If the chosen card is not one of those in the player's current hand */ void playCard(Pair coords, PlayableCard card, Side side) throws RemoteException, WrongStateException, WrongTurnException, WrongChoiceException; /** * Draws a card. + * * @param source The drawing source to draw the card from - * @throws HandException If the player already has a full hand of cards (three cards) - * @throws WrongStateException If the current match state doesn't allow drawing cards - * @throws WrongTurnException If the current turn it's not the one of this player + * @throws HandException If the player already has a full hand of cards (three cards) + * @throws WrongStateException If the current match state doesn't allow drawing cards + * @throws WrongTurnException If the current turn it's not the one of this player * @throws WrongChoiceException If the chosen DrawSource doesn't have any card left (i.e. it's empty) */ void drawCard(DrawSource source) throws RemoteException, HandException, WrongStateException, WrongTurnException, WrongChoiceException; + + /** + * Sends a text to all the players in the match. + * + * @param text The text to be sent + */ + void sendBroadcastText(String text) throws RemoteException; + + /** + * Sends a text just to a specific player in the match. + * + * @param recipient The username of the recipient + * @param text The text to be sent to the recipient + */ + void sendPrivateText(String recipient, String text) throws RemoteException; } ``` This object from now on will be the one used to communicate with the match, which is effectively located on the server machine, thus the @@ -140,36 +173,66 @@ To let the controller call methods on the client, the client must also implement This interface is ```ViewRMIInterface```: ```Java /** - * RMI interface used to declare all and only the methods callable on a remote view instance implementing this interface. + * Network interface used to declare all and only the methods callable on a remote view instance implementing this interface or + * by message listener for TCP. * Since it's a remote interface, all the methods here defined are meant to notify the occurrence of an event to the remote * object. Given this, all methods also contain some parameters specific to the happened event. * For security reasons, each method doesn't expose to the receiving view important objects (e.g. Player), but - * rather values representing them (e.g. Player's nickname). + * rather values representing them (e.g. Player's username). */ -public interface ViewRMIInterface extends Remote { +public interface RemoteViewInterface extends Remote { + /** * Notifies that the match has just started. * Furthermore, gives to the receiving object all the information (parameters) needed to show to the current match * state. - * @param playersNicknamesAndPawns Map that matches each pawn color to the corresponding player's nickname - * @param playersHands Map that matches each player's nickname to the corresponding List of cards in the hand - * @param visibleObjectives Pair of objectives visible to all players - * @param visiblePlayableCards Map having as values the visible common cards (the keys are just indexes). - * @param decksTopReigns Pair of reign symbols representing the two visible reigns symbols on top of the two decks; - * the first one is the gold deck one, the second one the resource deck one - * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual + * + * @param playersUsernamesAndPawns Map that matches each pawn color to the corresponding player's username + * @param playersHands Map that matches each player's username to the corresponding List of cards in the hand + * @param visibleObjectives Pair of objectives visible to all players + * @param visiblePlayableCards Map having as values the visible common cards (the keys are just indexes). + * @param decksTopReigns Pair of reign symbols representing the two visible reigns symbols on top of the two decks; + * the first one is the gold deck one, the second one the resource deck one + * @throws RemoteException If the remote object is considered not to be reachable anymore and cannot return as usual */ - void matchStarted(Map playersNicknamesAndPawns, Map> playersHands, Pair visibleObjectives, Map visiblePlayableCards, Pair decksTopReigns) throws RemoteException; + void matchStarted(Map playersUsernamesAndPawns, Map> playersHands, Pair visibleObjectives, Map visiblePlayableCards, Pair decksTopReigns) throws RemoteException; /** - * Gives to the remote object an initial card to show it in the view. - * @param initialCard Initial card to give - * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual + * Notifies that the match has resumed. + * Furthermore, gives to the receiving object all the information (parameters) needed to show to the current match + * state. + * + * @param playersUsernamesAndPawns Map that matches each pawn color to the corresponding player's username + * @param playersHands Map that matches each player's username to the corresponding List of cards in the hand + * @param visibleObjectives Pair of objectives visible to all players + * @param visiblePlayableCards Map having as values the visible common cards (the keys are just indexes). + * @param decksTopReigns Pair of reign symbols representing the two visible reigns symbols on top of the two decks; + * the first one is the gold deck one, the second one the resource deck one + * @param secretObjective Secret objective of the current player + * @param availableResources Available resources of all the players + * @param placedCards Placed cards of all the players + * @param playerPoints Points of all the players + * @param currentPlayer The current player + * @param drawPhase If the match is resumed in draw phase + * @throws RemoteException If the remote object is considered not to be reachable anymore and cannot return as usual + */ + void matchResumed(Map playersUsernamesAndPawns, Map> playersHands, + Pair visibleObjectives, Map visiblePlayableCards, + Pair decksTopReigns, Objective secretObjective, Map> availableResources, + Map, PlacedCard>> placedCards, Map playerPoints, String currentPlayer, boolean drawPhase) throws RemoteException; + + /** + * Gives the graphical view a list of available matches + * + * @param availableMatchs The available matches */ + void receiveAvailableMatches(List availableMatchs) throws RemoteException; + void giveInitialCard(InitialCard initialCard) throws RemoteException; /** * Gives to the remote object a pair of secret objectives to show them in the view and to choose one from them. + * * @param secretObjectives Pair of secret objectives to give * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual */ @@ -177,61 +240,104 @@ public interface ViewRMIInterface extends Remote { /** * Notifies that someone (it may or may not be the receiving View instance) has drawn its initial card. - * @param someoneNickname The nickname of the player who has drawn the card - * @param card The card drawn + * + * @param someoneUsername The username of the player who has drawn the card + * @param card The card drawn * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual */ - void someoneDrewInitialCard(String someoneNickname, InitialCard card) throws RemoteException; + void someoneDrewInitialCard(String someoneUsername, InitialCard card) throws RemoteException; /** * Notifies that someone (it may or may not be the receiving View instance) has decided (then set) its initial card side. - * @param someoneNickname The nickname of the player who has set side - * @param side The chosen side + * + * @param someoneUsername The username of the player who has set side + * @param side The chosen side * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual */ - void someoneSetInitialSide(String someoneNickname, Side side) throws RemoteException; + void someoneSetInitialSide(String someoneUsername, Side side, Map availableResources) throws RemoteException; /** * Notifies that someone (it may or may not be the receiving View instance) has drawn a pair of secret objectives. * Mind that the objectives are not passed as arguments, since they are secret to all players but the one receiving * them. The one meant to receive them receives this message too but obtain the objectives through the * giveSecretObjective() method. - * @param someoneNickname The nickname of the player who has drawn the card + * + * @param someoneUsername The username of the player who has drawn the card * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual */ - void someoneDrewSecretObjective(String someoneNickname) throws RemoteException; + void someoneDrewSecretObjective(String someoneUsername) throws RemoteException; /** * Notifies that someone (it may or may not be the receiving View instance) has chosen theirs secret objective. - * @param someoneNickname The nickname of the player who has chosen theirs secret objective + * + * @param someoneUsername The username of the player who has chosen theirs secret objective * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual */ - void someoneChoseSecretObjective(String someoneNickname) throws RemoteException; + void someoneChoseSecretObjective(String someoneUsername) throws RemoteException; /** * Notifies that someone (it may or may not be the receiving View instance) has played a card. - * @param someoneNickname The nickname of the player who has played a card - * @param coords The coordinates where the card has been placed as a Pair of int - * @param card The card that has been played - * @param side The side on which the card has been played + * + * @param someoneUsername The username of the player who has played a card + * @param coords The coordinates where the card has been placed as a Pair of int + * @param card The card that has been played + * @param side The side on which the card has been played * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual */ - void someonePlayedCard(String someoneNickname, Pair coords, PlayableCard card, Side side) throws RemoteException; + void someonePlayedCard(String someoneUsername, Pair coords, PlayableCard card, Side side, int points, Map availableResources) throws RemoteException; /** * Notifies that someone (it may or may not be the receiving View instance) has drawn a card. - * @param someoneNickname The nickname of the player who has played a card - * @param source The DrawSource from which the card has been drawn - * @param card The card that has been drawn + * + * @param someoneUsername The username of the player who has played a card + * @param source The DrawSource from which the card has been drawn + * @param card The card that has been drawn + * @param replacementCard The card that replaced the drawn one + * @param deckTopReigns The decks top reigns + * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual + */ + void someoneDrewCard(String someoneUsername, DrawSource source, PlayableCard card, PlayableCard replacementCard, Pair deckTopReigns) throws RemoteException; + + /** + * Notifies that someone has joined the match. + * + * @param someoneUsername The username of the player that joined + * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual + */ + void someoneJoined(String someoneUsername, List joinedPlayers) throws RemoteException; + + /** + * Notifies that someone has quit the match. + * + * @param someoneUsername The username of the player that quit * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual */ - void someoneDrewCard(String someoneNickname, DrawSource source, Card card) throws RemoteException; + void someoneQuit(String someoneUsername) throws RemoteException; /** * Notifies that the match has just started. + * + * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual + */ + void matchFinished(List ranking) throws RemoteException; + + /** + * Notifies that a new message in the global chat has been received. + * + * @param someoneUsername Username of the user that sent the message + * @param text Content of the message + * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual + */ + void someoneSentBroadcastText(String someoneUsername, String text) throws RemoteException; + + /** + * Notifies that a new private message has been sent to the current user. + * + * @param someoneUsername Username of the user that sent the message + * @param text Content of the message * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual */ - void matchFinished() throws RemoteException; + void someoneSentPrivateText(String someoneUsername, String text) throws RemoteException; } ``` -Each method must be implemented keeping in mind that it represent the action to be triggered when the corresponding event occurs. \ No newline at end of file +Each method must be implemented keeping in mind that it represent the action to be triggered when the corresponding event occurs. diff --git a/deliveries/Protocol/TCP_protocol.md b/deliveries/Protocol/TCP_protocol.md index b83e946f..94ede312 100644 --- a/deliveries/Protocol/TCP_protocol.md +++ b/deliveries/Protocol/TCP_protocol.md @@ -17,14 +17,14 @@ Implemented actions: - [GetAvailableMatches](#GetAvailableMatches) - [CreateMatch](#CreateMatch) - [JoinMatch](#JoinMatch) -- [SendBroadcastText](#SendBroadcastText) -- [SendPrivateText](#SendText) - [DrawInitialCard](#DrawInitialCard) - [ChooseInitialCardSide](#ChooseInitialCardSide) - [DrawSecretObjectives](#DrawSecretObjectives) - [ChooseSecretObjective](#ChooseSecretObjective) - [PlayCard](#PlayCard) - [DrawCard](#DrawCard) +- [SendBroadcastText](#SendBroadcastText) +- [SendPrivateText](#SendPrivateText) ### GetAvailableMatches The action does not need additional parameters. @@ -40,27 +40,12 @@ The action communicates (to the server) the intention of a client to create a ne | `maxPlayers` | Integer | Number of maximum players (must be between 2 and 4) | ### JoinMatch -The action communicates the intention of a client to join a match. +The action communicates the intention of a client to join (or reconnect to) a match. | Parameter | Type | Description | | :-------- | :----: | :------------------------ | | `matchName` | String | Name of the match to join | -### SendBroadcastText -The action sends a public text message in the chat. - -| Parameter | Type | Description | -| :-------- | :-----------------: | :-------------------------------------------------------------------------------- | -| `text` | String | Content of the message | - -### SendPrivateText -The action sends a private text message in the chat to the specified recipient. - -| Parameter | Type | Description | -| :-------- | :-----------------: | :-------------------------------------------------------------------------------- | -| `text` | String | Content of the message | -| `recipient` | String | Recipient's name of the private message. | - ### DrawInitialCard The action does not need additional parameters. - It communicates the intention of a player to draw the initial card. It can only happen before the first turn of the game. @@ -105,13 +90,31 @@ If the action is successful, a [SomeonePlayedCard](#SomeonePlayedCard) response ### DrawCard The action communicates the intention of a player to draw a card. It can only happen during the player's own turn. - | Parameter | Type | Description | | :--------- | :----: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `drawSource` | String | Source from which drawing the card. It can be `FIRST_VISIBLE_CARD`, `SECOND_VISIBLE_CARD`, `THIRD_VISIBLE_CARD`, `FOURTH_VISIBLE_CARD`, `GOLDS_DECK`, `RESOURCES_DECK` | If the action is successful, a [SomeoneDrewInitialCard](#SomeoneDrewInitialCard) response is sent to every client. +### SendBroadcastText +The action communicates the intention of the player to write a text in the chat, visible to every member of the game + +| Parameter | Type | Description | +| :-------- | :-----: | :---------------------------------------------- | +| `text` | String | The content of the text | + +If the action is successful, a [SomeoneSentBroadcastText](#SomeoneSentBroadcastText) response is sent to every client. + +### SendPrivateText +The action communicates the intention of the player to write a private text, visible only to himself and the player specified + +| Parameter | Type | Description | +| :-------- | :-----: | :---------------------------------------------- | +| `recipient` | String | The username of the recipient | +| `text` | String | The content of the text | + +If the action is successful, a [SomeoneSentPrivateText](#SomeoneSentPrivateText) response is sent to the current and the specified player + ## Responses Responses always have the following parameter: @@ -123,16 +126,18 @@ Response can either be: - [AvailableMatches](#AvailableMatches) - [SomeoneJoined](#SomeoneJoined) - [SomeoneQuit](#SomeoneQuit) -- [SomeoneSentPrivateText](#SomeoneSentPrivateText) -- [SomeoneSentBroadcastText](#SomeoneSentBroadcastText) - [MatchStarted](#MatchStarted) - [SomeoneDrewInitialCard](#SomeoneDrewInitialCard) - [SomeoneSetInitialSide](#SomeoneSetInitialSide) - [SomeoneDrewSecretObjectives](#SomeoneDrewSecretObjectives) - [SomeoneChoseSecretObjective](#SomeoneChoseSecretObjective) -- [SomeonePlayedCardMessage](#SomeonePlayedCardMessage) +- [SomeonePlayedCard](#SomeonePlayedCard) - [SomeoneDrewCard](#SomeoneDrewCard) - [MatchFinishedMessage](#MatchFinishedMessage) +- [SomeoneSentBroadcastText](#SomeoneSentBroadcastText) +- [SomeoneSentPrivateText](#SomeoneSentPrivateText) +- [MatchResumed](#MatchResumed) + ### AvailableMatches This response is sent when a user is connected to the server. @@ -167,23 +172,6 @@ This response is sent when a player quits the current match. | `joinedPlayers` | Integer | Number of players that currently joined the match | | `endMatch` | bool | true if the quit caused the match to interrupt, false otherwise| -### SomeoneSentBroadcastText -This response is sent when another player sends a message in the chat. - -| Parameter | Type | Description | -| :-------- | :----: | :----------------------------------------------------- | -| `username` | String | Username of the player that sent the message | -| `text` | String | Text of the message sent | - -### SomeoneSentPrivateText -This response is sent when another player sends a private message to another player. - -| Parameter | Type | Description | -| :-------- | :----: | :----------------------------------------------------- | -| `username` | String | Username of the player that sent the message | -| `recipient` | String | Username of the player that sent the message | -| `text` | String | Text of the message sent | - ### MatchStarted Sent when the required amount of players is reached and the match is about to start. @@ -311,11 +299,11 @@ This response is sent to each user in the match when a user plays a card. ### Rank Rank is a JSON object containing the results of a single player. -| Parameter | Type | Description | -| :-------- | :-----: | :----------------------------- | -| `username` | String | Username of the current player | -| `points` | Integer | Amount of the final points (after post-match objective counting) | -| `winner` | bool | If the current player is also the winner of the game | +| Parameter | Type | Description | +| :-------- | :-----: | :-------------------------------------------------------------------| +| `username` | String | Username of the current player | +| `points` | Integer | Amount of the final points (after post-match objective counting) | +| `winner` | bool | If the current player is also the winner of the game | #### Example ```JSON @@ -335,6 +323,38 @@ Rank is a JSON object containing the results of a single player. "response": "MatchFinished" } ``` +### SomeoneSentBroadcastText +This response is sent to each user in the match when a user sends a text in the chat. + +| Parameter | Type | Description | +| :------------------- | :----------------: | :------------------------------------------------ | +| `text` | String | The content of the text | + +### SomeoneSentPrivateText +This response is sent to the user who sent the message and to the recipient. + +| Parameter | Type | Description | +| :------------------- | :----------------: | :------------------------------------------------ | +| `recipient` | String | The recipient of the private text | +| `text` | String | The content of the text | + +### MatchResumed +This response is sent to the user who just rejoined a match. All the parameters refer to the status of the match before the server crashed + +| Parameter | Type | Description | +| :------------------------ | :-------------------------------------------: | :------------------------------------------------------ | +| `playersUsernamesAndPawns` | Map | Map from players' username to pawn color | +| `playersHands` | Map> | Map from players' username to their hand | +| `visibleObjectives` | Pair | The two visible objectives common to every player | +| `visiblePlayableCards` | Map | The four drawable cards visible to everyone | +| `decksTopReigns` | Pair | The reign of the two decks (resource and gold) | +| `secretObjective` | Integer | The secret objective ID of the player | +| `availableResources` | Map> | Map from players' username to their available resources | +| `placedCards` | Map> | Map from players' username to their board | +| `playerPoints` | Map | Map from players' username to their points | +| `currentPlayer` | String | Username of the player currently playing his turn | +| `drawPhase` | boolean | Whether the current player should play or draw a card | + ## Errors An error always contains these parameters: diff --git a/deliveries/README.md b/deliveries/README.md index 030f1b89..e5ef3fb2 100644 --- a/deliveries/README.md +++ b/deliveries/README.md @@ -1,6 +1,7 @@ # Cosa troviamo qui dentro? -Si trova: -- UML iniziale e finale -- Documenti -- Documenti di peer review -- Report su test results + +- Diagrammi UML del progetto (Cartella UML) +- Documentazione dei protocolli TCP e RMI (Cartella Protocol) +- Peer Review inviate da noi (Cartella PeerReview) +- JavaDoc del progetto (Cartella JavaDoc) +- File JAR eseguibili (Cartella JAR) diff --git a/deliveries/Test results/index.html b/deliveries/Test results/index.html new file mode 100644 index 00000000..bf13119f --- /dev/null +++ b/deliveries/Test results/index.html @@ -0,0 +1 @@ +AM08

    AM08

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total19,533 of 24,93621%821 of 1,12827%1,1021,5324,2445,45760291348125
    it.polimi.ingsw.utils5,5754888%1351912%1361801,0861,1814682418
    it.polimi.ingsw.client.frontend.tui5,2871612%28751%2552631,0551,0759610246
    it.polimi.ingsw.client.frontend.gui.controllers2,6420%1190%17817859959911611699
    it.polimi.ingsw.client.frontend.gui1,1870%520%9090300300646422
    it.polimi.ingsw.client.frontend.gui.nodes1,1450%180%3636200200272733
    it.polimi.ingsw.client.frontend8711%550%8687216217575845
    it.polimi.ingsw.network.tcp76036132%461828%5778195298193514
    it.polimi.ingsw.controllers54265654%294158%4898149319236303
    it.polimi.ingsw.client.network5260%60%5656172172535333
    it.polimi.ingsw.server35411925%20416%314286117203002
    it.polimi.ingsw.gamemodel2983,23191%5021881%603147076114176029
    it.polimi.ingsw.network.messages.responses27623345%433%5367851335164715
    it.polimi.ingsw.exceptions41%n/a7121424712712
    it.polimi.ingsw.network.messages.actions11981%n/a6271154627312
    it.polimi.ingsw.network.messages.errors0%n/a33663311
    it.polimi.ingsw.network.messages100%n/a01010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ChatPaneController.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ChatPaneController.html new file mode 100644 index 00000000..7528e99a --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ChatPaneController.html @@ -0,0 +1 @@ +ChatPaneController

    ChatPaneController

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total287 of 2870%14 of 140%222272721515
    initialize()570%n/a11131311
    addMessage(String, String, String)400%20%227711
    submitMessage()360%40%339911
    changeVisibility()270%20%228811
    setIconStatus(boolean)260%20%228811
    lambda$initialize$3(ActionEvent)260%n/a115511
    addPlayer(String)130%n/a113311
    confirmSubmitPrivateMessage(String)130%n/a113311
    lambda$initialize$0(MouseEvent)110%20%223311
    ChatPaneController()80%n/a112211
    confirmSubmitBroadcastMessage(String)80%n/a112211
    lambda$initialize$2(KeyEvent)70%20%223311
    receiveBroadcastMessage(String, String)60%n/a112211
    receivePrivateMessage(String, String)60%n/a112211
    lambda$initialize$1(MouseEvent)30%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ChatPaneController.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ChatPaneController.java.html new file mode 100644 index 00000000..2628a512 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ChatPaneController.java.html @@ -0,0 +1,210 @@ +ChatPaneController.java

    ChatPaneController.java

    package it.polimi.ingsw.client.frontend.gui.controllers;
    +
    +import javafx.animation.TranslateTransition;
    +import javafx.fxml.FXML;
    +import javafx.scene.control.Button;
    +import javafx.scene.control.ChoiceBox;
    +import javafx.scene.control.ScrollPane;
    +import javafx.scene.control.TextField;
    +import javafx.scene.image.Image;
    +import javafx.scene.image.ImageView;
    +import javafx.scene.input.KeyCode;
    +import javafx.scene.layout.HBox;
    +import javafx.scene.layout.VBox;
    +import javafx.scene.text.Text;
    +import javafx.scene.text.TextFlow;
    +import javafx.util.Duration;
    +
    +import java.util.*;
    +
    +/**
    + * JavaFX controller for the chat pane
    + */
    +public class ChatPaneController extends SceneController {
    +    @FXML
    +    private Button sendMessageBtn;
    +    @FXML
    +    private TextFlow chatHistoryText;
    +    @FXML
    +    private HBox chatPane;
    +    @FXML
    +    private Button showChatBtn;
    +    @FXML
    +    private TextField chatInputText;
    +    @FXML
    +    private ChoiceBox<String> chatSelector;
    +
    +    public ScrollPane chatHistoryScrollPane;
    +    public VBox chatContainer;
    +    private final Map<String, String> chatHistory = new HashMap<>();
    +    private boolean isVisible;
    +    private Queue<String> unconfirmedPrivateMessagesReceivers;
    +
    +    @Override
    +    public void initialize() {
    +        chatHistoryScrollPane.getStyleClass().clear();
    +        isVisible = false;
    +        chatPane.setTranslateX(460);
    +        setIconStatus(false);
    +
    +        unconfirmedPrivateMessagesReceivers = new LinkedList<>();
    +
    +        // Add the broadcast item as an entry in the chatSelector and set it as default item
    +        chatHistory.put("broadcast", "");
    +        chatSelector.getItems().add("broadcast");
    +        chatSelector.getSelectionModel().select("broadcast");
    +
    +        // Show/hide the chat pane when the outer button is clicked
    +        showChatBtn.setOnMouseClicked((mouseEvent -> {
    +            isVisible = !isVisible;
    +            changeVisibility();
    +        }));
    +
    +        // Send message written in input box on send message button clicked
    +        sendMessageBtn.setOnMouseClicked(mouseEvent -> {
    +            this.submitMessage();
    +        });
    +        chatInputText.setOnKeyPressed(keyEvent -> {
    +            if (keyEvent.getCode() == KeyCode.ENTER)  {
    +                this.submitMessage();
    +            }
    +        });
    +
    +        // Switch to chat when a chatSelector item is clicked
    +        chatSelector.setOnAction(actionEvent -> {
    +            String selectedChatName = chatSelector.getSelectionModel().getSelectedItem();
    +            String selectedChatHistory = chatHistory.get(selectedChatName);
    +
    +            chatHistoryText.getChildren().clear();
    +            chatHistoryText.getChildren().add(new Text(selectedChatHistory));
    +        });
    +    }
    +
    +    /**
    +     * Submit a message written in the chat. Calls the network and
    +     * clears the input field
    +     */
    +    private void submitMessage() {
    +        String inputText = chatInputText.getText();
    +        String selectedChatName = chatSelector.getSelectionModel().getSelectedItem();
    +
    +        if (!inputText.isBlank()) {
    +            if (selectedChatName.equals("broadcast")) {
    +                super.view.sendBroadcastText(inputText);
    +            } else {
    +                super.view.sendPrivateText(selectedChatName, inputText);
    +                unconfirmedPrivateMessagesReceivers.offer(selectedChatName);
    +            }
    +        }
    +
    +        chatInputText.clear();
    +    }
    +    /**
    +     * Adds a player to the chat.
    +     *
    +     * @param playerUsername The player's username
    +     */
    +    public void addPlayer(String playerUsername) {
    +        chatHistory.put(playerUsername, "");
    +        chatSelector.getItems().add(playerUsername);
    +    }
    +
    +    /**
    +     * Handles the receipt of a broadcast message from a user who's not the current client.
    +     * For this purpose the method confirmSubmitBroadcastMessage(...) can be used.
    +     *
    +     * @param senderUsername The username of the player that sent the message
    +     * @param message        The message sent
    +     */
    +    public void receiveBroadcastMessage(String senderUsername, String message) {
    +        addMessage("broadcast", senderUsername, message);
    +    }
    +
    +    /**
    +     * Handles the receipt of a private message from a user who's not the current client.
    +     * For this purpose the method confirmSubmitPrivateMessage(...) can be used.
    +     *
    +     * @param senderUsername The username of the player that sent the message
    +     * @param message        The message sent
    +     */
    +    public void receivePrivateMessage(String senderUsername, String message) {
    +        addMessage(senderUsername, senderUsername, message);
    +    }
    +
    +    /**
    +     * Handles the receipt of confirmation of successful submit of a broadcast message
    +     * from this client to the server (either broadcast or private).
    +     *
    +     * @param message The message to be confirmed
    +     */
    +    public void confirmSubmitBroadcastMessage(String message) {
    +        addMessage("broadcast", super.view.getUsername(), message);
    +    }
    +
    +    /**
    +     * Handles the receipt of confirmation of successful submit of a private message
    +     * from this client to the server (either broadcast or private).
    +     *
    +     * @param message The message to be confirmed
    +     */
    +    public void confirmSubmitPrivateMessage(String message) {
    +        String receiverUsername = unconfirmedPrivateMessagesReceivers.poll();
    +        addMessage(receiverUsername, super.view.getUsername(), message);
    +    }
    +
    +    /**
    +     * Utility method to add a message to the chat pane
    +     *
    +     * @param chatName       The chat in which to put the message
    +     * @param senderUsername The sender's username
    +     * @param message        Text message text content
    +     */
    +    private void addMessage(String chatName, String senderUsername, String message) {
    +        String textMessage = senderUsername + ": " + message + "\n";
    +
    +        // Update the specific chat history associated to the sender
    +        String updatedHistory = chatHistory.get(chatName) + textMessage;
    +        chatHistory.put(chatName, updatedHistory);
    +
    +        // If it's the currently selected chat is this one
    +        if (chatSelector.getSelectionModel().getSelectedItem().equals(chatName)) {
    +            // Visually update the chat pane
    +            chatHistoryText.getChildren().clear();
    +            chatHistoryText.getChildren().add(new Text(updatedHistory));
    +        }
    +    }
    +
    +    /**
    +     * Switches the chat pane from visible to not visible and viceversa.
    +     */
    +    private void changeVisibility() {
    +        TranslateTransition tt = new TranslateTransition(Duration.millis(200), chatPane);
    +        if (isVisible) {
    +            tt.setToX(0);
    +            setIconStatus(true);
    +        } else {
    +            tt.setToX(460);
    +            setIconStatus(false);
    +        }
    +        tt.play();
    +    }
    +
    +    /**
    +     * Changes the icon of the button to open the chat.
    +     *
    +     * @param opened True if the chat is opened, false otherwise
    +     */
    +    private void setIconStatus(boolean opened) {
    +        String path;
    +        if (opened) {
    +            path = "/images/icons/right.png";
    +        } else {
    +            path = "/images/icons/left.png";
    +        }
    +        ImageView img = new ImageView(new Image(path));
    +        img.setFitHeight(35);
    +        img.setFitWidth(35);
    +        showChatBtn.setGraphic(img);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ConnectionSceneController.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ConnectionSceneController.html new file mode 100644 index 00000000..664595f1 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ConnectionSceneController.html @@ -0,0 +1 @@ +ConnectionSceneController

    ConnectionSceneController

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total425 of 4250%14 of 140%131310210266
    debuggingKeys()2990%100%66696911
    connect()650%40%33171711
    showLobby()300%n/a117711
    initialize()250%n/a116611
    ConnectionSceneController()30%n/a111111
    lambda$initialize$0(ActionEvent)30%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ConnectionSceneController.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ConnectionSceneController.java.html new file mode 100644 index 00000000..acd4d2bc --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ConnectionSceneController.java.html @@ -0,0 +1,167 @@ +ConnectionSceneController.java

    ConnectionSceneController.java

    package it.polimi.ingsw.client.frontend.gui.controllers;
    +
    +import java.io.IOException;
    +import java.rmi.RemoteException;
    +import java.util.ArrayList;
    +import java.util.List;
    +import it.polimi.ingsw.client.frontend.gui.GraphicalApplication;
    +import it.polimi.ingsw.client.frontend.gui.nodes.CardView;
    +import it.polimi.ingsw.client.network.NetworkHandler;
    +import it.polimi.ingsw.client.network.NetworkHandlerRMI;
    +import it.polimi.ingsw.client.network.NetworkHandlerTCP;
    +import it.polimi.ingsw.gamemodel.Color;
    +import it.polimi.ingsw.utils.AvailableMatch;
    +import it.polimi.ingsw.utils.GuiUtil;
    +import it.polimi.ingsw.utils.LeaderboardEntry;
    +import javafx.fxml.FXML;
    +import javafx.scene.Scene;
    +import javafx.scene.control.Button;
    +import javafx.scene.control.RadioButton;
    +import javafx.scene.control.TextField;
    +import javafx.scene.control.ToggleGroup;
    +import javafx.scene.layout.StackPane;
    +import javafx.scene.layout.VBox;
    +
    +/**
    + * Controller for the connection scene
    + */
    +public class ConnectionSceneController extends SceneController {
    +    public TextField serverAddress;
    +    public TextField serverPort;
    +    @FXML
    +    private RadioButton RMIButton;
    +    @FXML
    +    private RadioButton TCPButton;
    +    @FXML
    +    private Button connectButton;
    +    private ToggleGroup connectionGroup;
    +
    +    public void initialize() {
    +        // Set the toggle group
    +        connectionGroup = new ToggleGroup();
    +        RMIButton.setToggleGroup(connectionGroup);
    +        TCPButton.setToggleGroup(connectionGroup);
    +        TCPButton.setSelected(true);
    +        // Add callback for the button
    +        connectButton.setOnAction(event -> {
    +            connect();
    +        });
    +
    +    }
    +
    +    /**
    +     * Connect to the specified NetworkView
    +     */
    +    private void connect() {
    +        if (debuggingKeys()) {
    +            return;
    +        }
    +        NetworkHandler networkHandler = null;
    +        if (TCPButton.isSelected()) {
    +            try {
    +                networkHandler = new NetworkHandlerTCP(view, serverAddress.getText(), Integer.valueOf(serverPort.getText()));
    +                view.setNetworkHandler(networkHandler);
    +                showLobby();
    +            } catch (Exception e) {
    +                view.notifyError(new RemoteException("Cannot connect to the server!"));
    +            }
    +        } else {
    +            try {
    +                networkHandler = new NetworkHandlerRMI(view, serverAddress.getText(), Integer.parseInt(serverPort.getText()));
    +                view.setNetworkHandler(networkHandler);
    +                showLobby();
    +            } catch (Exception e) {
    +                view.notifyError(e);
    +            }
    +        }
    +    }
    +
    +    private void showLobby() throws IOException {
    +        StackPane root = this.loadScene("/fxml/lobby.fxml");
    +        GuiUtil.applyCSS(root, "/css/style.css");
    +        Scene lobbyScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
    +        LobbySceneController controller = (LobbySceneController) root.getProperties().get("Controller");
    +        view.setLobbySceneController(controller);
    +        stage.setScene(lobbyScene);
    +    }
    +
    +    private boolean debuggingKeys() {
    +        boolean res = false;
    +        String command = serverAddress.getText();
    +        if (command.equals("ranking")) {
    +            try {
    +                StackPane root = this.loadScene("/fxml/ranking.fxml");
    +                GuiUtil.applyCSS(root, "/css/style.css");
    +                RankingSceneController controller = (RankingSceneController) root.getProperties().get("Controller");
    +                Scene lobbyScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
    +                stage.setScene(lobbyScene);
    +                controller.setVictory(true);
    +                controller.addRanking(new LeaderboardEntry("Oingo", 20, true));
    +                controller.addRanking(new LeaderboardEntry("Boingo", 12, false));
    +                controller.addRanking(new LeaderboardEntry("Hol Horse", 10, false));
    +            } catch (Exception e) {
    +                throw new RuntimeException(e);
    +            }
    +            return true;
    +        } else if (command.equals("waiting")) {
    +            try {
    +                StackPane root = this.loadScene("/fxml/waiting.fxml");
    +                GuiUtil.applyCSS(root, "/css/style.css");
    +                WaitingSceneController controller = (WaitingSceneController) root.getProperties().get("Controller");
    +                Scene lobbyScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
    +                stage.setScene(lobbyScene);
    +                controller.setCurrentPlayers(3);
    +                controller.setMaxPlayers(4);
    +                controller.setMatchName("Marioh");
    +                controller.addPlayer("Oingo");
    +                controller.addPlayer("Boingo");
    +                controller.addPlayer("Hol Horse");
    +            } catch (Exception e) {
    +                throw new RuntimeException(e);
    +            }
    +            return true;
    +        } else if (command.equals("match")) {
    +            try {
    +                VBox root = this.loadScene("/fxml/match.fxml");
    +                GuiUtil.applyCSS(root, "/css/match.css");
    +                MatchSceneController controller = (MatchSceneController) root.getProperties().get("Controller");
    +                Scene lobbyScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
    +                stage.setScene(lobbyScene);
    +                controller.addPlayerTab("Oingo", Color.RED);
    +                PlayerTabController controller1 = controller.addPlayerTab("Boingo", Color.BLUE);
    +                controller1.setCurrentPlayer(true);
    +                CardView cardView = new CardView();
    +                ChatPaneController chatPaneController = controller.getChatPane();
    +                chatPaneController.addPlayer("Oingo");
    +                controller.setPlateauPoints("Boingo", 3);
    +                controller.setPlateauPoints("Oingo", 3);
    +
    +            } catch (Exception e) {
    +                throw new RuntimeException(e);
    +            }
    +            return true;
    +        } else if (command.startsWith("error")) {
    +            String errorMessage = command.replace("error ", "");
    +            view.notifyError(new Exception(errorMessage));
    +        } else if (command.equals("lobby")) {
    +            try {
    +                StackPane root = this.loadScene("/fxml/lobby.fxml");
    +                GuiUtil.applyCSS(root, "/css/style.css");
    +                LobbySceneController controller = (LobbySceneController) root.getProperties().get("Controller");
    +                List<AvailableMatch> matches = new ArrayList<>();
    +                matches.add(new AvailableMatch("New", 3, 2, true));
    +                matches.add(new AvailableMatch("New2", 3, 3, false));
    +                matches.add(new AvailableMatch("New3", 0, 3, false));
    +                controller.updateMatches(matches);
    +                Scene lobbyScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
    +                stage.setScene(lobbyScene);
    +
    +            } catch (IOException e) {
    +                throw new RuntimeException(e);
    +            }
    +            return true;
    +        }
    +        return res;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ErrorSceneController.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ErrorSceneController.html new file mode 100644 index 00000000..f36ec0f8 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ErrorSceneController.html @@ -0,0 +1 @@ +ErrorSceneController

    ErrorSceneController

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total30 of 300%0 of 0n/a66111166
    setErrror(Exception)110%n/a113311
    setText(String)50%n/a112211
    setTitle(String)50%n/a112211
    static {...}50%n/a112211
    ErrorSceneController()30%n/a111111
    initialize()10%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ErrorSceneController.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ErrorSceneController.java.html new file mode 100644 index 00000000..5e1e2b52 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/ErrorSceneController.java.html @@ -0,0 +1,52 @@ +ErrorSceneController.java

    ErrorSceneController.java

    package it.polimi.ingsw.client.frontend.gui.controllers;
    +
    +
    +import it.polimi.ingsw.utils.GuiUtil;
    +import javafx.fxml.FXML;
    +import javafx.scene.text.Text;
    +
    +import java.io.IOException;
    +
    +/**
    + * Controller of the error scene window
    + */
    +public class ErrorSceneController extends SceneController {
    +    // Window dimensions
    +    public static double windowWidth = 500;
    +    public static double windowHeight = 200;
    +    public Text errorTitle;
    +
    +    @FXML
    +    private Text errorText;
    +
    +    @Override
    +    public void initialize() throws IOException {
    +
    +    }
    +
    +    /**
    +     * Set the text of the error that is shown in the bottom
    +     * @param text text of the error
    +     */
    +    public void setText(String text) {
    +        errorText.setText(text);
    +    }
    +
    +    /**
    +     * Set the title of the error that is shown on the top
    +     * @param title text of the title
    +     */
    +    public void setTitle(String title) {
    +        errorTitle.setText(title);
    +    }
    +
    +    /**
    +     * Show an error from an exception
    +     * @param e exception
    +     */
    +    public void setErrror(Exception e) {
    +        errorTitle.setText(GuiUtil.getExceptionTitle(e));
    +        errorText.setText(e.getMessage());
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/LobbySceneController.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/LobbySceneController.html new file mode 100644 index 00000000..e5a4a0e6 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/LobbySceneController.html @@ -0,0 +1 @@ +LobbySceneController

    LobbySceneController

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total393 of 3930%22 of 220%222283831111
    addMatchCard(String, int, int, boolean)1760%80%55404011
    updateMatches(List)470%40%339911
    lambda$initializePostController$1(MouseEvent)430%60%447711
    lambda$initializePostController$2(MouseEvent)350%40%337711
    showWaitScene()270%n/a116611
    initializePostController()220%n/a115511
    refreshMatches()160%n/a114411
    initialize()150%n/a114411
    lambda$initializePostController$3(Node)60%n/a111111
    LobbySceneController()30%n/a111111
    lambda$initializePostController$0(MouseEvent)30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/LobbySceneController.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/LobbySceneController.java.html new file mode 100644 index 00000000..180bc7c2 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/LobbySceneController.java.html @@ -0,0 +1,170 @@ +LobbySceneController.java

    LobbySceneController.java

    package it.polimi.ingsw.client.frontend.gui.controllers;
    +
    +import it.polimi.ingsw.client.frontend.gui.GraphicalApplication;
    +import it.polimi.ingsw.exceptions.WrongInputFormatException;
    +import it.polimi.ingsw.gamemodel.Color;
    +import it.polimi.ingsw.utils.AvailableMatch;
    +import it.polimi.ingsw.utils.GuiUtil;
    +import javafx.fxml.FXML;
    +import javafx.geometry.Pos;
    +import javafx.scene.Scene;
    +import javafx.scene.control.*;
    +import javafx.scene.layout.*;
    +import javafx.scene.shape.Circle;
    +
    +import java.io.IOException;
    +import java.util.List;
    +
    +public class LobbySceneController extends SceneController {
    +    @FXML
    +    public TextField createUsername;
    +    @FXML
    +    public TextField matchName;
    +    @FXML
    +    public HBox matchNumberContainer;
    +    public Label joinTitle;
    +    @FXML
    +    VBox matchContainer;
    +    @FXML
    +    ScrollPane lobbyScrollPane;
    +    @FXML
    +    Button joinButton;
    +    @FXML
    +    TextField joinUsername;
    +    @FXML
    +    Button createButton;
    +    ToggleGroup matchJoinToggle;
    +    ToggleGroup matchNumberToggle;
    +
    +    public void initialize() {
    +        matchJoinToggle = new ToggleGroup();
    +        matchNumberToggle = new ToggleGroup();
    +        lobbyScrollPane.getStyleClass().clear();
    +    }
    +
    +    @Override
    +    public void initializePostController() {
    +        joinTitle.setOnMouseClicked((event) -> refreshMatches());
    +        createButton.setOnMouseClicked((e) -> {
    +            RadioButton radioButton = (RadioButton) matchNumberToggle.getSelectedToggle();
    +            if (radioButton.getText().isEmpty() || createUsername.getText().isEmpty() || matchName.getText().isEmpty() ) {
    +                view.notifyError(new WrongInputFormatException("Username or match name or max players not chosen"));
    +                return;
    +            }
    +            view.setUsername(createUsername.getText());
    +            view.createMatch(matchName.getText(), Integer.valueOf(radioButton.getText()));
    +
    +        });
    +        joinButton.setOnMouseClicked((e) -> {
    +            view.setUsername(joinUsername.getText());
    +            RadioButton radiobutton = (RadioButton) matchJoinToggle.getSelectedToggle();
    +            if (radiobutton == null || joinUsername.getText().isEmpty() ) {
    +                view.notifyError(new WrongInputFormatException("Username or match not chosen"));
    +                return;
    +            }
    +            view.joinMatch((String) radiobutton.getProperties().get("matchName"));
    +        });
    +        matchNumberContainer.getChildren().forEach((button) -> {((RadioButton) button).setToggleGroup(matchNumberToggle);});
    +    }
    +
    +    /**
    +     * Show the wait scene
    +     * @return the wait scene controller
    +     * @throws IOException in case of file error
    +     */
    +    public WaitingSceneController showWaitScene() throws IOException {
    +        StackPane root = loadScene("/fxml/waiting.fxml");
    +        GuiUtil.applyCSS(root, "/css/match.css");
    +        WaitingSceneController controller = (WaitingSceneController) root.getProperties().get("Controller");
    +        Scene matchScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
    +        stage.setScene(matchScene);
    +        return controller;
    +    }
    +
    +    private void refreshMatches() {
    +        matchContainer.getChildren().clear();
    +        matchContainer.getChildren().add(new ProgressIndicator());
    +        view.getAvailableMatches();
    +    }
    +
    +    /**
    +     * Set the matches displayed
    +     * @param matchList List of the current available matches
    +     */
    +    public void updateMatches(List<AvailableMatch> matchList) {
    +        matchContainer.getChildren().clear();
    +        if (matchList.isEmpty()) {
    +            Label emptyLabel = new Label("There is no match");
    +            emptyLabel.getStyleClass().add("input-label");
    +            matchContainer.getChildren().add(emptyLabel);
    +        }
    +        for (AvailableMatch m : matchList) {
    +            addMatchCard(m.name(), m.currentPlayers(), m.maxPlayers(), m.isRejoinable());
    +        }
    +    }
    +
    +    /**
    +     * Create the container for a Match
    +     * @param name name of the match
    +     * @param players current amount of players
    +     * @param maxPlayers maximum number of players allowed in the match
    +     * @param isRejoinable if the match is rejoinable
    +     */
    +    public void addMatchCard(String name, int players, int maxPlayers, boolean isRejoinable) {
    +        Color c;
    +        if (isRejoinable) {
    +            c = Color.YELLOW;
    +        } else if (maxPlayers == players) {
    +            c = Color.RED;
    +        } else {
    +            c = Color.GREEN;
    +        }
    +
    +
    +        HBox matchCard = new HBox();
    +        matchCard.getStyleClass().add("lobby-card");
    +        matchCard.getStyleClass().add("lobby-card-" + matchContainer.getChildren().size()%2);
    +        matchCard.setAlignment(Pos.CENTER);
    +
    +        RadioButton button = new RadioButton();
    +        button.setDisable(players == maxPlayers && !isRejoinable);
    +        button.setAlignment(Pos.CENTER);
    +        button.getStyleClass().add("radio");
    +        button.getStyleClass().add("lobby-radio");
    +        button.setToggleGroup(this.matchJoinToggle);
    +        button.getProperties().put("matchName", name);
    +        //button.setText(name);
    +        matchCard.getChildren().add(button);
    +
    +        Label nameLabel = new Label(name);
    +        nameLabel.setAlignment(Pos.CENTER);
    +        nameLabel.getStyleClass().add("lobby-title");
    +        matchCard.getChildren().add(nameLabel);
    +
    +        Pane spacer = new Pane();
    +        HBox.setHgrow(spacer, Priority.ALWAYS);
    +        matchCard.getChildren().add(spacer);
    +
    +
    +        // Match status indicator
    +        Circle status = new Circle();
    +        spacer = new Pane();
    +        spacer.setPrefWidth(3);
    +        status.setFill(javafx.scene.paint.Color.web(GuiUtil.getHexFromColor(c)));
    +        status.setRadius(16);
    +        // Players label
    +        Label playerLabel = new Label(players + "/" + maxPlayers);
    +        playerLabel.setAlignment(Pos.CENTER);
    +        playerLabel.getStyleClass().add("lobby-title");
    +        matchCard.getChildren().add(playerLabel);
    +        matchCard.getChildren().add(spacer);
    +        matchCard.getChildren().add(status);
    +
    +        Pane spacer2 = new Pane();
    +        spacer2.setPrefWidth(5);
    +        matchCard.getChildren().add(spacer2);
    +
    +        matchContainer.getChildren().add(matchCard);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/MatchSceneController.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/MatchSceneController.html new file mode 100644 index 00000000..c2886595 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/MatchSceneController.html @@ -0,0 +1 @@ +MatchSceneController

    MatchSceneController

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total330 of 3300%19 of 190%313165651919
    initializePostController()680%n/a11151511
    addPlayerTab(String, Color)600%n/a11151511
    enableDrawSourcesInteractions(boolean)490%120%777711
    setDrawSource(DrawSource, PlayableCard, Symbol)390%70%778811
    showRankingScene()250%n/a115511
    setObjectives(Pair)150%n/a113311
    setFocus(String)100%n/a112211
    MatchSceneController()80%n/a112211
    getChatPane()70%n/a111111
    setFocusToTable()70%n/a112211
    setPlateauPoints(String, int)60%n/a112211
    setStateTitle(String)50%n/a112211
    lambda$initializePostController$5(MouseEvent)50%n/a111111
    lambda$initializePostController$4(MouseEvent)50%n/a111111
    lambda$initializePostController$3(MouseEvent)50%n/a111111
    lambda$initializePostController$2(MouseEvent)50%n/a111111
    lambda$initializePostController$1(MouseEvent)50%n/a111111
    lambda$initializePostController$0(MouseEvent)50%n/a111111
    initialize()10%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/MatchSceneController.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/MatchSceneController.java.html new file mode 100644 index 00000000..bb97f1bc --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/MatchSceneController.java.html @@ -0,0 +1,195 @@ +MatchSceneController.java

    MatchSceneController.java

    package it.polimi.ingsw.client.frontend.gui.controllers;
    +
    +import it.polimi.ingsw.client.frontend.gui.GraphicalApplication;
    +import it.polimi.ingsw.client.frontend.gui.nodes.CardView;
    +
    +import it.polimi.ingsw.client.frontend.gui.nodes.PlateauPane;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.utils.GuiUtil;
    +import it.polimi.ingsw.utils.Pair;
    +import javafx.fxml.FXML;
    +import javafx.fxml.FXMLLoader;
    +import javafx.scene.Cursor;
    +import javafx.scene.Scene;
    +import javafx.scene.control.Label;
    +import javafx.scene.control.Tab;
    +import javafx.scene.control.TabPane;
    +import javafx.scene.image.Image;
    +import javafx.scene.image.ImageView;
    +import javafx.scene.layout.*;
    +import javafx.scene.paint.Paint;
    +import javafx.scene.shape.Circle;
    +
    +import java.io.IOException;
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +/**
    + * JavaFX controller of the match scene
    + */
    +public class MatchSceneController extends SceneController {
    +    public Tab tableTab;
    +    public Label stateTitle;
    +    @FXML
    +    TabPane matchTabs;
    +    @FXML
    +    AnchorPane matchPane;
    +
    +    public CardView goldsDeck;
    +    public CardView resourcesDeck;
    +    public CardView firstVisible;
    +    public CardView secondVisible;
    +    public CardView thirdVisible;
    +    public CardView fourthVisible;
    +    public CardView firstObjective;
    +    public CardView secondObjective;
    +    public PlateauPane plateauPane;
    +    public HBox chatPane;
    +    Map<String, Tab> tabs = new HashMap<>();
    +
    +    public void initialize() {
    +    }
    +
    +    @Override
    +    public void initializePostController() throws IOException {
    +        goldsDeck.setOnMouseClicked((clickEvent) -> view.drawCard(DrawSource.GOLDS_DECK));
    +        goldsDeck.setCursor(Cursor.HAND);
    +        resourcesDeck.setOnMouseClicked((clickEvent) -> view.drawCard(DrawSource.RESOURCES_DECK));
    +        resourcesDeck.setCursor(Cursor.HAND);
    +        firstVisible.setOnMouseClicked((clickEvent) -> view.drawCard(DrawSource.FIRST_VISIBLE));
    +        firstVisible.setCursor(Cursor.HAND);
    +        secondVisible.setOnMouseClicked((clickEvent) -> view.drawCard(DrawSource.SECOND_VISIBLE));
    +        secondVisible.setCursor(Cursor.HAND);
    +        thirdVisible.setOnMouseClicked((clickEvent) -> view.drawCard(DrawSource.THIRD_VISIBLE));
    +        thirdVisible.setCursor(Cursor.HAND);
    +        fourthVisible.setOnMouseClicked((clickEvent) -> view.drawCard(DrawSource.FOURTH_VISIBLE));
    +        fourthVisible.setCursor(Cursor.HAND);
    +
    +        // Load the chat pane
    +        chatPane = loadScene("/fxml/chat.fxml");
    +        matchPane.getChildren().add(chatPane);
    +    }
    +
    +    /**
    +     * Add the tab of the given player
    +     * @param username username of the player
    +     * @param color color of the player
    +     * @return controller of the created player tab
    +     * @throws IOException if there are file errors
    +     */
    +    public PlayerTabController addPlayerTab(String username, Color color) throws IOException {
    +        // Load the tab
    +        FXMLLoader loader = GuiUtil.getLoader("/fxml/player_tab.fxml");
    +        Tab t = loader.load();
    +        setControllerAttributes(loader);
    +        // Add the tab
    +        t.setText(username);
    +        Circle icon = new Circle();
    +        icon.setRadius(15);
    +        icon.setFill(javafx.scene.paint.Color.web(GuiUtil.getHexFromColor(color)));
    +        t.setGraphic(icon);
    +        matchTabs.getTabs().add(t);
    +        // Add properties to the controller
    +        PlayerTabController controller = loader.getController();
    +        controller.setUsername(username);
    +        t.getProperties().put("Controller", controller);
    +        // Add colored pawn
    +        plateauPane.setColor(username, color);
    +        tabs.put(username, t);
    +        return controller;
    +    }
    +
    +    /**
    +     * Set the displayed card for the given draw source
    +     * @param source Source of the draw
    +     * @param replacementCard Replacement card, can be null
    +     * @param replacementReign Replacement reign, can be null
    +     */
    +    public void setDrawSource (DrawSource source, PlayableCard replacementCard, Symbol replacementReign) {
    +        switch (source) {
    +            case DrawSource.GOLDS_DECK -> goldsDeck.setGoldsCardBack(replacementReign);
    +            case DrawSource.RESOURCES_DECK -> resourcesDeck.setResourcesCardBack(replacementReign);
    +            case DrawSource.FIRST_VISIBLE -> firstVisible.setCard(replacementCard, Side.FRONT);
    +            case DrawSource.SECOND_VISIBLE -> secondVisible.setCard(replacementCard, Side.FRONT);
    +            case DrawSource.THIRD_VISIBLE -> thirdVisible.setCard(replacementCard, Side.FRONT);
    +            case DrawSource.FOURTH_VISIBLE -> fourthVisible.setCard(replacementCard, Side.FRONT);
    +        }
    +    }
    +
    +    /**
    +     * Set the visible objectives cards
    +     * @param objectives pair of the objectives
    +     */
    +    public void setObjectives(Pair<Objective, Objective> objectives) {
    +        firstObjective.setCard(objectives.first(), Side.FRONT);
    +        secondObjective.setCard(objectives.second(), Side.FRONT);
    +    }
    +
    +    /**
    +     * Move the player pawn on the plateau
    +     * @param username username of the player to move
    +     * @param points total amount of points of the player
    +     */
    +    public void setPlateauPoints(String username, int points) {
    +        this.plateauPane.setPoints(username, points);
    +    }
    +
    +    /**
    +     * Show the ranking scene on match end
    +     * @return ranking scene controller
    +     * @throws IOException on file errors
    +     */
    +    public RankingSceneController showRankingScene() throws IOException {
    +        StackPane root = loadScene("/fxml/ranking.fxml");
    +        Scene rankingScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
    +        GuiUtil.applyCSS(root, "/css/style.css");
    +        stage.setScene(rankingScene);
    +        return (RankingSceneController) root.getProperties().get("Controller");
    +    }
    +
    +    /**
    +     * Get the chat pane controller
    +     * @return the chat pane controller
    +     */
    +    public ChatPaneController getChatPane() {
    +        return (ChatPaneController) chatPane.getProperties().get("Controller");
    +    }
    +
    +    /**
    +     * Force the focus on a player's tab
    +     * @param username username of the player
    +     */
    +    public void setFocus(String username) {
    +        matchTabs.getSelectionModel().select(tabs.get(username));
    +    }
    +
    +    /**
    +     *
    +     */
    +    public void setFocusToTable() {
    +        matchTabs.getSelectionModel().select(tableTab);
    +    }
    +
    +    /**
    +     * Enables/disables mouse interactions with draw sources.
    +     *
    +     * @param enable True if interactions should be enabled, false otherwise
    +     */
    +    public void enableDrawSourcesInteractions(boolean enable) {
    +        goldsDeck.setDisable(!enable);
    +        resourcesDeck.setDisable(!enable);
    +        firstVisible.setDisable(!enable);
    +        secondVisible.setDisable(!enable);
    +        thirdVisible.setDisable(!enable);
    +        fourthVisible.setDisable(!enable);
    +    }
    +
    +    /**
    +     * Set the current state title to express an action while playing
    +     * @param text title
    +     */
    +    public void setStateTitle(String text) {
    +        stateTitle.setText(text);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/PlayerTabController.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/PlayerTabController.html new file mode 100644 index 00000000..d5403f73 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/PlayerTabController.html @@ -0,0 +1 @@ +PlayerTabController

    PlayerTabController

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total853 of 8530%42 of 420%55551801803434
    setResources(Map)940%20%22111111
    createDragArea(PlayableCard, Side)800%140%88121211
    showDragArea(Pair, PlayableCard, Side)700%n/a11151511
    lambda$initializeHandCard$0(CardView, MouseEvent)610%n/a11131311
    lambda$initializeHandCard$2(CardView, MouseEvent)510%80%559911
    createCardChoiceContainer(CardView, CardView)450%n/a11101011
    giveSecretObjectives(Pair)410%n/a119911
    setSecretObjective(Objective)390%20%227711
    giveInitialCard(InitialCard)350%n/a119911
    someoneDrewSecretObjective()330%n/a115511
    setHandCards(List)310%20%227711
    initialize()290%20%227711
    someoneDrewInitialCard(InitialCard)230%n/a115511
    removeDragAreas()220%20%225511
    initializeHandCard(CardView)190%n/a115511
    lambda$showDragArea$3(DragEvent)190%40%334411
    setCurrentPlayer(boolean)160%20%224411
    lambda$showDragArea$5(Pair, PlayableCard, Side, MouseEvent)160%20%225511
    lambda$showDragArea$4(Pair, PlayableCard, Side, DragEvent)140%n/a115511
    lambda$initializeHandCard$1(CardView, DragEvent)140%n/a116611
    removePlayerChoiceContainer()120%n/a113311
    setUsername(String)110%n/a113311
    enablePlaceCardInteractions(boolean)90%20%222211
    PlayerTabController()80%n/a112211
    lambda$showDragArea$7(Pane, DragEvent)80%n/a113311
    lambda$showDragArea$6(Pane, DragEvent)80%n/a113311
    placeCard(Pair, PlayableCard, Side)70%n/a112211
    lambda$giveSecretObjectives$9(Pair, MouseEvent)70%n/a111111
    lambda$giveSecretObjectives$8(Pair, MouseEvent)70%n/a111111
    setPoints(int)60%n/a112211
    setStateTitle(String)50%n/a112211
    lambda$giveInitialCard$11(MouseEvent)50%n/a112211
    lambda$giveInitialCard$10(MouseEvent)50%n/a112211
    getBoard()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/PlayerTabController.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/PlayerTabController.java.html new file mode 100644 index 00000000..5e5d6f08 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/PlayerTabController.java.html @@ -0,0 +1,401 @@ +PlayerTabController.java

    PlayerTabController.java

    package it.polimi.ingsw.client.frontend.gui.controllers;
    +
    +import it.polimi.ingsw.client.frontend.gui.nodes.BoardPane;
    +import it.polimi.ingsw.client.frontend.gui.nodes.CardView;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.utils.CardsManager;
    +import it.polimi.ingsw.utils.Pair;
    +import javafx.fxml.FXML;
    +import javafx.geometry.Insets;
    +import javafx.geometry.Pos;
    +import javafx.scene.Cursor;
    +import javafx.scene.Node;
    +import javafx.scene.control.Label;
    +import javafx.scene.control.ScrollPane;
    +import javafx.scene.control.Tab;
    +import javafx.scene.image.Image;
    +import javafx.scene.image.ImageView;
    +import javafx.scene.input.ClipboardContent;
    +import javafx.scene.input.Dragboard;
    +import javafx.scene.input.MouseButton;
    +import javafx.scene.input.TransferMode;
    +import javafx.scene.layout.HBox;
    +import javafx.scene.layout.Pane;
    +import javafx.scene.layout.StackPane;
    +
    +import java.util.ArrayList;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * Controller of the player tab
    + */
    +public class PlayerTabController extends SceneController {
    +    public HBox handCards;
    +    @FXML
    +    private StackPane rootPane;
    +    @FXML
    +    private Tab playerTab;
    +    private String username;
    +    @FXML
    +    BoardPane playerBoard;
    +    @FXML
    +    ScrollPane scroll;
    +    @FXML
    +    HBox resourcesCounter;
    +    @FXML
    +    Label pointsCounter;
    +    @FXML
    +    Label stateTitle;
    +    HBox actionContainer;
    +    private final List<Node> temporaryDragAreas = new ArrayList<>();
    +
    +    public void initialize() {
    +        scroll.getStyleClass().clear();
    +
    +        HashMap<Symbol, Integer> res = new HashMap<>();
    +        for (Symbol s : Symbol.getBasicResources()) {
    +            res.put(s, 0);
    +        }
    +        setResources(res);
    +    }
    +
    +    /**
    +     * Set the displayed resources
    +     *
    +     * @param resources map to the resources amount
    +     */
    +    public void setResources(Map<Symbol, Integer> resources) {
    +        resourcesCounter.getChildren().clear();
    +        Symbol[] order = new Symbol[]{Symbol.FUNGUS, Symbol.PLANT, Symbol.ANIMAL, Symbol.INSECT,
    +                Symbol.FEATHER, Symbol.PARCHMENT, Symbol.INKWELL};
    +        for (Symbol s : order) {
    +            ImageView icon = new ImageView(new Image("/images/symbols/" + s.toString().toUpperCase() + ".png"));
    +            icon.setFitHeight(40);
    +            icon.setFitWidth(40);
    +            Label count = new Label(String.valueOf(resources.get(s)));
    +            count.getStyleClass().add("resources-count");
    +            resourcesCounter.getChildren().add(icon);
    +            resourcesCounter.getChildren().add(count);
    +        }
    +    }
    +
    +    /**
    +     * Places a card on the board
    +     *
    +     * @param coords
    +     * @param card
    +     * @param side
    +     */
    +    public void placeCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) {
    +        playerBoard.addCard(coords, card, side);
    +    }
    +
    +    /**
    +     * Set the amount of points that the player has
    +     * @param points amount of points
    +     */
    +    public void setPoints(int points) {
    +        pointsCounter.setText("Points: " + points);
    +    }
    +
    +    // Drag and drop management
    +
    +    /**
    +     * Add attributes to the hand card
    +     *
    +     * @param card CardView to add attributes
    +     */
    +    private void initializeHandCard(CardView card) {
    +        card.setCursor(Cursor.OPEN_HAND);
    +        card.setOnDragDetected(event -> {
    +            // Set Dragboard content
    +            Dragboard dragboard = card.startDragAndDrop(TransferMode.MOVE);
    +            ClipboardContent content = new ClipboardContent();
    +            content.putString("");
    +            dragboard.setContent(content);
    +            // Set the card as image of the dragboard
    +            card.setArc(0);
    +            dragboard.setDragView(card.snapshot(null, null));
    +            dragboard.setDragViewOffsetX(CardView.cardWidth / 2);
    +            dragboard.setDragViewOffsetY(CardView.cardHeight / 2);
    +            this.createDragArea((PlayableCard) card.getProperties().get("Card"), (Side) card.getProperties().get("Side"));
    +            card.setVisible(false);
    +            card.setCursor(Cursor.CLOSED_HAND);
    +            event.consume();
    +        });
    +        card.setOnDragDone(event -> {
    +            this.removeDragAreas();
    +            card.setArc(20);
    +            card.setVisible(true);
    +            card.setCursor(Cursor.DEFAULT);
    +            event.consume();
    +        });
    +        card.setOnMouseClicked((clickEvent) -> {
    +            if (clickEvent.getButton() == MouseButton.SECONDARY) {
    +                Side side = (Side) card.getProperties().get("Side");
    +                Side newSide = side.equals(Side.BACK) ? Side.FRONT : Side.BACK;
    +                card.setCard((PlayableCard) card.getProperties().get("Card"), newSide);
    +            } else if (clickEvent.getButton() == MouseButton.MIDDLE) {
    +                // Compatibility with Hyprland
    +                if (this.temporaryDragAreas.size() > 0) {
    +                    this.removeDragAreas();
    +                } else {
    +                    this.createDragArea((PlayableCard) card.getProperties().get("Card"), (Side) card.getProperties().get("Side"));
    +                }
    +            }
    +        });
    +    }
    +
    +    /**
    +     * Create all possible drag areas on the board
    +     *
    +     * @param card Card to place
    +     * @param side Side on which place the card
    +     */
    +    private void createDragArea(PlayableCard card, Side side) {
    +        List<Pair<Integer, Integer>> placeableCoords = new ArrayList<>();
    +        for (Pair<Integer, Integer> coords : playerBoard.takenSpots) {
    +            for (int i = -1; i < 2; i++) {
    +                for (int j = -1; j < 2; j++) {
    +                    if (i != 0 && j != 0) {
    +                        Pair<Integer, Integer> c = new Pair<>(coords.first() + i, coords.second() + j);
    +                        if (!playerBoard.takenSpots.contains(c)) placeableCoords.add(c);
    +                    }
    +                }
    +            }
    +        }
    +        for (Pair<Integer, Integer> c : placeableCoords) {
    +            showDragArea(c, card, side);
    +        }
    +    }
    +
    +    /**
    +     * Create a drag area in the specified coordinates, for the specified card on a certain side
    +     *
    +     * @param pcoords Game coordinates on which to put the area
    +     * @param card    Card where to put the area
    +     * @param side    Side on which to put the card
    +     */
    +    private void showDragArea(Pair<Integer, Integer> pcoords, PlayableCard card, Side side) {
    +        Pane dragArea = new Pane();
    +        dragArea.getStyleClass().add("place-spot");
    +        // Set area position
    +        Pair<Double, Double> gcoords = playerBoard.convertCoordinates(pcoords);
    +        dragArea.setLayoutX(gcoords.first());
    +        dragArea.setLayoutY(gcoords.second());
    +        // Set area size
    +        dragArea.setPrefHeight(CardView.cardHeight);
    +        dragArea.setPrefWidth(CardView.cardWidth);
    +
    +        // When you drag over the area accept the drag
    +        dragArea.setOnDragOver(event -> {
    +            if (event.getGestureSource() != this && event.getDragboard().hasString()) {
    +                event.acceptTransferModes(TransferMode.MOVE);
    +            }
    +            event.consume();
    +        });
    +        // When you drop on the area do the needed actions
    +        dragArea.setOnDragDropped(event -> {
    +            event.setDropCompleted(true);
    +            this.removeDragAreas();
    +            // Play the card
    +            view.playCard(pcoords, card, side);
    +            event.consume();
    +        });
    +        dragArea.setOnMouseClicked(event -> {
    +            if (event.getButton().equals(MouseButton.PRIMARY)) {
    +                this.removeDragAreas();
    +                // Play the card
    +                view.playCard(pcoords, card, side);
    +                event.consume();
    +            }
    +        });
    +
    +        // When you enter the area change style
    +        dragArea.setOnDragEntered(event -> {
    +            dragArea.getStyleClass().add("place-spot-hover");
    +            event.consume();
    +        });
    +        // When you exit the area change style
    +        dragArea.setOnDragExited(event -> {
    +            dragArea.getStyleClass().remove("place-spot-hover");
    +            event.consume();
    +        });
    +        playerBoard.getChildren().add(dragArea);
    +        temporaryDragAreas.add(dragArea);
    +    }
    +
    +    /**
    +     * Remove all temporary drag areas from player board
    +     */
    +    private void removeDragAreas() {
    +        for (Node n : temporaryDragAreas) {
    +            playerBoard.getChildren().remove(n);
    +        }
    +        temporaryDragAreas.clear();
    +    }
    +
    +    /**
    +     * Current player has to choose the secret objective
    +     * @param objectives the two objectives to choose
    +     */
    +    public void giveSecretObjectives(Pair<Objective, Objective> objectives) {
    +        stateTitle.setText("Choose your secret objective");
    +        CardView first = new CardView(objectives.first(), Side.FRONT);
    +        CardView second = new CardView(objectives.second(), Side.FRONT);
    +        createCardChoiceContainer(first, second);
    +        first.setCursor(Cursor.HAND);
    +        second.setCursor(Cursor.HAND);
    +        first.setOnMouseClicked((mouseEvent) -> view.chooseSecretObjective(objectives.first()));
    +        second.setOnMouseClicked((mouseEvent -> view.chooseSecretObjective(objectives.second())));
    +    }
    +
    +    /**
    +     * Another player is choosing the secret objective
    +     */
    +    public void someoneDrewSecretObjective() {
    +        stateTitle.setText(username + " is choosing the secret objective");
    +        CardView first = new CardView(CardsManager.getInstance().getObjectives().get(1), Side.BACK);
    +        CardView second = new CardView(CardsManager.getInstance().getObjectives().get(1), Side.BACK);
    +        createCardChoiceContainer(first, second);
    +    }
    +
    +    /**
    +     * The current player is choosing the initial card side
    +     * @param card given initial card
    +     */
    +    public void giveInitialCard(InitialCard card) {
    +        stateTitle.setText("Choose your card");
    +        CardView front = new CardView(card, Side.FRONT);
    +        CardView back = new CardView(card, Side.BACK);
    +        createCardChoiceContainer(front, back);
    +        front.setCursor(Cursor.HAND);
    +        front.setOnMouseClicked((e) -> {
    +            view.chooseInitialCardSide(Side.FRONT);
    +        });
    +        back.setCursor(Cursor.HAND);
    +        back.setOnMouseClicked((e) -> {
    +            view.chooseInitialCardSide(Side.BACK);
    +        });
    +    }
    +
    +    /**
    +     * Show that someone is choosing the initial card side
    +     * @param card initial card
    +     */
    +    public void someoneDrewInitialCard(InitialCard card) {
    +        stateTitle.setText(username + " is choosing the initial card side...");
    +        CardView front = new CardView(card, Side.FRONT);
    +        CardView back = new CardView(card, Side.BACK);
    +        createCardChoiceContainer(front, back);
    +    }
    +
    +    /**
    +     * Remove the container that asks for initials card, objective cards..
    +     */
    +    public void removePlayerChoiceContainer() {
    +        rootPane.getChildren().remove(actionContainer);
    +        stateTitle.setText("");
    +    }
    +
    +    /**
    +     * Creates the container to show the choice of initials card or objectives
    +     *
    +     * @param front First option to show
    +     * @param back  Second option to show
    +     */
    +    private void createCardChoiceContainer(CardView front, CardView back) {
    +        actionContainer = new HBox();
    +        // Add CardViews
    +        actionContainer.getChildren().add(front);
    +        actionContainer.getChildren().add(back);
    +        // Set container properties
    +        actionContainer.setMaxHeight(Double.NEGATIVE_INFINITY);
    +        actionContainer.setMaxWidth(Double.NEGATIVE_INFINITY);
    +        actionContainer.setSpacing(30);
    +        // Set alignment and add to the rootPane
    +        actionContainer.setAlignment(Pos.BASELINE_CENTER);
    +        rootPane.getChildren().add(actionContainer);
    +        StackPane.setAlignment(actionContainer, Pos.CENTER);
    +    }
    +
    +    /**
    +     * Set the player username
    +     * @param username username of the player
    +     */
    +    public void setUsername(String username) {
    +        this.username = username;
    +        playerTab.getProperties().put("Username", username);
    +    }
    +
    +    /**
    +     * Get the Board Pane of the player
    +     * @return the board pane
    +     */
    +    public BoardPane getBoard() {
    +        return playerBoard;
    +    }
    +
    +    /**
    +     * Set the secret objective for the current player
    +     * @param objective objective to set
    +     */
    +    public void setSecretObjective(Objective objective) {
    +        CardView secretObjective;
    +        if (objective != null) {
    +            secretObjective = new CardView(objective, Side.FRONT);
    +        } else {
    +            secretObjective = new CardView(CardsManager.getInstance().getObjectives().get(2), Side.BACK);
    +        }
    +        StackPane.setAlignment(secretObjective, Pos.BOTTOM_LEFT);
    +        StackPane.setMargin(secretObjective, new Insets(0, 100, 100, 0));
    +
    +        rootPane.getChildren().add(secretObjective);
    +    }
    +
    +    /**
    +     * Set state title, usually used to tell the player what to do
    +     * @param title text of the title
    +     */
    +    public void setStateTitle(String title) {
    +        this.stateTitle.setText(title);
    +    }
    +
    +    /**
    +     * Set player hand cards
    +     * @param cards list of cards currently in the player's hand
    +     */
    +    public void setHandCards(List<PlayableCard> cards) {
    +        handCards.getChildren().clear();
    +        for (PlayableCard card : cards) {
    +            CardView handCard = new CardView(card, Side.FRONT);
    +            initializeHandCard(handCard);
    +            handCards.getChildren().add(handCard);
    +        }
    +    }
    +
    +    /**
    +     * Set if the player is the current one
    +     * @param current if the player is current
    +     */
    +    public void setCurrentPlayer(boolean current) {
    +        if (current) {
    +            playerTab.getStyleClass().add("player-tab");
    +        } else {
    +            playerTab.getStyleClass().remove("player-tab");
    +        }
    +    }
    +
    +    /**
    +     * Enables/disables mouse interactions with hand cards.
    +     *
    +     * @param enable True if interactions should be enabled, false otherwise
    +     */
    +    public void enablePlaceCardInteractions(boolean enable) {
    +        handCards.setDisable(!enable);
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/RankingSceneController.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/RankingSceneController.html new file mode 100644 index 00000000..9eeacacd --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/RankingSceneController.html @@ -0,0 +1 @@ +RankingSceneController

    RankingSceneController

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total158 of 1580%6 of 60%1111363688
    addRanking(LeaderboardEntry)980%40%33171711
    showConnectionScene()300%n/a117711
    setVictory(boolean)120%20%224411
    initializePostController()60%n/a112211
    lambda$initializePostController$0(ActionEvent)50%n/a113311
    RankingSceneController()30%n/a111111
    static {...}30%n/a111111
    initialize()10%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/RankingSceneController.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/RankingSceneController.java.html new file mode 100644 index 00000000..54a4bbff --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/RankingSceneController.java.html @@ -0,0 +1,98 @@ +RankingSceneController.java

    RankingSceneController.java

    package it.polimi.ingsw.client.frontend.gui.controllers;
    +
    +import it.polimi.ingsw.client.frontend.gui.GraphicalApplication;
    +import it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI;
    +import it.polimi.ingsw.utils.GuiUtil;
    +import it.polimi.ingsw.utils.LeaderboardEntry;
    +import javafx.geometry.Pos;
    +import javafx.scene.Scene;
    +import javafx.scene.control.Button;
    +import javafx.scene.control.Label;
    +import javafx.scene.layout.StackPane;
    +import javafx.scene.layout.VBox;
    +
    +import java.io.IOException;
    +
    +/**
    + * JavaFX Controller of the ranking scene, shows the leaderboard after the match is finished
    + */
    +public class RankingSceneController extends SceneController {
    +
    +    public VBox leaderboardContainer;
    +    public static double tableSize = 700;
    +    public Label victoryLabel;
    +    public Button playAgainButton;
    +
    +    @Override
    +    public void initialize() throws IOException {
    +
    +    }
    +
    +    @Override
    +    public void initializePostController() {
    +        playAgainButton.setOnAction(event -> {
    +            try {
    +                showConnectionScene();
    +            } catch (IOException e) {}
    +        });
    +    }
    +
    +    /**
    +     * Add an entry to the graphical leaderboard
    +     * @param entry the entry
    +     */
    +    public void addRanking(LeaderboardEntry entry) {
    +        StackPane row = new StackPane();
    +        row.setMaxHeight(Double.NEGATIVE_INFINITY);
    +        row.setMinWidth(tableSize);
    +
    +        // Add player label
    +        Label playerLabel = new Label(entry.username());
    +        playerLabel.setMaxWidth(tableSize/3);
    +        StackPane.setAlignment(playerLabel, Pos.CENTER_LEFT);
    +        playerLabel.getStyleClass().add("leaderboard-player-label");
    +
    +        // Add player points
    +        Label playerPoints = new Label(String.valueOf(entry.points()) + " points");
    +        StackPane.setAlignment(playerPoints, Pos.CENTER);
    +        playerPoints.getStyleClass().add("leaderboard-points");
    +
    +        // Add player result
    +        Label playerResult = new Label(entry.winner() ? "Winner" : "Loser");
    +        StackPane.setAlignment(playerResult, Pos.CENTER_RIGHT);
    +        playerResult.getStyleClass().add("leaderboard-result");
    +        playerResult.getStyleClass().add(entry.winner() ? "leaderboard-winner" : "leaderboard-loser");
    +
    +        // Add elements to parents
    +        row.getChildren().addAll(playerLabel, playerPoints, playerResult);
    +        leaderboardContainer.getChildren().add(row);
    +    }
    +
    +    /**
    +     * Set if the player has won the match
    +     * @param victory if the current player has won
    +     */
    +    public void setVictory(boolean victory) {
    +        if (victory) {
    +            victoryLabel.setText("Victory");
    +        } else {
    +            victoryLabel.setText("Defeat");
    +        }
    +    }
    +
    +    /**
    +     * Show the connection scene
    +     * @throws IOException in case of file errors
    +     */
    +    public void showConnectionScene() throws IOException {
    +        view.disconnect();
    +        view = new GraphicalViewGUI(stage);
    +        StackPane root = this.loadScene("/fxml/connection.fxml");
    +        // Add stylesheet
    +        GuiUtil.applyCSS(root, "/css/style.css");
    +        // Create the connection scene
    +        Scene connectionScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
    +        stage.setScene(connectionScene);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/SceneController.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/SceneController.html new file mode 100644 index 00000000..e0e73a7f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/SceneController.html @@ -0,0 +1 @@ +SceneController

    SceneController

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total51 of 510%0 of 0n/a77181877
    setControllerAttributes(FXMLLoader)150%n/a115511
    loadScene(String)130%n/a114411
    setControllerAttributes(FXMLLoader, Node)110%n/a113311
    setGraphicalView(GraphicalViewGUI)40%n/a112211
    setStage(Stage)40%n/a112211
    SceneController()30%n/a111111
    initializePostController()10%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/SceneController.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/SceneController.java.html new file mode 100644 index 00000000..11c4c82b --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/SceneController.java.html @@ -0,0 +1,84 @@ +SceneController.java

    SceneController.java

    package it.polimi.ingsw.client.frontend.gui.controllers;
    +
    +import it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI;
    +import it.polimi.ingsw.utils.GuiUtil;
    +import javafx.fxml.FXMLLoader;
    +import javafx.scene.Node;
    +import javafx.stage.Stage;
    +
    +import java.io.IOException;
    +
    +/**
    + * JavaFX controller of a scene
    + */
    +public abstract class SceneController {
    +    protected GraphicalViewGUI view;
    +    protected Stage stage;
    +
    +    /**
    +     * Method to be called to do actions after the controller attributes are set
    +     * @throws IOException
    +     */
    +    public void initializePostController() throws IOException{
    +    }
    +
    +    /**
    +     * This method is run when the controller is initialized
    +     * @throws IOException if there is a file error
    +     */
    +    public abstract void initialize() throws IOException;
    +
    +    /**
    +     * Set the graphical view for the controller
    +     * @param view graphical view
    +     */
    +    public void setGraphicalView(GraphicalViewGUI view) {
    +        this.view = view;
    +    }
    +
    +    /**
    +     * Set the main stage the controller is in
    +     * @param stage JavaFX stage
    +     */
    +    public void setStage(Stage stage) {
    +        this.stage = stage;
    +    }
    +
    +    /**
    +     * Load a node from a FXML file path, assign properties to the controller
    +     * and to the node
    +     * @param path path of the FXML file
    +     * @return the node on top of the FXML
    +     * @param <T> Type of the node
    +     * @throws IOException
    +     */
    +    protected <T extends Node>T loadScene(String path) throws IOException {
    +        FXMLLoader loader = GuiUtil.getLoader(path);
    +        T result = loader.load();
    +        setControllerAttributes(loader, result);
    +        return result;
    +    }
    +
    +    /**
    +     * Set graphical view and the main stage properties to the scene controller
    +     * @param loader FXMLL Loader of the scene
    +     * @throws IOException in case of exception
    +     */
    +    protected void setControllerAttributes(FXMLLoader loader) throws IOException {
    +        SceneController controller = loader.getController();
    +        controller.setGraphicalView(view);
    +        controller.setStage(stage);
    +        controller.initializePostController();
    +    }
    +    /**
    +     * Set graphical view and the main stage properties to the scene controller
    +     * also sets the "Controller" property for the given node
    +     * @param loader FXMLL Loader of the scene
    +     * @throws IOException in case of exception
    +     */
    +    protected void setControllerAttributes(FXMLLoader loader, Node node) throws IOException {
    +        setControllerAttributes(loader);
    +        node.getProperties().put("Controller", loader.getController());
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/WaitingSceneController.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/WaitingSceneController.html new file mode 100644 index 00000000..eade1434 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/WaitingSceneController.html @@ -0,0 +1 @@ +WaitingSceneController

    WaitingSceneController

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total115 of 1150%2 of 20%111132321010
    addPlayer(String)280%n/a117711
    showMatch()250%n/a115511
    removePlayer(String)150%20%223311
    WaitingSceneController()140%n/a114411
    updateLabel()110%n/a112211
    setMatchName(String)60%n/a113311
    setMaxPlayers(int)60%n/a113311
    setCurrentPlayers(int)60%n/a113311
    getCurrentPlayers()30%n/a111111
    initialize()10%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/WaitingSceneController.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/WaitingSceneController.java.html new file mode 100644 index 00000000..62a5a9b4 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/WaitingSceneController.java.html @@ -0,0 +1,110 @@ +WaitingSceneController.java

    WaitingSceneController.java

    package it.polimi.ingsw.client.frontend.gui.controllers;
    +
    +import it.polimi.ingsw.client.frontend.gui.GraphicalApplication;
    +import it.polimi.ingsw.utils.GuiUtil;
    +import javafx.geometry.Pos;
    +import javafx.scene.Scene;
    +import javafx.scene.control.Label;
    +import javafx.scene.layout.VBox;
    +
    +import java.io.IOException;
    +import java.util.HashMap;
    +
    +/**
    + * JavaFX controller for the waiting scene. It shows all the current players
    + * waiting for the match to start
    + */
    +public class WaitingSceneController extends SceneController {
    +
    +    public Label matchName;
    +    public VBox playersContainer;
    +    private String name;
    +    private int maxPlayers = 0;
    +    private int players = 0;
    +    private HashMap<String, Label> labels = new HashMap<>();
    +
    +    @Override
    +    public void initialize() throws IOException {
    +
    +    }
    +
    +    /**
    +     * Add a player to the list
    +     * @param username username of the player to add
    +     */
    +    public void addPlayer(String username) {
    +        Label playerLabel = new Label();
    +        playerLabel.setAlignment(Pos.CENTER);
    +        playerLabel.setText(username);
    +        playerLabel.getStyleClass().add("form-label");
    +        playersContainer.getChildren().add(playerLabel);
    +        labels.put(username, playerLabel);
    +    }
    +
    +    /**
    +     * Set the name of the match to display
    +     * @param name name of the match
    +     */
    +    public void setMatchName(String name) {
    +        this.name = name;
    +        updateLabel();
    +    }
    +
    +    /**
    +     * Set the maximum amount of players in the current match
    +     * @param players maximum number of players
    +     */
    +    public void setMaxPlayers(int players) {
    +        maxPlayers = players;
    +        updateLabel();
    +
    +    }
    +
    +    /**
    +     * Set the current amount of players in the current match
    +     * @param players current number of players
    +     */
    +    public void setCurrentPlayers(int players) {
    +        this.players = players;
    +        updateLabel();
    +    }
    +
    +    /**
    +     * Get the amount of current players
    +     * @return the amount of current players in the match
    +     */
    +    public int getCurrentPlayers() {
    +        return players;
    +    }
    +
    +    /**
    +     * Update the players count, match name and max players
    +     */
    +    public void updateLabel() {
    +        matchName.setText(name + " " + players + "/" + maxPlayers);
    +    }
    +
    +    /**
    +     * Remove a player from the list
    +     * @param username username of the player to remove
    +     */
    +    public void removePlayer(String username) {
    +        if (this.labels.containsKey(username)) {
    +            playersContainer.getChildren().remove(labels.get(username));
    +        }
    +    }
    +
    +    /**
    +     * Show the match scene when the match is started
    +     * @return the match scene controller
    +     * @throws IOException if there was a file error
    +     */
    +    public MatchSceneController showMatch() throws IOException {
    +        VBox root = loadScene("/fxml/match.fxml");
    +        GuiUtil.applyCSS(root, "/css/match.css");
    +        Scene matchScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
    +        stage.setScene(matchScene);
    +        return (MatchSceneController) root.getProperties().get("Controller");
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/index.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/index.html new file mode 100644 index 00000000..d5c895e9 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.frontend.gui.controllers

    it.polimi.ingsw.client.frontend.gui.controllers

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total2,642 of 2,6420%119 of 1190%17817859959911611699
    PlayerTabController8530%420%5555180180343411
    ConnectionSceneController4250%140%13131021026611
    LobbySceneController3930%220%22228383111111
    MatchSceneController3300%190%31316565191911
    ChatPaneController2870%140%22227272151511
    RankingSceneController1580%60%111136368811
    WaitingSceneController1150%20%11113232101011
    SceneController510%n/a7718187711
    ErrorSceneController300%n/a6611116611
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/index.source.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/index.source.html new file mode 100644 index 00000000..aced26d2 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.controllers/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.frontend.gui.controllers

    it.polimi.ingsw.client.frontend.gui.controllers

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total2,642 of 2,6420%119 of 1190%17817859959911611699
    PlayerTabController.java8530%420%5555180180343411
    ConnectionSceneController.java4250%140%13131021026611
    LobbySceneController.java3930%220%22228383111111
    MatchSceneController.java3300%190%31316565191911
    ChatPaneController.java2870%140%22227272151511
    RankingSceneController.java1580%60%111136368811
    WaitingSceneController.java1150%20%11113232101011
    SceneController.java510%n/a7718187711
    ErrorSceneController.java300%n/a6611116611
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/BoardPane.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/BoardPane.html new file mode 100644 index 00000000..101c3d4d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/BoardPane.html @@ -0,0 +1 @@ +BoardPane

    BoardPane

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total126 of 1260%0 of 0n/a66272766
    convertCoordinates(Pair)420%n/a115511
    addCard(Pair, InitialCard, Side)230%n/a115511
    addCard(Pair, PlayableCard, Side)220%n/a115511
    displayCard(Pair, CardView)220%n/a115511
    static {...}90%n/a114411
    BoardPane()80%n/a113311
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/BoardPane.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/BoardPane.java.html new file mode 100644 index 00000000..86305491 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/BoardPane.java.html @@ -0,0 +1,91 @@ +BoardPane.java

    BoardPane.java

    package it.polimi.ingsw.client.frontend.gui.nodes;
    +
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.utils.CardsManager;
    +import it.polimi.ingsw.utils.GuiUtil;
    +import it.polimi.ingsw.utils.Pair;
    +import javafx.scene.Node;
    +import javafx.scene.image.Image;
    +import javafx.scene.image.ImageView;
    +import javafx.scene.input.Dragboard;
    +import javafx.scene.input.TransferMode;
    +import javafx.scene.layout.Pane;
    +
    +import java.util.ArrayList;
    +import java.util.List;
    +
    +/**
    + * Game board, manages card display
    + */
    +public class BoardPane extends Pane {
    +    // Card dimensions
    +    public static double cardWidth = CardView.cardWidth;
    +    public static double cardHeight = CardView.cardHeight;
    +    public static double cardBorderW = 44.8;
    +    public static double cardBorderH = 52.6;
    +    // Currently placed cards
    +    public List<Pair<Integer, Integer>> takenSpots = new ArrayList<>();
    +
    +    /**
    +     * Constructor of BoardPane
    +     */
    +    public BoardPane() {
    +        super();
    +    }
    +
    +    /**
    +     * Add a card to the board
    +     * @param position relative coordinates of the card
    +     * @param card card to add
    +     * @param side side of the card to add
    +     */
    +    public void addCard(Pair<Integer, Integer> position, PlayableCard card, Side side) {
    +        CardView c = new CardView(card, side);
    +        c.getProperties().put("gameCoords", position);
    +        displayCard(position, c);
    +        takenSpots.add(position);
    +    }
    +
    +    /**
    +     * Add a card to the board
    +     * @param position relative coordinates of the card
    +     * @param card card to add
    +     * @param side side of the card to add
    +     * @return the added CardView
    +     */
    +    public CardView addCard(Pair<Integer, Integer> position, InitialCard card, Side side) {
    +        CardView c = new CardView(card, side);
    +        displayCard(position, c);
    +        takenSpots.add(position);
    +        c.getProperties().put("gameCoords", position);
    +        return c;
    +    }
    +
    +    /**
    +     * Sets the layout coordinates of the card and adds it to the board
    +     * @param position position of the card to place
    +     * @param c CardView of the card
    +     */
    +    private void displayCard(Pair<Integer, Integer> position, CardView c) {
    +        Pair<Double, Double> coords = convertCoordinates(position);
    +        c.setLayoutX(coords.first());
    +        c.setLayoutY(coords.second());
    +        this.getChildren().add(c);
    +    }
    +
    +    /**
    +     * Convert coordinates from game coordinate to JavaFX Board coordinates
    +     * @param coords coordinate to convert
    +     * @return converted coordinates
    +     */
    +    public Pair<Double, Double> convertCoordinates(Pair<Integer, Integer> coords) {
    +        double boardWidth = super.getPrefWidth();
    +        double boardHeight = super.getPrefHeight();
    +        double w = boardWidth/2 + (coords.first() * (cardWidth - cardBorderW));
    +        double h = boardHeight/2 - (coords.second() * (cardHeight - cardBorderH));
    +        return new Pair<>(w, h);
    +    }
    +
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/CardView.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/CardView.html new file mode 100644 index 00000000..03cdacc9 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/CardView.html @@ -0,0 +1 @@ +CardView

    CardView

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total454 of 4540%6 of 60%18181101101515
    setToken(Color)1150%20%22191911
    addCorners()530%n/a119911
    addProperties(String)520%n/a11141411
    setResourcesCardBack(Symbol)240%20%227711
    setGoldsCardBack(Symbol)240%20%227711
    CardView(InitialCard, Side)220%n/a116611
    CardView(PlayableCard, Side)220%n/a116611
    CardView(Objective, Side)220%n/a116611
    CardView()200%n/a116611
    setCard(InitialCard, Side)200%n/a115511
    setCard(PlayableCard, Side)200%n/a115511
    setCard(Objective, Side)200%n/a115511
    setCornerProperties(Pane, double, double)180%n/a116611
    static {...}130%n/a116611
    setArc(double)90%n/a113311
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/CardView.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/CardView.java.html new file mode 100644 index 00000000..4ba13c01 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/CardView.java.html @@ -0,0 +1,252 @@ +CardView.java

    CardView.java

    package it.polimi.ingsw.client.frontend.gui.nodes;
    +
    +
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.utils.GuiUtil;
    +import it.polimi.ingsw.utils.Pair;
    +import javafx.scene.image.Image;
    +import javafx.scene.image.ImageView;
    +import javafx.scene.input.ClipboardContent;
    +import javafx.scene.input.Dragboard;
    +import javafx.scene.input.TransferMode;
    +import javafx.scene.layout.Pane;
    +import javafx.scene.layout.StackPane;
    +import javafx.scene.paint.ImagePattern;
    +import javafx.scene.shape.Rectangle;
    +
    +import javax.xml.crypto.dom.DOMCryptoContext;
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +public class CardView extends Pane {
    +    // Card dimensions
    +    public static double cardWidth = 199;
    +    public static double cardHeight = 132;
    +    public static double cardBorderW = 44.8;
    +    public static double cardBorderH = 52.6;
    +
    +    /** Pawn dimensions (at center of the initial card) */
    +    public static double tokenRadius = 28;
    +
    +    /** Path to what to show when a card is missing */
    +    public static String noCardPath = "/images/no_resource2.png";
    +    // Card corners
    +    public Pane topLeftCorner;
    +    public Pane topRightCorner;
    +    public Pane bottomLeftCorner;
    +    public Pane bottomRightCorner;
    +
    +    private Image image;
    +    private Rectangle cardRectangle;
    +
    +    /**
    +     * Initialize an empty CardView
    +     */
    +    public CardView() {
    +        super();
    +        String imagePath = noCardPath;
    +        this.getProperties().put("Card", null);
    +        this.getProperties().put("Side", null);
    +        this.addProperties(imagePath);
    +    }
    +
    +    /**
    +     * Initialize a CardView of an Initial Card
    +     * @param card initial card
    +     * @param side side to show
    +     */
    +    public CardView(InitialCard card, Side side) {
    +        super();
    +        String imagePath = GuiUtil.getImagePath(card, side);
    +        this.getProperties().put("Card", card);
    +        this.getProperties().put("Side", side);
    +        this.addProperties(imagePath);
    +    }
    +
    +    /**
    +     * Initialize a CardView of a Playable Card
    +     * @param card playable card
    +     * @param side side to show
    +     */
    +    public CardView(PlayableCard card, Side side) {
    +        super();
    +        String imagePath = GuiUtil.getImagePath(card, side);
    +        this.getProperties().put("Card", card);
    +        this.getProperties().put("Side", side);
    +        this.addProperties(imagePath);
    +    }
    +
    +    /**
    +     * Initialize a CardView of an Objective Card
    +     * @param card objective
    +     * @param side side to show
    +     */
    +    public CardView(Objective card, Side side) {
    +        super();
    +        String imagePath = GuiUtil.getImagePath(card, side);
    +        this.getProperties().put("Card", card);
    +        this.getProperties().put("Side", side);
    +        this.addProperties(imagePath);
    +    }
    +
    +    /**
    +     * Change the displayed card
    +     * @param card card to display
    +     * @param side side of the card to display
    +     */
    +    public void setCard(InitialCard card, Side side) {
    +        String imagePath = GuiUtil.getImagePath(card, side);
    +        this.getProperties().put("Card", card);
    +        this.getProperties().put("Side", side);
    +        this.addProperties(imagePath);
    +    }
    +
    +    /**
    +     * Change the displayed card
    +     * @param card card to display
    +     * @param side side of the card to display
    +     */
    +    public void setCard(PlayableCard card, Side side) {
    +        String imagePath = GuiUtil.getImagePath(card, side);
    +        this.getProperties().put("Card", card);
    +        this.getProperties().put("Side", side);
    +        this.addProperties(imagePath);
    +    }
    +
    +    /**
    +     * Change the displayed card
    +     * @param card card to display
    +     * @param side side of the card to display
    +     */
    +    public void setCard(Objective card, Side side) {
    +        String imagePath = GuiUtil.getImagePath(card, side);
    +        this.getProperties().put("Card", card);
    +        this.getProperties().put("Side", side);
    +        this.addProperties(imagePath);
    +    }
    +
    +    /**
    +     * Change the displayed card to the back of a resource card
    +     * @param reign reign to display
    +     */
    +    public void setResourcesCardBack(Symbol reign) {
    +        String imagePath;
    +        this.getProperties().put("Card", null);
    +        this.getProperties().put("Side", Side.BACK);
    +        if (reign != null) {
    +            imagePath = GuiUtil.getResourcesBack(reign);
    +        } else {
    +            imagePath = noCardPath;
    +        }
    +        addProperties(imagePath);
    +    }
    +
    +    /**
    +     * Change the displayed card to the back of a gold card
    +     * @param reign reign to display
    +     */
    +    public void setGoldsCardBack(Symbol reign) {
    +        String imagePath;
    +        this.getProperties().put("Card", null);
    +        this.getProperties().put("Side", Side.BACK);
    +        if (reign != null) {
    +            imagePath = GuiUtil.getGoldsBack(reign);
    +        } else {
    +            imagePath = noCardPath;
    +        }
    +        addProperties(imagePath);
    +    }
    +
    +    /**
    +     * Add the properties to the image
    +     * @param imagePath
    +     */
    +    private void addProperties(String imagePath) {
    +        super.setPrefHeight(cardHeight);
    +        super.setPrefWidth(cardWidth);
    +        super.setMaxHeight(cardHeight);
    +        super.setMaxWidth(cardWidth);
    +        Rectangle rect = new Rectangle(cardWidth, cardHeight);
    +        image = new Image(imagePath);
    +        ImagePattern pattern = new ImagePattern(
    +                image
    +        );
    +        rect.setFill(pattern);
    +        cardRectangle = rect;
    +        setArc(20);
    +        super.getChildren().add(rect);
    +        super.getStyleClass().add("game-card");
    +        addCorners();
    +    }
    +
    +    /**
    +     * Set arcHeight and arcWidth of the card
    +     * @param arc arc width and height
    +     */
    +    public void setArc(double arc) {
    +        cardRectangle.setArcHeight(arc);
    +        cardRectangle.setArcWidth(arc);
    +    }
    +
    +
    +    /**
    +     * Add corners to the card
    +     */
    +    private void addCorners() {
    +        topLeftCorner = new Pane();
    +        topRightCorner = new Pane();
    +        bottomLeftCorner= new Pane();
    +        bottomRightCorner = new Pane();
    +
    +        setCornerProperties(topLeftCorner, 0, 0);
    +        setCornerProperties(topRightCorner, cardWidth-cardBorderW,0);
    +        setCornerProperties(bottomRightCorner, cardWidth-cardBorderW,cardHeight-cardBorderH);
    +        setCornerProperties(bottomLeftCorner, 0,cardHeight-cardBorderH);
    +    }
    +
    +    /**
    +     * Add position and dimensions to a corner ad add them in the card
    +     * @param corner The corner to add the properties to
    +     * @param x position
    +     * @param y position
    +     */
    +    private void setCornerProperties(Pane corner, double x, double y) {
    +        corner.setPrefWidth(cardBorderW);
    +        corner.setPrefHeight(cardBorderH);
    +        corner.setLayoutX(x);
    +        corner.setLayoutY(y);
    +        super.getChildren().add(corner);
    +    }
    +
    +    /**
    +     * Display token of a color on the initial card
    +     * @param color color of the token
    +     */
    +    public void setToken(Color color) {
    +        double tokenY = 64;
    +        Map<Side, Pair<Double, Double>> coords = new HashMap<>();
    +        coords.put(Side.FRONT, new Pair<>(78.0, 121.0));
    +        coords.put(Side.BACK, new Pair<>(62.0, 137.0));
    +
    +        Side side = (Side)super.getProperties().get("Side");
    +
    +        ImageView token = new ImageView(new Image(GuiUtil.getPawnImagePath(color)));
    +        token.setFitWidth(tokenRadius);
    +        token.setFitHeight(tokenRadius);
    +
    +        token.setLayoutX(coords.get(side).first() - tokenRadius/2);
    +        token.setLayoutY(tokenY - tokenRadius / 2);
    +
    +        if (color.equals(Color.RED)) {
    +            ImageView blackToken = new ImageView(GuiUtil.getBlackPawnImagePath());
    +            blackToken.setFitWidth(tokenRadius);
    +            blackToken.setFitHeight(tokenRadius);
    +            blackToken.setLayoutX(coords.get(side).second() - tokenRadius/2);
    +            blackToken.setLayoutY(tokenY - tokenRadius/2);
    +            super.getChildren().add(blackToken);
    +        }
    +        super.getChildren().add(token);
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/PlateauPane.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/PlateauPane.html new file mode 100644 index 00000000..0456d2a6 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/PlateauPane.html @@ -0,0 +1 @@ +PlateauPane

    PlateauPane

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total565 of 5650%12 of 120%1212636366
    PlateauPane()4080%n/a11353511
    setPoints(String, int)760%80%55131311
    setColor(String, Color)260%n/a116611
    playersAtPosition(int)260%40%336611
    convertCoords(Pair)240%n/a111111
    static {...}50%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/PlateauPane.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/PlateauPane.java.html new file mode 100644 index 00000000..5695785c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/PlateauPane.java.html @@ -0,0 +1,130 @@ +PlateauPane.java

    PlateauPane.java

    package it.polimi.ingsw.client.frontend.gui.nodes;
    +
    +import it.polimi.ingsw.gamemodel.Color;
    +import it.polimi.ingsw.utils.GuiUtil;
    +import it.polimi.ingsw.utils.Pair;
    +import javafx.scene.image.Image;
    +import javafx.scene.image.ImageView;
    +import javafx.scene.input.MouseButton;
    +import javafx.scene.layout.Pane;
    +
    +import java.util.HashMap;
    +
    +/**
    + * JavaFX node, Pane showing all the player pawns and points
    + */
    +public class PlateauPane extends Pane {
    +    public static double pawnSize = 64;
    +    public static double positionOffset = -6;
    +    HashMap<Integer, Pair<Double, Double>> positions;
    +    HashMap<String, ImageView> players;
    +    HashMap<String, Integer> points;
    +
    +    /**
    +     * Constructor of the node
    +     */
    +    public PlateauPane() {
    +        players = new HashMap<>();
    +        positions = new HashMap<>();
    +        points = new HashMap<>();
    +        positions.put(0, new Pair<>(104.0, 743.0));
    +        positions.put(1, new Pair<>(197.0, 741.0));
    +        positions.put(2, new Pair<>(291.0, 742.0));
    +        positions.put(3, new Pair<>(342.0, 656.0));
    +        positions.put(4, new Pair<>(246.0, 654.0));
    +        positions.put(5, new Pair<>(154.0, 652.0));
    +        positions.put(6, new Pair<>(56.0, 656.0));
    +        positions.put(7, new Pair<>(57.0, 571.0));
    +        positions.put(8, new Pair<>(152.0, 570.0));
    +        positions.put(9, new Pair<>(247.0, 570.0));
    +        positions.put(10, new Pair<>(338.0, 569.0));
    +        positions.put(11, new Pair<>(340.0, 482.0));
    +        positions.put(12, new Pair<>(243.0, 482.0));
    +        positions.put(13, new Pair<>(150.0, 483.0));
    +        positions.put(14, new Pair<>(55.0, 486.0));
    +        positions.put(15, new Pair<>(56.0, 397.0));
    +        positions.put(16, new Pair<>(151.0, 397.0));
    +        positions.put(17, new Pair<>(244.0, 395.0));
    +        positions.put(18, new Pair<>(340.0, 398.0));
    +        positions.put(19, new Pair<>(340.0, 313.0));
    +        positions.put(20, new Pair<>(200.0, 270.0));
    +        positions.put(21, new Pair<>(60.0, 315.0));
    +        positions.put(22, new Pair<>(59.0, 227.0));
    +        positions.put(23, new Pair<>(60.0, 140.0));
    +        positions.put(24, new Pair<>(114.0, 71.0));
    +        positions.put(25, new Pair<>(198.0, 54.0));
    +        positions.put(26, new Pair<>(287.0, 70.0));
    +        positions.put(27, new Pair<>(342.0, 141.0));
    +        positions.put(28, new Pair<>(342.0, 225.0));
    +        positions.put(29, new Pair<>(199.0, 158.0));
    +    }
    +
    +    /**
    +     * Set the color of a player
    +     *
    +     * @param player username of the player
    +     * @param color  color of the player's pawn
    +     */
    +    public void setColor(String player, Color color) {
    +        ImageView img = new ImageView(new Image(GuiUtil.getPawnImagePath(color)));
    +        img.setFitWidth(pawnSize);
    +        img.setFitHeight(pawnSize);
    +        players.put(player, img);
    +        setPoints(player, 0);
    +    }
    +
    +    /**
    +     * Set the amount of points of a player and move its pawn
    +     *
    +     * @param player username of the player
    +     * @param points current number of points he has
    +     */
    +    public void setPoints(String player, int points) {
    +        if (points > 29) {
    +            return;
    +        }
    +        if (!this.points.containsKey(player) || this.points.get(player) != points) {
    +            Pair<Double, Double> position = convertCoords(positions.get(points));
    +            // Calculate offset because of players in the same position
    +            int offset = this.playersAtPosition(points);
    +            this.points.put(player, points);
    +
    +            ImageView playerPawn = players.get(player);
    +            playerPawn.setLayoutX(position.first());
    +            playerPawn.setLayoutY(position.second() + offset * positionOffset);
    +
    +            if (this.getChildren().contains(playerPawn))
    +                this.getChildren().remove(playerPawn);
    +            this.getChildren().add(playerPawn);
    +        }
    +    }
    +
    +    /**
    +     * Get the amount of players in a certain point
    +     *
    +     * @param points number of points
    +     * @return number of players in that position
    +     */
    +    private int playersAtPosition(int points) {
    +        int p = 0;
    +        for (String player : this.points.keySet()) {
    +            if (points == this.points.get(player)) {
    +                p++;
    +            }
    +        }
    +        return p;
    +    }
    +
    +    /**
    +     * Convert relative coordinates of the pane to coordinates
    +     * corrected to the pawn size
    +     *
    +     * @param coord coordinate to convert
    +     * @return the converted coordinates
    +     */
    +    private Pair<Double, Double> convertCoords(Pair<Double, Double> coord) {
    +        return new Pair<>(coord.first() - pawnSize / 2 + 2, coord.second() - pawnSize / 2);
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/index.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/index.html new file mode 100644 index 00000000..18e501ad --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.frontend.gui.nodes

    it.polimi.ingsw.client.frontend.gui.nodes

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total1,145 of 1,1450%18 of 180%3636200200272733
    PlateauPane5650%120%121263636611
    CardView4540%60%1818110110151511
    BoardPane1260%n/a6627276611
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/index.source.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/index.source.html new file mode 100644 index 00000000..9b18d79b --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui.nodes/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.frontend.gui.nodes

    it.polimi.ingsw.client.frontend.gui.nodes

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total1,145 of 1,1450%18 of 180%3636200200272733
    PlateauPane.java5650%120%121263636611
    CardView.java4540%60%1818110110151511
    BoardPane.java1260%n/a6627276611
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalApplication.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalApplication.html new file mode 100644 index 00000000..1a8cbce3 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalApplication.html @@ -0,0 +1 @@ +GraphicalApplication

    GraphicalApplication

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total73 of 730%0 of 0n/a66252566
    start(Stage)380%n/a11111111
    loadScene(String)200%n/a116611
    static {...}50%n/a112211
    lambda$start$0(WindowEvent)40%n/a113311
    GraphicalApplication()30%n/a111111
    main(String[])30%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalApplication.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalApplication.java.html new file mode 100644 index 00000000..2bdaeea4 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalApplication.java.html @@ -0,0 +1,87 @@ +GraphicalApplication.java

    GraphicalApplication.java

    package it.polimi.ingsw.client.frontend.gui;
    +
    +import it.polimi.ingsw.client.frontend.gui.controllers.SceneController;
    +import it.polimi.ingsw.utils.GuiUtil;
    +import javafx.application.Application;
    +import javafx.application.Platform;
    +import javafx.fxml.FXMLLoader;
    +import javafx.scene.Scene;
    +import javafx.scene.layout.StackPane;
    +import javafx.stage.Stage;
    +import java.io.IOException;
    +
    +/**
    + * Class from which the FXML application is run, so it's entry point for the user.
    + * Apart from making use of FXML instances and methods, it interacts massively with {@link GraphicalViewGUI}.
    + */
    +public class GraphicalApplication extends Application {
    +    private GraphicalViewGUI view;
    +    private Stage primaryStage;
    +    // Window size
    +    public static double screenWidth = 1920.0;
    +    public static double screenHeight = 1020.0;
    +
    +    /**
    +     * Launch the application
    +     * @param args args
    +     */
    +    public static void main(String[] args) {
    +        launch(args);
    +    }
    +
    +    /**
    +     * Default method to start the FXML application, it can be called only from this class main(...).
    +     *
    +     * @param primaryStage The stage to be opened
    +     * @throws IOException If there has been an I/O error.
    +     */
    +    @Override
    +    public void start(Stage primaryStage) throws IOException {
    +        this.primaryStage = primaryStage;
    +        this.view = new GraphicalViewGUI(primaryStage);
    +
    +        // Load initial screen
    +        primaryStage.setTitle("Codex Naturalis");
    +        // Load FXML layout
    +        StackPane root = this.loadScene("/fxml/connection.fxml");
    +        // Add stylesheet
    +        GuiUtil.applyCSS(root, "/css/style.css");
    +        // Create the connection scene
    +        Scene connectionScene = new Scene(root, screenWidth, screenHeight);
    +        // Show the window
    +
    +        /* Disabled by default
    +        // Fullscreen
    +        primaryStage.setFullScreen(true);
    +        primaryStage.setMaximized(true);
    +        primaryStage.setResizable(false);
    +        primaryStage.setFullScreenExitHint("");
    +        */
    +
    +        primaryStage.setScene(connectionScene);
    +        primaryStage.show();
    +        root.requestFocus();
    +        primaryStage.setOnCloseRequest((event) -> {
    +                Platform.exit();
    +                System.exit(0);
    +            });
    +    }
    +
    +
    +    /**
    +     * Get a node from the specified FXML path and set the values of a SceneController
    +     * @param path file path of FXML
    +     * @return The first node
    +     * @param <T> Type of the node
    +     * @throws IOException in case of error while reading the file
    +     */
    +    private <T>T loadScene(String path) throws IOException {
    +        FXMLLoader loader = GuiUtil.getLoader(path);
    +        T result = loader.load();
    +        SceneController controller = loader.getController();
    +        controller.setGraphicalView(view);
    +        controller.setStage(primaryStage);
    +        return result;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalViewGUI.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalViewGUI.html new file mode 100644 index 00000000..e206021a --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalViewGUI.html @@ -0,0 +1 @@ +GraphicalViewGUI

    GraphicalViewGUI

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total1,114 of 1,1140%52 of 520%84842752755858
    lambda$setupMatch$4(boolean, boolean)1290%60%44292911
    lambda$setupResumedMatch$5(String, PlayerTabController)910%40%33121211
    lambda$someoneDrewCard$21(String, DrawSource, PlayableCard, Pair)640%60%44111111
    lambda$someonePlayedCard$20(String, Pair, PlayableCard, Side, int, Map)600%20%22131311
    lambda$notifyError$22(String, String)590%n/a11191911
    someoneJoined(String, List)510%80%55131311
    lambda$someoneJoined$13(List)440%20%22111111
    setupResumedMatch(boolean)380%40%33101011
    lambda$someoneSetInitialSide$9(String, Side)370%n/a116611
    lambda$changePlayer$0()310%20%227711
    lambda$someoneChoseSecretObjective$10(String)270%20%226611
    someoneQuit(String)250%60%445511
    lambda$makeMove$1()220%n/a114411
    lambda$matchFinished$17(List)200%n/a117711
    someonePlayedCard(String, Pair, PlayableCard, Side, int, Map)180%n/a113311
    notifyLastTurn()170%20%224411
    lambda$notifyConnectionLost$24(RankingSceneController)170%n/a117711
    someoneDrewSecretObjective(String)160%n/a114411
    lambda$someoneSentPrivateText$19(String, String)160%20%224411
    lambda$someoneSentBroadcastText$18(String, String)160%20%224411
    lambda$matchFinished$16(LeaderboardEntry)160%20%224411
    someoneDrewCard(String, DrawSource, PlayableCard, PlayableCard, Pair)150%n/a113311
    notifyConnectionLost()150%n/a114411
    lambda$giveSecretObjectives$7(Pair)140%n/a113311
    lambda$giveInitialCard$6(InitialCard)140%n/a113311
    lambda$someoneQuit$15(String)130%n/a113311
    createMatch(String, Integer)110%n/a114411
    someoneSetInitialSide(String, Side, Map)110%n/a113311
    receiveAvailableMatches(List)110%n/a114411
    giveInitialCard(InitialCard)100%n/a114411
    giveSecretObjectives(Pair)100%n/a114411
    someoneDrewInitialCard(String, InitialCard)100%n/a113311
    lambda$someoneJoined$14(String, List)100%n/a113311
    lambda$setupMatch$3(String, PlayerTabController)100%20%223311
    GraphicalViewGUI(Stage)90%n/a114411
    setupMatch(boolean, boolean)90%n/a113311
    someoneChoseSecretObjective(String)80%n/a113311
    setUsername(String)80%n/a113311
    lambda$someoneDrewInitialCard$8(String, InitialCard)80%n/a111111
    lambda$setupMatch$2(DrawSource, PlayableCard)80%n/a112211
    joinMatch(String)70%n/a113311
    notifyError(Exception)70%n/a112211
    getAvailableMatches()70%n/a113311
    makeMove()60%n/a113311
    someoneSentBroadcastText(String, String)60%n/a112211
    someoneSentPrivateText(String, String)60%n/a112211
    notifyError(String, String)60%n/a112211
    setLobbySceneController(LobbySceneController)60%n/a113311
    lambda$someoneJoined$12(AvailableMatch)60%n/a111111
    notifyMatchStarted()50%n/a112211
    notifyMatchResumed(boolean)50%n/a112211
    matchFinished(List)50%n/a112211
    lambda$receiveAvailableMatches$23(List)50%n/a111111
    changePlayer()40%n/a112211
    main(String[])40%n/a112211
    disconnect()40%n/a112211
    lambda$notifyLastTurn$11(PlayerTabController)40%n/a111111
    getUsername()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalViewGUI.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalViewGUI.java.html new file mode 100644 index 00000000..663c68f1 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/GraphicalViewGUI.java.html @@ -0,0 +1,511 @@ +GraphicalViewGUI.java

    GraphicalViewGUI.java

    package it.polimi.ingsw.client.frontend.gui;
    +
    +import java.io.IOException;
    +import java.rmi.RemoteException;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +import it.polimi.ingsw.client.frontend.ClientBoard;
    +import it.polimi.ingsw.client.frontend.GraphicalView;
    +import it.polimi.ingsw.client.frontend.MatchStatus;
    +import it.polimi.ingsw.client.frontend.ShownCard;
    +import it.polimi.ingsw.client.frontend.gui.controllers.*;
    +import it.polimi.ingsw.client.frontend.gui.nodes.CardView;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.utils.*;
    +import javafx.application.Application;
    +import javafx.application.Platform;
    +import javafx.fxml.FXMLLoader;
    +import javafx.scene.Scene;
    +import javafx.scene.layout.StackPane;
    +import javafx.stage.Modality;
    +import javafx.stage.Stage;
    +
    +/**
    + * JavaFX implementation of Codex Naturalis client
    + */
    +public class GraphicalViewGUI extends GraphicalView {
    +    private final Stage stage;
    +    // Controllers
    +    private Map<String, PlayerTabController> playerTabControllers;
    +    private MatchSceneController matchSceneController;
    +    private WaitingSceneController waitingSceneController;
    +    private LobbySceneController lobbySceneController;
    +    private RankingSceneController rankingSceneController;
    +    private ChatPaneController chatPaneController;
    +
    +    // Match state management
    +    MatchStatus matchState = MatchStatus.LOBBY;
    +
    +    // Temporary vars
    +    private String matchName;
    +    private List<AvailableMatch> lastAvailableMatches;
    +    private Integer maxPlayers;
    +
    +    /**
    +     * Initialize on a given JavaFX stage
    +     * @param stage the main stage of the application
    +     */
    +    public GraphicalViewGUI(Stage stage) {
    +        this.stage = stage;
    +    }
    +
    +    @Override
    +    public void changePlayer() {
    +        Platform.runLater(() -> {
    +            // Notify to each player tab if it is his turn and disable his hand card interactions
    +            // this is needed in order to disable this client's interactions after his turn has finished
    +            for (String username : playerTabControllers.keySet()) {
    +                PlayerTabController tab = playerTabControllers.get(username);
    +                boolean isCurrent = username.equals(currentPlayer);
    +
    +                tab.setCurrentPlayer(isCurrent);
    +                tab.enablePlaceCardInteractions(false);
    +            }
    +        });
    +    }
    +
    +    /**
    +     * Method called everytime it's this client turn.
    +     */
    +    @Override
    +    public void makeMove() {
    +        this.changePlayer();
    +        Platform.runLater(() -> {
    +            matchSceneController.setFocus(this.username);
    +
    +            // Enable the hand cards interactions, so that they can be dragged
    +            playerTabControllers.get(this.username).enablePlaceCardInteractions(true);
    +            playerTabControllers.get(this.username).setStateTitle("Play a card");
    +        });
    +    }
    +
    +    @Override
    +    public void createMatch(String matchName, Integer maxPlayers) {
    +        super.createMatch(matchName, maxPlayers);
    +        this.matchName = matchName;
    +        this.maxPlayers = maxPlayers;
    +    }
    +
    +    @Override
    +    public void joinMatch(String matchName) {
    +        super.joinMatch(matchName);
    +        this.matchName = matchName;
    +    }
    +
    +    @Override
    +    protected void notifyMatchStarted() {
    +        this.setupMatch(false, false);
    +    }
    +
    +    @Override
    +    protected void notifyMatchResumed(boolean drawPhase) {
    +        this.setupMatch(true, drawPhase);
    +    }
    +
    +    /**
    +     * Set match scene and populate elements on match start
    +     * @param matchResumed if the match is resumed
    +     */
    +    private void setupMatch(boolean matchResumed, boolean drawPhase) {
    +        matchState = MatchStatus.MATCH_STATE;
    +        Platform.runLater(() -> {
    +            try {
    +                if (waitingSceneController == null) {
    +                    waitingSceneController = new WaitingSceneController();
    +                    waitingSceneController.setGraphicalView(this);
    +                    waitingSceneController.setStage(stage);
    +                }
    +                matchSceneController = waitingSceneController.showMatch();
    +            } catch (IOException e) {
    +                throw new RuntimeException(e);
    +            }
    +            // Set visible objectives
    +            matchSceneController.setObjectives(super.visibleObjectives);
    +            // Set visible draw sources
    +            super.visiblePlayableCards.forEach((drawSource, playableCard) -> {
    +                matchSceneController.setDrawSource(drawSource, playableCard, playableCard.getReign());
    +            });
    +            matchSceneController.setDrawSource(DrawSource.GOLDS_DECK, null, super.decksTopReign.first());
    +            matchSceneController.setDrawSource(DrawSource.RESOURCES_DECK, null, super.decksTopReign.second());
    +
    +            // Create players tabs, assign colors and their hands
    +            int n = 0;
    +            playerTabControllers = new HashMap<>();
    +            for (String p : super.players) {
    +                try {
    +                    PlayerTabController controller = matchSceneController.addPlayerTab(p, Color.values()[n]);
    +                    playerTabControllers.put(p, controller);
    +                    controller.setHandCards(super.clientBoards.get(p).getHand());
    +                    // Disable the interaction with hand cards on all player tabs
    +                    controller.enablePlaceCardInteractions(false);
    +                } catch (IOException e) {
    +                    throw new RuntimeException(e);
    +                }
    +                n++;
    +            }
    +
    +            // Initialize the chat pane
    +            chatPaneController = matchSceneController.getChatPane();
    +            playerTabControllers.forEach((tabUsername, controller) -> {
    +                if (!tabUsername.equals(this.username))
    +                    chatPaneController.addPlayer(tabUsername);
    +            });
    +
    +            // By default, disable draw sources interactions
    +            matchSceneController.enableDrawSourcesInteractions(false);
    +            if (matchResumed) this.setupResumedMatch(drawPhase);
    +        });
    +    }
    +
    +    /**
    +     * Populate extra elements after match resumed
    +     */
    +    private void setupResumedMatch(boolean drawPhase) {
    +        playerTabControllers.forEach(((username, playerTabController) -> {
    +            ClientBoard playerBoard = clientBoards.get(username);
    +            playerTabController.setSecretObjective(playerBoard.getObjective());
    +
    +            // Place the initial card
    +            playerTabController.getBoard().addCard(new Pair<>(0, 0), (InitialCard) playerBoard.getPlaced().get(0).card(), playerBoard.getPlaced().get(0).side());
    +
    +            // Place all the other cards
    +            Map<Integer, ShownCard> placed = playerBoard.getPlaced();
    +            for (Integer turn : placed.keySet()) {
    +                if (turn > 0) {
    +                    playerTabController.getBoard().addCard(placed.get(turn).coords(), (PlayableCard) placed.get(turn).card(), placed.get(turn).side());
    +                }
    +            }
    +
    +            // Set points and available resources
    +            playerTabController.setPoints(playerBoard.getPoints());
    +            matchSceneController.plateauPane.setPoints(username, playerBoard.getPoints());
    +            playerTabController.setResources(playerBoard.getAvailableResources());
    +        }));
    +
    +        // Enable interactions if it is the current user turn
    +        this.changePlayer();
    +        if (currentPlayer.equals(username)) {
    +            if (!drawPhase) {
    +                this.makeMove();
    +                playerTabControllers.get(username).enablePlaceCardInteractions(true);
    +            } else {
    +                // Draw interactions
    +                // Set focus on the table
    +                matchSceneController.setFocusToTable();
    +                matchSceneController.setStateTitle("Draw a card");
    +                // Enable draw sources interactions
    +                matchSceneController.enableDrawSourcesInteractions(true);
    +            }
    +        }
    +    }
    +
    +    @Override
    +    public void giveInitialCard(InitialCard initialCard) {
    +        super.giveInitialCard(initialCard);
    +        this.changePlayer();
    +        Platform.runLater(() -> {
    +            playerTabControllers.get(username).giveInitialCard(initialCard);
    +            matchSceneController.setFocus(username);
    +        });
    +    }
    +
    +    @Override
    +    public void giveSecretObjectives(Pair<Objective, Objective> secretObjectives) {
    +        super.giveSecretObjectives(secretObjectives);
    +        this.changePlayer();
    +        Platform.runLater(() -> {
    +            playerTabControllers.get(username).giveSecretObjectives(secretObjectives);
    +            matchSceneController.setFocus(username);
    +        });
    +    }
    +
    +    @Override
    +    public void someoneDrewInitialCard(String someoneUsername, InitialCard card) {
    +        super.someoneDrewInitialCard(someoneUsername, card);
    +        Platform.runLater(() -> playerTabControllers.get(someoneUsername).someoneDrewInitialCard(card));
    +    }
    +
    +    @Override
    +    public void someoneSetInitialSide(String someoneUsername, Side side, Map<Symbol, Integer> availableResources) {
    +        super.someoneSetInitialSide(someoneUsername, side, availableResources);
    +        Platform.runLater(() -> {
    +            PlayerTabController playerTabController = playerTabControllers.get(someoneUsername);
    +            playerTabController.removePlayerChoiceContainer();
    +            InitialCard card = super.clientBoards.get(someoneUsername).getInitialCard();
    +            CardView initial = playerTabController.getBoard().addCard(new Pair<>(0, 0), card, side);
    +            initial.setToken(Color.values()[players.indexOf(someoneUsername)]);
    +        });
    +    }
    +
    +    @Override
    +    public void someoneDrewSecretObjective(String someoneUsername) {
    +        super.someoneDrewSecretObjective(someoneUsername);
    +        PlayerTabController playerTabController = playerTabControllers.get(someoneUsername);
    +        Platform.runLater(playerTabController::someoneDrewSecretObjective);
    +    }
    +
    +    @Override
    +    public void someoneChoseSecretObjective(String someoneUsername) {
    +        super.someoneChoseSecretObjective(someoneUsername);
    +        Platform.runLater(() -> {
    +            PlayerTabController playerTabController = playerTabControllers.get(someoneUsername);
    +            playerTabController.removePlayerChoiceContainer();
    +            if (someoneUsername.equals(username)) {
    +                playerTabController.setSecretObjective(clientBoards.get(username).getObjective());
    +            } else {
    +                playerTabController.setSecretObjective(null);
    +            }
    +        });
    +    }
    +
    +    @Override
    +    public void notifyLastTurn() {
    +        for (PlayerTabController t : playerTabControllers.values()) {
    +            Platform.runLater(() -> t.setStateTitle("Last turn, play carefully!"));
    +        }
    +    }
    +
    +    @Override
    +    public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
    +        if (!matchState.equals(MatchStatus.WAIT_STATE) && !matchState.equals(MatchStatus.LOBBY)) {
    +            return;
    +        }
    +        super.someoneJoined(someoneUsername, joinedPlayers);
    +        if (this.maxPlayers == null) {
    +            maxPlayers = lastAvailableMatches.stream()
    +                    .filter((m) -> m.name().equals(matchName))
    +                    .mapToInt(AvailableMatch::maxPlayers)
    +                    .toArray()[0];
    +        }
    +        if (username.equals(someoneUsername)) {
    +            matchState = MatchStatus.WAIT_STATE;
    +            Platform.runLater(() -> {
    +                try {
    +                    waitingSceneController = lobbySceneController.showWaitScene();
    +                } catch (Exception e) {
    +                    throw new RuntimeException(e);
    +                }
    +                waitingSceneController.setCurrentPlayers(joinedPlayers.size());
    +                waitingSceneController.setMatchName(matchName);
    +                waitingSceneController.setMaxPlayers(maxPlayers);
    +                for (String player : joinedPlayers) {
    +                    waitingSceneController.addPlayer(player);
    +                }
    +            });
    +        } else {
    +            Platform.runLater(() -> {
    +                waitingSceneController.addPlayer(someoneUsername);
    +                waitingSceneController.setCurrentPlayers(joinedPlayers.size());
    +            });
    +        }
    +    }
    +
    +    @Override
    +    public void someoneQuit(String someoneUsername) {
    +        if (matchState.equals(MatchStatus.WAIT_STATE)) {
    +            Platform.runLater(() -> {
    +                waitingSceneController.removePlayer(someoneUsername);
    +                waitingSceneController.setCurrentPlayers(waitingSceneController.getCurrentPlayers()-1);
    +            });
    +        } else if (networkHandler.isConnected() && !matchState.equals(MatchStatus.FINAL_STATE)) {
    +            notifyError("Player Quit", "Match finished because " + someoneUsername + " quit");
    +        }
    +    }
    +
    +    @Override
    +    public void matchFinished(List<LeaderboardEntry> ranking) {
    +        Platform.runLater(() -> {
    +            try {
    +                matchState = MatchStatus.FINAL_STATE;
    +                rankingSceneController = matchSceneController.showRankingScene();
    +                ranking.forEach((entry) -> {
    +                    if (entry.username().equals(this.username)) {
    +                        rankingSceneController.setVictory(entry.winner());
    +                    }
    +                    rankingSceneController.addRanking(entry);
    +                });
    +            } catch (IOException e) {
    +                throw new RuntimeException(e);
    +            }
    +        });
    +    }
    +
    +    @Override
    +    public void someoneSentBroadcastText(String someoneUsername, String text) {
    +        Platform.runLater(() -> {
    +            if (someoneUsername.equals(this.username))
    +                chatPaneController.confirmSubmitBroadcastMessage(text);
    +            else
    +                chatPaneController.receiveBroadcastMessage(someoneUsername, text);
    +        });
    +    }
    +
    +    @Override
    +    public void someoneSentPrivateText(String someoneUsername, String text) {
    +        Platform.runLater(() -> {
    +            if (someoneUsername.equals(this.username))
    +                chatPaneController.confirmSubmitPrivateMessage(text);
    +            else
    +                chatPaneController.receivePrivateMessage(someoneUsername, text);
    +        });
    +    }
    +
    +    @Override
    +    public void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coords, PlayableCard card, Side side, int points, Map<Symbol, Integer> availableResources) {
    +        super.someonePlayedCard(someoneUsername, coords, card, side, points, availableResources);
    +        Platform.runLater(() -> {
    +            PlayerTabController controller = playerTabControllers.get(someoneUsername);
    +            controller.placeCard(coords, card, side);
    +            controller.setPoints(points);
    +            matchSceneController.setPlateauPoints(someoneUsername, points);
    +            controller.setHandCards(clientBoards.get(someoneUsername).getHand());
    +            controller.setResources(availableResources);
    +
    +            // If the player that played a card is this client
    +            if (someoneUsername.equals(this.username)) {
    +                // Set the focus on the plateau tab
    +                matchSceneController.setFocusToTable();
    +                matchSceneController.setStateTitle("Draw a card");
    +                // Enable draw sources interactions
    +                matchSceneController.enableDrawSourcesInteractions(true);
    +            } else {
    +                matchSceneController.setStateTitle(someoneUsername + " is drawing a card...");
    +            }
    +            playerTabControllers.get(someoneUsername).setStateTitle("");
    +        });
    +    }
    +
    +    @Override
    +    public void someoneDrewCard(String someoneUsername, DrawSource source, PlayableCard card, PlayableCard replacementCard,
    +                                Pair<Symbol, Symbol> deckTopReigns) {
    +        super.someoneDrewCard(someoneUsername, source, card, replacementCard, deckTopReigns);
    +        Platform.runLater(() -> {
    +            PlayerTabController tab = playerTabControllers.get(someoneUsername);
    +            tab.setHandCards(clientBoards.get(someoneUsername).getHand());
    +            if (!source.equals(DrawSource.GOLDS_DECK) && !source.equals(DrawSource.RESOURCES_DECK)) {
    +                matchSceneController.setDrawSource(source, replacementCard, replacementCard.getReign());
    +            }
    +            matchSceneController.setDrawSource(DrawSource.GOLDS_DECK, null, deckTopReigns.first());
    +            matchSceneController.setDrawSource(DrawSource.RESOURCES_DECK, null, deckTopReigns.second());
    +
    +            // If the player that drew a card is this client, disable draw source interactions
    +            if (someoneUsername.equals(this.username)) {
    +                matchSceneController.enableDrawSourcesInteractions(false);
    +                matchSceneController.setFocus(this.username);
    +            }
    +            // Remove draw title
    +            matchSceneController.setStateTitle("");
    +        });
    +    }
    +
    +    @Override
    +    public void notifyError(Exception exception) {
    +        this.notifyError(GuiUtil.getExceptionTitle(exception), exception.getMessage());
    +    }
    +
    +    /**
    +     * Notify an error
    +     * @param title title of the error
    +     * @param description description of the error
    +     */
    +    public void notifyError(String title, String description) {
    +        Platform.runLater(() -> {
    +            try {
    +                // Load the error node from the fxml file
    +
    +                FXMLLoader loader = GuiUtil.getLoader("/fxml/error.fxml");
    +                StackPane root = loader.load();
    +                ErrorSceneController controller = loader.getController();
    +
    +                Stage dialog = new Stage();
    +                Scene errorScene = new Scene(root, ErrorSceneController.windowWidth, ErrorSceneController.windowHeight);
    +
    +                // Initialize attributes
    +                GuiUtil.applyCSS(root, "/css/style.css");
    +                controller.setTitle(title);
    +                controller.setText(description);
    +
    +                dialog.setScene(errorScene);
    +                dialog.setTitle("Error");
    +                dialog.initOwner(this.stage);
    +                dialog.initModality(Modality.APPLICATION_MODAL);
    +                dialog.setResizable(false);
    +                dialog.sizeToScene();
    +
    +                // Show the modal window (stage)
    +                dialog.show();
    +            } catch (IOException e) {
    +                throw new RuntimeException(e);
    +            }
    +        });
    +    }
    +
    +    public void setUsername(String username) {
    +        this.username = username;
    +        networkHandler.setUsername(username);
    +    }
    +
    +    /**
    +     * Getter for the client username
    +     * @return client username
    +     */
    +    public String getUsername() {
    +        return username;
    +    }
    +
    +    /**
    +     * Request available matches to the server
    +     */
    +    public void getAvailableMatches() {
    +        this.setLastRequestStatus(RequestStatus.PENDING);
    +        this.networkHandler.getAvailableMatches();
    +    }
    +
    +    @Override
    +    public void receiveAvailableMatches(List<AvailableMatch> availableMatches) {
    +        super.receiveAvailableMatches(availableMatches);
    +        lastAvailableMatches = availableMatches;
    +        Platform.runLater(() -> lobbySceneController.updateMatches(availableMatches));
    +    }
    +
    +    /**
    +     * Set the lobby scene controller
    +     * @param lobbySceneController controller of the lobby scene
    +     */
    +    public void setLobbySceneController(LobbySceneController lobbySceneController) {
    +        this.lobbySceneController = lobbySceneController;
    +        this.getAvailableMatches();
    +    }
    +
    +    /**
    +     * Main class to launch the applicaiton
    +     * @param args command line arguments
    +     */
    +    public static void main(String[] args) {
    +        Application.launch(GraphicalApplication.class, args);
    +    }
    +
    +    @Override
    +    public void notifyConnectionLost() {
    +        notifyError(new RemoteException("Connection to the server lost"));
    +        RankingSceneController r = new RankingSceneController();
    +            Platform.runLater(() -> {
    +                try {
    +                    r.setStage(stage);
    +                    r.setGraphicalView(this);
    +                    r.showConnectionScene();
    +                } catch (IOException e) {
    +                    throw new RuntimeException(e);
    +                }
    +            });
    +    }
    +
    +    /**
    +     * Request disconnection from the network
    +     */
    +    public void disconnect() {
    +        networkHandler.disconnect();
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/index.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/index.html new file mode 100644 index 00000000..d8e41f83 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.frontend.gui

    it.polimi.ingsw.client.frontend.gui

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total1,187 of 1,1870%52 of 520%9090300300646422
    GraphicalViewGUI1,1140%520%8484275275585811
    GraphicalApplication730%n/a6625256611
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/index.source.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/index.source.html new file mode 100644 index 00000000..98049298 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.gui/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.frontend.gui

    it.polimi.ingsw.client.frontend.gui

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total1,187 of 1,1870%52 of 520%9090300300646422
    GraphicalViewGUI.java1,1140%520%8484275275585811
    GraphicalApplication.java730%n/a6625256611
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/BoardPosition.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/BoardPosition.html new file mode 100644 index 00000000..89967cc2 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/BoardPosition.html @@ -0,0 +1 @@ +BoardPosition

    BoardPosition

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 9100%0 of 0n/a010101
    BoardPosition(boolean, Optional)9100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/BoardPosition.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/BoardPosition.java.html new file mode 100644 index 00000000..85743155 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/BoardPosition.java.html @@ -0,0 +1,17 @@ +BoardPosition.java

    BoardPosition.java

    package it.polimi.ingsw.client.frontend.tui;
    +
    +import java.util.Optional;
    +import it.polimi.ingsw.gamemodel.Corner;
    +
    +/**
    + * Represents a position on the board, used to find valid positions and display anchor numbers when
    + * a player must choose where to place the card.
    + *
    + * @param isValid Whether the position is a valid one or not
    + * @param link The anchor point for a valid position
    + *
    + * @see ValidPositions
    + */
    +public record BoardPosition(boolean isValid, Optional<Corner> link) {
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/GraphicalViewTUI.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/GraphicalViewTUI.html new file mode 100644 index 00000000..f8596353 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/GraphicalViewTUI.html @@ -0,0 +1 @@ +GraphicalViewTUI

    GraphicalViewTUI

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total1,581 of 1,5810%135 of 1350%1141144224223939
    parsePlayerControl()2760%310%2121575711
    setMatch()1150%100%66353511
    makeMove()1150%100%66303011
    setNetworkHandler()880%70%55272711
    makeUserDraw(Map)740%110%99282811
    chooseCoords(ClientBoard)700%80%55202011
    chooseCardFromHand(ClientBoard)640%60%44171711
    giveInitialCard(InitialCard)610%40%33161611
    GraphicalViewTUI()500%n/a11131311
    giveSecretObjectives(Pair)470%40%33131311
    lambda$notifyMatchResumed$3(boolean)460%40%33101011
    createMatch()440%20%22111111
    startPlayerControls()400%60%44161611
    joinMatch(List)400%40%339911
    lambda$changePlayer$1(ClientBoard)370%40%338811
    getServerResponse()340%20%228811
    someoneJoined(String, List)330%n/a119911
    someoneSentPrivateText(String, String)310%20%227711
    someoneSentBroadcastText(String, String)310%20%227711
    chooseCardSide(PlayableCard)280%20%228811
    chooseUsername()230%20%227711
    getAvailableMatches()220%20%228811
    lambda$setMatch$0(List, List, AvailableMatch)200%40%334411
    setLastRequestStatus(RequestStatus)190%20%226611
    changePlayer()180%n/a115511
    startInterface()170%n/a116611
    someonePlayedCard(String, Pair, PlayableCard, Side, int, Map)170%20%224411
    notifyError(Exception)160%20%225511
    matchFinished(List)130%n/a114411
    lambda$notifyMatchResumed$2(Integer, ShownCard)130%n/a112211
    showHand(ClientBoard)120%n/a113311
    enablePlayerControls()110%n/a114411
    notifyConnectionLost()110%n/a114411
    main(String[])110%20%224411
    someoneChoseSecretObjective(String)90%n/a113311
    static {...}90%n/a111111
    notifyMatchResumed(boolean)80%n/a113311
    someoneQuit(String)70%n/a112211
    notifyMatchStarted()0%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/GraphicalViewTUI.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/GraphicalViewTUI.java.html new file mode 100644 index 00000000..8b1340c7 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/GraphicalViewTUI.java.html @@ -0,0 +1,948 @@ +GraphicalViewTUI.java

    GraphicalViewTUI.java

    package it.polimi.ingsw.client.frontend.tui;
    +
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.Map;
    +import it.polimi.ingsw.client.frontend.ClientBoard;
    +import it.polimi.ingsw.client.frontend.GraphicalView;
    +import it.polimi.ingsw.client.frontend.ShownCard;
    +import it.polimi.ingsw.client.network.NetworkHandlerRMI;
    +import it.polimi.ingsw.client.network.NetworkHandlerTCP;
    +import it.polimi.ingsw.exceptions.WrongInputFormatException;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.utils.AvailableMatch;
    +import it.polimi.ingsw.utils.LeaderboardEntry;
    +import it.polimi.ingsw.utils.Pair;
    +import it.polimi.ingsw.utils.RequestStatus;
    +
    +/**
    + * Class that handles client game loop from TUI.
    + */
    +public class GraphicalViewTUI extends GraphicalView {
    +    private final TuiPrinter printer;
    +    private String lastError;
    +    private boolean ongoing;
    +    private List<String> playersWithObjective;
    +    private final PlayerControls playerControls;
    +    private final InputHandler inputHandler;
    +    private final ValidPositions validPositions;
    +    private final static List<String> helpMessage = List.of(
    +            "players,     p -> show list of players",
    +            "write,       w -> write message (add :username to send private text)",
    +            "chat,        c -> show chat",
    +            "board,       b -> show your board (or specify a number to show corresponding player's board)",
    +            "objectives,  o -> show secret and common objectives",
    +            "hand,        h -> show your hand");
    +
    +    private List<String> chat;
    +    private List<String> messages;
    +    private final static String playerControlPrompt =
    +            "Type command, or 'help' for a list of available commands.";
    +
    +
    +    /**
    +     * Class constructor. Starts the interface and creates all auxiliary objects.
    +     */
    +    public GraphicalViewTUI() {
    +        super();
    +        this.ongoing = true;
    +        this.playersWithObjective = new ArrayList<>();
    +        this.playerControls = new PlayerControls(); // starts disabled
    +        this.validPositions = new ValidPositions();
    +
    +        this.chat = new ArrayList<>();
    +        this.messages = new ArrayList<>();
    +        try {
    +            this.printer = new TuiPrinter();
    +        } catch (Exception e) {
    +            throw new RuntimeException("Could not access terminal. Quitting now");
    +        }
    +
    +        this.inputHandler = new InputHandler(this.printer);
    +
    +    }
    +
    +    /**
    +     * Actually starts the interface, then handles the pre-match.
    +     */
    +    private void startInterface() {
    +        this.printer.clearTerminal();
    +        this.setNetworkHandler();
    +        this.printer.clearTerminal();
    +        this.setMatch();
    +        new Thread(this::startPlayerControls).start();
    +    }
    +
    +    ///////////////////////
    +    // AUXILIARY METHODS //
    +    ///////////////////////
    +    /**
    +     * Sets the last request's status, eventually notifying all threads of the server's response.
    +     * 
    +     * @param status The last request's status
    +     */
    +    @Override
    +    public void setLastRequestStatus(RequestStatus status) {
    +        synchronized (this.lastRequest) {
    +            super.setLastRequestStatus(status);
    +            if (!status.equals(RequestStatus.PENDING)) {
    +                this.lastRequest.notifyAll();
    +            }
    +        }
    +    }
    +
    +
    +    /**
    +     * Waits for the server response after any action was performed. Until the server does not send
    +     * a response (or an error), the thread is stopped.
    +     * 
    +     * @return Whether the last action was successful or not
    +     */
    +    private boolean getServerResponse() {
    +        this.printer.printCenteredMessage("Waiting for server...", 1);
    +        try {
    +            synchronized (this.lastRequest) {
    +                while (this.lastRequest.getStatus().equals(RequestStatus.PENDING)) {
    +                    this.lastRequest.wait();
    +                }
    +            }
    +            return this.lastRequest.getStatus().equals(RequestStatus.SUCCESSFUL);
    +        } catch (InterruptedException e) {
    +            throw new RuntimeException();
    +        }
    +
    +    }
    +
    +
    +    /**
    +     * Shows the player's board and hand.
    +     * 
    +     * @param board the player's board
    +     */
    +    private synchronized void showHand(ClientBoard board) {
    +        this.printer.printPlayerBoard(this.username, board);
    +        this.printer.printHandAtBottom(board.getHand());
    +    }
    +
    +    /**
    +     * Asks the user which card he wants to play.
    +     * 
    +     * @param board The player's board
    +     * 
    +     * @return The chosen card
    +     */
    +    private PlayableCard chooseCardFromHand(ClientBoard board) {
    +        List<PlayableCard> hand = board.getHand();
    +
    +        this.inputHandler.setPrompt("Choose card to play (1, 2, 3):");
    +        this.showHand(board);
    +        String userIn = this.inputHandler.askUser();
    +
    +        PlayableCard card = null;
    +        Integer maxValue = hand.size();
    +        while (card == null) {
    +            try {
    +                Integer index = Integer.parseInt(userIn) - 1;
    +                if (index >= 0 && index < maxValue) {
    +                    card = hand.get(index);
    +                } else {
    +                    throw new NumberFormatException("Number not in range!");
    +                }
    +            } catch (NumberFormatException e) {
    +                this.inputHandler.setPrompt("Not a valid number! try again");
    +                this.showHand(board);
    +                userIn = this.inputHandler.askUser();
    +            }
    +        }
    +
    +        return card;
    +    }
    +
    +
    +    /**
    +     * Asks the user which side he wants to play the chosen card.
    +     * 
    +     * @param card The card to be placed on the board
    +     * 
    +     * @return The chosen side
    +     */
    +    private Side chooseCardSide(PlayableCard card) {
    +        this.printer.clearTerminal();
    +        this.printer.printPlayableFrontAndBack(card, 0);
    +
    +        this.inputHandler
    +                .setPrompt("What side do you want to play the card on? (defaults to front)");
    +        String userIn = this.inputHandler.askUser();
    +        return switch (userIn) {
    +            case "b", "back" -> Side.BACK;
    +            default -> Side.FRONT;
    +        };
    +    }
    +
    +
    +    /**
    +     * Asks the user where he wants to play the chosen card.
    +     * 
    +     * @param board The current player's board
    +     * 
    +     * @return The chosen coordinates
    +     */
    +    private Pair<Integer, Integer> chooseCoords(ClientBoard board) {
    +        Map<Pair<Integer, Integer>, Pair<Integer, Corner>> valids =
    +                this.validPositions.getValidPlaces();
    +
    +        Pair<Integer, Integer> coord = null;
    +
    +        this.inputHandler.setPrompt("Choose where to place card:");
    +        while (coord == null) {
    +            this.printer.printValidPlaces(valids);
    +            this.printer.printPlayerBoard(this.username, board);
    +
    +            Integer position = -1;
    +            try {
    +                position = Integer.valueOf(this.inputHandler.askUser());
    +            } catch (NumberFormatException e) {
    +                this.inputHandler.setPrompt("Not a number! Try again");
    +            }
    +            if (position != -1) {
    +                for (Pair<Integer, Integer> cmp : valids.keySet()) {
    +                    if (valids.get(cmp).first().equals(position)) {
    +                        coord = cmp;
    +                    }
    +                }
    +                this.inputHandler.setPrompt("Not a valid number! try again");
    +            }
    +        }
    +        return coord;
    +    }
    +
    +
    +    /**
    +     * Gets the player's input while it's not his turn, and then performs the corresponding action.
    +     */
    +    private void parsePlayerControl() {
    +        ClientBoard board = this.clientBoards.get(this.username);
    +        String userIn, command, argument, player;
    +
    +        userIn = this.inputHandler.getNextLine();
    +        this.printer.clearTerminal();
    +
    +        int splitIndex = userIn.indexOf(" ");
    +        if (splitIndex == -1) {
    +            command = userIn;
    +            argument = "";
    +        } else {
    +            command = userIn.substring(0, splitIndex);
    +            argument = userIn.substring(splitIndex + 1);
    +        }
    +
    +        switch (command) {
    +            case "o", "objectives":
    +                this.printer.printObjectives(username, board.getColor(), board.getObjective(),
    +                        this.visibleObjectives);
    +                break;
    +            case "h", "hand":
    +                this.printer.printHand(this.username, board.getColor(), board.getHand());
    +                break;
    +            case "b", "board":
    +                switch (argument) {
    +                    case "1":
    +                        player = this.players.get(0);
    +                        this.printer.printPlayerBoard(player, this.clientBoards.get(player));
    +                        break;
    +                    case "2":
    +                        player = this.players.get(1);
    +                        this.printer.printPlayerBoard(player, this.clientBoards.get(player));
    +                        break;
    +                    case "3":
    +                        if (this.players.size() > 2) {
    +                            player = this.players.get(2);
    +                            this.printer.printPlayerBoard(player, this.clientBoards.get(player));
    +                        }
    +                        break;
    +                    case "4":
    +                        if (this.players.size() > 3) {
    +                            player = this.players.get(3);
    +                            this.printer.printPlayerBoard(player, this.clientBoards.get(player));
    +                        }
    +                        break;
    +
    +                    default:
    +                        this.printer.printPlayerBoard(this.username,
    +                                this.clientBoards.get(this.username));
    +                        break;
    +                }
    +                break;
    +            case "c", "chat":
    +                this.printer.printChat(this.chat);
    +                break;
    +            case "w", "write":
    +                if (!argument.equals("")) {
    +                    if (argument.charAt(0) == ':') {
    +                        splitIndex = argument.indexOf(" ");
    +                        if (splitIndex != -1) {
    +                            String text = argument.substring(splitIndex + 1);
    +                            String recipient = argument.substring(1, splitIndex);
    +                            if (!argument.equals("")) {
    +                                this.sendPrivateText(recipient, text);
    +                            }
    +                            if (!this.getServerResponse()) {
    +                                this.messages.add(this.lastError);
    +                            } else {
    +                                this.chat.add("(to: " + recipient + "): " + text);
    +                            }
    +                        }
    +                    } else {
    +                        this.sendBroadcastText(argument);
    +                        if (!this.getServerResponse()) {
    +                            this.messages.add(this.lastError);
    +                        } else {
    +                            this.chat.add("(you): " + argument);
    +                        }
    +                    }
    +
    +                    this.printer.clearTerminal();
    +                }
    +                break;
    +            case "p", "players":
    +                this.printer.printSimpleList(this.players, false, true);
    +                break;
    +
    +            case "help":
    +                this.printer.printSimpleList(helpMessage, false, false);
    +                break;
    +
    +            default:
    +                this.printer.printCenteredMessage("Not a known command: '" + command
    +                        + "'. Type 'help' to show a help message", 0);
    +                break;
    +        }
    +
    +        this.inputHandler.setPrompt(playerControlPrompt);
    +        this.inputHandler.showPrompt();
    +    }
    +
    +
    +    /**
    +     * Enables the player to use custom commands while it's not his turn.
    +     */
    +    private void enablePlayerControls() {
    +        this.inputHandler.setPrompt(playerControlPrompt);
    +        this.inputHandler.showPrompt();
    +        this.playerControls.enable();
    +    }
    +
    +
    +    /**
    +     * Starts the handling of player controls. If enables, polls for user input and as soon as there
    +     * is something calls {@link GraphicalViewTUI#parsePlayerControl()}. If disabled, stops the
    +     * thread
    +     */
    +    private void startPlayerControls() {
    +        while (this.ongoing) {
    +            synchronized (this.playerControls) {
    +                if (this.playerControls.isEnabled()) {
    +                    try {
    +                        if (System.in.available() > 0) {
    +                            this.parsePlayerControl();
    +                        } else {
    +                            Thread.sleep(200);
    +                        }
    +                    } catch (InterruptedException e) {
    +                    } catch (IOException e) {
    +                        System.err.println("Could not connect! Quitting now...");
    +                        System.exit(1);
    +                    }
    +                } else {
    +                    try {
    +                        this.playerControls.wait();
    +                    } catch (InterruptedException e) {
    +                    }
    +                }
    +
    +            }
    +        }
    +    }
    +
    +    ////////////////////////
    +    // PRE MATCH METHODS //
    +    ///////////////////////
    +    /**
    +     * Sets the network view, asking the player how he wants to connect (host, port, RMI vs TCP).
    +     */
    +    private void setNetworkHandler() {
    +        String userIn, IPAddr;
    +        Integer port = null;
    +
    +        this.inputHandler.setPrompt("Choose IP address:");
    +        IPAddr = this.inputHandler.askUser();
    +        this.inputHandler.setPrompt("Choose port:");
    +        userIn = this.inputHandler.askUser();
    +        while (port == null) {
    +            try {
    +                port = Integer.valueOf(userIn);
    +            } catch (NumberFormatException e) {
    +                userIn = this.inputHandler.askUser();
    +            }
    +        }
    +
    +        this.inputHandler.setPrompt("Choose connection type (1 for TCP, 2 for RMI)");
    +        this.networkHandler = null;
    +        while (this.networkHandler == null) {
    +            userIn = this.inputHandler.askUser();
    +            try {
    +                switch (userIn) {
    +                    case "1", "tcp", "TCP":
    +                        this.setNetworkHandler(new NetworkHandlerTCP(this, IPAddr, port));
    +                        break;
    +                    case "2", "rmi", "RMI":
    +                        this.setNetworkHandler(new NetworkHandlerRMI(this, IPAddr, port));
    +                        break;
    +                    default:
    +                        this.inputHandler.setPrompt(
    +                                "Not a valid connection type! Choose connection type (1 for TCP, 2 for RMI)");
    +                        break;
    +                }
    +            } catch (Exception e) {
    +                this.printer.clearTerminal();
    +                this.printer.printMessage("Could not connect! Try again");
    +                this.setNetworkHandler();
    +                return;
    +            }
    +        }
    +    }
    +
    +
    +    /**
    +     * Asks the player to choose a username.
    +     */
    +    private void chooseUsername() {
    +        String userIn = "";
    +        this.inputHandler.setPrompt("Choose username:");
    +        while (userIn.equals("")) {
    +            userIn = this.inputHandler.askUser();
    +            this.inputHandler.setPrompt("Not a valid username! Choose username:");
    +        }
    +        super.setUsername(userIn);
    +    }
    +
    +
    +    /**
    +     * Asks the server for a list of available matches and waits for it.
    +     */
    +    private void getAvailableMatches() {
    +        this.lastRequest.setStatus(RequestStatus.PENDING);
    +        this.networkHandler.getAvailableMatches();
    +
    +        if (!this.getServerResponse()) {
    +            this.printer.clearTerminal();
    +            this.printer.printCenteredMessage("Could not receive availbale matches, try again!", 1);
    +            this.getAvailableMatches();
    +            return;
    +        }
    +    }
    +
    +
    +    /**
    +     * Tries to create a new match, asking the player for match name and max players.
    +     * 
    +     * @throws WrongInputFormatException if the max number of players was not specified
    +     */
    +    private void createMatch() throws WrongInputFormatException {
    +        String userIn = this.inputHandler.askUser();
    +        Integer splitIndex = userIn.indexOf(" ");
    +        if (splitIndex == -1) {
    +            throw new WrongInputFormatException("The max players number was not specified!");
    +        }
    +
    +        String matchName = userIn.substring(0, splitIndex);
    +        Integer maxPlayers;
    +        try {
    +            maxPlayers = Integer.valueOf(userIn.substring(splitIndex + 1));
    +        } catch (Exception e) {
    +            throw new WrongInputFormatException("Bad format for max players number!");
    +        }
    +
    +        super.createMatch(matchName, maxPlayers);
    +    }
    +
    +
    +    /**
    +     * Tries to join a match, showing the player a list of matches and their relative index, and
    +     * asking him which he wants to join.
    +     * 
    +     * @param joinables List of matches the player can join
    +     * 
    +     * @throws WrongInputFormatException if the player did not specify a valid index
    +     */
    +    private void joinMatch(List<AvailableMatch> joinables) throws WrongInputFormatException {
    +        String userIn = this.inputHandler.askUser();
    +        Integer matchIndex;
    +        try {
    +            matchIndex = Integer.valueOf(userIn) - 1;
    +        } catch (NumberFormatException e) {
    +            throw new WrongInputFormatException("You must specify a number!");
    +        }
    +
    +        if (matchIndex < 0 || matchIndex >= joinables.size()) {
    +            throw new WrongInputFormatException("Invalid index!");
    +        }
    +
    +        super.joinMatch(joinables.get(matchIndex).name());
    +    }
    +
    +
    +    /**
    +     * Tries to set the match, either creating it or joining an already existing one.
    +     * 
    +     * @see GraphicalViewTUI#joinMatch(List)
    +     * @see GraphicalViewTUI#createMatch()
    +     */
    +    private void setMatch() {
    +        List<AvailableMatch> joinables = new ArrayList<>(), notJoinables = new ArrayList<>();
    +        this.chooseUsername();
    +
    +        this.getAvailableMatches();
    +
    +        String createMatchPrompt = "Type the match name and max players (e.g. MatchTest 2).";
    +        String joinMatchPrompt = "Type the number corresponding to the match you want to join.";
    +
    +        this.availableMatches.forEach(match -> {
    +            if (match.currentPlayers() < match.maxPlayers() || match.isRejoinable()) {
    +                joinables.add(match);
    +            } else {
    +                notJoinables.add(match);
    +            }
    +        });
    +        this.printer.clearTerminal();
    +
    +        boolean matchSet = false;
    +
    +        while (!matchSet) {
    +            try {
    +                if (this.availableMatches.isEmpty()) {
    +                    this.inputHandler.setPrompt("No matches available. " + createMatchPrompt);
    +                    this.createMatch();
    +                    matchSet = true;
    +                } else {
    +                    if (joinables.isEmpty())
    +                        joinMatchPrompt = "No matches available. " + joinMatchPrompt;
    +
    +                    this.inputHandler.setPrompt(
    +                            "Do you want to join a match or (c)reate one? (defaults to join)");
    +                    String userIn = this.inputHandler.askUser();
    +                    this.printer.printMatchesLobby(joinables, notJoinables, 0);
    +                    switch (userIn) {
    +                        case "c", "C", "create", "Create":
    +                            this.inputHandler.setPrompt(createMatchPrompt);
    +                            this.createMatch();
    +                            matchSet = true;
    +                            break;
    +
    +                        default:
    +                            this.inputHandler.setPrompt(joinMatchPrompt);
    +                            this.joinMatch(joinables);
    +                            matchSet = true;
    +                            break;
    +                    }
    +                }
    +            } catch (WrongInputFormatException e) {
    +                this.inputHandler.setPrompt(e.getMessage() + "! Try again.");
    +            }
    +        }
    +
    +        if (!this.getServerResponse()) {
    +            this.printer.clearTerminal();
    +            this.printer.printCenteredMessage(this.lastError + "! Try again.", 0);
    +            this.setMatch();
    +            return;
    +        }
    +
    +    }
    +
    +
    +    /**
    +     * Show the list of players in the match.
    +     * 
    +     * @param someoneUsername Last player who joined the match
    +     * @param joinedPlayers List of all the other players
    +     */
    +    @Override
    +    public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
    +        super.someoneJoined(someoneUsername, joinedPlayers);
    +        this.printer.clearTerminal();
    +        this.printer.printWelcomeScreen();
    +        this.messages.add("Joined players:");
    +        this.messages.addAll(joinedPlayers);
    +        this.printer.printListReverse(this.messages);
    +        this.printer.printPrompt("");
    +        this.messages.clear();
    +    }
    +
    +    ///////////////////
    +    // MATCH METHODS //
    +    ///////////////////
    +    /**
    +     * Asks the user which side he wants to play the initial card.
    +     * 
    +     * @param initialCard The initial card he drew
    +     */
    +    @Override
    +    public void giveInitialCard(InitialCard initialCard) {
    +        super.giveInitialCard(initialCard);
    +        this.printer.clearTerminal();
    +        this.printer.printInitialSideBySide(initialCard, 1);
    +
    +        this.inputHandler.setPrompt("Choose initial card side (defaults to front)");
    +        String userIn = this.inputHandler.askUser();
    +        Side side;
    +        switch (userIn) {
    +            case "b", "back":
    +                side = Side.BACK;
    +                break;
    +            default:
    +                side = Side.FRONT;
    +                break;
    +        }
    +
    +        super.chooseInitialCardSide(side);
    +        if (!this.getServerResponse()) {
    +            this.giveInitialCard(initialCard);
    +        } else {
    +            this.printer.clearTerminal();
    +            this.validPositions
    +                    .addCard(new ShownCard(initialCard, side, new Pair<Integer, Integer>(0, 0)));
    +        }
    +    }
    +
    +
    +    /**
    +     * Asks the user which secret objective he wants to keep between the random two given to him.
    +     * 
    +     * @param secretObjectives the pair of objectives the player has to choose from
    +     */
    +    @Override
    +    public void giveSecretObjectives(Pair<Objective, Objective> secretObjectives) {
    +        super.giveSecretObjectives(secretObjectives);
    +        this.printer.clearTerminal();
    +        this.printer.printObjectivePair("Your choices:", secretObjectives, 1);
    +
    +        this.inputHandler.setPrompt("Choose secret objective (defaults to first):");
    +        String userIn = this.inputHandler.askUser();
    +        Objective objective;
    +        switch (userIn) {
    +            case "2", "second":
    +                objective = secretObjectives.second();
    +                break;
    +            default:
    +                objective = secretObjectives.first();
    +                break;
    +        }
    +
    +        super.chooseSecretObjective(objective);
    +        if (!this.getServerResponse()) {
    +            this.giveSecretObjectives(secretObjectives);
    +        }
    +    }
    +
    +
    +    /**
    +     * Adds to the list of player with objectives the last player who chose his secret objective.
    +     * This is used to determine whether the player currently playing has already chosen secret
    +     * objective (and so should play a regular turn) or not.
    +     * 
    +     * @param someoneUsername the username of the last player who chose secret objective
    +     */
    +    @Override
    +    public void someoneChoseSecretObjective(String someoneUsername) {
    +        super.someoneChoseSecretObjective(someoneUsername);
    +        this.playersWithObjective.add(someoneUsername);
    +    }
    +
    +
    +    /**
    +     * Notifies all players (but the current one) that someone is playing their turn.
    +     */
    +    @Override
    +    public void changePlayer() {
    +        this.printer.clearTerminal();
    +        ClientBoard board = this.clientBoards.get(this.currentPlayer);
    +
    +        new Thread(() -> {
    +            if (board.getPlaced().isEmpty()) { // choosing initial side
    +                this.printer.printCenteredMessage(this.currentPlayer + " is choosing initial side!",
    +                        0);
    +                this.printer.printPrompt("");
    +            } else if (!this.playersWithObjective.contains(this.currentPlayer)) { // choosing
    +                                                                                  // objective
    +                this.printer.printCenteredMessage(
    +                        this.currentPlayer + " is choosing secret objective!", 0);
    +                this.printer.printPrompt("");
    +            } else {
    +                this.enablePlayerControls();
    +            }
    +        }).start();
    +    }
    +
    +
    +    /**
    +     * Ask a player to choose a card to play, the side on which the card should be played, and the
    +     * coordinates in which the card should be played; finally trying to actually play the card.
    +     */
    +    @Override
    +    public void makeMove() {
    +        this.playerControls.disable();
    +        this.printer.clearTerminal();
    +
    +        if (this.lastRequest.getStatus().equals(RequestStatus.FAILED)) {
    +            this.messages.add(lastError + " Try again.");
    +        }
    +        if (this.lastTurn) {
    +            this.messages.add("This is the last turn! Play carefully");
    +        }
    +        if (!this.messages.isEmpty()) {
    +            this.printer.printMessages(messages);
    +        }
    +
    +        ClientBoard board = this.clientBoards.get(this.username);
    +        PlayableCard card = this.chooseCardFromHand(board);
    +        Side side = this.chooseCardSide(card);
    +        Pair<Integer, Integer> coords = this.chooseCoords(board);
    +        ShownCard shownCard = new ShownCard(card, side, coords);
    +
    +        this.printer.clearTerminal();
    +        this.printer.printPlayerBoard(this.username, board);
    +        this.printer.printCard(shownCard);
    +
    +        this.inputHandler.setPrompt("Are you sure? (n to cancel)");
    +        String userIn = this.inputHandler.askUser();
    +        if (userIn.equals("n")) {
    +            this.makeMove();
    +            return;
    +        }
    +
    +        super.playCard(coords, card, side);
    +        if (!this.getServerResponse()) {
    +            this.printer.clearTerminal();
    +            this.printer.clearTerminal();
    +            this.makeMove();
    +            return;
    +        } else {
    +            this.messages.clear();
    +            this.validPositions.addCard(shownCard);
    +        }
    +    }
    +
    +
    +    /**
    +     * Asks the player from where he wants to draw.
    +     * 
    +     * @param availableResources All the possible draw sources
    +     */
    +    private void makeUserDraw(Map<Symbol, Integer> availableResources) {
    +        this.printer.clearTerminal();
    +        DrawSource source = null;
    +        this.printer.printAvailableResources(availableResources, 0);
    +        String userIn;
    +        this.inputHandler.setPrompt("Choose a draw source: ");
    +        while (source == null) {
    +            this.printer.printDrawingScreen(decksTopReign, visiblePlayableCards);
    +
    +            this.inputHandler.setPrompt("Choose draw source:");
    +            userIn = this.inputHandler.askUser();
    +            switch (userIn) {
    +                case "G", "g":
    +                    source = DrawSource.GOLDS_DECK;
    +                    break;
    +                case "R", "r":
    +                    source = DrawSource.RESOURCES_DECK;
    +                    break;
    +                case "1":
    +                    source = DrawSource.FIRST_VISIBLE;
    +                    break;
    +                case "2":
    +                    source = DrawSource.SECOND_VISIBLE;
    +                    break;
    +                case "3":
    +                    source = DrawSource.THIRD_VISIBLE;
    +                    break;
    +                case "4":
    +                    source = DrawSource.FOURTH_VISIBLE;
    +                    break;
    +                default:
    +                    this.inputHandler.setPrompt("Not a valid source! Try again.");
    +                    break;
    +            }
    +        }
    +        super.drawCard(source);
    +        if (!getServerResponse()) {
    +            this.makeUserDraw(availableResources);
    +            return;
    +        }
    +    }
    +
    +
    +    /**
    +     * Notifies all players that someone played a card, and updates the relative player's board.
    +     * 
    +     * @param someoneUsername The player that played the card
    +     * @param coords The chosen coordinates
    +     * @param card The chosen played card
    +     * @param side The chosen side
    +     * @param points The points of that player
    +     * @param availableResources The resources of that player
    +     */
    +    @Override
    +    public void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coords,
    +            PlayableCard card, Side side, int points, Map<Symbol, Integer> availableResources) {
    +        super.someonePlayedCard(someoneUsername, coords, card, side, points, availableResources);
    +
    +        if (this.username.equals(someoneUsername)) {
    +            this.makeUserDraw(availableResources);
    +        }
    +    }
    +
    +
    +    /**
    +     * Notifies everyone else that a player left.
    +     * 
    +     * @param someoneUsername Player's username
    +     */
    +    @Override
    +    public void someoneQuit(String someoneUsername) {
    +        this.printer.printCenteredMessage(someoneUsername + " quit!", 0);
    +    }
    +
    +
    +    /**
    +     * Shows whether the current player won or lost.
    +     * 
    +     * @param ranking Match ranking
    +     */
    +    @Override
    +    public void matchFinished(List<LeaderboardEntry> ranking) {
    +        this.printer.clearTerminal();
    +        this.ongoing = false;
    +        this.printer.printEndScreen(ranking, this.username);
    +    }
    +
    +
    +    /**
    +     * Sets the last error message to what the server responded.
    +     * 
    +     * @param exception The thrown exception
    +     */
    +    @Override
    +    public void notifyError(Exception exception) {
    +        super.notifyError(exception);
    +        this.lastError = exception.getMessage();
    +        if (this.lastError == null) {
    +            this.lastError = exception.getClass().getName();
    +        }
    +    }
    +
    +
    +    /**
    +     * Notifies that the match has started.
    +     */
    +    @Override
    +    protected void notifyMatchStarted() {}
    +
    +
    +    /**
    +     * Notifies that the player correctly rejoined a match, and makes him play his turn.
    +     * 
    +     * @param drawPhase whether the player should draw or play
    +     */
    +    @Override
    +    protected void notifyMatchResumed(boolean drawPhase) {
    +        new Thread(() -> {
    +
    +            this.clientBoards.get(this.username).getPlaced()
    +                    .forEach((turn, shownCard) -> this.validPositions.addCard(
    +                            new ShownCard(shownCard.card(), shownCard.side(), shownCard.coords())));
    +
    +            // we resume match only if the game was in progress, so all players chose secret
    +            // objectives
    +            this.players.forEach(this.playersWithObjective::add);
    +
    +            this.printer.clearTerminal();
    +            if (this.username.equals(this.currentPlayer)) {
    +                if (drawPhase) {
    +                    this.makeUserDraw(this.clientBoards.get(this.username).getAvailableResources());
    +                    // new Thread(() ->
    +                    // this.makeUserDraw(this.clientBoards.get(this.username).getAvailableResources())).start();;
    +                } else {
    +                    // new Thread(this::makeMove).start();
    +                    this.makeMove();
    +                }
    +            } else {
    +                this.enablePlayerControls();
    +            }
    +
    +        }).start();
    +    }
    +
    +
    +    /**
    +     * Adds to the chat a broadcast text.
    +     * 
    +     * @param someoneUsername The player who sent the broadcast
    +     * @param text The sent text
    +     */
    +    @Override
    +    public void someoneSentPrivateText(String someoneUsername, String text) {
    +        super.someoneSentPrivateText(someoneUsername, text);
    +
    +        if (!this.username.equals(someoneUsername)) {
    +            this.chat.add("(" + someoneUsername + "): " + text);
    +            this.messages.add(someoneUsername + " sent a private text!");
    +            this.printer.printMessages(this.messages);
    +            this.inputHandler.showPrompt();
    +        }
    +    }
    +
    +
    +    /**
    +     * Adds to the chat a private text.
    +     * 
    +     * @param someoneUsername The player who sent the private text
    +     * @param text The sent text
    +     */
    +    @Override
    +    public void someoneSentBroadcastText(String someoneUsername, String text) {
    +        super.someoneSentBroadcastText(someoneUsername, text);
    +
    +        if (!this.username.equals(someoneUsername)) {
    +            this.chat.add("[" + someoneUsername + "]: " + text);
    +            this.messages.add(someoneUsername + " sent a text!");
    +            this.printer.printMessages(this.messages);
    +            this.inputHandler.showPrompt();
    +        }
    +    }
    +
    +    /**
    +     * Notifies that there has been a connection error. We only care about server crashes, but it
    +     * could be anything
    +     */
    +    @Override
    +    public void notifyConnectionLost() {
    +        this.printer.clearTerminal();
    +        this.printer.printCenteredMessage("Connection Lost!", 0);
    +        System.exit(1);
    +    }
    +
    +
    +    /**
    +     * Launch the TUI client
    +     * @param args command line arguments
    +     */
    +    public static void main(String[] args) {
    +        GraphicalViewTUI tui = new GraphicalViewTUI();
    +        tui.startInterface();
    +        while (tui.ongoing) {
    +        }
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/InputHandler.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/InputHandler.html new file mode 100644 index 00000000..dcc78066 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/InputHandler.html @@ -0,0 +1 @@ +InputHandler

    InputHandler

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total56 of 560%0 of 0n/a66191966
    askUser()160%n/a115511
    clearStdin()140%n/a115511
    InputHandler(TuiPrinter)120%n/a114411
    showPrompt()60%n/a112211
    setPrompt(String)40%n/a112211
    getNextLine()40%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/InputHandler.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/InputHandler.java.html new file mode 100644 index 00000000..1fd6c3f8 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/InputHandler.java.html @@ -0,0 +1,80 @@ +InputHandler.java

    InputHandler.java

    package it.polimi.ingsw.client.frontend.tui;
    +
    +import java.io.IOException;
    +import java.util.Scanner;
    +
    +/**
    + * Class that handles the prompt and gets the user input
    + */
    +public class InputHandler {
    +    private final TuiPrinter printer;
    +    private final Scanner scanner;
    +    private String prompt;
    +
    +
    +    /**
    +     * Class constructor.
    +     * 
    +     * @param printer The actual printer
    +     */
    +    public InputHandler(TuiPrinter printer) {
    +        this.printer = printer;
    +        this.scanner = new Scanner(System.in);
    +    }
    +
    +
    +    /**
    +     * Sets the current prompt, without displaying it.
    +     * 
    +     * @param prompt The new value
    +     */
    +    public void setPrompt(String prompt) {
    +        this.prompt = prompt;
    +    }
    +
    +
    +    /**
    +     * Gets the next user input.
    +     * 
    +     * @return The next user input
    +     */
    +    public String getNextLine() {
    +        return this.scanner.nextLine();
    +    }
    +
    +
    +    /**
    +     * Shows the current prompt.
    +     */
    +    public void showPrompt() {
    +        this.printer.printPrompt(this.prompt);
    +    }
    +
    +
    +    /**
    +     * Flushes the stdin, so that every input from the user before showing the prompt gets discarded.
    +     */
    +    private void clearStdin() {
    +        try {
    +            System.in.read(new byte[System.in.available()]);
    +        } catch (IOException e) {
    +            this.printer.printCenteredMessage("Disconnected! Looks like the game is gone", 0);
    +        }
    +    }
    +
    +    
    +    /**
    +     * Flushes stdin, prints prompt and then gets the user input.
    +     * 
    +     * @return The user input
    +     */
    +    public String askUser() {
    +        this.clearStdin();
    +        this.printer.printPrompt(this.prompt);
    +        String userIn = this.scanner.nextLine();
    +        this.printer.clearTerminal();
    +        return userIn;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/PlayerControls.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/PlayerControls.html new file mode 100644 index 00000000..16d477d3 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/PlayerControls.html @@ -0,0 +1 @@ +PlayerControls

    PlayerControls

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total19 of 190%0 of 0n/a449944
    PlayerControls()60%n/a113311
    enable()60%n/a113311
    disable()40%n/a112211
    isEnabled()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/PlayerControls.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/PlayerControls.java.html new file mode 100644 index 00000000..c4f2b542 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/PlayerControls.java.html @@ -0,0 +1,42 @@ +PlayerControls.java

    PlayerControls.java

    package it.polimi.ingsw.client.frontend.tui;
    +
    +/**
    + * Class used to synchronyze methods that should be ran only during other player's turns.
    + */
    +public class PlayerControls {
    +    private boolean enabled;
    +
    +    
    +    /**
    +     * Class constructor. Starts disabled.
    +     */
    +    public PlayerControls() {
    +        this.enabled = false;
    +    }
    +
    +    
    +    /**
    +     * @return Whether the player's custom controls are enabled or not.
    +     */
    +    public boolean isEnabled() {
    +        return this.enabled;
    +    }
    +
    +    
    +    /**
    +     * Enables player's custom controls, and notifies all threads synchronized on this object.
    +     */
    +    public synchronized void enable() {
    +        this.enabled = true;
    +        this.notifyAll();
    +    }
    +
    +    
    +    /**
    +     * Disables the player's controls.
    +     */
    +    public void disable() {
    +        this.enabled = false;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/TuiPrinter.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/TuiPrinter.html new file mode 100644 index 00000000..99252497 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/TuiPrinter.html @@ -0,0 +1 @@ +TuiPrinter

    TuiPrinter

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total3,582 of 3,5820%147 of 1470%1271275955954646
    printStringsBoxed(List, String, Color, Boolean)3350%130%88515111
    printBigTitle(int, int)3080%20%22494911
    printVisibleCards(Pair, Map)2560%80%55424211
    printMatchesLobby(List, List, int)2510%80%55343411
    printDeck(Pair, Symbol, DrawSource)1890%80%55303011
    printEndScreen(List, String)1700%160%99373711
    printScoreboard(Map, int)1650%40%33252511
    printCenteredMessage(String, int)1290%40%33222211
    printLittleTitle(int, int)1000%20%22171711
    printSimpleList(List, Boolean, Boolean)950%100%66151511
    getNumberCoords(Pair, Corner)870%50%557711
    printObjectivePair(String, Pair, int)840%20%22131311
    printWelcome(int, int)830%20%22141411
    printWelcomeScreen()830%60%44191911
    printDrawingScreen(Pair, Map)830%n/a11121211
    printHandAtBottom(List)830%20%22141411
    getLinkedCoords(Pair, Corner)790%50%556611
    printAvailableResources(Map, Integer)780%20%22121211
    printPlayableFrontAndBack(PlayableCard, int)770%20%22131311
    printHand(String, Color, List)740%20%22131311
    printInitialSideBySide(InitialCard, int)670%20%22121211
    printObjectives(String, Color, Objective, Pair)600%n/a11111111
    printCard(ShownCard)590%60%449911
    getAbsoluteCoords(Pair)580%n/a117711
    printListReverse(List)530%20%229911
    printValidPlaces(Map)510%20%229911
    boxBuilder(int, StringBuffer, StringBuffer, StringBuffer)500%n/a11111111
    printPlayerBoard(String, ClientBoard)470%40%33111111
    printMessages(List)460%20%227711
    printPrompt(String)410%20%227711
    printPoints(String, Color, Integer)350%n/a115511
    sumCoords(Pair, Pair)240%n/a111111
    getMaxElemLen(List)220%40%336611
    parseUsername(String, Color)190%50%557711
    getDimStart(int, int)190%40%336611
    getCardIndex(DrawSource)190%70%778811
    printMessage(String)190%n/a113311
    repeatChar(char, int)180%20%224411
    TuiPrinter()150%n/a115511
    static {...}130%n/a111111
    printTitle(int, int, boolean)120%20%224411
    printChat(List)80%n/a112211
    getHeight()50%n/a111111
    getWidth()50%n/a111111
    setPosition(Integer, Integer)40%n/a111111
    clearTerminal()40%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/TuiPrinter.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/TuiPrinter.java.html new file mode 100644 index 00000000..c8d8816f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/TuiPrinter.java.html @@ -0,0 +1,1225 @@ +TuiPrinter.java

    TuiPrinter.java

    package it.polimi.ingsw.client.frontend.tui;
    +
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.Map;
    +import org.jline.terminal.Terminal;
    +import it.polimi.ingsw.client.frontend.ClientBoard;
    +import it.polimi.ingsw.client.frontend.ShownCard;
    +import it.polimi.ingsw.exceptions.CardException;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.utils.AvailableMatch;
    +import it.polimi.ingsw.utils.LeaderboardEntry;
    +import it.polimi.ingsw.utils.Pair;
    +import it.polimi.ingsw.utils.TUICardParser;
    +
    +/**
    + * Class that handles the actual printing to the terminal.
    + */
    +public class TuiPrinter {
    +    private final Terminal terminal;
    +    private final TUICardParser parser;
    +    private final Integer infoLineOffset;
    +    private static final Integer cardRows = 6, cardCols = 18, cornerRows = 3, cornerCols = 5;
    +
    +    /**
    +     * Class constructor, it creates auxiliary objects to communicate with the terminal and the card
    +     * parser.
    +     * 
    +     * @throws IOException
    +     */
    +    public TuiPrinter() throws IOException {
    +        this.terminal = org.jline.terminal.TerminalBuilder.terminal();
    +        this.parser = new TUICardParser();
    +        this.infoLineOffset = 2;
    +
    +    }
    +
    +    // ! PRIVATE METHODS //
    +    /**
    +     * Sums two coordinates.
    +     * 
    +     * @param op1 The first coordinate
    +     * @param op2 The second coordinate
    +     * 
    +     * @return A new coordinate containing the sum of the two
    +     */
    +    private Pair<Integer, Integer> sumCoords(Pair<Integer, Integer> op1,
    +            Pair<Integer, Integer> op2) {
    +        return new Pair<>(op1.first() + op2.first(), op1.second() + op2.second());
    +    }
    +
    +    /**
    +     * @return The terminal's height (rows).
    +     */
    +    private Integer getHeight() {
    +        return this.terminal.getHeight();
    +    }
    +
    +    /**
    +     * @return The terminal's width (columns).
    +     */
    +    private Integer getWidth() {
    +        return this.terminal.getWidth();
    +    }
    +
    +
    +    /**
    +     * Sets the string's position on the terminal. This is done via an escape sequence, that anchors
    +     * the text in the specified row and column.
    +     * 
    +     * @param x The x coordinate (column)
    +     * @param y The y coordinate (row)
    +     * 
    +     * @return The escape sequence to be inserted in the string, in order for it to be anchored in
    +     *         the right spot
    +     */
    +    private String setPosition(Integer x, Integer y) {
    +        return "\033[" + y + ";" + x + "H";
    +    }
    +
    +    private Pair<Integer, Integer> getAbsoluteCoords(Pair<Integer, Integer> coords) {
    +        int termRows = this.getHeight(), termCols = this.getWidth();
    +
    +        Pair<Integer, Integer> coordOffset =
    +                new Pair<Integer, Integer>((termCols - cardCols) / 2, (termRows - cardRows) / 2);
    +        Pair<Integer, Integer> coordUpdated =
    +                new Pair<Integer, Integer>(coords.first() * (cardCols - cornerCols),
    +                        -coords.second() * (cardRows - cornerRows));
    +
    +        return this.sumCoords(coordOffset, coordUpdated);
    +    }
    +
    +    /**
    +     * Prints the colored username of a player.
    +     * 
    +     * @param username The player's username
    +     * @param color The color associated to the player
    +     * 
    +     * @return A string with the necessary escape sequences to show a colored username
    +     */
    +    private String parseUsername(String username, Color color) {
    +        String c = switch (color) {
    +            case Color.RED -> "\033[031m";
    +            case Color.YELLOW -> "\033[032m";
    +            case Color.GREEN -> "\033[033m";
    +            case Color.BLUE -> "\033[034m";
    +            default -> "";
    +        };
    +
    +        return c + username + "\033[0m";
    +    }
    +
    +    /**
    +     * Shows a card on the terminal
    +     * 
    +     * @param card Record containing the card and its coordinates
    +     */
    +    public void printCard(ShownCard card) {
    +        try {
    +            if (card.coords().equals(new Pair<>(0, 0)))
    +                System.out.println(parser.parseCard(card.card(), getAbsoluteCoords(card.coords()),
    +                        null, card.side() == Side.FRONT));
    +            else
    +                System.out.println(parser.parseCard(card.card(), getAbsoluteCoords(card.coords()),
    +                        card.coords(), card.side() == Side.FRONT));
    +            System.out.println("\033[0m");
    +        } catch (CardException e) {
    +        }
    +    }
    +
    +    /**
    +     * Prints the user points and username.
    +     * 
    +     * @param username The player's username
    +     * @param color The player's associated color
    +     * @param points The player's point
    +     */
    +    private void printPoints(String username, Color color, Integer points) {
    +        int oldOffset = this.getHeight() - infoLineOffset;
    +        int termCols = this.getWidth();
    +        // int newOffset = 1;
    +        String out = this.parseUsername(username, color) + "'s points: " + points;
    +        System.out.println(this.setPosition((termCols - out.length()) / 4, oldOffset) + out);
    +    }
    +
    +    private int getDimStart(int max, int dim) {
    +        if (dim >= max)
    +            return 1;
    +
    +        int left = max - dim; // available space
    +        if (left % 2 == 1)
    +            left--;
    +        return left / 2; // starting coord
    +    }
    +
    +
    +    /**
    +     * Prints the "welcome" string.
    +     * 
    +     * @param x The starting x coordinate
    +     * @param y The starting y coordinate
    +     */
    +    private void printWelcome(int x, int y) {
    +        List<String> welcomeString = new ArrayList<>();
    +
    +        String prefix = setPosition(x, y);
    +        welcomeString.add(prefix
    +                + "  _       __           __                                               __          ");
    +        prefix = setPosition(x, ++y);
    +        welcomeString.add(prefix
    +                + " | |     / /  ___     / /  _____   ____     ____ ___     ___           / /_   ____  ");
    +        prefix = setPosition(x, ++y);
    +        welcomeString.add(prefix
    +                + " | | /| / /  / _ \\   / /  / ___/  / __ \\   / __  __ \\   / _ \\         / __/  / __ \\ ");
    +        prefix = setPosition(x, ++y);
    +        welcomeString.add(prefix
    +                + " | |/ |/ /  /  __/  / /  / /__   / /_/ /  / / / / / /  /  __/        / /_   / /_/ / ");
    +        prefix = setPosition(x, ++y);
    +        welcomeString.add(prefix
    +                + " |__/|__/   \\___/  /_/   \\___/   \\____/  /_/ /_/ /_/   \\___/         \\__/   \\____/  ");
    +
    +        for (int i = 0; i < welcomeString.size(); i++)
    +            System.out.println(welcomeString.get(i));
    +    }
    +
    +    /**
    +     * Prints either the small or big title.
    +     * 
    +     * @param x The starting x coordinate
    +     * @param y The starting y coordinate
    +     * @param isLittle Whether the title should be small or big
    +     */
    +    private void printTitle(int x, int y, boolean isLittle) {
    +        if (isLittle)
    +            printLittleTitle(x, y);
    +        else
    +            printBigTitle(x, y);
    +    }
    +
    +    /**
    +     * Prints the big title.
    +     * 
    +     * @param x The starting x coordinate
    +     * @param y The starting y coordinate
    +     */
    +    private void printBigTitle(int x, int y) {
    +        String white = "\033[0m", yellow = parser.getRightColor(Symbol.INKWELL), bold = "\033[1m";
    +        List<String> titleString = new ArrayList<>();
    +
    +        String prefix = setPosition(x, y);
    +        titleString.add(prefix
    +                + "  _____                                                                                                                                                                                                     _____  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + " ( ___ )---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------( ___ ) ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |                                                                                                                                                                                                     |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |                                                                                                                                                                                                     |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |                                                                                                                                                                                                     |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |           ...                         ..                                             ...     ...                      s                                                  ..    .       .x+=:.       |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |        xH88''~ .x8X                 dF                                            .=*8888n..'%888:                   :8                                            x .d88'    @88>    z'    ^%      |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |      :8888   .f'8888Hf        u.   '88bu.                    uL   ..             X    |8888f '8888                  .88       x.    .        .u    .                5888R     %8P        .   <k     |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |     :8888>  X8L  ^'''   ...ue888b  '*88888bu        .u     .@88b  @88R           88x. '8888X  8888>        u       :888ooo  .@88k  z88u    .d88B :@8c        u      '888R      .       .@8Ned8'     |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |     X8888  X888h        888R Y888r   ^'*8888N    ud8888.  ''Y888k/'*P           '8888k 8888X  ''*8h.    us888u.  -*8888888 ~'8888 ^8888   ='8888f8888r    us888u.    888R    .@88u   .@^%8888'      |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |     88888  |88888.      888R I888>  beWE '888L :888'8888.    Y888L               '8888 X888X .xH8    .@88 '8888'   8888      8888  888R     4888>'88'  .@88 '8888'   888R   ''888E' x88:  ')8b.     |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |     88888   %88888      888R I888>  888E  888E d888 '88%'     8888                 '8' X888|:888X    9888  9888    8888      8888  888R     4888> '    9888  9888    888R     888E  8888N=*8888     |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |     88888 '> '8888>     888R I888>  888E  888E 8888.+'        '888N               =~'  X888 X888X    9888  9888    8888      8888  888R     4888>      9888  9888    888R     888E   %8'    R88     |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |     '8888L %  |888   | u8888cJ888   888E  888F 8888L       .u./'888&               :h. X8*' |888X    9888  9888   .8888Lu=   8888 ,888B .  .d888L .+   9888  9888    888R     888E    @8Wou 9%      |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |      '8888  '-*''   /   '*888*P'   .888N..888  '8888c. .+ d888' Y888*'            X888xX'   '8888..: 9888  9888   ^%888*    '8888Y 8888'   ^'8888*'    9888  9888   .888B .   888&  .888888P'       |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |        '888.      :'      'Y'       ''888*''    '88888%   ' 'Y   Y'             :~'888f     '*888*'  '888*''888'    'Y'      'Y'   'YP        'Y'      '888*''888'  ^*888%    R888' '   ^'F         |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |          '''***~''                     ''         'YP'                              ''        '''     ^Y'   ^Y'                                         ^Y'   ^Y'     '%       ''                   |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |                                                                                                                                                                                                     |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |   |                                                                                                                                                                                                     |   |  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  |___|                                                                                                                                                                                                     |___|  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + " (_____)---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(_____) ");
    +
    +        System.out.println(bold + yellow);
    +        for (int i = 0; i < titleString.size(); i++)
    +            System.out.println(titleString.get(i));
    +        System.out.println(white);
    +    }
    +
    +    /**
    +     * Prints the small title.
    +     * 
    +     * @param x The starting x coordinate
    +     * @param y The starting y coordinate
    +     */
    +    private void printLittleTitle(int x, int y) {
    +        String white = "\033[0m", yellow = parser.getRightColor(Symbol.INKWELL), bold = "\033[1m";
    +        List<String> titleString = new ArrayList<>();
    +
    +        String prefix = setPosition(x, y);
    +        titleString.add(prefix
    +                + "    ______                __                         _   __            __                               __   _         ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "   / ____/  ____     ____/ /  ___     _  __         / | / /  ____ _   / /_   __  __   _____   ____ _   / /  (_)  _____ ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + "  / /      / __ \\   / __  /  / _ \\   | |/_/        /  |/ /  / __  /  / __/  / / / /  / ___/  / __  /  / /  / /  / ___/ ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + " / /___   / /_/ /  / /_/ /  /  __/  _>  <         / /|  /  / /_/ /  / /_   / /_/ /  / /     / /_/ /  / /  / /  (__  )  ");
    +        prefix = setPosition(x, ++y);
    +        titleString.add(prefix
    +                + " \\____/   \\____/   \\__,_/   \\___/  /_/|_|        /_/ |_/   \\__,_/   \\__/   \\__,_/  /_/      \\__,_/  /_/  /_/  /____/   ");
    +
    +        System.out.println(bold + yellow);
    +        for (int i = 0; i < titleString.size(); i++)
    +            System.out.println(titleString.get(i));
    +        System.out.println(white);
    +    }
    +
    +
    +    /**
    +     * Shows a deck and its "shadow", used to clearify what draw sources are decks.
    +     * 
    +     * @param coord The coordinates where the deck should be printed
    +     * @param reign The deck's top card's reign
    +     * @param deckType Whether the deck is resource or gold
    +     */
    +    private void printDeck(Pair<Integer, Integer> coord, Symbol reign, DrawSource deckType) {
    +        if (reign == null)
    +            return;
    +        String bianco = "\033[0m";
    +        int xx = 8, yy = 7 + 1;
    +
    +        List<String> underCover = new ArrayList<>();
    +        int x = coord.first(), y = coord.second();
    +
    +        String prefix = setPosition(x, y);
    +        underCover.add(prefix + "┌────────────────┐");
    +        prefix = setPosition(x, ++y);
    +        underCover.add(prefix + "│                │");
    +        prefix = setPosition(x, ++y);
    +        underCover.add(prefix + "│                │");
    +        prefix = setPosition(x, ++y);
    +        underCover.add(prefix + "│                │");
    +        prefix = setPosition(x, ++y);
    +        underCover.add(prefix + "│                │");
    +        prefix = setPosition(x, ++y);
    +        underCover.add(prefix + "└────────────────┘");
    +
    +        System.out.println(bianco);
    +        for (String s : underCover)
    +            System.out.println(s);
    +
    +        x = coord.first() + 2;
    +        y = coord.second() - 1;
    +        String topDeckCar = this.parser.getGenericBack(reign, new Pair<>(x, y));
    +        System.out.println(topDeckCar);
    +
    +        if (deckType == DrawSource.GOLDS_DECK)
    +            System.out.println(setPosition(x + xx, y - 1 - 1) + getCardIndex(deckType));
    +        if (deckType == DrawSource.RESOURCES_DECK)
    +            System.out.println(setPosition(x + xx, y + yy + 1) + getCardIndex(deckType));
    +
    +    }
    +
    +    /**
    +     * Prints the visible cards from which it's possible to draw.
    +     * 
    +     * @param coord The coordinates from where the printing should be started
    +     * @param visiblePlayableCards The drawable cards
    +     */
    +    private void printVisibleCards(Pair<Integer, Integer> coord,
    +            Map<DrawSource, PlayableCard> visiblePlayableCards) {
    +        String white = "\033[0m";
    +
    +        // obtain card obj
    +        PlayableCard firstG = visiblePlayableCards.get(DrawSource.FIRST_VISIBLE),
    +                secondG = visiblePlayableCards.get(DrawSource.SECOND_VISIBLE),
    +                thirdR = visiblePlayableCards.get(DrawSource.THIRD_VISIBLE),
    +                fourthR = visiblePlayableCards.get(DrawSource.FOURTH_VISIBLE);
    +
    +        // obtain card coord
    +        int x = coord.first(), y = coord.second();
    +        int xOffset = 18 + 2, yOffset = 6 + 2;
    +        Pair<Integer, Integer> firstCoord = new Pair<>(x, y),
    +                secondCoord = new Pair<>(x + xOffset, y), thirdCoord = new Pair<>(x, y + yOffset),
    +                fourthCoord = new Pair<>(x + xOffset, y + yOffset);
    +
    +        // obtain card as string (if it exists)
    +        try {
    +            String firstToPrint;
    +            String secondToPrint;
    +            String thirdToPrint;
    +            String fourthToPrint;
    +            int xx = 8, yy = 6;
    +
    +            if (firstG != null) {
    +                firstToPrint = this.parser.parseCard(firstG, firstCoord, null, true);
    +                System.out.println(firstToPrint);
    +                System.out.println(setPosition(firstCoord.first() + xx, firstCoord.second() - 1 - 2)
    +                        + getCardIndex(DrawSource.FIRST_VISIBLE));
    +                System.out.println(white);
    +            }
    +            if (secondG != null) {
    +                secondToPrint = this.parser.parseCard(secondG, secondCoord, null, true);
    +                System.out.println(secondToPrint);
    +                System.out
    +                        .println(setPosition(secondCoord.first() + xx, secondCoord.second() - 1 - 2)
    +                                + getCardIndex(DrawSource.SECOND_VISIBLE));
    +                System.out.println(white);
    +            }
    +            if (thirdR != null) {
    +                thirdToPrint = this.parser.parseCard(thirdR, thirdCoord, null, true);
    +                System.out.println(thirdToPrint);
    +                System.out.println(
    +                        setPosition(thirdCoord.first() + xx, thirdCoord.second() + yy + 1 + 1)
    +                                + getCardIndex(DrawSource.THIRD_VISIBLE));
    +                System.out.println(white);
    +            }
    +            if (fourthR != null) {
    +                fourthToPrint = this.parser.parseCard(fourthR, fourthCoord, null, true);
    +                System.out.println(fourthToPrint);
    +                System.out.println(
    +                        setPosition(fourthCoord.first() + xx, fourthCoord.second() + yy + 1 + 1)
    +                                + getCardIndex(DrawSource.FOURTH_VISIBLE));
    +                System.out.println(white);
    +            }
    +
    +        } catch (CardException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +    }
    +
    +    /**
    +     * Returns the index representing a draw source, in order to make easier for the user to choose
    +     * the draw source.
    +     * 
    +     * @param drawSource The draw source
    +     * 
    +     * @return The corresponding index
    +     */
    +    private char getCardIndex(DrawSource drawSource) {
    +        return switch (drawSource) {
    +            case FIRST_VISIBLE -> '1';
    +            case SECOND_VISIBLE -> '2';
    +            case THIRD_VISIBLE -> '3';
    +            case FOURTH_VISIBLE -> '4';
    +            case GOLDS_DECK -> 'G';
    +            case RESOURCES_DECK -> 'R';
    +            default -> '0';
    +        };
    +    }
    +
    +    /**
    +     * Prints a character a given amount of times.
    +     * 
    +     * @param c The char
    +     * @param times The times the char should be repeated
    +     * 
    +     * @return String obtained concatenating the char
    +     */
    +    private String repeatChar(char c, int times) {
    +
    +        StringBuilder s = new StringBuilder();
    +        for (int i = 0; i < times; i++)
    +            s.append(c);
    +        return s.toString();
    +    }
    +
    +    /**
    +     * Creates a box, used for centered messages
    +     * 
    +     * @param totalWidth The width (column) of the content
    +     * @param upperBorder The upper border
    +     * @param middleBorder The vertical border
    +     * @param lowerBorder The lower border
    +     */
    +    private void boxBuilder(int totalWidth, StringBuffer upperBorder, StringBuffer middleBorder,
    +            StringBuffer lowerBorder) {
    +        int lineWidth = totalWidth - 2;
    +
    +        // define the border template
    +        upperBorder.append("╔");
    +        upperBorder.append(repeatChar('═', lineWidth));
    +        upperBorder.append("╗");
    +
    +        middleBorder.append("╠");
    +        middleBorder.append(repeatChar('═', lineWidth));
    +        middleBorder.append("╣");
    +
    +        lowerBorder.append("╚");
    +        lowerBorder.append(repeatChar('═', lineWidth));
    +        lowerBorder.append("╝");
    +    }
    +
    +    private int getMaxElemLen(List<String> stringList) {
    +        int max = 0;
    +        for (String s : stringList) {
    +            if (s.length() > max)
    +                max = s.length();
    +        }
    +        return max;
    +    }
    +
    +
    +    /**
    +     * Parses a certain coordinate to another, representing where a link number should be printed.
    +     * 
    +     * @param coord The anchor card's coordinate
    +     * @param corner The anchor card's corner
    +     * 
    +     * @return The number's coordinates
    +     */
    +    private Pair<Integer, Integer> getNumberCoords(Pair<Integer, Integer> coord, Corner corner) {
    +        return switch (corner) {
    +            case Corner.TOP_LEFT -> new Pair<>(coord.first() - 2, coord.second() - 1);
    +            case Corner.TOP_RIGHT -> new Pair<>(coord.first() + cardCols + 1, coord.second() - 1);
    +            case Corner.BOTTOM_LEFT -> new Pair<>(coord.first() - 2, coord.second() + cardRows);
    +            case Corner.BOTTOM_RIGHT -> new Pair<>(coord.first() + cardCols + 1,
    +                    coord.second() + cardRows);
    +            default -> null;
    +        };
    +    }
    +
    +
    +    /**
    +     * Parses a certain coordinate to another, representing the coordinates of a hypotetical card
    +     * that could be linked to the anchor's card.
    +     * 
    +     * @param coord The anchor card's coordinates
    +     * @param corner The anchor card's corner
    +     * 
    +     * @return The hypotetical linked card
    +     */
    +    private Pair<Integer, Integer> getLinkedCoords(Pair<Integer, Integer> coord, Corner corner) {
    +        return switch (corner) {
    +            case Corner.TOP_LEFT -> new Pair<>(coord.first() + 1, coord.second() - 1);
    +            case Corner.TOP_RIGHT -> new Pair<>(coord.first() - 1, coord.second() - 1);
    +            case Corner.BOTTOM_LEFT -> new Pair<>(coord.first() + 1, coord.second() + 1);
    +            case Corner.BOTTOM_RIGHT -> new Pair<>(coord.first() - 1, coord.second() + 1);
    +            default -> null;
    +        };
    +    }
    +
    +    // ! PUBLIC METHODS //
    +
    +    /**
    +     * Clears the terminal.
    +     */
    +    public void clearTerminal() {
    +        System.out.println("\033[2J");
    +    }
    +
    +    /**
    +     * Prints the command prompt.
    +     */
    +    public void printPrompt(String customMessage) {
    +        int termRows = this.getHeight();
    +        if (customMessage == "") {
    +            System.out.print(this.setPosition(1, termRows - infoLineOffset + 1));
    +        } else {
    +            System.out.print(
    +                    this.setPosition(1, termRows - infoLineOffset + 1) + customMessage + " ");
    +        }
    +        System.out.flush();
    +    }
    +
    +
    +    /**
    +     * Prints a list of Strings to the terminal, first element of first line, last element on last
    +     * line.
    +     * 
    +     * @param messages List of messages to display
    +     */
    +    public void printMessages(List<String> messages) {
    +        int termRows = this.getHeight();
    +        Integer offset = 0;
    +        for (String string : messages) {
    +            System.out.println(this.setPosition(1, termRows - infoLineOffset - offset) + string);
    +            offset++;
    +        }
    +    }
    +
    +
    +    /**
    +     * Prints a list of Strings to the terminal, first element on last line, last element of first
    +     * line.
    +     * 
    +     * @param message List of messages to display
    +     */
    +    public void printListReverse(List<String> message) {
    +        int termRows = this.getHeight();
    +        Integer offset = 0;
    +        int size = message.size();
    +        for (String string : message) {
    +            System.out.println(
    +                    this.setPosition(1, termRows - infoLineOffset - size + offset + 1) + string);
    +            offset++;
    +        }
    +    }
    +
    +    /**
    +     * Prints a message in the line above the prompt.
    +     *
    +     * @param string The message to print
    +     */
    +    public void printMessage(String string) {
    +        int termRows = this.getHeight();
    +        System.out.println(this.setPosition(1, termRows - infoLineOffset) + string);
    +    }
    +
    +    /**
    +     * Prints all the players' available resources (from the board).
    +     *
    +     * @param availableResources map from the type of resource (Symbol) to its quantity (Integer)
    +     * @param verticalOffset offset lines from the top (default is 1)
    +     */
    +    public void printAvailableResources(Map<Symbol, Integer> availableResources,
    +            Integer verticalOffset) {
    +        int vertCoord = this.getHeight() - this.infoLineOffset;
    +        int termCols = this.getWidth();
    +        String out = "";
    +        String spaces = "    ";
    +        Integer len = availableResources.keySet().size() * (5 + spaces.length()); // icon, space, :,
    +                                                                                  // space, number
    +        List<Symbol> toPrint = List.of(Symbol.PLANT, Symbol.INSECT, Symbol.FUNGUS, Symbol.ANIMAL,
    +                Symbol.PARCHMENT, Symbol.FEATHER, Symbol.INKWELL);
    +
    +        for (Symbol resource : toPrint) {
    +            out += parser.getRightColor(resource) + parser.getRightIcon(resource) + ": "
    +                    + availableResources.get(resource) + spaces;
    +        }
    +
    +        System.out.println(this.setPosition((termCols - len) / 2, vertCoord) + out + "\033[0m");
    +    }
    +
    +    /**
    +     * Prints the whole board, including username, points and resources.
    +     *
    +     * @param username The username to print
    +     * @param board the board to be printed
    +     */
    +    public void printPlayerBoard(String username, ClientBoard board) {
    +        if (board == null) {
    +            this.printMessage("No such player exists!");
    +            return;
    +        }
    +        Map<Integer, ShownCard> placed = board.getPlaced();
    +        for (Integer turn : placed.keySet()) {
    +            this.printCard(placed.get(turn));
    +        }
    +        this.printAvailableResources(board.getAvailableResources(),
    +                this.getHeight() - infoLineOffset);
    +        this.printPoints(username, board.getColor(), board.getPoints());
    +    }
    +
    +    /**
    +     * Prints the hand of the player, which includes the 3 available-to-play cards.
    +     *
    +     * @param username username of the player
    +     * @param color color of the player's token
    +     * @param hand list of cards (as IDs)
    +     */
    +    public void printHand(String username, Color color, List<PlayableCard> hand) {
    +        int termCols = this.getWidth();
    +        Integer handSize = hand.size();
    +        Integer spaces = 4;
    +
    +        Integer last = (termCols - (handSize) * (cardCols)) / 2 - spaces * (handSize - 1) / 2;
    +        for (PlayableCard card : hand) {
    +            try {
    +                System.out.println(
    +                        parser.parseCard(card, new Pair<Integer, Integer>(last, 2), null, true)
    +                                + "\033[0m");
    +                last += cardCols + spaces;
    +            } catch (Exception e) {
    +                e.printStackTrace();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Prints the objectives, both common and secret, of a given player.
    +     *
    +     * @param username username of the player
    +     * @param color color of the player's token
    +     * @param secret secret objective (as ID)
    +     * @param visibles array of common objectives (as IDs)
    +     */
    +    public void printObjectives(String username, Color color, Objective secret,
    +            Pair<Objective, Objective> visibles) {
    +        int termCols = this.getWidth();
    +        Integer strlen;
    +
    +        strlen = ("Your secret objective").length();
    +        username = this.parseUsername("Your", color) + " secret objective:";
    +        Integer last = (termCols - strlen) / 2;
    +        System.out.println(this.setPosition(last, 1) + username);
    +
    +        last = (termCols - cardCols) / 2;
    +        System.out.println(
    +                parser.parseObjective(secret, new Pair<Integer, Integer>(last, 2)) + "\033[0m");
    +
    +        int verticalSpaceAlreadyUsedForSecretObjective = (7) + 1 + 1;
    +        printObjectivePair("Common objectives:", visibles,
    +                verticalSpaceAlreadyUsedForSecretObjective);
    +
    +    }
    +
    +    /**
    +     * Prints a pair of objectives, with a brief description above them.
    +     * 
    +     * @param pairObjectives pair of objectives
    +     * @param heightOffset offset lines from the top (default is 1)
    +     */
    +    public void printObjectivePair(String message, Pair<Objective, Objective> pairObjectives,
    +            int heightOffset) {
    +        int yOffset = (heightOffset <= 0) ? 1 : heightOffset;
    +
    +        // common objectives STRING
    +        int xCoord = getDimStart(this.terminal.getWidth(), message.length());
    +        message = setPosition(xCoord, yOffset++) + message;
    +        System.out.println(message);
    +
    +        // common objectives CARDS
    +        int cardWidth = 18, spaceBetweenSides = 4;
    +        xCoord = getDimStart(this.getWidth(), (2 * cardWidth) + spaceBetweenSides);
    +
    +        Pair<Integer, Integer> obj1Coord = new Pair<>(xCoord, yOffset);
    +        Pair<Integer, Integer> obj2Coord =
    +                new Pair<>(xCoord + cardWidth + spaceBetweenSides, yOffset);
    +        String obj1 = this.parser.parseObjective(pairObjectives.first(), obj1Coord);
    +        String obj2 = this.parser.parseObjective(pairObjectives.second(), obj2Coord);
    +
    +        System.out.println(obj1 + obj2);
    +    }
    +
    +    /**
    +     * Prints the message history of the most recent messages.
    +     *
    +     * @param chat chat object, as a list of strings
    +     */
    +    public void printChat(List<String> chat) {
    +        printSimpleList(chat, false, false);
    +    }
    +
    +    /**
    +     * Prints the welcome screen in the middle of the tui view.
    +     */
    +    public void printWelcomeScreen() {
    +
    +        // get title and welcome sizes
    +        int welcomeHeight = 5, welcomeWidth = 88 + 2; // width must be even (pari)
    +        int spaceBetween = 3;
    +        int titleHeight = 21, titleWidth = 210 + 2; // width must be even (pari)
    +        int verticalOffset = -10;
    +
    +        boolean isLittle = (this.terminal.getWidth() < titleWidth
    +                || this.terminal.getHeight() < welcomeHeight - verticalOffset + titleHeight) ? true
    +                        : false;
    +        if (isLittle) {
    +            titleHeight = 5;
    +            titleWidth = 118 + 2;
    +            verticalOffset = -1;
    +        }
    +
    +        // get coordinates
    +        int welcomeStartY =
    +                getDimStart(this.getHeight(), welcomeHeight + spaceBetween + titleHeight);
    +        int titleStartY = welcomeStartY + welcomeHeight + spaceBetween;
    +
    +        int welcomeStartX = getDimStart(this.getWidth(), welcomeWidth);
    +        int titleStartX = getDimStart(this.getWidth(), titleWidth);
    +
    +        // print welcome and title
    +        printWelcome(welcomeStartX, welcomeStartY + verticalOffset);
    +        printTitle(titleStartX, titleStartY + verticalOffset, isLittle);
    +    }
    +
    +    /**
    +     * Prints the game's ranking.
    +     * 
    +     * @param ranking The Leaderboard
    +     * @param username The player's username, used to highlight your rank
    +     */
    +    public synchronized void printEndScreen(List<LeaderboardEntry> ranking, String username) {
    +        int maxWidth = this.getWidth() - 2;
    +
    +        this.clearTerminal();
    +        List<String> winning = new ArrayList<String>();
    +        List<String> losing = new ArrayList<String>();
    +        for (LeaderboardEntry leaderboardEntry : ranking) {
    +            String user = leaderboardEntry.username();
    +            if (user.equals(username)) {
    +                String color;
    +                if (leaderboardEntry.winner()) {
    +                    color = "\033[31m";
    +                } else {
    +                    color = "\033[33m";
    +                }
    +
    +                user = color + "YOU" + "\033[0m";
    +            }
    +            String entry = user + " (" + leaderboardEntry.points() + ")";
    +            if (leaderboardEntry.winner()) {
    +                winning.add(entry);
    +            } else {
    +                losing.add(entry);
    +            }
    +        }
    +
    +        String winningTitle = winning.size() == 1 ? "Winner: " : "Draw:";
    +        String losingTitle = "Losers:";
    +
    +        final int startPos = (maxWidth - winningTitle.length()) / 2;
    +        System.out.println(this.setPosition(startPos, 2) + winningTitle);
    +        int i = 0;
    +        final int base = 3;
    +        for (String winner : winning) {
    +            System.out.println(this.setPosition(startPos, base + i) + winner);
    +            i++;
    +        }
    +
    +        if (losing.size() > 0) {
    +            i++;
    +            System.out.println(this.setPosition(startPos, base + i) + losingTitle);
    +            i++;
    +            for (String loser : losing) {
    +                System.out.println(this.setPosition(startPos, base + i) + loser);
    +                i++;
    +            }
    +        }
    +
    +        System.out.println(this.setPosition(0, this.getHeight()) + " ");
    +        System.exit(0);
    +    }
    +
    +    /**
    +     * Prints the specified initial card front and back in the middle of the screen.
    +     * 
    +     * @param initialCard initial card to print
    +     * @param heightOffset offset lines from the top (default is 1)
    +     */
    +    public void printInitialSideBySide(InitialCard initialCard, int heightOffset) {
    +
    +        int offset = (heightOffset <= 0) ? 1 : heightOffset;
    +        String faceup, facedown;
    +        int cardWidth = 18, spaceBetweenSides = 4;
    +        int width = getDimStart(this.getWidth(), (2 * cardWidth) + spaceBetweenSides);
    +
    +        Pair<Integer, Integer> faceupCoord = new Pair<>(width, offset);
    +        Pair<Integer, Integer> facedownCoord =
    +                new Pair<>(width + cardWidth + spaceBetweenSides, offset);
    +
    +        try {
    +            faceup = this.parser.parseCard(initialCard, faceupCoord, null, true);
    +            facedown = this.parser.parseCard(initialCard, facedownCoord, null, false);
    +            System.out.println(faceup + facedown);
    +        } catch (CardException e) {
    +        }
    +    }
    +
    +    /**
    +     * Prints the specified initial card front and back in the middle of the screen.
    +     * 
    +     * @param playableCard gold/resource card to print
    +     * @param heightOffset offset lines from the top. For default (y-centered) must be 0
    +     */
    +    public void printPlayableFrontAndBack(PlayableCard playableCard, int heightOffset) {
    +        int yCoord = (heightOffset > 0) ? heightOffset : getDimStart(getHeight() - 1, 6);
    +        int cardWidth = 18, spaceBetweenSides = 4;
    +        int xCoord = getDimStart(getWidth(), cardWidth + spaceBetweenSides + cardWidth);
    +
    +        String faceUp, faceDown, bianco = "\033[0m";
    +        Pair<Integer, Integer> faceupCoord = new Pair<>(xCoord, yCoord);
    +        Pair<Integer, Integer> facedownCoord =
    +                new Pair<>(xCoord + cardWidth + spaceBetweenSides, yCoord);
    +
    +        try {
    +            faceUp = this.parser.parseCard(playableCard, faceupCoord, null, true);
    +            faceDown = this.parser.parseCard(playableCard, facedownCoord, null, false);
    +            System.out.println(faceUp + faceDown + bianco);
    +        } catch (CardException e) {
    +        }
    +    }
    +
    +    /**
    +     * Prints a one-line message in the center of the screen.
    +     *
    +     * @param message message to display
    +     * @param heightOffset offset lines from the top. For default (y-centered) must be 0
    +     */
    +    public void printCenteredMessage(String message, int heightOffset) {
    +        int maxWidth = message.length();
    +        if (maxWidth > getWidth() - 4)
    +            return;
    +
    +        String resetStyle = "\033[0m", style = "\033[1m";
    +
    +        // int yCoord = getDimStart(this.terminal.getHeight(), 3);
    +        int yCoord = (heightOffset > 0) ? heightOffset : getDimStart(this.terminal.getHeight(), 3);
    +        int xCoord = getDimStart(this.terminal.getWidth(), maxWidth + 4);
    +        String prefix = setPosition(xCoord, yCoord);
    +
    +        // define the border template
    +        StringBuffer upperBorder = new StringBuffer("╔");
    +        upperBorder.append(repeatChar('═', maxWidth + 2));
    +        upperBorder.append("╗");
    +        StringBuffer center = new StringBuffer("║ ");
    +        center.append(style + message + resetStyle);
    +        center.append(" ║");
    +        StringBuffer lowerBorder = new StringBuffer("╚");
    +        lowerBorder.append(repeatChar('═', maxWidth + 2));
    +        lowerBorder.append("╝");
    +
    +        // print
    +        System.out.println(prefix + upperBorder.toString());
    +        prefix = setPosition(xCoord, ++yCoord);
    +        System.out.println(prefix + center.toString());
    +        prefix = setPosition(xCoord, ++yCoord);
    +        System.out.println(prefix + lowerBorder.toString());
    +
    +    }
    +
    +    /**
    +     * Prints the drawing screen, containing the 2 decks and the 4 visible cards. Unavailable
    +     * resources are not displayed.
    +     *
    +     * @param decksTopReign pair of the 2 top-deck cards
    +     * @param visiblePlayableCards map of visible cards
    +     */
    +    public void printDrawingScreen(Pair<Symbol, Symbol> decksTopReign,
    +            Map<DrawSource, PlayableCard> visiblePlayableCards) {
    +        // int maxHeight = this.getHeight() - this.infoLineOffset;
    +        int deckHeight = 6 + 2, deckWidth = 18 + 1; // width must be even (pari)
    +        int xSpaceBetween = 12, ySpaceBetween = 0;
    +        int cardsHeight = 6 + 2, cardsWidth = 18 + 2 + 18; // width must be even (pari)
    +
    +        int deckStartX = getDimStart(this.getWidth(), deckWidth + xSpaceBetween + cardsWidth);
    +        int deckStartY = getDimStart(this.getHeight(), deckHeight + ySpaceBetween + cardsHeight);
    +        int cardsStartX = deckStartX + deckWidth + xSpaceBetween;
    +        int cardsStartY = deckStartY;
    +
    +        printDeck(new Pair<>(deckStartX, deckStartY), decksTopReign.first(), DrawSource.GOLDS_DECK);
    +        printDeck(new Pair<>(deckStartX, deckStartY + deckHeight + ySpaceBetween),
    +                decksTopReign.second(), DrawSource.RESOURCES_DECK);
    +        printVisibleCards(new Pair<>(cardsStartX, cardsStartY), visiblePlayableCards);
    +    }
    +
    +    /**
    +     * Prints the list of matches (joinable or not) in the center of the screen. It can print a
    +     * maximum of 99 matches.
    +     *
    +     * @param joinableMatches list of available matches
    +     * @param unavailableMatches list of not joinable matches
    +     * @param heightOffset offset lines from the top (default is 1)
    +     */
    +    public void printMatchesLobby(List<AvailableMatch> joinableMatches,
    +            List<AvailableMatch> unavailableMatches, int heightOffset) {
    +        int yCoord = (heightOffset > 0) ? heightOffset : 1;
    +        int maxWidth = 45;
    +        int xCoord = getDimStart(getWidth(), maxWidth);
    +        String prefix = setPosition(xCoord, yCoord);
    +
    +        // define the border template
    +        StringBuffer upperBorder = new StringBuffer();
    +        StringBuffer middleBorder = new StringBuffer();
    +        StringBuffer lowerBorder = new StringBuffer();
    +        boxBuilder(maxWidth, upperBorder, middleBorder, lowerBorder);
    +
    +        // print upper and middle border
    +        System.out.println(prefix + upperBorder.toString());
    +        prefix = setPosition(xCoord, ++yCoord);
    +        System.out.println(prefix + "║      \033[1mMatches                        Slots\033[0m ║"); // manually
    +                                                                                                    // adjust
    +                                                                                                    // according
    +                                                                                                    // to
    +                                                                                                    // maxWidth
    +        prefix = setPosition(xCoord, ++yCoord);
    +        System.out.println(prefix + middleBorder.toString());
    +        prefix = setPosition(xCoord, ++yCoord);
    +
    +
    +        // print list of joinable matches
    +        String white = "\033[0m", green = "\033[32m", yellow = "\033[33m";
    +        int matchIndex = 1;
    +        for (AvailableMatch m1 : joinableMatches) {
    +
    +            if (joinableMatches.get(matchIndex - 1).isRejoinable()) {
    +                System.out.printf("%s║ %s[%02d] %-31s    %s  ║", prefix, yellow, matchIndex,
    +                        m1.name().toString(), white); // manually adjust according to maxWidth
    +            } else {
    +                System.out.printf("%s║ %s[%02d] %-31s %s/%s%s  ║", prefix, green, matchIndex,
    +                        m1.name().toString(), m1.currentPlayers().toString(),
    +                        m1.maxPlayers().toString(), white); // manually adjust according to maxWidth
    +            }
    +
    +            prefix = setPosition(xCoord, ++yCoord);
    +            matchIndex++;
    +        }
    +
    +        // print list of unavailable matches
    +        String red = "\033[31m";
    +        for (AvailableMatch m2 : unavailableMatches) {
    +
    +            System.out.printf("%s║ [--] %s%-31s %s/%s%s  ║", prefix, red, m2.name().toString(),
    +                    m2.currentPlayers().toString(), m2.maxPlayers().toString(), white); // manually
    +                                                                                        // adjust
    +                                                                                        // according
    +                                                                                        // to
    +                                                                                        // maxWidth
    +            prefix = setPosition(xCoord, ++yCoord);
    +        }
    +
    +        // print lower border
    +        System.out.print(prefix + lowerBorder.toString());
    +    }
    +
    +    /**
    +     * Prints the scoreboard at the end of the match.
    +     *
    +     * @param playerToPoints map from player name as string, to total points as integer
    +     * @param heightOffset offset lines from the top (default is 1)
    +     */
    +    public void printScoreboard(Map<String, Integer> playerToPoints, int heightOffset) {
    +        int yCoord = (heightOffset > 0) ? heightOffset : 1;
    +        int maxWidth = 38 + 2;
    +        int xCoord = getDimStart(getWidth(), maxWidth);
    +        String prefix = setPosition(xCoord, yCoord);
    +
    +        // define the border template
    +        StringBuffer upperBorder = new StringBuffer("╔");
    +        upperBorder.append(repeatChar('═', maxWidth - 2));
    +        upperBorder.append("╗");
    +        StringBuffer middleBorder = new StringBuffer("╠");
    +        middleBorder.append(repeatChar('═', maxWidth - 2));
    +        middleBorder.append("╣");
    +        StringBuffer lowerBorder = new StringBuffer("╚");
    +        lowerBorder.append(repeatChar('═', maxWidth - 2));
    +        lowerBorder.append("╝");
    +
    +        // print upper and middle border
    +        System.out.println(prefix + upperBorder.toString());
    +        prefix = setPosition(xCoord, ++yCoord);
    +        System.out.println(prefix + "║ \033[1mPlayer                         Score\033[0m ║"); // manually
    +                                                                                               // adjust
    +                                                                                               // according
    +                                                                                               // to
    +                                                                                               // maxWidth
    +        prefix = setPosition(xCoord, ++yCoord);
    +        System.out.println(prefix + middleBorder.toString());
    +        prefix = setPosition(xCoord, ++yCoord);
    +
    +        // print list of players
    +        for (String s : playerToPoints.keySet()) {
    +            System.out.printf("%s║ %-31s%4s  ║", prefix, s, playerToPoints.get(s).toString()); // manually
    +                                                                                               // adjust
    +                                                                                               // according
    +                                                                                               // to
    +                                                                                               // maxWidth
    +            prefix = setPosition(xCoord, ++yCoord);
    +        }
    +
    +        // print lower border
    +        System.out.print(prefix + lowerBorder.toString());
    +    }
    +
    +    /**
    +     * Prints the hand of the player at the bottom of the screen.
    +     *
    +     * @param hand list of the 3 playable cards (hand)
    +     */
    +    public void printHandAtBottom(List<PlayableCard> hand) {
    +        int termCols = this.getWidth();
    +        Integer handSize = hand.size();
    +        Integer spaces = 4;
    +
    +        Integer last = (termCols - (handSize) * (cardCols)) / 2 - spaces * (handSize - 1) / 2;
    +        Integer row = this.getHeight() - TuiPrinter.cardRows - 3;
    +
    +        for (PlayableCard card : hand) {
    +            try {
    +                System.out.println(
    +                        parser.parseCard(card, new Pair<Integer, Integer>(last, row), null, true)
    +                                + "\033[0m");
    +                last += cardCols + spaces;
    +            } catch (Exception e) {
    +                e.printStackTrace();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Prints a list of strings with a box around them.
    +     *
    +     * @param stringList list of strings
    +     * @param msg message to display
    +     * @param textColor color of the players' name (red or green)
    +     * @param isCentered if the list has to be centered in the tui or not
    +     */
    +    public void printStringsBoxed(List<String> stringList, String msg, Color textColor,
    +            Boolean isCentered) {
    +        int maxWidth = 40; // leave it even
    +        int xCoord = getDimStart(getWidth(), maxWidth);
    +        int yCoord = (isCentered) ? getDimStart(terminal.getHeight(), stringList.size() + 4) : 1;
    +        String bold = "\033[1m", reset = "\033[0m", color;
    +        switch (textColor) {
    +            case RED:
    +                color = "\033[31m";
    +                break;
    +            case GREEN:
    +                color = "\033[32m";
    +                break;
    +            default:
    +                color = reset;
    +                break;
    +        }
    +
    +        // define the border template
    +        StringBuffer upperBorder = new StringBuffer();
    +        StringBuffer middleBorder = new StringBuffer();
    +        StringBuffer lowerBorder = new StringBuffer();
    +        boxBuilder(maxWidth, upperBorder, middleBorder, lowerBorder);
    +
    +        // define title of the table
    +        // String msg = "Connected Players";
    +        StringBuffer title = new StringBuffer();
    +        title.append("║").append(bold);
    +        if (msg.length() % 2 != 0) {
    +            title.append(repeatChar(' ', (maxWidth - msg.length() - 2) / 2));
    +            title.append(msg);
    +            title.append(repeatChar(' ', ((maxWidth - msg.length() - 2) / 2) + 1));
    +
    +        } else {
    +            title.append(repeatChar(' ', (maxWidth - msg.length() - 2) / 2));
    +            title.append(msg);
    +            title.append(repeatChar(' ', (maxWidth - msg.length() - 2) / 2));
    +        }
    +        title.append("║").append(reset);
    +
    +        // define players' lines
    +        List<String> playerList = new ArrayList<>();
    +        for (String s : stringList) {
    +
    +            StringBuffer player = new StringBuffer();
    +            player.append("║").append(color);
    +            if (s.length() % 2 != 0) {
    +                player.append(repeatChar(' ', (maxWidth - s.length() - 2) / 2));
    +                player.append(s);
    +                player.append(repeatChar(' ', ((maxWidth - s.length() - 2) / 2) + 1));
    +
    +            } else {
    +                player.append(repeatChar(' ', (maxWidth - s.length() - 2) / 2));
    +                player.append(s);
    +                player.append(repeatChar(' ', (maxWidth - s.length() - 2) / 2));
    +            }
    +            player.append(reset).append("║");
    +
    +            playerList.add(player.toString());
    +        }
    +
    +        // print it all
    +        String prefix = setPosition(xCoord, yCoord);
    +        System.out.println(prefix + upperBorder.toString());
    +        prefix = setPosition(xCoord, ++yCoord);
    +        System.out.println(prefix + title.toString());
    +        prefix = setPosition(xCoord, ++yCoord);
    +        System.out.println(prefix + middleBorder.toString());
    +        prefix = setPosition(xCoord, ++yCoord);
    +        for (String s : playerList) {
    +            System.out.println(prefix + s);
    +            prefix = setPosition(xCoord, ++yCoord);
    +        }
    +        System.out.println(prefix + lowerBorder);
    +
    +    }
    +
    +    /**
    +     * Prints a list, simple or numbered, either in the center or in the bottom left of the tui.
    +     *
    +     * @param stringList list of strings
    +     * @param isCentered if you want it centered or not
    +     * @param isNumbered if you want it numbered or not
    +     */
    +    public void printSimpleList(List<String> stringList, Boolean isCentered, Boolean isNumbered) {
    +        // coords with case
    +        int xCoord = (isCentered) ? getDimStart(getWidth(), getMaxElemLen(stringList)) : 1;
    +        int yCoord = (isCentered) ? (terminal.getHeight() - stringList.size())
    +                : (this.getHeight() - infoLineOffset + 1 - stringList.size());
    +        int index = 0;
    +        if (yCoord <= 0) {
    +            index = -yCoord + 2;
    +            yCoord = 1;
    +        }
    +
    +        // printing phase
    +        int i = 1;
    +        String prefix = setPosition(xCoord, yCoord);
    +        for (; index < stringList.size(); index++) {
    +            if (isNumbered)
    +                System.out.println(prefix + String.valueOf(i++) + ") " + stringList.get(index));
    +            else
    +                System.out.println(prefix + stringList.get(index));
    +
    +            prefix = setPosition(xCoord, ++yCoord);
    +        }
    +    }
    +
    +    /**
    +     * Prints indexes for available spots, during the placing card phase.
    +     *
    +     * @param validPlaces map FROM board's coordinates where the hypotetic card would be TO a pair,
    +     *        consisting of a number (the index) and the corner where future card would be linked
    +     */
    +    public void printValidPlaces(Map<Pair<Integer, Integer>, Pair<Integer, Corner>> validPlaces) {
    +        Corner link;
    +        Pair<Integer, Integer> abs;
    +        Pair<Integer, Integer> linkedCard;
    +        for (Pair<Integer, Integer> coord : validPlaces.keySet()) {
    +            link = validPlaces.get(coord).second();
    +            linkedCard = this.getLinkedCoords(coord, link);
    +            abs = this.getNumberCoords(this.getAbsoluteCoords(linkedCard), link);
    +
    +            System.out.print(
    +                    this.setPosition(abs.first(), abs.second()) + validPlaces.get(coord).first());
    +            System.out.flush();
    +        }
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/ValidPositions.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/ValidPositions.html new file mode 100644 index 00000000..1c7df47b --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/ValidPositions.html @@ -0,0 +1 @@ +ValidPositions

    ValidPositions

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total49 of 20175%5 of 1050%411102916
    getValidPlaces()460%40%338811
    isValid(Pair)21285%1150%121301
    addCard(ShownCard)17398%4100%0311101
    static {...}35100%n/a010301
    offsetCoord(Pair, Pair)24100%n/a010101
    ValidPositions()8100%n/a010301
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/ValidPositions.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/ValidPositions.java.html new file mode 100644 index 00000000..b84fd8fb --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/ValidPositions.java.html @@ -0,0 +1,97 @@ +ValidPositions.java

    ValidPositions.java

    package it.polimi.ingsw.client.frontend.tui;
    +
    +import java.util.HashMap;
    +import java.util.Map;
    +import java.util.Optional;
    +import it.polimi.ingsw.client.frontend.ShownCard;
    +import it.polimi.ingsw.exceptions.CardException;
    +import it.polimi.ingsw.gamemodel.CardFace;
    +import it.polimi.ingsw.gamemodel.Corner;
    +import it.polimi.ingsw.gamemodel.Symbol;
    +import it.polimi.ingsw.utils.Pair;
    +
    +/**
    + * Valid positions of a board, ie all the points a new card can be linked to
    + */
    +public class ValidPositions {
    +    private final Map<Pair<Integer, Integer>, BoardPosition> coordinates;
    +    private static final Map<Corner, Pair<Integer, Integer>> offsets =
    +            Map.of(Corner.TOP_LEFT, new Pair<Integer, Integer>(-1, 1), Corner.TOP_RIGHT, new Pair<Integer, Integer>(1, 1),
    +                    Corner.BOTTOM_LEFT, new Pair<Integer, Integer>(-1, -1), Corner.BOTTOM_RIGHT, new Pair<Integer, Integer>(1, -1));
    +
    +    
    +    /**
    +     * Class constructor.
    +     */
    +    public ValidPositions() {
    +        this.coordinates = new HashMap<>();
    +    }
    +    
    +    /**
    +     * Sums two coordinates.
    +     * 
    +     * @param coord First coordinate
    +     * @param offset Second coordinate
    +     * 
    +     * @return The sum of the two coordinates
    +     */
    +    private Pair<Integer, Integer> offsetCoord(Pair<Integer, Integer> coord, Pair<Integer, Integer> offset) {
    +        return new Pair<Integer, Integer>(coord.first() + offset.first(), coord.second() + offset.second());
    +    }
    +
    +    
    +    /**
    +     * Checks if a coordinate is a valid link point.
    +     * 
    +     * @param coord The coordinate to check
    +     * 
    +     * @return whether the coordinate is a valid link point or not
    +     */
    +    public boolean isValid(Pair<Integer, Integer> coord) {
    +        if (this.coordinates.get(coord) == null) {
    +            return false;
    +        }
    +
    +        return this.coordinates.get(coord).isValid();
    +    }
    +
    +    /**
    +     * Gets all the valid linking points.
    +     * 
    +     * @return A map from coordinate to anchor's corner and linking point's index
    +     */
    +    public Map<Pair<Integer, Integer>, Pair<Integer, Corner>> getValidPlaces() {
    +        Map<Pair<Integer, Integer>, Pair<Integer, Corner>> valids = new HashMap<>();
    +        int pos = 1;
    +        for (Pair<Integer, Integer> coord : this.coordinates.keySet()) {
    +            if (this.coordinates.get(coord).isValid()) {
    +                valids.put(coord, new Pair<Integer,Corner>(pos, this.coordinates.get(coord).link().get()));
    +                pos++;
    +            }
    +        }
    +
    +        return valids;
    +    }
    +    
    +    /**
    +     * Adds a card, updating all the valid linking points.
    +     * 
    +     * @param card The added card
    +     */
    +    public void addCard(ShownCard card) {
    +        CardFace cardFace = card.card().getSide(card.side());
    +        Pair<Integer, Integer> coord = card.coords();
    +        this.coordinates.put(coord, new BoardPosition(false, Optional.empty()));
    +        for (Corner corner : offsets.keySet()) {
    +            try {
    +                if (!cardFace.getCorner(corner).equals(Symbol.EMPTY_CORNER)) {
    +                    this.coordinates.putIfAbsent(this.offsetCoord(coord, offsets.get(corner)), new BoardPosition(true, Optional.of(corner)));
    +                } else {
    +                    this.coordinates.put(this.offsetCoord(coord, offsets.get(corner)), new BoardPosition(false, Optional.empty()));
    +                }
    +            } catch (CardException e) {
    +            }
    +        }
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/index.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/index.html new file mode 100644 index 00000000..5ef4e1ee --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.frontend.tui

    it.polimi.ingsw.client.frontend.tui

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total5,287 of 5,4482%287 of 2921%2552631,0551,0759610246
    TuiPrinter3,5820%1470%127127595595464611
    GraphicalViewTUI1,5810%1350%114114422422393911
    InputHandler560%n/a6619196611
    ValidPositions4915275%5550%41110291601
    PlayerControls0%n/a44994411
    BoardPosition100%n/a01010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/index.source.html b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/index.source.html new file mode 100644 index 00000000..6eb74bee --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend.tui/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.frontend.tui

    it.polimi.ingsw.client.frontend.tui

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total5,287 of 5,4482%287 of 2921%2552631,0551,0759610246
    TuiPrinter.java3,5820%1470%127127595595464611
    GraphicalViewTUI.java1,5810%1350%114114422422393911
    InputHandler.java560%n/a6619196611
    ValidPositions.java4915275%5550%41110291601
    PlayerControls.java0%n/a44994411
    BoardPosition.java100%n/a01010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/ClientBoard.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/ClientBoard.html new file mode 100644 index 00000000..7a73c2a9 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/ClientBoard.html @@ -0,0 +1 @@ +ClientBoard

    ClientBoard

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total155 of 1550%0 of 0n/a151534341515
    placeCard(Pair, PlayableCard, Side, Integer, Map)370%n/a116611
    ClientBoard(Color, List)360%n/a11101011
    placeInitial(Side, Map)360%n/a114411
    lambda$new$0(Symbol)80%n/a111111
    drawCard(PlayableCard)60%n/a112211
    setSecretObjective(Objective)40%n/a112211
    setInitial(InitialCard)40%n/a112211
    getInitialCard()30%n/a111111
    getPlacementNumber()30%n/a111111
    getHand()30%n/a111111
    getPoints()30%n/a111111
    getPlaced()30%n/a111111
    getAvailableResources()30%n/a111111
    getColor()30%n/a111111
    getObjective()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/ClientBoard.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/ClientBoard.java.html new file mode 100644 index 00000000..5184de6d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/ClientBoard.java.html @@ -0,0 +1,158 @@ +ClientBoard.java

    ClientBoard.java

    package it.polimi.ingsw.client.frontend;
    +
    +import java.util.ArrayList;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.utils.Pair;
    +
    +/**
    + * This class contains just elements needed to show the player's board, points, resources, hand and objectives
    + */
    +public class ClientBoard {
    +    private final Map<Integer, ShownCard> placed;
    +    private Integer placementNumber;
    +    private List<PlayableCard> hand;
    +    private Integer points;
    +    private Map<Symbol, Integer> availableResources;
    +    private final Color color;
    +    private Objective objective;
    +    private InitialCard initialCard;
    +
    +    
    +    /**
    +     * Class constructor.
    +     * 
    +     * @param color The player pawn's color
    +     * @param hand The player's hand
    +     */
    +    public ClientBoard(Color color, List<PlayableCard> hand) {
    +        this.placementNumber = 0;
    +        this.placed = new HashMap<>();
    +        this.color = color;
    +
    +        this.hand = new ArrayList<>();
    +        this.hand = hand;
    +
    +        this.points = 0;
    +
    +        this.availableResources = new HashMap<>();
    +        Symbol.getBasicResources().forEach((reign -> this.availableResources.put(reign, 0)));
    +    }
    +    
    +    /**
    +     * Sets the secret objective.
    +     * 
    +     * @param objective The chosen secret objective
    +     */
    +    public void setSecretObjective(Objective objective) {
    +        this.objective = objective;
    +    }
    +    
    +    /**
    +     * Adds a card to the player's board.
    +     * 
    +     * @param coords The card's coordinates
    +     * @param card The chosen card
    +     * @param side The chosen side
    +     * @param points The player's point (total)
    +     * @param resources The player's resources (total)
    +     */
    +    public void placeCard(Pair<Integer, Integer> coords, PlayableCard card, Side side, Integer points, Map<Symbol, Integer> resources) {
    +        this.hand.remove(card);
    +        this.placed.put(placementNumber, new ShownCard(card, side, coords));
    +        this.points = points;
    +        this.availableResources = resources;
    +        this.placementNumber++;
    +    }
    +    
    +    /**
    +     * Adds a card to the player's hand.
    +     * 
    +     * @param card The drawn card
    +     */
    +    public void drawCard(PlayableCard card) {
    +        this.hand.add(card);
    +    }
    +
    +    
    +    /**
    +     * Sets the initial card. This still does not put it in the board, as the side is still not chosen.
    +     * 
    +     * @param card The chosen card
    +     *
    +     * @see ClientBoard#placeInitial(Side, Map)
    +     */
    +    public void setInitial(InitialCard card) {
    +        this.initialCard = card;
    +    }
    +    
    +    /**
    +     * Places initial card on the board. At this point, the initial card's side has been chosen
    +     * 
    +     * @param side The chosen side
    +     * @param availableResources The player's resources (total)
    +     */
    +    public void placeInitial(Side side, Map<Symbol, Integer> availableResources) {
    +        this.placed.put(placementNumber, new ShownCard(this.initialCard, side, new Pair<>(0, 0)));
    +        this.availableResources = availableResources;
    +        this.placementNumber++;
    +    }
    +
    +    /**
    +     * @return The initial card.
    +     */
    +    public InitialCard getInitialCard() {return this.initialCard;}
    +
    +    /**
    +     * @return The card's index (ie, the first card played would have a placementNumber of 1).
    +     */
    +    public Integer getPlacementNumber() {
    +        return placementNumber;
    +    }
    +
    +    /**
    +     * @return The player's hand.
    +     */
    +    public List<PlayableCard> getHand() {
    +        return hand;
    +    }
    +
    +    /**
    +     * @return The player's points.
    +     */
    +    public Integer getPoints() {
    +        return points;
    +    }
    +
    +    /**
    +     * @return The player's board.
    +     */
    +    public Map<Integer, ShownCard> getPlaced() {
    +        return placed;
    +    }
    +
    +    /**
    +     * @return The player's resources.
    +     */
    +    public Map<Symbol, Integer> getAvailableResources() {
    +        return availableResources;
    +    }
    +
    +    /**
    +     * @return The player pawn's color.
    +     */
    +    public Color getColor() {
    +        return color;
    +    }
    +
    +    /**
    +     * @return The player's secret objective.
    +     */
    +    public Objective getObjective() {
    +        return objective;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/GraphicalView.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/GraphicalView.html new file mode 100644 index 00000000..01594a3e --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/GraphicalView.html @@ -0,0 +1 @@ +GraphicalView

    GraphicalView

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total679 of 6790%55 of 550%67671731733838
    resumeMatch(Map, Map, Pair, Map, Pair, Objective, Map, Map, Map, String, boolean)1200%60%44232311
    setupMatch(Map, Map, Pair, Map, Pair)960%70%66252511
    nextPlayer()630%80%55111111
    someoneDrewCard(String, DrawSource, PlayableCard, PlayableCard, Pair)510%120%77111111
    someonePlayedCard(String, Pair, PlayableCard, Side, int, Map)320%60%447711
    lambda$someoneDrewInitialCard$4(String, InitialCard)290%20%229911
    GraphicalView()220%n/a117711
    someoneSetInitialSide(String, Side, Map)190%20%225511
    someoneDrewInitialCard(String, InitialCard)170%20%225511
    chooseSecretObjective(Objective)160%n/a114411
    lambda$setupMatch$3(Map, String, List)140%n/a112211
    playCard(Pair, PlayableCard, Side)130%n/a113311
    matchStarted(Map, Map, Pair, Map, Pair)120%n/a114411
    giveInitialCard(InitialCard)120%n/a113311
    someoneChoseSecretObjective(String)110%20%224411
    createMatch(String, Integer)90%n/a113311
    someoneDrewSecretObjective(String)90%20%223311
    someoneJoined(String, List)90%20%223311
    someoneSentBroadcastText(String, String)90%20%223311
    someoneSentPrivateText(String, String)90%20%223311
    setUsername(String)80%n/a113311
    joinMatch(String)80%n/a113311
    chooseInitialCardSide(Side)80%n/a113311
    drawCard(DrawSource)80%n/a113311
    drawInitialCard()70%n/a113311
    drawSecretObjectives()70%n/a113311
    receiveAvailableMatches(List)70%n/a113311
    lambda$playCard$0(Pair, PlayableCard, Side)70%n/a111111
    sendPrivateText(String, String)60%n/a112211
    lambda$setupMatch$2(String, Color)60%n/a111111
    lambda$resumeMatch$1(Map, Pair)60%n/a111111
    setLastRequestStatus(RequestStatus)50%n/a112211
    sendBroadcastText(String)50%n/a112211
    notifyError(Exception)40%n/a112211
    setNetworkHandler(NetworkHandler)40%n/a112211
    giveSecretObjectives(Pair)40%n/a112211
    notifyLastTurn()40%n/a112211
    isLastTurn()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/GraphicalView.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/GraphicalView.java.html new file mode 100644 index 00000000..b8e305bb --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/GraphicalView.java.html @@ -0,0 +1,553 @@ +GraphicalView.java

    GraphicalView.java

    package it.polimi.ingsw.client.frontend;
    +
    +import java.util.*;
    +import it.polimi.ingsw.client.network.NetworkHandler;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.utils.AvailableMatch;
    +import it.polimi.ingsw.utils.LeaderboardEntry;
    +import it.polimi.ingsw.utils.Pair;
    +import it.polimi.ingsw.utils.RequestStatus;
    +
    +/**
    + * Class to manage graphical clients
    + */
    +public abstract class GraphicalView {
    +    protected NetworkHandler networkHandler;
    +    protected Map<String, ClientBoard> clientBoards;
    +    protected List<String> players; // ordered by turn
    +    protected String currentPlayer;
    +    protected Pair<Objective, Objective> visibleObjectives;
    +    protected Map<DrawSource, PlayableCard> visiblePlayableCards;
    +    protected Pair<Symbol, Symbol> decksTopReign;
    +    protected boolean lastTurn = false;
    +    protected List<AvailableMatch> availableMatches;
    +    protected String username;
    +    protected final LastRequest lastRequest;
    +    private boolean matchStarted = false;
    +    private final Boolean sync = true;
    +
    +    /**
    +     * Class constructor.
    +     */
    +    public GraphicalView() {
    +        this.lastRequest = new LastRequest();
    +        this.lastRequest.setStatus(RequestStatus.PENDING);
    +    }
    +    
    +    /**
    +     * Sets the username of the corresponding player.
    +     * 
    +     * @param username The chosen username
    +     */
    +    protected void setUsername(String username) {
    +        this.username = username;
    +        this.networkHandler.setUsername(username);
    +    }
    +    
    +    /**
    +     * @return Whether is the last turn or not.
    +     */
    +    public boolean isLastTurn() {
    +        return this.lastTurn;
    +    }
    +    
    +    /**
    +     * Sets the last request's status.
    +     * 
    +     * @param status Last request's status
    +     */
    +    public void setLastRequestStatus(RequestStatus status) {
    +        this.lastRequest.setStatus(status);
    +    }
    +
    +    /**
    +     * Sets the internal state according to the occurrence of an error.
    +     *
    +     * @param exception The thrown exception
    +     */
    +    public void notifyError(Exception exception) {
    +        this.setLastRequestStatus(RequestStatus.FAILED);
    +    }
    +
    +    /**
    +     * Sets the network interface in order to communicate.
    +     *
    +     * @param networkHandler the interface to communicate
    +     */
    +    public void setNetworkHandler(NetworkHandler networkHandler) {
    +        this.networkHandler = networkHandler;
    +    }
    +
    +    /**
    +     * Tries to create a match.
    +     *
    +     * @param maxPlayers maximum amount of players
    +     * @param matchName The match's name
    +     */
    +    public void createMatch(String matchName, Integer maxPlayers) {
    +        this.setLastRequestStatus(RequestStatus.PENDING);
    +        this.networkHandler.createMatch(matchName, maxPlayers);
    +    }
    +
    +    /**
    +     * Tries to join a match.
    +     *
    +     * @param matchName the match's name
    +     */
    +    public void joinMatch(String matchName) {
    +        this.setLastRequestStatus(RequestStatus.PENDING);
    +        this.networkHandler.joinMatch(matchName);
    +    }
    +
    +    /**
    +     * Sends a broadcast text.
    +     * 
    +     * @param text The content
    +     */
    +    public void sendBroadcastText(String text) {
    +        this.networkHandler.sendBroadcastText(text);
    +    }
    +    
    +    /**
    +     * Sends a private text.
    +     * 
    +     * @param recipient The recipient
    +     * @param text The content
    +     */
    +    public void sendPrivateText(String recipient, String text) {
    +        this.networkHandler.sendPrivateText(recipient, text);
    +    }
    +
    +    /**
    +     * Draws an initial card for the player.
    +     */
    +    public void drawInitialCard() {
    +        this.setLastRequestStatus(RequestStatus.PENDING);
    +        this.networkHandler.drawInitialCard();
    +    }
    +
    +    /**
    +     * Communicates the chosen initial card side.
    +     *
    +     * @param side The side on which play the initial card drawn using {@link #drawInitialCard()}
    +     */
    +    public void chooseInitialCardSide(Side side) {
    +        this.setLastRequestStatus(RequestStatus.PENDING);
    +        this.networkHandler.chooseInitialCardSide(side);
    +    }
    +
    +    /**
    +     * Draws two secret objectives.
    +     */
    +    public void drawSecretObjectives() {
    +        this.setLastRequestStatus(RequestStatus.PENDING);
    +        this.networkHandler.drawSecretObjectives();
    +    }
    +
    +    /**
    +     * Communicates the chosen secret objective.
    +     *
    +     * @param objective The chosen objective
    +     */
    +    public void chooseSecretObjective(Objective objective) {
    +        this.setLastRequestStatus(RequestStatus.PENDING);
    +        this.clientBoards.get(this.username).setSecretObjective(objective);
    +        this.networkHandler.chooseSecretObjective(objective);
    +    }
    +
    +    /**
    +     * Plays a card.
    +     *
    +     * @param coords The coordinates on which to place the card
    +     * @param card   The PlayableCard to play
    +     * @param side   The side on which to play the chosen card
    +     */
    +    public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) {
    +        this.setLastRequestStatus(RequestStatus.PENDING);
    +        new Thread(() -> this.networkHandler.playCard(coords, card, side)).start();
    +    }
    +
    +    /**
    +     * Draws a card.
    +     *
    +     * @param source The drawing source to draw the card from
    +     */
    +    public void drawCard(DrawSource source) {
    +        this.setLastRequestStatus(RequestStatus.PENDING);
    +        this.networkHandler.drawCard(source);
    +    }
    +
    +    /**
    +     * Method used to show the turn has changed.
    +     */
    +    public abstract void changePlayer();
    +
    +    /**
    +     * Goes to the next turn, making sure that the current player is set and that he plays the right
    +     * turn (choose initial card/objective, or make a move).
    +     */
    +    private void nextPlayer() {
    +        if (this.currentPlayer == null)
    +            this.currentPlayer = this.players.get(0);
    +        else
    +            this.currentPlayer = this.players.get((this.players.indexOf(currentPlayer) + 1) % this.players.size());
    +
    +
    +        if (this.currentPlayer.equals(this.username)) {
    +            if (this.clientBoards.get(this.username).getPlaced().isEmpty())
    +                this.drawInitialCard();
    +            else if (this.clientBoards.get(this.username).getObjective() == null)
    +                this.drawSecretObjectives();
    +            else
    +                this.makeMove();
    +        } else {
    +            this.changePlayer();
    +        }
    +    }
    +
    +
    +    /**
    +     * Ask the user to make a play. Must call {@link GraphicalView#playCard(Pair, PlayableCard, Side)}.
    +     */
    +    public abstract void makeMove();
    +
    +
    +    /**
    +     * Starts match on the client side, setting all variables to their initial values.
    +     *
    +     * @param playersUsernamesAndPawns Map containing all players' pawns, indexed by their username
    +     * @param playersHands             Map containing all the players' hands, indexed by their username
    +     * @param visibleObjectives        The two objectives common to every player
    +     * @param visiblePlayableCards     The four cards that can be drawn, visible to everyone
    +     * @param decksTopReign            the reigns of the two decks' top
    +     */
    +    public void matchStarted(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
    +                             Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
    +                             Pair<Symbol, Symbol> decksTopReign) {
    +        this.setupMatch(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReign);
    +        this.notifyMatchStarted();
    +        this.nextPlayer();
    +    }
    +
    +    /**
    +     * Resumes match on the client side, setting all variables to their initial values.
    +     *
    +     * @param playersUsernamesAndPawns Map containing all players' pawns, indexed by their username
    +     * @param playersHands             Map containing all the players' hands, indexed by their username
    +     * @param visibleObjectives        The two objectives common to every player
    +     * @param visiblePlayableCards     The four cards that can be drawn, visible to everyone
    +     * @param decksTopReign            the reigns of the two decks' top
    +     * @param secretObjective          Secret objective of the current player
    +     * @param availableResources       Available resources of all the players
    +     * @param placedCards              Placed cards of all the players
    +     * @param playerPoints             Points of all the players
    +     * @param currentPlayer            The current player
    +     * @param drawPhase                If the match is resumed in draw phase
    +     */
    +    public void resumeMatch(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
    +                            Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
    +                            Pair<Symbol, Symbol> decksTopReign, Objective secretObjective, Map<String, Map<Symbol, Integer>> availableResources,
    +                            Map<String, Map<Pair<Integer, Integer>, PlacedCard>> placedCards, Map<String, Integer> playerPoints, String currentPlayer, boolean drawPhase) {
    +        this.setupMatch(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReign);
    +        this.clientBoards.get(username).setSecretObjective(secretObjective);
    +        for (String player : placedCards.keySet()) {
    +            ClientBoard clientBoard = this.clientBoards.get(player);
    +            Map<Pair<Integer, Integer>, PlacedCard> playerBoard = placedCards.get(player);
    +            List<Pair<Integer, Integer>> orderedCards = playerBoard.keySet().stream()
    +                    .sorted(Comparator.comparingInt(c -> playerBoard.get(c).getTurn()))
    +                    .toList();
    +            for (Pair<Integer, Integer> cardCoord : orderedCards) {
    +                if (cardCoord.equals(new Pair<>(0, 0))) {
    +                    clientBoard.setInitial((InitialCard) playerBoard.get(cardCoord).getCard());
    +                    clientBoard.placeInitial(playerBoard.get(cardCoord).getPlayedSide(),
    +                            availableResources.get(player));
    +                } else {
    +                    clientBoard.placeCard(cardCoord,
    +                            (PlayableCard) playerBoard.get(cardCoord).getCard(),
    +                            playerBoard.get(cardCoord).getPlayedSide(),
    +                            playerPoints.get(player), availableResources.get(player)
    +                    );
    +                }
    +            }
    +        }
    +        this.currentPlayer = currentPlayer;
    +        this.notifyMatchResumed(drawPhase);
    +        this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +    }
    +
    +    
    +    /**
    +     * Initialize everything about the match.
    +     * 
    +     * @param playersUsernamesAndPawns Map from player's username to pawn color
    +     * @param playersHands Map from player's username to hand
    +     * @param visibleObjectives Common objectives
    +     * @param visiblePlayableCards Common cards that can be drawn
    +     * @param decksTopReign The two decks' top cards
    +     */
    +    private void setupMatch(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
    +                            Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
    +                            Pair<Symbol, Symbol> decksTopReign) {
    +        synchronized (sync) {
    +            this.players = new ArrayList<>();
    +            this.clientBoards = new HashMap<>();
    +            Color curr;
    +            playersUsernamesAndPawns.forEach((player, pawn) -> this.players.add(player));
    +
    +            for (String username : playersUsernamesAndPawns.keySet()) {
    +                curr = playersUsernamesAndPawns.get(username);
    +                switch (curr) {
    +                    case Color.RED:
    +                        this.players.set(0, username);
    +                        break;
    +                    case Color.BLUE:
    +                        this.players.set(1, username);
    +                        break;
    +                    case Color.GREEN:
    +                        this.players.set(2, username);
    +                        break;
    +                    case Color.YELLOW:
    +                        this.players.set(3, username);
    +                        break;
    +                    default:
    +                        break;
    +                }
    +            }
    +
    +            this.currentPlayer = null;
    +
    +            playersHands.forEach((username, hand) -> {
    +                this.clientBoards.put(username, new ClientBoard(playersUsernamesAndPawns.get(username), hand));
    +            });
    +
    +            this.visiblePlayableCards = visiblePlayableCards;
    +            this.visibleObjectives = visibleObjectives;
    +            this.decksTopReign = decksTopReign;
    +            matchStarted = true;
    +            sync.notifyAll();
    +        }
    +    }
    +    /**
    +     * Method that shows the user that the match has started.
    +     */
    +    protected abstract void notifyMatchStarted();
    +
    +    /**
    +     * Method that shows the user that the match has resumed.
    +     */
    +    protected abstract void notifyMatchResumed(boolean  drawPhase);
    +
    +    /**
    +     * Receive the list of matches currently available
    +     * @param availableMatches the list of available matches
    +     */
    +    public void receiveAvailableMatches(List<AvailableMatch> availableMatches) {
    +        this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +        this.availableMatches = availableMatches;
    +    }
    +
    +    /**
    +     * Give the user its initial card.
    +     *
    +     * @param initialCard the player's initial card
    +     */
    +    public void giveInitialCard(InitialCard initialCard) {
    +        this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +        this.clientBoards.get(this.username).setInitial(initialCard);
    +    }
    +
    +
    +    /**
    +     * Gives the player two secret objectives to choose from.
    +     *
    +     * @param secretObjectives the two objectives to choose from
    +     */
    +    public void giveSecretObjectives(Pair<Objective, Objective> secretObjectives) {
    +        this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +    }
    +
    +    /**
    +     * Notifies other players that someone drew the initial card.
    +     *
    +     * @param someoneUsername Player who drew the initial
    +     * @param card            The card he drew
    +     */
    +    public void someoneDrewInitialCard(String someoneUsername, InitialCard card) {
    +        if (this.username.equals(someoneUsername)) {
    +            this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +        }
    +        new Thread( () -> {
    +            synchronized (sync) {
    +                while (!matchStarted) {
    +                    try {
    +                        sync.wait();
    +                    } catch (InterruptedException e) {
    +                        throw new RuntimeException(e);
    +                    }
    +                }
    +                this.clientBoards.get(someoneUsername).setInitial(card);
    +            }
    +        }).start();
    +    }
    +
    +
    +    /**
    +     * Effectively place the initial card on the player's board, on the right side. Note that the card
    +     * must have already been set.
    +     *
    +     * @param availableResources Currently available resources for the player
    +     * @param someoneUsername Player who chose the initial card's side
    +     * @param side            Chosen side
    +     */
    +    public void someoneSetInitialSide(String someoneUsername, Side side, Map<Symbol, Integer> availableResources) {
    +        if (this.username.equals(someoneUsername)) {
    +            this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +        }
    +        this.clientBoards.get(someoneUsername).placeInitial(side, availableResources);
    +        this.nextPlayer();
    +    }
    +
    +
    +    /**
    +     * Notifies other players that someone is choosing the secret objective. They should not know from
    +     * which objective he is choosing, so they are not passed.
    +     *
    +     * @param someoneUsername Player who is choosing
    +     */
    +    public void someoneDrewSecretObjective(String someoneUsername) {
    +        if (this.username.equals(someoneUsername)) {
    +            this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +        }
    +    }
    +    
    +    /**
    +     * Changes the current player and updates last request's status to {@link RequestStatus#SUCCESSFUL}.
    +     * 
    +     * @param someoneUsername The player who chose the objective
    +     */
    +    public void someoneChoseSecretObjective(String someoneUsername) {
    +        if (this.username.equals(someoneUsername)) {
    +            this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +        }
    +        this.nextPlayer();
    +    }
    +
    +
    +    /**
    +     * Actually places a card on the player's board (so the Player tried to place a card and it was a
    +     * valid move).
    +     *
    +     * @param someoneUsername    The player who made the move
    +     * @param coords             where he placed the card
    +     * @param card               the placed card
    +     * @param side               the side the card was placed on
    +     * @param points             the total points of the player after he placed the card
    +     * @param availableResources the available resources of the player after he placed the card
    +     */
    +    public void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coords, PlayableCard card, Side side, int points,
    +                                  Map<Symbol, Integer> availableResources) {
    +        if (this.username.equals(someoneUsername)) {
    +            this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +        }
    +        if (points >= 20 && !this.lastTurn) {
    +            this.lastTurn = true;
    +            this.notifyLastTurn();
    +        }
    +        this.clientBoards.get(someoneUsername).placeCard(coords, card, side, points, availableResources);
    +    }
    +
    +
    +    /**
    +     * Handles the replacement of the last card drawn, and changes turn.
    +     *
    +     * @param someoneUsername Player who drew the card
    +     * @param source          From where he drew the card
    +     * @param card            The card he drew
    +     * @param replacementCard The replacement card, which will be null if the {@link DrawSource} is a
    +     *                        deck
    +     * @param deckTopReigns   Current deck top reigns
    +     */
    +    public void someoneDrewCard(String someoneUsername, DrawSource source, PlayableCard card, PlayableCard replacementCard,
    +                                Pair<Symbol, Symbol> deckTopReigns) {
    +        if (this.username.equals(someoneUsername)) {
    +            this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +        }
    +        if (!source.equals(DrawSource.GOLDS_DECK) && !source.equals(DrawSource.RESOURCES_DECK)) {
    +            visiblePlayableCards.put(source, replacementCard);
    +        }
    +        this.decksTopReign = deckTopReigns;
    +
    +        if (decksTopReign.first() == null && decksTopReign.second() == null && !this.lastTurn) {
    +            this.lastTurn = true;
    +            this.notifyLastTurn();
    +        }
    +        this.clientBoards.get(someoneUsername).drawCard(card);
    +
    +        this.nextPlayer();
    +    }
    +
    +    /**
    +     * Notifies the player that this is the last turn he can play.
    +     */
    +    public void notifyLastTurn() {
    +        this.lastTurn = true;
    +    }
    +
    +    /**
    +     * Notifies the player that someone joined the lobby.
    +     *
    +     * @param joinedPlayers List of the players currently in the match
    +     * @param someoneUsername Player who joined
    +     */
    +    public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
    +        if (this.username.equals(someoneUsername)) {
    +            this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +        }
    +    }
    +
    +    /**
    +     * Notifies the player that someone quit the lobby.
    +     *
    +     * @param someoneUsername Player who quit
    +     */
    +    public abstract void someoneQuit(String someoneUsername);
    +
    +
    +    /**
    +     * Shows the player the match's leaderboard after the game ended.
    +     *
    +     * @param ranking Ranking of players
    +     */
    +    public abstract void matchFinished(List<LeaderboardEntry> ranking);
    +
    +    /**
    +     * Notifies that someone sent a broadcast text.
    +     *
    +     * @param someoneUsername Player who sent the text
    +     * @param text            Text he sent
    +     */
    +    public void someoneSentBroadcastText(String someoneUsername, String text) {
    +        if (this.username.equals(someoneUsername)) {
    +            this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +        }
    +    }
    +
    +    /**
    +     * Notifies the player that someone sent him a private text.
    +     *
    +     * @param someoneUsername Player who sent the private text
    +     * @param text            Text he sent
    +     */
    +    public void someoneSentPrivateText(String someoneUsername, String text) {
    +        if (this.username.equals(someoneUsername)) {
    +            this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
    +        }
    +    }
    +
    +    /**
    +     * Notify the client that the connection with the server
    +     * has been lost.
    +     */
    +    public abstract void notifyConnectionLost();
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/LastRequest.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/LastRequest.html new file mode 100644 index 00000000..d73fea39 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/LastRequest.html @@ -0,0 +1 @@ +LastRequest

    LastRequest

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total10 of 100%0 of 0n/a334433
    setStatus(RequestStatus)40%n/a112211
    LastRequest()30%n/a111111
    getStatus()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/LastRequest.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/LastRequest.java.html new file mode 100644 index 00000000..007d5449 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/LastRequest.java.html @@ -0,0 +1,27 @@ +LastRequest.java

    LastRequest.java

    package it.polimi.ingsw.client.frontend;
    +
    +import it.polimi.ingsw.utils.RequestStatus;
    +
    +/**
    + * Last request status. Used for synchronized methods
    + */
    +public class LastRequest {
    +    private RequestStatus status;
    +
    +    /**
    +     * Sets the status.
    +     * 
    +     * @param status The new status
    +     */
    +    public void setStatus(RequestStatus status) {
    +        this.status = status;
    +    }
    +    
    +    /**
    +     * @return The last request's status.
    +     */
    +    public RequestStatus getStatus() {
    +        return this.status;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/MatchStatus.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/MatchStatus.html new file mode 100644 index 00000000..4889575d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/MatchStatus.html @@ -0,0 +1 @@ +MatchStatus

    MatchStatus

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total27 of 270%0 of 0n/a115511
    static {...}270%n/a115511
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/MatchStatus.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/MatchStatus.java.html new file mode 100644 index 00000000..04549ef7 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/MatchStatus.java.html @@ -0,0 +1,17 @@ +MatchStatus.java

    MatchStatus.java

    package it.polimi.ingsw.client.frontend;
    +
    +import it.polimi.ingsw.gamemodel.MatchState;
    +
    +/**
    + * Represents the current match macro-state from the client point of view.
    + * This is not supposed to substitute {@link MatchState}, but rather make it easier for clients
    + * to keep track of the current state of match, which is to say whether it's unused (LOBBY),
    + * in WaitState (WAIT_STATE) or being played (MATCH_STATE).
    + */
    +public enum MatchStatus {
    +    LOBBY,
    +    WAIT_STATE,
    +    MATCH_STATE,
    +    FINAL_STATE
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/ShownCard.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/ShownCard.html new file mode 100644 index 00000000..0affa663 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/ShownCard.html @@ -0,0 +1 @@ +ShownCard

    ShownCard

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 12100%0 of 0n/a010101
    ShownCard(Card, Side, Pair)12100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/ShownCard.java.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/ShownCard.java.html new file mode 100644 index 00000000..c6912c23 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/ShownCard.java.html @@ -0,0 +1,16 @@ +ShownCard.java

    ShownCard.java

    package it.polimi.ingsw.client.frontend;
    +
    +import it.polimi.ingsw.gamemodel.Card;
    +import it.polimi.ingsw.gamemodel.Side;
    +import it.polimi.ingsw.utils.Pair;
    +
    +/**
    + * ShownCard
    + *
    + * @param card The card to be shown
    + * @param side The side to be shown
    + * @param coords The coordinates to be shown on the card (if needed)
    + */
    +public record ShownCard(Card card, Side side, Pair<Integer, Integer> coords) {
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/index.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/index.html new file mode 100644 index 00000000..bd8524d0 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.frontend

    it.polimi.ingsw.client.frontend

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total871 of 8831%55 of 550%8687216217575845
    GraphicalView6790%550%6767173173383811
    ClientBoard1550%n/a15153434151511
    MatchStatus270%n/a11551111
    LastRequest100%n/a33443311
    ShownCard12100%n/a01010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.frontend/index.source.html b/deliveries/Test results/it.polimi.ingsw.client.frontend/index.source.html new file mode 100644 index 00000000..30751e33 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.frontend/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.frontend

    it.polimi.ingsw.client.frontend

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total871 of 8831%55 of 550%8687216217575845
    GraphicalView.java6790%550%6767173173383811
    ClientBoard.java1550%n/a15153434151511
    MatchStatus.java270%n/a11551111
    LastRequest.java100%n/a33443311
    ShownCard.java12100%n/a01010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandler.html b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandler.html new file mode 100644 index 00000000..9afb535d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandler.html @@ -0,0 +1 @@ +NetworkHandler

    NetworkHandler

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total163 of 1630%4 of 40%232352522121
    lambda$startConnectionCheck$0(ScheduledExecutorService)170%40%337711
    NetworkHandler(GraphicalView, String, int)150%n/a116611
    startConnectionCheck()150%n/a114411
    matchResumed(Map, Map, Pair, Map, Pair, Objective, Map, Map, Map, String, boolean)150%n/a112211
    someonePlayedCard(String, Pair, PlayableCard, Side, int, Map)100%n/a112211
    matchStarted(Map, Map, Pair, Map, Pair)90%n/a112211
    someoneDrewCard(String, DrawSource, PlayableCard, PlayableCard, Pair)90%n/a112211
    someoneSetInitialSide(String, Side, Map)70%n/a112211
    someoneDrewInitialCard(String, InitialCard)60%n/a112211
    someoneJoined(String, List)60%n/a112211
    someoneSentBroadcastText(String, String)60%n/a112211
    someoneSentPrivateText(String, String)60%n/a112211
    receiveAvailableMatches(List)50%n/a112211
    giveInitialCard(InitialCard)50%n/a112211
    giveSecretObjectives(Pair)50%n/a112211
    someoneDrewSecretObjective(String)50%n/a112211
    someoneChoseSecretObjective(String)50%n/a112211
    someoneQuit(String)50%n/a112211
    matchFinished(List)50%n/a112211
    setUsername(String)40%n/a112211
    isConnected()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandler.java.html b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandler.java.html new file mode 100644 index 00000000..1441f7fc --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandler.java.html @@ -0,0 +1,377 @@ +NetworkHandler.java

    NetworkHandler.java

    package it.polimi.ingsw.client.network;
    +
    +import it.polimi.ingsw.client.frontend.GraphicalView;
    +import it.polimi.ingsw.controllers.PlayerController;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.server.Server;
    +import it.polimi.ingsw.utils.AvailableMatch;
    +import it.polimi.ingsw.utils.LeaderboardEntry;
    +import it.polimi.ingsw.utils.Pair;
    +
    +import java.util.List;
    +import java.util.Map;
    +import java.util.concurrent.Executors;
    +import java.util.concurrent.ScheduledExecutorService;
    +import java.util.concurrent.TimeUnit;
    +
    +/**
    + * Class used by a generic client to receive from and transmit to a remote {@link Server} instance and a
    + * remote {@link PlayerController} instance.
    + * It represents an abstract layer, being implemented by: {@link NetworkHandlerRMI} and {@link NetworkHandlerTCP}.
    + */
    +public abstract class NetworkHandler implements RemoteViewInterface {
    +    protected final GraphicalView graphicalView;
    +    protected String username;
    +    protected final String ipAddress;
    +    protected final int port;
    +    protected boolean connected = false;
    +
    +    /**
    +     * Initialize the instance all its internal attributes.
    +     *
    +     * @param graphicalView The GraphicalView to be subscribed to this NetworkHandler instance
    +     * @param ipAddress     The server IP address
    +     * @param port          The server port
    +     */
    +    public NetworkHandler(GraphicalView graphicalView, String ipAddress, int port) {
    +        this.graphicalView = graphicalView;
    +        this.ipAddress = ipAddress;
    +        this.port = port;
    +    }
    +
    +    /**
    +     * Periodically check the connection status
    +     */
    +    public void startConnectionCheck() {
    +        // Create a thread pool of 1 thread
    +        ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
    +
    +        Runnable pingServer = () -> {
    +            if (!connected) {
    +                // If the connection lost is already acknowledged, shutdown the executor
    +                executor.shutdown();
    +            } else {
    +                if (!ping()) {
    +                    // If there is a connection error, notify the client and shutdown the executor
    +                    disconnect();
    +                    graphicalView.notifyConnectionLost();
    +                    executor.shutdown();
    +                }
    +            }
    +        };
    +
    +        // Check every two second for connectivity
    +        executor.scheduleAtFixedRate(pingServer, 0, 2, TimeUnit.SECONDS);
    +    }
    +
    +    /**
    +     * Sets the player's username.
    +     *
    +     * @param username The player's username
    +     */
    +    public void setUsername(String username) {
    +        this.username = username;
    +    }
    +
    +    /**
    +     * Asks the server to send a list of {@link AvailableMatch}
    +     */
    +    public abstract void getAvailableMatches();
    +
    +    /**
    +     * Checks for connectivity.
    +     *
    +     * @return The status of the connection, true if active, false otherwise
    +     */
    +    public abstract boolean ping();
    +
    +    /**
    +     * Asks to create a match.
    +     *
    +     * @param matchName  The match name
    +     * @param maxPlayers The match maximum number of players
    +     */
    +    public abstract void createMatch(String matchName, Integer maxPlayers);
    +
    +    /**
    +     * Asks to join a match.
    +     *
    +     * @param matchName the match's name
    +     */
    +    public abstract void joinMatch(String matchName);
    +
    +    /**
    +     * Draws an initial card for the player.
    +     */
    +    public abstract void drawInitialCard();
    +
    +    /**
    +     * Communicates the chosen initial card side.
    +     *
    +     * @param side The side on which play the initial card drawn using {@link #drawInitialCard()}
    +     */
    +    public abstract void chooseInitialCardSide(Side side);
    +
    +    /**
    +     * Draws two secret objectives.
    +     */
    +    public abstract void drawSecretObjectives();
    +
    +    /**
    +     * Communicates the chosen secret objective.
    +     *
    +     * @param objective The chosen objective
    +     */
    +    public abstract void chooseSecretObjective(Objective objective);
    +
    +    /**
    +     * Plays a card.
    +     *
    +     * @param coords The coordinates on which to place the card
    +     * @param card   The PlayableCard to play
    +     * @param side   The side on which to play the chosen card
    +     */
    +    public abstract void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side);
    +
    +    /**
    +     * Draws a card.
    +     *
    +     * @param source The drawing source to draw the card from
    +     */
    +    public abstract void drawCard(DrawSource source);
    +
    +    /**
    +     * Getter for the connection status.
    +     *
    +     * @return True if connected, false otherwise
    +     */
    +    public boolean isConnected() {
    +        return connected;
    +    }
    +
    +    /**
    +     * Sends a message to all the match players
    +     *
    +     * @param text The content of the message
    +     */
    +    public abstract void sendBroadcastText(String text);
    +
    +    /**
    +     * Sends a private message to a match player
    +     *
    +     * @param recipient The recipient username
    +     * @param text      The content of the message
    +     */
    +    public abstract void sendPrivateText(String recipient, String text);
    +
    +    /**
    +     * Disconnects from the server.
    +     */
    +    public abstract void disconnect();
    +
    +    /**
    +     * Receives the currently available matches.
    +     *
    +     * @param availableMatches The available matches
    +     */
    +    public void receiveAvailableMatches(List<AvailableMatch> availableMatches) {
    +        graphicalView.receiveAvailableMatches(availableMatches);
    +    }
    +
    +    /**
    +     * Notifies that the match has just started.
    +     * Furthermore, gives to the receiving object all the information (parameters) needed to show to the current match
    +     * state.
    +     *
    +     * @param playersUsernamesAndPawns Map that matches each pawn color to the corresponding player's username
    +     * @param playersHands             Map that matches each player's username to the corresponding List of cards in the hand
    +     * @param visibleObjectives        Pair of objectives visible to all players
    +     * @param visiblePlayableCards     Map having as values the visible common cards (the keys are just indexes).
    +     * @param decksTopReigns           Pair of reign symbols representing the two visible reigns symbols on top of the two decks;
    +     *                                 the first one is the gold deck one, the second one the resource deck one
    +     */
    +    @Override
    +    public void matchStarted(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
    +                             Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
    +                             Pair<Symbol, Symbol> decksTopReigns) {
    +        graphicalView.matchStarted(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReigns);
    +    }
    +
    +    /**
    +     * Notifies that the match has resumed.
    +     * Furthermore, gives to the receiving object all the information (parameters) needed to show to the current match
    +     * state.
    +     *
    +     * @param playersUsernamesAndPawns Map that matches each pawn color to the corresponding player's username
    +     * @param playersHands             Map that matches each player's username to the corresponding List of cards in the hand
    +     * @param visibleObjectives        Pair of objectives visible to all players
    +     * @param visiblePlayableCards     Map having as values the visible common cards (the keys are just indexes).
    +     * @param decksTopReigns           Pair of reign symbols representing the two visible reigns symbols on top of the two decks;
    +     *                                 the first one is the gold deck one, the second one the resource deck one
    +     * @param secretObjective          Secret objective of the current player
    +     * @param availableResources       Available resources of all the players
    +     * @param placedCards              Placed cards of all the players
    +     * @param playerPoints             Points of all the players
    +     * @param currentPlayer            The current player
    +     * @param drawPhase                If the match is resumed in draw phase
    +     */
    +    @Override
    +    public void matchResumed(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
    +                             Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
    +                             Pair<Symbol, Symbol> decksTopReigns, Objective secretObjective, Map<String, Map<Symbol, Integer>> availableResources,
    +                             Map<String, Map<Pair<Integer, Integer>, PlacedCard>> placedCards, Map<String, Integer> playerPoints,
    +                             String currentPlayer, boolean drawPhase) {
    +        graphicalView.resumeMatch(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReigns, secretObjective, availableResources, placedCards, playerPoints, currentPlayer, drawPhase);
    +    }
    +
    +    /**
    +     * Gives to the receiving graphical view (the client) its initial card.
    +     *
    +     * @param initialCard The initial card to be given
    +     */
    +    @Override
    +    public void giveInitialCard(InitialCard initialCard) {
    +        graphicalView.giveInitialCard(initialCard);
    +    }
    +
    +    /**
    +     * Gives to the remote object a pair of secret objectives to show them in the view and to choose one from them.
    +     *
    +     * @param secretObjectives Pair of secret objectives to give
    +     */
    +    @Override
    +    public void giveSecretObjectives(Pair<Objective, Objective> secretObjectives) {
    +        graphicalView.giveSecretObjectives(secretObjectives);
    +    }
    +
    +    /**
    +     * Notifies that someone (it may or may not be the receiving View instance) has drawn its initial card.
    +     *
    +     * @param someoneUsername The username of the player who has drawn the card
    +     * @param card            The card drawn
    +     */
    +    @Override
    +    public void someoneDrewInitialCard(String someoneUsername, InitialCard card) {
    +        graphicalView.someoneDrewInitialCard(someoneUsername, card);
    +    }
    +
    +    /**
    +     * Notifies that someone (it may or may not be the receiving View instance) has decided (then set) its initial card side.
    +     *
    +     * @param someoneUsername    The username of the player who has set the initial card side
    +     * @param side               The chosen side
    +     * @param availableResources The current available resources of the player having someoneUsername as username
    +     */
    +    @Override
    +    public void someoneSetInitialSide(String someoneUsername, Side side, Map<Symbol, Integer> availableResources) {
    +        graphicalView.someoneSetInitialSide(someoneUsername, side, availableResources);
    +    }
    +
    +    /**
    +     * Notifies that someone (it may or may not be the receiving View instance) has drawn a pair of secret objectives.
    +     * Mind that the objectives are not passed as arguments, since they are secret to all players but the one receiving
    +     * them. The one meant to receive them receives this message too but obtain the objectives through the
    +     * giveSecretObjective() method.
    +     *
    +     * @param someoneUsername The username of the player who has drawn the card
    +     */
    +    @Override
    +    public void someoneDrewSecretObjective(String someoneUsername) {
    +        graphicalView.someoneDrewSecretObjective(someoneUsername);
    +    }
    +
    +    /**
    +     * Notifies that someone (it may or may not be the receiving View instance) has chosen theirs secret objective.
    +     *
    +     * @param someoneUsername The username of the player who has chosen theirs secret objective
    +     */
    +    @Override
    +    public void someoneChoseSecretObjective(String someoneUsername) {
    +        graphicalView.someoneChoseSecretObjective(someoneUsername);
    +    }
    +
    +    /**
    +     * Notifies that someone (it may or may not be the receiving View instance) has played a card.
    +     *
    +     * @param someoneUsername    The username of the player who has played a card
    +     * @param coords             The coordinates where the card has been placed as a Pair of int
    +     * @param card               The card that has been played
    +     * @param side               The side on which the card has been played
    +     * @param points             The points of the player who played a card
    +     * @param availableResources The current available resources of the player who played a card
    +     */
    +    @Override
    +    public void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coords, PlayableCard card, Side side, int points,
    +                                  Map<Symbol, Integer> availableResources) {
    +        graphicalView.someonePlayedCard(someoneUsername, coords, card, side, points, availableResources);
    +    }
    +
    +    /**
    +     * Notifies that someone (it may or may not be the receiving View instance) has drawn a card.
    +     *
    +     * @param someoneUsername The username of the player who has played a card
    +     * @param source          The DrawSource from which the card has been drawn
    +     * @param card            The card that has been drawn
    +     * @param replacementCard The card that replaced the drawn one
    +     * @param deckTopReigns   The decks top reigns
    +     */
    +    @Override
    +    public void someoneDrewCard(String someoneUsername, DrawSource source, PlayableCard card, PlayableCard replacementCard,
    +                                Pair<Symbol, Symbol> deckTopReigns) {
    +        graphicalView.someoneDrewCard(someoneUsername, source, card, replacementCard, deckTopReigns);
    +    }
    +
    +    /**
    +     * Notifies that a player has joined the match.
    +     *
    +     * @param someoneUsername The username of the player who has joined
    +     * @param joinedPlayers   The players currently in the match
    +     */
    +    @Override
    +    public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
    +        graphicalView.someoneJoined(someoneUsername, joinedPlayers);
    +    }
    +
    +    /**
    +     * Notifies that a player has quit from the match.
    +     *
    +     * @param someoneUsername The username of the player who has quit
    +     */
    +    @Override
    +    public void someoneQuit(String someoneUsername) {
    +        graphicalView.someoneQuit(someoneUsername);
    +    }
    +
    +    /**
    +     * Notifies that the match has just finished.
    +     *
    +     * @param ranking The match final ranking
    +     */
    +    @Override
    +    public void matchFinished(List<LeaderboardEntry> ranking) {
    +        graphicalView.matchFinished(ranking);
    +    }
    +
    +    /**
    +     * Notifies that a new message in the global chat is sent
    +     *
    +     * @param someoneUsername Username of the user that sent the message
    +     * @param text            Content of the message
    +     */
    +    @Override
    +    public void someoneSentBroadcastText(String someoneUsername, String text) {
    +        graphicalView.someoneSentBroadcastText(someoneUsername, text);
    +    }
    +
    +    /**
    +     * Notifies that a new private message is sent in private chat to the current user
    +     *
    +     * @param someoneUsername Username of the user that sent the message
    +     * @param text            Content of the message
    +     */
    +    @Override
    +    public void someoneSentPrivateText(String someoneUsername, String text) {
    +        graphicalView.someoneSentPrivateText(someoneUsername, text);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerRMI.html b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerRMI.html new file mode 100644 index 00000000..a1483108 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerRMI.html @@ -0,0 +1 @@ +NetworkHandlerRMI

    NetworkHandlerRMI

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total190 of 1900%2 of 20%151576761414
    NetworkHandlerRMI(GraphicalView, String, int)310%n/a11101011
    joinMatch(String)290%20%229911
    createMatch(String, Integer)160%n/a116611
    getAvailableMatches()140%n/a116611
    playCard(Pair, PlayableCard, Side)130%n/a115511
    sendPrivateText(String, String)120%n/a115511
    chooseInitialCardSide(Side)110%n/a115511
    chooseSecretObjective(Objective)110%n/a115511
    drawCard(DrawSource)110%n/a115511
    sendBroadcastText(String)110%n/a115511
    drawInitialCard()100%n/a115511
    drawSecretObjectives()100%n/a115511
    ping()70%n/a113311
    disconnect()40%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerRMI.java.html b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerRMI.java.html new file mode 100644 index 00000000..d4705f2f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerRMI.java.html @@ -0,0 +1,238 @@ +NetworkHandlerRMI.java

    NetworkHandlerRMI.java

    package it.polimi.ingsw.client.network;
    +
    +import java.rmi.NotBoundException;
    +import java.rmi.RemoteException;
    +import java.rmi.registry.LocateRegistry;
    +import java.rmi.registry.Registry;
    +import java.rmi.server.UnicastRemoteObject;
    +import java.util.List;
    +import it.polimi.ingsw.client.frontend.GraphicalView;
    +import it.polimi.ingsw.controllers.PlayerController;
    +import it.polimi.ingsw.controllers.PlayerControllerRMI;
    +import it.polimi.ingsw.controllers.PlayerControllerRMIInterface;
    +import it.polimi.ingsw.gamemodel.DrawSource;
    +import it.polimi.ingsw.gamemodel.Objective;
    +import it.polimi.ingsw.gamemodel.PlayableCard;
    +import it.polimi.ingsw.gamemodel.Side;
    +import it.polimi.ingsw.server.Server;
    +import it.polimi.ingsw.server.ServerRMIInterface;
    +import it.polimi.ingsw.utils.AvailableMatch;
    +import it.polimi.ingsw.utils.Pair;
    +
    +/**
    + * Class used by a generic client to receive from and transmit to a remote {@link Server} instance and a
    + * remote {@link PlayerControllerRMI} instance using the RMI protocol.
    + */
    +public class NetworkHandlerRMI extends NetworkHandler {
    +    private final ServerRMIInterface server;
    +    private PlayerControllerRMIInterface controller;
    +    private boolean exported = false;
    +
    +    /**
    +     * Initialize the instance all its internal attributes.
    +     *
    +     * @param graphicalView The GraphicalView to be subscribed to this NetworkHandler instance
    +     * @param ipAddress     The server IP address
    +     * @param port          The server port
    +     * @throws RemoteException If the remote server is considered not reachable any more and cannot return as usual
    +     */
    +    public NetworkHandlerRMI(GraphicalView graphicalView, String ipAddress, int port) throws RemoteException {
    +        super(graphicalView, ipAddress, port);
    +
    +        // Try to get a remote Server instance from the network
    +        Registry registry = LocateRegistry.getRegistry(ipAddress, port);
    +        try {
    +            this.server = (ServerRMIInterface) registry.lookup("CodexNaturalisRMIServer");
    +            connected = true;
    +            this.startConnectionCheck();
    +        } catch (NotBoundException e) {
    +            // If the registry exists but the lookup string isn't found, exit the application since it's
    +            // a programmatic error (it regards the code, not the app life cycle)
    +            throw new RuntimeException(e);
    +        }
    +    }
    +
    +    /**
    +     * Asks the server to send a list of {@link AvailableMatch}.
    +     */
    +    @Override
    +    public void getAvailableMatches() {
    +        try {
    +            List<AvailableMatch> matches = server.getJoinableMatches();
    +            this.receiveAvailableMatches(matches);
    +        } catch (Exception e) {
    +            this.graphicalView.notifyError(e);
    +        }
    +    }
    +
    +    /**
    +     * Asks to join a match.
    +     *
    +     * @param matchName the match's name
    +     */
    +    @Override
    +    public void joinMatch(String matchName) {
    +        try {
    +            controller = server.joinMatch(matchName, this.username);
    +
    +            // Export the object only if it was not previously exported
    +            if (!exported) {
    +                UnicastRemoteObject.exportObject(this, 0);
    +                exported = true;
    +            }
    +            controller.registerView(this);
    +        } catch (Exception e) {
    +            this.graphicalView.notifyError(e);
    +        }
    +    }
    +
    +    /**
    +     * Asks to create a match.
    +     *
    +     * @param matchName  The match name
    +     * @param maxPlayers The match maximum number of players
    +     */
    +    @Override
    +    public void createMatch(String matchName, Integer maxPlayers) {
    +        try {
    +            server.createMatch(matchName, maxPlayers);
    +            this.joinMatch(matchName);
    +        } catch (Exception e) {
    +            this.graphicalView.notifyError(e);
    +        }
    +    }
    +
    +    /**
    +     * Draws an initial card for the player.
    +     */
    +    @Override
    +    public void drawInitialCard() {
    +        try {
    +            controller.drawInitialCard();
    +        } catch (Exception e) {
    +            this.graphicalView.notifyError(e);
    +        }
    +    }
    +
    +    /**
    +     * Communicates the chosen initial card side.
    +     *
    +     * @param side The side on which play the initial card drawn using {@link #drawInitialCard()}
    +     */
    +    @Override
    +    public void chooseInitialCardSide(Side side) {
    +        try {
    +            controller.chooseInitialCardSide(side);
    +        } catch (Exception e) {
    +            this.graphicalView.notifyError(e);
    +        }
    +    }
    +
    +    /**
    +     * Draws two secret objectives.
    +     */
    +    @Override
    +    public void drawSecretObjectives() {
    +        try {
    +            controller.drawSecretObjectives();
    +        } catch (Exception e) {
    +            this.graphicalView.notifyError(e);
    +        }
    +    }
    +
    +    /**
    +     * Communicates the chosen secret objective.
    +     *
    +     * @param objective The chosen objective
    +     */
    +    @Override
    +    public void chooseSecretObjective(Objective objective) {
    +        try {
    +            controller.chooseSecretObjective(objective);
    +        } catch (Exception e) {
    +            this.graphicalView.notifyError(e);
    +        }
    +    }
    +
    +    /**
    +     * Plays a card.
    +     *
    +     * @param coords The coordinates on which to place the card
    +     * @param card   The PlayableCard to play
    +     * @param side   The side on which to play the chosen card
    +     */
    +    @Override
    +    public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) {
    +        try {
    +            controller.playCard(coords, card, side);
    +        } catch (Exception e) {
    +            this.graphicalView.notifyError(e);
    +        }
    +    }
    +
    +    /**
    +     * Draws a card.
    +     *
    +     * @param source The drawing source to draw the card from
    +     */
    +    @Override
    +    public void drawCard(DrawSource source) {
    +        try {
    +            controller.drawCard(source);
    +        } catch (Exception e) {
    +            this.graphicalView.notifyError(e);
    +        }
    +    }
    +
    +    /**
    +     * Sends a message to all the match players
    +     *
    +     * @param text The content of the message
    +     */
    +    @Override
    +    public void sendBroadcastText(String text) {
    +        try {
    +            controller.sendBroadcastText(text);
    +        } catch (Exception e) {
    +            this.graphicalView.notifyError(e);
    +        }
    +    }
    +
    +    /**
    +     * Sends a private message to a match player
    +     *
    +     * @param recipient The recipient username
    +     * @param text The content of the message
    +     */
    +    @Override
    +    public void sendPrivateText(String recipient, String text) {
    +        try {
    +            controller.sendPrivateText(recipient, text);
    +        } catch (Exception e) {
    +            this.graphicalView.notifyError(e);
    +        }
    +    }
    +
    +    /**
    +     * Disconnects from the server.
    +     */
    +    @Override
    +    public void disconnect() {
    +        connected = false;
    +    }
    +
    +    /**
    +     * Checks for connectivity.
    +     *
    +     * @return The status of the connection, true if active, false otherwise
    +     */
    +    @Override
    +    public boolean ping() {
    +        try {
    +            return server.ping();
    +        } catch (RemoteException e) {
    +            return false;
    +        }
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerTCP.html b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerTCP.html new file mode 100644 index 00000000..d291e82d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerTCP.html @@ -0,0 +1 @@ +NetworkHandlerTCP

    NetworkHandlerTCP

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total173 of 1730%0 of 0n/a181844441818
    NetworkHandlerTCP(GraphicalView, String, Integer)370%n/a117711
    playCard(Pair, PlayableCard, Side)120%n/a112211
    createMatch(String, Integer)110%n/a112211
    chooseSecretObjective(Objective)100%n/a112211
    sendPrivateText(String, String)100%n/a112211
    joinMatch(String)90%n/a112211
    chooseInitialCardSide(Side)90%n/a112211
    drawCard(DrawSource)90%n/a112211
    sendBroadcastText(String)90%n/a112211
    ping()90%n/a114411
    sendMessage(Message)90%n/a115511
    getAvailableMatches()80%n/a112211
    drawInitialCard()80%n/a112211
    drawSecretObjectives()80%n/a112211
    notifyError(Exception)50%n/a112211
    disconnect()40%n/a112211
    getUsername()30%n/a111111
    getIO()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerTCP.java.html b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerTCP.java.html new file mode 100644 index 00000000..fcad082e --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.network/NetworkHandlerTCP.java.html @@ -0,0 +1,220 @@ +NetworkHandlerTCP.java

    NetworkHandlerTCP.java

    package it.polimi.ingsw.client.network;
    +
    +import java.io.IOException;
    +import java.net.Socket;
    +import java.rmi.RemoteException;
    +import it.polimi.ingsw.client.frontend.GraphicalView;
    +import it.polimi.ingsw.controllers.PlayerControllerTCP;
    +import it.polimi.ingsw.gamemodel.DrawSource;
    +import it.polimi.ingsw.gamemodel.Objective;
    +import it.polimi.ingsw.gamemodel.PlayableCard;
    +import it.polimi.ingsw.gamemodel.Side;
    +import it.polimi.ingsw.network.messages.Message;
    +import it.polimi.ingsw.network.messages.actions.*;
    +import it.polimi.ingsw.network.tcp.ClientReceiver;
    +import it.polimi.ingsw.network.tcp.IOHandler;
    +import it.polimi.ingsw.server.Server;
    +import it.polimi.ingsw.utils.AvailableMatch;
    +import it.polimi.ingsw.utils.Pair;
    +
    +/**
    + * Class used by a generic client to receive from and transmit to a remote {@link Server} instance
    + * and a remote {@link PlayerControllerTCP} instance using the TCP protocol.
    + */
    +public class NetworkHandlerTCP extends NetworkHandler {
    +    private final IOHandler io;
    +    private final Socket socket;
    +
    +    /**
    +     * Initialize the instance all its internal attributes.
    +     *
    +     * @param graphicalView The GraphicalView to be subscribed to this NetworkHandler instance
    +     * @param ipAddress The server IP address
    +     * @param port The server port
    +     * @throws RemoteException If the remote server is considered not reachable any more and cannot
    +     *         return as usual
    +     */
    +    public NetworkHandlerTCP(GraphicalView graphicalView, String ipAddress, Integer port)
    +            throws IOException {
    +        super(graphicalView, ipAddress, port);
    +        this.socket = new Socket(ipAddress, port);
    +        this.io = new IOHandler(socket);
    +        new Thread(new ClientReceiver(this, socket)).start();
    +        connected = true;
    +        super.startConnectionCheck();
    +    }
    +
    +    /**
    +     * Notifies the view about a remote error.
    +     *
    +     * @param exception The exception thrown remotely
    +     */
    +    public void notifyError(Exception exception) {
    +        this.graphicalView.notifyError(exception);
    +    }
    +
    +    /**
    +     * Gets the player's username.
    +     *
    +     * @return The player's username
    +     */
    +    public String getUsername() {
    +        return this.username;
    +    }
    +
    +    /**
    +     * Gets the I/O handler.
    +     *
    +     * @return The I/O handler
    +     */
    +    public IOHandler getIO() {
    +        return this.io;
    +    }
    +
    +    /**
    +     * Asks the server to send a list of {@link AvailableMatch}.
    +     */
    +    @Override
    +    public void getAvailableMatches() {
    +        this.sendMessage(new GetAvailableMatchesMessage(this.username));
    +    }
    +
    +    /**
    +     * Asks to create a match.
    +     *
    +     * @param matchName The match name
    +     * @param maxPlayers The match maximum number of players
    +     */
    +    @Override
    +    public void createMatch(String matchName, Integer maxPlayers) {
    +        this.sendMessage(new CreateMatchMessage(this.username, matchName, maxPlayers));
    +    }
    +
    +    /**
    +     * Asks to join a match.
    +     *
    +     * @param matchName the match's name
    +     */
    +    @Override
    +    public void joinMatch(String matchName) {
    +        this.sendMessage(new JoinMatchMessage(this.username, matchName));
    +    }
    +
    +    /**
    +     * Draws an initial card for the player.
    +     */
    +    @Override
    +    public void drawInitialCard() {
    +        this.sendMessage(new DrawInitialCardMessage(this.username));
    +    }
    +
    +    /**
    +     * Communicates the chosen initial card side.
    +     *
    +     * @param side The side on which play the initial card drawn using {@link #drawInitialCard()}
    +     */
    +    @Override
    +    public void chooseInitialCardSide(Side side) {
    +        this.sendMessage(new ChooseInitialCardSideMessage(this.username, side));
    +    }
    +
    +    /**
    +     * Draws two secret objectives.
    +     */
    +    @Override
    +    public void drawSecretObjectives() {
    +        this.sendMessage(new DrawSecretObjectivesMessage(this.username));
    +    }
    +
    +    /**
    +     * Communicates the chosen secret objective.
    +     *
    +     * @param objective The chosen objective
    +     */
    +    @Override
    +    public void chooseSecretObjective(Objective objective) {
    +        this.sendMessage(new ChooseSecretObjectiveMessage(this.username, objective.getID()));
    +    }
    +
    +    /**
    +     * Plays a card.
    +     *
    +     * @param coords The coordinates on which to place the card
    +     * @param card The PlayableCard to play
    +     * @param side The side on which to play the chosen card
    +     */
    +    @Override
    +    public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) {
    +        this.sendMessage(new PlayCardMessage(this.username, coords, card.getId(), side));
    +    }
    +
    +    /**
    +     * Draws a card.
    +     *
    +     * @param source The drawing source to draw the card from
    +     */
    +    @Override
    +    public void drawCard(DrawSource source) {
    +        this.sendMessage(new DrawCardMessage(this.username, source));
    +    }
    +
    +    /**
    +     * Sends a message to all the match players
    +     *
    +     * @param text The content of the message
    +     */
    +    @Override
    +    public void sendBroadcastText(String text) {
    +        this.sendMessage(new SendBroadcastTextMessage(this.username, text));
    +    }
    +
    +    /**
    +     * Sends a private message to a match player
    +     *
    +     * @param recipient The recipient username
    +     * @param text The content of the message
    +     */
    +    @Override
    +    public void sendPrivateText(String recipient, String text) {
    +        this.sendMessage(new SendPrivateTextMessage(this.username, recipient, text));
    +    }
    +
    +    /**
    +     * Disconnects from the server.
    +     */
    +    @Override
    +    public void disconnect() {
    +        connected = false;
    +    }
    +
    +    /**
    +     * Checks for connectivity.
    +     *
    +     * @return The status of the connection, true if active, false otherwise
    +     */
    +    @Override
    +    public boolean ping() {
    +        try {
    +            io.writeMsg("ping");
    +            return true;
    +        } catch (IOException e) {
    +            return false;
    +        }
    +    }
    +
    +
    +    /**
    +     * Utility to send a message to the socket's output stream. If there was an error, it means the
    +     * connection crashed, and so tries to disconnect the player
    +     * 
    +     * @param msg The message to send
    +     */
    +    private void sendMessage(Message msg) {
    +        try {
    +            this.io.writeMsg(msg);
    +        } catch (IOException e) {
    +            this.disconnect();
    +        }
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.network/index.html b/deliveries/Test results/it.polimi.ingsw.client.network/index.html new file mode 100644 index 00000000..abdb4a03 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.network/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.network

    it.polimi.ingsw.client.network

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total526 of 5260%6 of 60%5656172172535333
    NetworkHandlerRMI1900%20%15157676141411
    NetworkHandlerTCP1730%n/a18184444181811
    NetworkHandler1630%40%23235252212111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.client.network/index.source.html b/deliveries/Test results/it.polimi.ingsw.client.network/index.source.html new file mode 100644 index 00000000..1aa918ce --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.client.network/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.client.network

    it.polimi.ingsw.client.network

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total526 of 5260%6 of 60%5656172172535333
    NetworkHandlerRMI.java1900%20%15157676141411
    NetworkHandlerTCP.java1730%n/a18184444181811
    NetworkHandler.java1630%40%23235252212111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.controllers/PlayerController.html b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerController.html new file mode 100644 index 00000000..72458087 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerController.html @@ -0,0 +1 @@ +PlayerController

    PlayerController

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total59 of 11448%7 of 1030%710122925
    sendJoined()453946%5337%45122401
    lambda$sendJoined$1(Player)70%20%221111
    lambda$sendJoined$0(Player)70%n/a111111
    PlayerController(String, Match)13100%n/a010401
    getPlayer()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.controllers/PlayerController.java.html b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerController.java.html new file mode 100644 index 00000000..675cb3ba --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerController.java.html @@ -0,0 +1,101 @@ +PlayerController.java

    PlayerController.java

    package it.polimi.ingsw.controllers;
    +
    +import it.polimi.ingsw.exceptions.AlreadyUsedUsernameException;
    +import it.polimi.ingsw.exceptions.ChosenMatchException;
    +import it.polimi.ingsw.exceptions.WrongNameException;
    +import it.polimi.ingsw.exceptions.WrongStateException;
    +import it.polimi.ingsw.gamemodel.Match;
    +import it.polimi.ingsw.gamemodel.MatchObserver;
    +import it.polimi.ingsw.gamemodel.Player;
    +import it.polimi.ingsw.utils.GuiUtil;
    +
    +import java.util.Optional;
    +
    +/**
    + * Controller for a match player, the only agent needing a view and so a controller in this
    + * application. This class subclasses instances are given (in RMI case) / reachable (in TCP case) on
    + * the network and collected by a corresponding view (RMI view or TCP view); then this class commits
    + * its two subclasses {@link PlayerControllerRMI} and {@link PlayerControllerTCP} to implement all
    + * the methods needed by a generic view to play in a match. This class implements
    + * {@link MatchObserver} since its instances subscribe themselves to a Match, as mentioned in
    + * {@link #PlayerController(String, Match)}; this is needed to allow this class to behave as a
    + * bridge between a view and a match.
    + */
    +public abstract sealed class PlayerController implements MatchObserver permits PlayerControllerRMI, PlayerControllerTCP {
    +    protected Player player;
    +    protected final Match match;
    +
    +    /**
    +     * Instantiates the internal Player with the given username and sets the internal Match reference to
    +     * the given one, furthermore add the new Player instance to the match and subscribe this class
    +     * instance to the match observers.
    +     *
    +     * @param username The username of the new player of the Match
    +     * @param match    The match to which this PlayerClass must pertain
    +     */
    +    public PlayerController(String username, Match match) {
    +        this.player = new Player(username, match);
    +        this.match = match;
    +    }
    +
    +    /**
    +     * Gets the player linked to this PlayerController instance.
    +     *
    +     * @return The player linked to this instance
    +     */
    +    public Player getPlayer() {
    +        return player;
    +    }
    +
    +    /**
    +     * Tries to effectively join a match, adding himself to the list of observers and the corresponding
    +     * player to the match, if the username is valid.
    +     *
    +     * @throws AlreadyUsedUsernameException If the username is already taken
    +     * @throws WrongStateException          If the match currently does not accept new players
    +     * @throws ChosenMatchException         If the chosen match is not valid
    +     * @throws WrongNameException           If the chosen username is not acceptable due to alphabetical restrictions
    +     * @throws IllegalArgumentException     If the player is already in the match or too many players would be in the match
    +     */
    +    public void sendJoined() throws IllegalArgumentException, AlreadyUsedUsernameException, WrongStateException, ChosenMatchException, WrongNameException {
    +        if (!GuiUtil.isValidName(this.player.getUsername())) {
    +            throw new WrongNameException("The match name must be alphanumeric with maximum 32 characters");
    +        }
    +        if (match == null) {
    +            throw new ChosenMatchException("The specified match does not exist");
    +        }
    +
    +        try {
    +            synchronized (match) {
    +                if (!match.isRejoinable()) {
    +                    match.subscribeObserver(this);
    +                    match.addPlayer(this.player);
    +                } else {
    +                    // Rejoin a match
    +                    // Get the player with the same username and not already connected
    +                    Optional<Player> playerOptional = match.getPlayers().stream()
    +                            .filter((p) -> p.getUsername().equals(player.getUsername()))
    +                            .filter((p) -> !p.isConnected())
    +                            .findFirst();
    +                    if (playerOptional.isPresent()) {
    +                        player = playerOptional.get();
    +                        player.setConnected(true);
    +                        match.subscribeObserver(this);
    +                        this.matchResumed();
    +                    } else {
    +                        throw new WrongStateException("There is no disconnected player with this username");
    +                    }
    +                }
    +            }
    +        } catch (AlreadyUsedUsernameException | IllegalArgumentException e) {
    +            match.unsubscribeObserver(this);
    +            throw e;
    +        }
    +    }
    +
    +    /**
    +     * Notifies the view that match has resumed after a server crash.
    +     */
    +    public abstract void matchResumed();
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerRMI.html b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerRMI.html new file mode 100644 index 00000000..bb61e1b0 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerRMI.html @@ -0,0 +1 @@ +PlayerControllerRMI

    PlayerControllerRMI

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total95 of 56683%16 of 4665%185344160230
    onConnectionError()100%n/a113311
    onUnregisteredView()70%n/a112211
    matchResumed()611394%1375%1332301
    matchStarted()66191%1375%1331601
    someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard)62882%1583%1431001
    someoneDrewInitialCard(Player, InitialCard)62177%1375%133901
    someoneSentPrivateText(Player, Player, String)62177%2466%243801
    someoneDrewSecretObjective(Player, Pair)62076%1375%133901
    someoneJoined(Player)61976%1150%123801
    someonePlayedCard(Player, Pair, PlayableCard, Side)61875%1150%123701
    matchFinished()61875%1150%123901
    someoneSetInitialSide(Player, Side, Map)61266%1150%123701
    someoneSentBroadcastText(Player, String)61164%1150%123701
    someoneQuit(Player)61062%1150%123701
    someoneChoseSecretObjective(Player, Objective)61062%1150%123701
    sendPrivateText(String, String)25100%1150%120601
    createLeaderboardEntry(Player, Boolean)11100%n/a010101
    registerView(RemoteViewInterface)9100%1150%120401
    lambda$matchFinished$2(Pair)9100%n/a010101
    playCard(Pair, PlayableCard, Side)7100%n/a010201
    PlayerControllerRMI(String, Match)5100%n/a010201
    drawInitialCard()5100%n/a010201
    chooseInitialCardSide(Side)5100%n/a010201
    drawSecretObjectives()5100%n/a010201
    chooseSecretObjective(Objective)5100%n/a010201
    drawCard(DrawSource)5100%n/a010201
    sendBroadcastText(String)5100%n/a010201
    lambda$sendPrivateText$1(String, Player)5100%n/a010101
    lambda$sendPrivateText$0(String, Player)5100%n/a010101
    getView()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerRMI.java.html b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerRMI.java.html new file mode 100644 index 00000000..8ae149aa --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerRMI.java.html @@ -0,0 +1,542 @@ +PlayerControllerRMI.java

    PlayerControllerRMI.java

    package it.polimi.ingsw.controllers;
    +
    +import it.polimi.ingsw.client.network.RemoteViewInterface;
    +import it.polimi.ingsw.exceptions.*;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.server.Server;
    +import it.polimi.ingsw.utils.LeaderboardEntry;
    +import it.polimi.ingsw.utils.Pair;
    +
    +import java.rmi.RemoteException;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * Subclass of {@link PlayerController} that implements its abstract methods through RMI interactions.
    + * Each instance of this class is supposed to be sent through {@link Server#joinMatch(String, String)})
    + * to an RMI View, this latter will then send its View instance to the PlayerController object, calling
    + * {@link #registerView(RemoteViewInterface)} on it.
    + */
    +public final class PlayerControllerRMI extends PlayerController implements PlayerControllerRMIInterface {
    +    // The remote View instance
    +    private RemoteViewInterface view;
    +
    +    /**
    +     * Instantiates the internal Player with the given username and sets the internal Match reference to the given one,
    +     * add the new Player instance to the match and subscribe this class instance to the match observers.
    +     *
    +     * @param username The username of the new player of the Match
    +     * @param match    The match to which this PlayerClass must pertain
    +     * @throws AlreadyUsedUsernameException If the username is already taken by another player of the same match
    +     * @throws WrongStateException          If a new player cannot be added on the current state of the Match
    +     */
    +    public PlayerControllerRMI(String username, Match match) throws AlreadyUsedUsernameException, WrongStateException {
    +        super(username, match);
    +    }
    +
    +    /**
    +     * Notifies the view that match has resumed after a server crash.
    +     */
    +    @Override
    +    public void matchResumed() {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            // Get visible objectives, visible playable cards and visible decks top reigns
    +            Pair<Objective, Objective> visibleObjectives = match.getVisibleObjectives();
    +            Map<DrawSource, PlayableCard> visiblePlayableCards = match.getVisiblePlayableCards();
    +            Pair<Symbol, Symbol> decksTopReigns = match.getDecksTopReigns();
    +
    +            // Create a map that matches each pawn colour to the corresponding player's username
    +            Map<String, Color> playersUsernamesAndPawns = new HashMap<>();
    +
    +            // Create a map that matches each player's username to the corresponding list of cards in the hand
    +            Map<String, List<PlayableCard>> playersHands = new HashMap<>();
    +
    +            // Create a map that matches each player's username to the corresponding available resources
    +            Map<String, Map<Symbol, Integer>> availableResources = new HashMap<>();
    +
    +            // Create a map that matches each player's username to the corresponding points
    +            Map<String, Integer> playerPoints = new HashMap<>();
    +
    +            // Create a map that matches each player's username to the corresponding board
    +            Map<String, Map<Pair<Integer, Integer>, PlacedCard>> playerBoards = new HashMap<>();
    +
    +            // Fill the maps with proper values
    +            for (Player p : match.getPlayers()) {
    +                playersUsernamesAndPawns.put(p.getUsername(), p.getPawnColor());
    +                playersHands.put(p.getUsername(), p.getBoard().getCurrentHand());
    +                availableResources.put(p.getUsername(), p.getBoard().getAvailableResources());
    +                playerPoints.put(p.getUsername(), p.getPoints());
    +                playerBoards.put(p.getUsername(), p.getBoard().getPlacedCards());
    +            }
    +
    +            try {
    +                view.matchResumed(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReigns,
    +                        player.getSecretObjective(), availableResources, playerBoards, playerPoints, match.getCurrentPlayer().getUsername(), match.getCurrentState().getClass().equals(AfterMoveState.class));
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Sets the internal View attribute to the given argument; if it has already been called, it won't
    +     * do anything, since it's call is allowed once per PlayerController object.
    +     * It's used by a remote View having this class object to send itself over RMI to the PlayerControllerRMI
    +     * instance.
    +     * Note that this method is supposed to be called by a view.
    +     *
    +     * @param view The View to save in the PlayerController internal state
    +     */
    +    @Override
    +    public void registerView(RemoteViewInterface view) throws RemoteException, ChosenMatchException, WrongStateException, AlreadyUsedUsernameException, WrongNameException {
    +        if (this.view == null) {
    +            this.view = view;
    +
    +            this.sendJoined();
    +        }
    +    }
    +
    +    /**
    +     * Draws an initial card for the player. Since this is done through RMI, it just involves a call to
    +     * {@link Player#drawInitialCard()}.
    +     * Note that this method is supposed to be called by a view.
    +     *
    +     * @throws WrongStateException If the current match state doesn't allow drawing an initial card
    +     * @throws WrongTurnException  If the current turn it's not the one of this player
    +     */
    +    @Override
    +    public void drawInitialCard() throws WrongStateException, WrongTurnException, RemoteException {
    +        player.drawInitialCard();
    +    }
    +
    +    /**
    +     * Communicates the chosen initial card side. Since this is done through RMI, it just involves a call to
    +     * {@link Player#chooseInitialCardSide(Side)}.
    +     * Note that this method is supposed to be called by a view.
    +     *
    +     * @param side The side on which play the initial card drawn using {@link #drawInitialCard()}
    +     * @throws WrongStateException If the current match state doesn't allow setting the initial card side
    +     * @throws WrongTurnException  If the current turn it's not the one of this player
    +     */
    +    @Override
    +    public void chooseInitialCardSide(Side side) throws WrongStateException, WrongTurnException, RemoteException {
    +        player.chooseInitialCardSide(side);
    +    }
    +
    +    /**
    +     * Draws two secret objectives. Since this is done through RMI, it just involves a call to
    +     * {@link Player#drawSecretObjectives()}.
    +     * Note that this method is supposed to be called by a view.
    +     *
    +     * @throws WrongStateException If the current match state doesn't allow drawing secret objectives
    +     * @throws WrongTurnException  If the current turn it's not the one of this player
    +     */
    +    @Override
    +    public void drawSecretObjectives() throws WrongStateException, WrongTurnException, RemoteException {
    +        player.drawSecretObjectives();
    +    }
    +
    +    /**
    +     * Communicates the chosen secret objective. Since this is done through RMI, it just involves a call to
    +     * {@link Player#chooseSecretObjective(Objective)}.
    +     * Note that this method is supposed to be called by a view.
    +     *
    +     * @param objective The chosen objective
    +     * @throws WrongStateException  If the current match state doesn't allow choosing a secret objective
    +     * @throws WrongTurnException   If the current turn it's not the one of this player
    +     * @throws WrongChoiceException If the chosen objective is not one of the two drawn ones using {@link #drawSecretObjectives()}
    +     */
    +    @Override
    +    public void chooseSecretObjective(Objective objective) throws WrongStateException, WrongTurnException, WrongChoiceException, RemoteException {
    +        player.chooseSecretObjective(objective);
    +    }
    +
    +    /**
    +     * Plays a card. Since this is done through RMI, it just involves a call to
    +     * {@link Player#playCard(Pair, PlayableCard, Side)}.
    +     * Note that this method is supposed to be called by a view.
    +     *
    +     * @param coords The coordinates on which to place the card
    +     * @param card   The PlayableCard to play
    +     * @param side   The side on which to play the chosen card
    +     * @throws WrongStateException  If the current match state doesn't allow playing cards
    +     * @throws WrongTurnException   If the current turn it's not the one of this player
    +     * @throws WrongChoiceException If the chosen card is not one of those in the player's current hand
    +     */
    +    @Override
    +    public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) throws WrongStateException, WrongTurnException, WrongChoiceException, RemoteException {
    +        player.playCard(coords, card, side);
    +    }
    +
    +    /**
    +     * Draws a card. Since this is done through RMI, it just involves a call to
    +     * {@link Player#drawCard(DrawSource)}.
    +     * Note that this method is supposed to be called by a view.
    +     *
    +     * @param source The drawing source to draw the card from
    +     * @throws HandException        If the player already has a full hand of cards (three cards)
    +     * @throws WrongStateException  If the current match state doesn't allow drawing cards
    +     * @throws WrongTurnException   If the current turn it's not the one of this player
    +     * @throws WrongChoiceException If the chosen DrawSource doesn't have any card left (i.e. it's empty)
    +     */
    +    @Override
    +    public void drawCard(DrawSource source) throws HandException, WrongStateException, WrongTurnException, WrongChoiceException, RemoteException {
    +        player.drawCard(source);
    +    }
    +
    +    /**
    +     * Sends a broadcast in the chat. Since this is done through RMI, it just involves a call to
    +     * {@link Player#sendBroadcastText(String)}.
    +     * Note that this method is supposed to be called by a view.
    +     *
    +     * @param text Text of the message
    +     */
    +    @Override
    +    public void sendBroadcastText(String text) throws RemoteException {
    +        player.sendBroadcastText(text);
    +    }
    +
    +    /**
    +     * Sends a private message in the chat. Since this is done through RMI, it just involves a call to
    +     * {@link Player#sendPrivateText(Player, String)} )}.
    +     * Note that this method is supposed to be called by a view.
    +     *
    +     * @param recipient username of the recipient
    +     * @param text      text of the message
    +     */
    +    @Override
    +    public void sendPrivateText(String recipient, String text) throws RemoteException {
    +        if (match.getPlayers().stream().anyMatch(p -> p.getUsername().equals(recipient))) {
    +            Player p = match.getPlayers().stream()
    +                    .filter(pl -> pl.getUsername().equals(recipient))
    +                    .toList().getFirst();
    +            player.sendPrivateText(p, text);
    +        }
    +    }
    +
    +    /**
    +     * Notifies that the match has just started.
    +     * Note that is supposed to be called by the match.
    +     */
    +    @Override
    +    public void matchStarted() {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            // Get visible objectives, visible playable cards and visible decks top reigns
    +            Pair<Objective, Objective> visibleObjectives = match.getVisibleObjectives();
    +            Map<DrawSource, PlayableCard> visiblePlayableCards = match.getVisiblePlayableCards();
    +            Pair<Symbol, Symbol> decksTopReigns = match.getDecksTopReigns();
    +
    +            // Create a map that matches each pawn colour to the corresponding player's username
    +            Map<String, Color> playersUsernamesAndPawns = new HashMap<>();
    +
    +            // Create a map that matches each player's username to the corresponding list of cards in the hand
    +            Map<String, List<PlayableCard>> playersHands = new HashMap<>();
    +
    +            // Fill the maps with proper values
    +            for (Player p : match.getPlayers()) {
    +                playersUsernamesAndPawns.put(p.getUsername(), p.getPawnColor());
    +                playersHands.put(p.getUsername(), p.getBoard().getCurrentHand());
    +            }
    +
    +            try {
    +                view.matchStarted(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReigns);
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Notifies that someone has joined the match.
    +     * Note that this method is supposed to be called by a match, moreover the match calls this method on all the
    +     * MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified.
    +     * If and only if the PlayerController receiving this method call is the one linked to given `someone`, it notifies
    +     * the view about the current lobby information.
    +     *
    +     * @param someone The Player instance that has joined
    +     */
    +    @Override
    +    public void someoneJoined(Player someone) {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            try {
    +                List<String> playersUsernames = match.getPlayers().stream().map(Player::getUsername).toList();
    +                view.someoneJoined(someone.getUsername(), playersUsernames);
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Notifies that someone has quit from the match.
    +     * Note that Match calls this method on all MatchObservers instance subscribed to itself, then
    +     * even the MatchObserver causing this event gets notified.
    +     *
    +     * @param someone The Player instance that has quit
    +     */
    +    @Override
    +    public void someoneQuit(Player someone) {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            try {
    +                view.someoneQuit(someone.getUsername());
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Notifies that someone has drawn its initial card.
    +     * Note that this method is supposed to be called by a match, moreover the match calls this method on all the
    +     * MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified.
    +     * If and only if the PlayerController receiving this method call is the one linked to given `someone`, it notifies
    +     * the view that it received an initial card.
    +     *
    +     * @param someone The player instance that has drawn the card
    +     * @param card    The initial card that has been drawn
    +     */
    +    @Override
    +    public void someoneDrewInitialCard(Player someone, InitialCard card) {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            try {
    +                if (player.equals(someone)) {
    +                    view.giveInitialCard(card);
    +                } else {
    +                    view.someoneDrewInitialCard(someone.getUsername(), card);
    +                }
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Notifies that someone has chosen its initial card side.
    +     * Note that this method is supposed to be called by a match, moreover the match calls this method on all the
    +     * MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified.
    +     *
    +     * @param someone The player instance that has chosen the side
    +     * @param side    The chosen initial card side
    +     */
    +    @Override
    +    public void someoneSetInitialSide(Player someone, Side side, Map<Symbol, Integer> availableResources) {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            try {
    +                view.someoneSetInitialSide(someone.getUsername(), side, availableResources);
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Notifies that someone has drawn two secret objectives.
    +     * Note that this method is supposed to be called by a match, moreover the match calls this method on all the
    +     * MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified.
    +     * If and only if the PlayerController receiving this method call is the one linked to given `someone`, it notifies
    +     * the view about the proposed objectives, the other views will just receive a notification about the player's username.
    +     *
    +     * @param someone    The player instance that has drawn the objectives
    +     * @param objectives The two proposed objectives
    +     */
    +    @Override
    +    public void someoneDrewSecretObjective(Player someone, Pair<Objective, Objective> objectives) {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            try {
    +                if (player.equals(someone)) {
    +                    view.giveSecretObjectives(objectives);
    +                } else {
    +                    view.someoneDrewSecretObjective(someone.getUsername());
    +                }
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Notifies that someone has chosen the secret objective.
    +     * Note that this method is supposed to be called by a match, moreover the match calls this method on all the
    +     * MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified.
    +     * The view will just receive `someone` username, no the objective.
    +     *
    +     * @param someone   The player instance that has chosen the secret objective
    +     * @param objective The chosen secret objective
    +     */
    +    @Override
    +    public void someoneChoseSecretObjective(Player someone, Objective objective) {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            try {
    +                view.someoneChoseSecretObjective(someone.getUsername());
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Notifies that someone has played a card.
    +     * Note that this method is supposed to be called by a match, moreover the match calls this method on all the
    +     * MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified.
    +     *
    +     * @param someone The Player instance that has played a card
    +     * @param coords  The coordinates on which the card has been placed
    +     * @param card    The PlayableCard that has been played
    +     * @param side    The side on which the card has been placed
    +     */
    +    @Override
    +    public void someonePlayedCard(Player someone, Pair<Integer, Integer> coords, PlayableCard card, Side side) {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            try {
    +                view.someonePlayedCard(someone.getUsername(), coords, card, side, someone.getPoints(), someone.getBoard().getAvailableResources());
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Notifies that someone has drawn a card.
    +     * The replacement card is the one that has taken the place of the drawn one, it's needed since observers have to
    +     * know the reign of the new card on top of the decks.
    +     * Note that this method is supposed to be called by a match, moreover the match calls this method on all the
    +     * MatchObservers instance subscribed to itself, then even the MatchObserver causing this event gets notified.
    +     *
    +     * @param someone         The Player instance that has drawn a card
    +     * @param source          The drawing source from which the card has been drawn
    +     * @param card            The card that has been drawn
    +     * @param replacementCard The card that has replaced the drawn card, null if the draw source is a deck
    +     */
    +    @Override
    +    public void someoneDrewCard(Player someone, DrawSource source, PlayableCard card, PlayableCard replacementCard) {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            try {
    +                PlayableCard rep = null;
    +                if (!source.equals(DrawSource.GOLDS_DECK) && !source.equals(DrawSource.RESOURCES_DECK)) {
    +                    rep = replacementCard;
    +                }
    +                view.someoneDrewCard(someone.getUsername(), source, card, rep, match.getDecksTopReigns());
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Notifies that someone sent a message in the public chat.
    +     *
    +     * @param someone The player that send the message
    +     * @param text    Content of the message
    +     */
    +    @Override
    +    public void someoneSentBroadcastText(Player someone, String text) {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            try {
    +                view.someoneSentBroadcastText(someone.getUsername(), text);
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Notifies that someone sent a private message to another user.
    +     * If the recipient is the current player, then the view is notified,
    +     * otherwise the message is ignored.
    +     *
    +     * @param someone   The player that sent the message
    +     * @param recipient The recipient of the message
    +     * @param text      Content of the message
    +     */
    +    @Override
    +    public void someoneSentPrivateText(Player someone, Player recipient, String text) {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            if (recipient.equals(this.player) || someone.equals(this.player)) {
    +                try {
    +                    view.someoneSentPrivateText(someone.getUsername(), text);
    +                } catch (RemoteException e) {
    +                    onConnectionError();
    +                }
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Creates a {@link LeaderboardEntry} instance from the given parameters.
    +     *
    +     * @param player The player of the {@link LeaderboardEntry}
    +     * @param winner True if the player is the winner
    +     * @return The new {@link LeaderboardEntry} instance
    +     */
    +    private LeaderboardEntry createLeaderboardEntry(Player player, Boolean winner) {
    +        return new LeaderboardEntry(player.getUsername(), player.getPoints(), winner);
    +    }
    +
    +    /**
    +     * Notifies that the match has just finished.
    +     */
    +    @Override
    +    public void matchFinished() {
    +        if (view == null) {
    +            onUnregisteredView();
    +        } else {
    +            try {
    +                List<LeaderboardEntry> ranking = match.getPlayersFinalRanking().stream()
    +                        .map(p -> createLeaderboardEntry(p.first(), p.second())).toList();
    +                view.matchFinished(ranking);
    +            } catch (RemoteException e) {
    +                onConnectionError();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Getter for the view associated to this instance.
    +     *
    +     * @return The {@link RemoteViewInterface} of this instance
    +     */
    +    public RemoteViewInterface getView() {
    +        return view;
    +    }
    +
    +    /**
    +     * Removes the player linked to this PlayerControllerRMI instance when there's a connection error.
    +     */
    +    private void onConnectionError() {
    +        match.unsubscribeObserver(this);
    +        match.removePlayer(player);
    +    }
    +
    +    /**
    +     * Prints an error in stderr when this instance is being used without a view attached to it.
    +     */
    +    private void onUnregisteredView() {
    +        System.err.println("The PlayerControllerRMI of player " + player.getUsername() + " hasn't got a corresponding view");
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerTCP.html b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerTCP.html new file mode 100644 index 00000000..f784b8af --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerTCP.html @@ -0,0 +1 @@ +PlayerControllerTCP

    PlayerControllerTCP

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total388 of 51825%6 of 1457%2335931301928
    matchResumed()1010%n/a11191911
    lambda$matchResumed$1(Map, Map, Map, Map, Map, Player)520%n/a11121211
    someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard)220%20%226611
    someoneDrewSecretObjective(Player, Pair)210%n/a114411
    lambda$matchResumed$0(Map, Pair, PlacedCard)210%n/a113311
    someoneChoseSecretObjective(Player, Objective)190%20%226611
    matchStarted()180%n/a113311
    someonePlayedCard(Player, Pair, PlayableCard, Side)170%n/a113311
    playCard(Pair, PlayableCard, Side)140%n/a115511
    drawInitialCard()120%n/a115511
    chooseInitialCardSide(Side)120%n/a115511
    drawSecretObjectives()120%n/a115511
    chooseSecretObjective(Objective)120%n/a115511
    drawCard(DrawSource)120%n/a115511
    someoneDrewInitialCard(Player, InitialCard)100%n/a112211
    someoneSetInitialSide(Player, Side, Map)100%n/a113311
    createErrorMessage(Exception)90%n/a111111
    matchFinished()90%n/a112211
    lambda$matchResumed$2(Map.Entry)50%n/a111111
    sendPrivateText(String, String)31100%2466%240901
    someoneSentPrivateText(Player, Player, String)27100%4100%030601
    someoneQuit(Player)15100%n/a010301
    someoneJoined(Player)14100%n/a010301
    someoneSentBroadcastText(Player, String)11100%n/a010301
    connectionError()10100%n/a010301
    sendMessage(Message)9100%n/a010501
    PlayerControllerTCP(String, Match, IOHandler)8100%n/a010301
    sendBroadcastText(String)5100%n/a010201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerTCP.java.html b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerTCP.java.html new file mode 100644 index 00000000..0c5c32f9 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.controllers/PlayerControllerTCP.java.html @@ -0,0 +1,427 @@ +PlayerControllerTCP.java

    PlayerControllerTCP.java

    package it.polimi.ingsw.controllers;
    +
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.stream.Collectors;
    +import it.polimi.ingsw.exceptions.HandException;
    +import it.polimi.ingsw.exceptions.WrongChoiceException;
    +import it.polimi.ingsw.exceptions.WrongStateException;
    +import it.polimi.ingsw.exceptions.WrongTurnException;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.network.messages.Message;
    +import it.polimi.ingsw.network.messages.errors.ErrorMessage;
    +import it.polimi.ingsw.network.messages.responses.*;
    +import it.polimi.ingsw.network.tcp.IOHandler;
    +import it.polimi.ingsw.utils.Pair;
    +import it.polimi.ingsw.utils.PlacedCardRecord;
    +
    +/**
    + * Subclass of {@link PlayerController} that implements its abstract methods through TCP
    + * interactions.
    + */
    +public final class PlayerControllerTCP extends PlayerController {
    +    private final IOHandler io;
    +
    +    /**
    +     * Instantiates the internal Player with the given username and sets the internal Match
    +     * reference to the given one, add the new Player instance to the match and subscribe this class
    +     * instance to the match observers.
    +     *
    +     * @param username The username of the new player of the Match
    +     * @param match The match to which this PlayerClass must pertain
    +     * @param io The I/O handler to be attached to this instance
    +     */
    +    public PlayerControllerTCP(String username, Match match, IOHandler io) {
    +        super(username, match);
    +        this.io = io;
    +    }
    +
    +    /**
    +     * Utility method to send a message object over the network.
    +     *
    +     * @param msg The message object to be sent
    +     */
    +    private void sendMessage(Message msg) {
    +        try {
    +            this.io.writeMsg(msg);
    +        } catch (Exception e) {
    +            this.connectionError();
    +        }
    +    }
    +
    +    /**
    +     * Utility method called when there's a connection error, it removes the player from the match.
    +     */
    +    private void connectionError() {
    +        match.removePlayer(player);
    +        match.unsubscribeObserver(this);
    +    }
    +
    +    /**
    +     * Utility method to create an {@link ErrorMessage} object from an exception.
    +     *
    +     * @param exception The exception
    +     * @return The nex ErrorMessage instance
    +     */
    +    private ErrorMessage createErrorMessage(Exception exception) {
    +        return new ErrorMessage(exception.getMessage(), exception.getClass().getName());
    +    }
    +
    +    /**
    +     * Notifies that the match has just started. Note that is supposed to be called by the match.
    +     */
    +    @Override
    +    public void matchStarted() {
    +        this.sendMessage(new MatchStartedMessage(match.getVisibleObjectives(),
    +                match.getVisiblePlayableCards(), match.getDecksTopReigns(), match.getPlayers()));
    +    }
    +
    +    /**
    +     * Notifies that someone has joined the match. Note that this method is supposed to be called by
    +     * a match, moreover the match calls this method on all the MatchObservers instance subscribed
    +     * to itself, then even the MatchObserver causing this event gets notified. If and only if the
    +     * PlayerController receiving this method call is the one linked to given `someone`, it notifies
    +     * the view about the current lobby information.
    +     *
    +     * @param someone The Player instance that has joined
    +     */
    +    @Override
    +    public void someoneJoined(Player someone) {
    +        this.sendMessage(new SomeoneJoinedMessage(someone.getUsername(), match.getPlayers(),
    +                match.getMaxPlayers()));
    +    }
    +
    +    /**
    +     * Notifies that someone has quit from the match. Note that Match calls this method on all
    +     * MatchObservers instance subscribed to itself, then even the MatchObserver causing this event
    +     * gets notified.
    +     *
    +     * @param someone The Player instance that has quit
    +     */
    +    @Override
    +    public void someoneQuit(Player someone) {
    +        this.sendMessage(new SomeoneQuitMessage(someone.getUsername(), match.getPlayers().size(),
    +                match.isFinished()));
    +    }
    +
    +    /**
    +     * Notifies that someone has drawn its initial card. Note that this method is supposed to be
    +     * called by a match, moreover the match calls this method on all the MatchObservers instance
    +     * subscribed to itself, then even the MatchObserver causing this event gets notified. If and
    +     * only if the PlayerController receiving this method call is the one linked to given `someone`,
    +     * it notifies the view that it received an initial card.
    +     *
    +     * @param someone The player instance that has drawn the card
    +     * @param card The initial card that has been drawn
    +     */
    +    @Override
    +    public void someoneDrewInitialCard(Player someone, InitialCard card) {
    +        this.sendMessage(new SomeoneDrewInitialCardMessage(someone.getUsername(), card.getId()));
    +    }
    +
    +    /**
    +     * Notifies that someone has chosen its initial card side. Note that this method is supposed to
    +     * be called by a match, moreover the match calls this method on all the MatchObservers instance
    +     * subscribed to itself, then even the MatchObserver causing this event gets notified.
    +     *
    +     * @param someone The player instance that has chosen the side
    +     * @param side The chosen initial card side
    +     */
    +    @Override
    +    public void someoneSetInitialSide(Player someone, Side side,
    +            Map<Symbol, Integer> availableResources) {
    +        this.sendMessage(
    +                new SomeoneSetInitialSideMessage(someone.getUsername(), side, availableResources));
    +    }
    +
    +    /**
    +     * Notifies that someone has drawn two secret objectives. Note that this method is supposed to
    +     * be called by a match, moreover the match calls this method on all the MatchObservers instance
    +     * subscribed to itself, then even the MatchObserver causing this event gets notified. If and
    +     * only if the PlayerController receiving this method call is the one linked to given `someone`,
    +     * it notifies the view about the proposed objectives, the other views will just receive a
    +     * notification about the player's username.
    +     *
    +     * @param someone The player instance that has drawn the objectives
    +     * @param objectives The two proposed objectives
    +     */
    +    @Override
    +    public void someoneDrewSecretObjective(Player someone, Pair<Objective, Objective> objectives) {
    +        Pair<Integer, Integer> IDs =
    +                new Pair<>(objectives.first().getID(), objectives.second().getID());
    +        this.sendMessage(new SomeoneDrewSecretObjectivesMessage(someone.getUsername(), IDs));
    +    }
    +
    +    /**
    +     * Notifies that someone has chosen the secret objective. Note that this method is supposed to
    +     * be called by a match, moreover the match calls this method on all the MatchObservers instance
    +     * subscribed to itself, then even the MatchObserver causing this event gets notified. The view
    +     * will just receive `someone` username, no the objective.
    +     *
    +     * @param someone The player instance that has chosen the secret objective
    +     * @param objective The chosen secret objective
    +     */
    +    @Override
    +    public void someoneChoseSecretObjective(Player someone, Objective objective) {
    +        Integer objectiveID = null;
    +        if (someone.equals(player))
    +            objectiveID = objective.getID();
    +        this.sendMessage(
    +                new SomeoneChoseSecretObjectiveMessage(someone.getUsername(), objectiveID));
    +    }
    +
    +    /**
    +     * Notifies that someone has played a card. Note that this method is supposed to be called by a
    +     * match, moreover the match calls this method on all the MatchObservers instance subscribed to
    +     * itself, then even the MatchObserver causing this event gets notified.
    +     *
    +     * @param someone The Player instance that has played a card
    +     * @param coords The coordinates on which the card has been placed
    +     * @param card The PlayableCard that has been played
    +     * @param side The side on which the card has been placed
    +     */
    +    @Override
    +    public void someonePlayedCard(Player someone, Pair<Integer, Integer> coords, PlayableCard card,
    +            Side side) {
    +        this.sendMessage(new SomeonePlayedCardMessage(someone.getUsername(), coords, card.getId(),
    +                side, someone.getPoints(), someone.getBoard().getAvailableResources()));
    +    }
    +
    +    /**
    +     * Notifies that someone has drawn a card. The replacement card is the one that has taken the
    +     * place of the drawn one, it's needed since observers have to know the reign of the new card on
    +     * top of the decks. Note that this method is supposed to be called by a match, moreover the
    +     * match calls this method on all the MatchObservers instance subscribed to itself, then even
    +     * the MatchObserver causing this event gets notified.
    +     *
    +     * @param someone The Player instance that has drawn a card
    +     * @param source The drawing source from which the card has been drawn
    +     * @param card The card that has been drawn
    +     * @param replacementCard The card that has replaced the drawn card, null if the draw source is
    +     *        a deck
    +     */
    +    @Override
    +    public void someoneDrewCard(Player someone, DrawSource source, PlayableCard card,
    +            PlayableCard replacementCard) {
    +        Integer repId = null;
    +        if (replacementCard != null) {
    +            repId = replacementCard.getId();
    +        }
    +        this.sendMessage(new SomeoneDrewCardMessage(someone.getUsername(), source, card.getId(),
    +                repId, match.getDecksTopReigns()));
    +    }
    +
    +    /**
    +     * Notifies that someone sent a message in the public chat.
    +     *
    +     * @param someone The player that send the message
    +     * @param text Content of the message
    +     */
    +    @Override
    +    public void someoneSentBroadcastText(Player someone, String text) {
    +        Message msg = new SomeoneSentBroadcastTextMessage(someone.getUsername(), text);
    +        this.sendMessage(msg);
    +    }
    +
    +    /**
    +     * Notifies that someone sent a private message to another user. If the recipient is the current
    +     * player, then the view is notified, otherwise the message is ignored.
    +     *
    +     * @param someone The player that sent the message
    +     * @param recipient The recipient of the message
    +     * @param text Content of the message
    +     */
    +    @Override
    +    public void someoneSentPrivateText(Player someone, Player recipient, String text) {
    +        if (recipient.getUsername().equals(this.player.getUsername())
    +                || someone.getUsername().equals(this.player.getUsername())) {
    +            Message msg = new SomeoneSentPrivateTextMessage(someone.getUsername(),
    +                    recipient.getUsername(), text);
    +            this.sendMessage(msg);
    +        }
    +    }
    +
    +    /**
    +     * Notifies that the match has just finished.
    +     */
    +    @Override
    +    public void matchFinished() {
    +        this.sendMessage(new MatchFinishedMessage(match.getPlayersFinalRanking()));
    +    }
    +
    +
    +    /**
    +     * Tries to get the player initial card, unless there was a {@link WrongTurnException} or a
    +     * {@link WrongStateException}, in which case a new {@link ErrorMessage} is sent with the
    +     * exception content
    +     */
    +    public void drawInitialCard() {
    +        try {
    +            this.player.drawInitialCard();
    +        } catch (WrongTurnException | WrongStateException e) {
    +            this.sendMessage(this.createErrorMessage(e));
    +        }
    +    }
    +
    +
    +    /**
    +     * Tries to set the player's initial card's side, unless there was a {@link WrongTurnException}
    +     * or a {@link WrongStateException}, in which case a new {@link ErrorMessage} is sent with the
    +     * exception content
    +     *
    +     * @param side The chosen card
    +     */
    +    public void chooseInitialCardSide(Side side) {
    +        try {
    +            this.player.chooseInitialCardSide(side);
    +        } catch (WrongTurnException | WrongStateException e) {
    +            this.sendMessage(this.createErrorMessage(e));
    +        }
    +    }
    +
    +    /**
    +     * Tries to get the player's secret objectives pair (from which he will have to choose one),
    +     * unless there was a {@link WrongTurnException} or a {@link WrongStateException}, in which case
    +     * a new {@link ErrorMessage} is sent with the exception content
    +     */
    +    public void drawSecretObjectives() {
    +        try {
    +            this.player.drawSecretObjectives();
    +        } catch (WrongTurnException | WrongStateException e) {
    +            this.sendMessage(this.createErrorMessage(e));
    +        }
    +    }
    +
    +    /**
    +     * Tries to set the player's secret objective, unless there was a {@link WrongTurnException} or
    +     * a {@link WrongStateException}, in which case a new {@link ErrorMessage} is sent with the
    +     * exception content
    +     *
    +     * @param objective The chosen objective
    +     */
    +    public void chooseSecretObjective(Objective objective) {
    +        try {
    +            this.player.chooseSecretObjective(objective);
    +        } catch (WrongChoiceException | WrongStateException | WrongTurnException e) {
    +            this.sendMessage(this.createErrorMessage(e));
    +        }
    +    }
    +
    +    /**
    +     * Tries to place a card on the player's board, unless there was a {@link WrongStateException},
    +     * in which case a new {@link ErrorMessage} is sent with the exception content
    +     *
    +     * @param coords The chosen coordinates
    +     * @param card The chosen card
    +     * @param side The chosen side
    +     */
    +    public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) {
    +        try {
    +            this.player.playCard(coords, card, side);
    +        } catch (WrongChoiceException | WrongStateException | WrongTurnException e) {
    +            this.sendMessage(this.createErrorMessage(e));
    +        }
    +    }
    +
    +    /**
    +     * Tries to draw a card, unless there was a {@link WrongStateException}, in which case a new
    +     * {@link ErrorMessage} is sent with the exception content
    +     *
    +     * @param source The chosen source
    +     */
    +    public void drawCard(DrawSource source) {
    +        try {
    +            this.player.drawCard(source);
    +        } catch (HandException | WrongTurnException | WrongStateException
    +                | WrongChoiceException e) {
    +            this.sendMessage(this.createErrorMessage(e));
    +        }
    +    }
    +
    +    /**
    +     * Sends a broadcast in the chat.
    +     *
    +     * @param text Text of the message
    +     */
    +    public void sendBroadcastText(String text) {
    +        this.player.sendBroadcastText(text);
    +    }
    +
    +    /**
    +     * Sends a private message in the chat.
    +     *
    +     * @param recipientUsername username of the recipient
    +     * @param text text of the message
    +     */
    +    public void sendPrivateText(String recipientUsername, String text) {
    +        Player recipient = null;
    +        for (Player player : this.match.getPlayers()) {
    +            if (player.getUsername().equals(recipientUsername)) {
    +                recipient = player;
    +                break;
    +            }
    +        }
    +
    +        // if you want to send error if recipient does not exist, change here
    +        if (recipient != null) {
    +            this.player.sendPrivateText(recipient, text);
    +        }
    +    }
    +
    +    /**
    +     * Notifies the view that match has resumed after a server crash.
    +     */
    +    @Override
    +    public void matchResumed() {
    +        Map<String, Color> playersUsernamesAndPawns = new HashMap<>();
    +        Map<String, List<Integer>> playersHands = new HashMap<>();
    +        Pair<Integer, Integer> visibleObjectives;
    +        Map<DrawSource, Integer> visiblePlayableCards = new HashMap<>();
    +        Pair<Symbol, Symbol> decksTopReigns;
    +        Integer secretObjective;
    +        Map<String, Map<Symbol, Integer>> availableResources = new HashMap<>();
    +        Map<String, Map<Integer, PlacedCardRecord>> placedCards = new HashMap<>();
    +        Map<String, Integer> playerPoints = new HashMap<>();
    +        String currentPlayer;
    +        boolean drawPhase;
    +
    +        this.match.getPlayers().forEach(player -> {
    +            String username = player.getUsername();
    +            Board board = player.getBoard();
    +            playersUsernamesAndPawns.put(username, player.getPawnColor());
    +            playersHands.put(username,
    +                    board.getCurrentHand().stream().map(Card::getId).collect(Collectors.toList()));
    +            availableResources.put(username, board.getAvailableResources());
    +
    +            Map<Integer, PlacedCardRecord> placed = new HashMap<>();
    +            board.getPlacedCards()
    +                    .forEach((coords, placedCard) -> placed.put(placedCard.getTurn(),
    +                            new PlacedCardRecord(placedCard.getCard().getId(), coords.first(),
    +                                    coords.second(), placedCard.getPlayedSide())));
    +
    +            placedCards.put(username, placed);
    +            playerPoints.put(username, player.getPoints());
    +        });
    +
    +        Pair<Objective, Objective> visibleObjectivesValue = this.match.getVisibleObjectives();
    +        // Get a Set of Entry, which contains key and value, and create a new Hashmap with key and
    +        // value.ID
    +        visibleObjectives = new Pair<>(visibleObjectivesValue.first().getID(),
    +                visibleObjectivesValue.second().getID());
    +        visiblePlayableCards = this.match.getVisiblePlayableCards().entrySet().stream()
    +                .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().getId()));
    +        decksTopReigns = this.match.getDecksTopReigns();
    +        secretObjective = this.player.getSecretObjective().getID();
    +        currentPlayer = this.match.getCurrentPlayer().getUsername();
    +        drawPhase = this.match.getCurrentState().getClass().equals(AfterMoveState.class);
    +
    +
    +        Message msg = new MatchResumedMessage(playersUsernamesAndPawns, playersHands,
    +                visibleObjectives, visiblePlayableCards, decksTopReigns, secretObjective,
    +                availableResources, placedCards, playerPoints, currentPlayer, drawPhase);
    +
    +        this.sendMessage(msg);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.controllers/index.html b/deliveries/Test results/it.polimi.ingsw.controllers/index.html new file mode 100644 index 00000000..6eba3ad7 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.controllers/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.controllers

    it.polimi.ingsw.controllers

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total542 of 1,19854%29 of 7058%4898149319236303
    PlayerControllerTCP38813025%6857%233593130192801
    PlayerControllerRMI9547183%163065%18534416023001
    PlayerController595548%7330%71012292501
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.controllers/index.source.html b/deliveries/Test results/it.polimi.ingsw.controllers/index.source.html new file mode 100644 index 00000000..d0ecf593 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.controllers/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.controllers

    it.polimi.ingsw.controllers

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total542 of 1,19854%29 of 7058%4898149319236303
    PlayerControllerTCP.java38813025%6857%233593130192801
    PlayerControllerRMI.java9547183%163065%18534416023001
    PlayerController.java595548%7330%71012292501
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/AlreadyUsedUsernameException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/AlreadyUsedUsernameException.html new file mode 100644 index 00000000..fdf8f4e2 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/AlreadyUsedUsernameException.html @@ -0,0 +1 @@ +AlreadyUsedUsernameException

    AlreadyUsedUsernameException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 4100%0 of 0n/a010201
    AlreadyUsedUsernameException(String)4100%n/a010201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/AlreadyUsedUsernameException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/AlreadyUsedUsernameException.java.html new file mode 100644 index 00000000..7e9a4663 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/AlreadyUsedUsernameException.java.html @@ -0,0 +1,8 @@ +AlreadyUsedUsernameException.java

    AlreadyUsedUsernameException.java

    package it.polimi.ingsw.exceptions;
    +
    +public class AlreadyUsedUsernameException extends Exception {
    +    public AlreadyUsedUsernameException(String message) {
    +        super(message);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/CardException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/CardException.html new file mode 100644 index 00000000..c8295abb --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/CardException.html @@ -0,0 +1 @@ +CardException

    CardException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 4100%0 of 0n/a010201
    CardException(String)4100%n/a010201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/CardException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/CardException.java.html new file mode 100644 index 00000000..c23631ce --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/CardException.java.html @@ -0,0 +1,9 @@ +CardException.java

    CardException.java

    package it.polimi.ingsw.exceptions;
    +
    +public class CardException extends Exception {
    +    public CardException(String s) {
    +        super(s);
    +    }
    +}
    +
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/ChosenMatchException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/ChosenMatchException.html new file mode 100644 index 00000000..379ddedc --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/ChosenMatchException.html @@ -0,0 +1 @@ +ChosenMatchException

    ChosenMatchException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total4 of 40%0 of 0n/a112211
    ChosenMatchException(String)40%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/ChosenMatchException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/ChosenMatchException.java.html new file mode 100644 index 00000000..ed5a9b54 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/ChosenMatchException.java.html @@ -0,0 +1,8 @@ +ChosenMatchException.java

    ChosenMatchException.java

    package it.polimi.ingsw.exceptions;
    +
    +public class ChosenMatchException extends Exception {
    +    public ChosenMatchException(String message) {
    +        super(message);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/DeckException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/DeckException.html new file mode 100644 index 00000000..b14e1fc6 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/DeckException.html @@ -0,0 +1 @@ +DeckException

    DeckException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 4100%0 of 0n/a010201
    DeckException(String)4100%n/a010201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/DeckException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/DeckException.java.html new file mode 100644 index 00000000..18f79436 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/DeckException.java.html @@ -0,0 +1,9 @@ +DeckException.java

    DeckException.java

    package it.polimi.ingsw.exceptions;
    +
    +public class DeckException extends Exception {
    +    public DeckException(String s) {
    +        super(s);
    +    }
    +}
    +
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/HandException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/HandException.html new file mode 100644 index 00000000..3dac5f28 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/HandException.html @@ -0,0 +1 @@ +HandException

    HandException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total4 of 40%0 of 0n/a112211
    HandException(String)40%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/HandException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/HandException.java.html new file mode 100644 index 00000000..acc0ee30 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/HandException.java.html @@ -0,0 +1,9 @@ +HandException.java

    HandException.java

    package it.polimi.ingsw.exceptions;
    +
    +public class HandException extends Exception {
    +    public HandException(String s) {
    +        super(s);
    +    }
    +}
    +
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidPlayerException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidPlayerException.html new file mode 100644 index 00000000..81d0e798 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidPlayerException.html @@ -0,0 +1 @@ +InvalidPlayerException

    InvalidPlayerException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total4 of 40%0 of 0n/a112211
    InvalidPlayerException(String)40%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidPlayerException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidPlayerException.java.html new file mode 100644 index 00000000..23b1fde5 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidPlayerException.java.html @@ -0,0 +1,11 @@ +InvalidPlayerException.java

    InvalidPlayerException.java

    package it.polimi.ingsw.exceptions;
    +
    +public class InvalidPlayerException extends Exception {
    +
    +    public InvalidPlayerException(String message) {
    +        super(message);
    +    }
    +
    +}
    +
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidResourceException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidResourceException.html new file mode 100644 index 00000000..d472bf80 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidResourceException.html @@ -0,0 +1 @@ +InvalidResourceException

    InvalidResourceException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total4 of 40%0 of 0n/a112211
    InvalidResourceException(String)40%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidResourceException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidResourceException.java.html new file mode 100644 index 00000000..1d1e47a4 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/InvalidResourceException.java.html @@ -0,0 +1,9 @@ +InvalidResourceException.java

    InvalidResourceException.java

    package it.polimi.ingsw.exceptions;
    +
    +public class InvalidResourceException extends Exception {
    +    public InvalidResourceException(String s) {
    +        super(s);
    +    }
    +}
    +
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/WrongChoiceException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongChoiceException.html new file mode 100644 index 00000000..57ace49f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongChoiceException.html @@ -0,0 +1 @@ +WrongChoiceException

    WrongChoiceException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 4100%0 of 0n/a010201
    WrongChoiceException(String)4100%n/a010201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/WrongChoiceException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongChoiceException.java.html new file mode 100644 index 00000000..3c425d1c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongChoiceException.java.html @@ -0,0 +1,8 @@ +WrongChoiceException.java

    WrongChoiceException.java

    package it.polimi.ingsw.exceptions;
    +
    +public class WrongChoiceException extends Exception {
    +    public WrongChoiceException(String s) {
    +        super(s);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/WrongInputFormatException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongInputFormatException.html new file mode 100644 index 00000000..a1619a18 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongInputFormatException.html @@ -0,0 +1 @@ +WrongInputFormatException

    WrongInputFormatException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total4 of 40%0 of 0n/a112211
    WrongInputFormatException(String)40%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/WrongInputFormatException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongInputFormatException.java.html new file mode 100644 index 00000000..d94cecc6 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongInputFormatException.java.html @@ -0,0 +1,12 @@ +WrongInputFormatException.java

    WrongInputFormatException.java

    package it.polimi.ingsw.exceptions;
    +
    +/**
    + * WrongInputFormatException
    + */
    +
    +public class WrongInputFormatException extends Exception {
    +  public WrongInputFormatException(String msg) {
    +    super(msg);
    +  }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/WrongNameException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongNameException.html new file mode 100644 index 00000000..2529e451 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongNameException.html @@ -0,0 +1 @@ +WrongNameException

    WrongNameException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total4 of 40%0 of 0n/a112211
    WrongNameException(String)40%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/WrongNameException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongNameException.java.html new file mode 100644 index 00000000..b292e562 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongNameException.java.html @@ -0,0 +1,8 @@ +WrongNameException.java

    WrongNameException.java

    package it.polimi.ingsw.exceptions;
    +
    +public class WrongNameException extends Exception{
    +    public WrongNameException(String message) {
    +        super(message);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/WrongStateException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongStateException.html new file mode 100644 index 00000000..99b7e1dd --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongStateException.html @@ -0,0 +1 @@ +WrongStateException

    WrongStateException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 4100%0 of 0n/a010201
    WrongStateException(String)4100%n/a010201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/WrongStateException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongStateException.java.html new file mode 100644 index 00000000..f8c79a24 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongStateException.java.html @@ -0,0 +1,8 @@ +WrongStateException.java

    WrongStateException.java

    package it.polimi.ingsw.exceptions;
    +
    +public class WrongStateException extends Exception {
    +    public WrongStateException(String message) {
    +        super(message);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/WrongTurnException.html b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongTurnException.html new file mode 100644 index 00000000..ed2f725d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongTurnException.html @@ -0,0 +1 @@ +WrongTurnException

    WrongTurnException

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total4 of 40%0 of 0n/a112211
    WrongTurnException(String)40%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/WrongTurnException.java.html b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongTurnException.java.html new file mode 100644 index 00000000..18580a7c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/WrongTurnException.java.html @@ -0,0 +1,8 @@ +WrongTurnException.java

    WrongTurnException.java

    package it.polimi.ingsw.exceptions;
    +
    +public class WrongTurnException extends Exception {
    +    public WrongTurnException(String message) {
    +        super(message);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/index.html b/deliveries/Test results/it.polimi.ingsw.exceptions/index.html new file mode 100644 index 00000000..7dcea2bb --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.exceptions

    it.polimi.ingsw.exceptions

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total28 of 4841%0 of 0n/a7121424712712
    WrongNameException40%n/a11221111
    WrongInputFormatException40%n/a11221111
    WrongTurnException40%n/a11221111
    InvalidPlayerException40%n/a11221111
    ChosenMatchException40%n/a11221111
    InvalidResourceException40%n/a11221111
    HandException40%n/a11221111
    WrongChoiceException4100%n/a01020101
    AlreadyUsedUsernameException4100%n/a01020101
    CardException4100%n/a01020101
    WrongStateException4100%n/a01020101
    DeckException4100%n/a01020101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.exceptions/index.source.html b/deliveries/Test results/it.polimi.ingsw.exceptions/index.source.html new file mode 100644 index 00000000..cefa6ff5 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.exceptions/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.exceptions

    it.polimi.ingsw.exceptions

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total28 of 4841%0 of 0n/a7121424712712
    WrongTurnException.java40%n/a11221111
    WrongInputFormatException.java40%n/a11221111
    ChosenMatchException.java40%n/a11221111
    InvalidResourceException.java40%n/a11221111
    InvalidPlayerException.java40%n/a11221111
    WrongNameException.java40%n/a11221111
    HandException.java40%n/a11221111
    WrongChoiceException.java4100%n/a01020101
    DeckException.java4100%n/a01020101
    WrongStateException.java4100%n/a01020101
    AlreadyUsedUsernameException.java4100%n/a01020101
    CardException.java4100%n/a01020101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterDrawState.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterDrawState.html new file mode 100644 index 00000000..7dca272d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterDrawState.html @@ -0,0 +1 @@ +AfterDrawState

    AfterDrawState

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 26100%0 of 2100%030702
    transition()22100%2100%020501
    AfterDrawState(Match)4100%n/a010201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterDrawState.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterDrawState.java.html new file mode 100644 index 00000000..7573a352 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterDrawState.java.html @@ -0,0 +1,37 @@ +AfterDrawState.java

    AfterDrawState.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Subclass of {@link MatchState}. This is the state in which the match recognize if it's finished or it has to continue.
    + */
    +public class AfterDrawState extends MatchState implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    /**
    +     * Initializes this instance.
    +     *
    +     * @param match The match in this state
    +     */
    +    public AfterDrawState(Match match) {
    +        super(match);
    +    }
    +
    +    /**
    +     * If the match isn't finished, transitions to {@link NextTurnState}, otherwise to {@link FinalState}.
    +     */
    +    @Override
    +    public void transition() {
    +        MatchState nextState;
    +
    +        if (match.isFinished())
    +            nextState = new FinalState(match);
    +        else
    +            nextState = new NextTurnState(match);
    +
    +        match.setState(nextState);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterMoveState.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterMoveState.html new file mode 100644 index 00000000..9e95f63a --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterMoveState.html @@ -0,0 +1 @@ +AfterMoveState

    AfterMoveState

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 18100%0 of 0n/a030703
    transition()13100%n/a010401
    AfterMoveState(Match)4100%n/a010201
    drawCard()1100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterMoveState.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterMoveState.java.html new file mode 100644 index 00000000..ef1a36e5 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/AfterMoveState.java.html @@ -0,0 +1,41 @@ +AfterMoveState.java

    AfterMoveState.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Subclass of {@link MatchState}. This is the state in which the match allows a player to draw a card.
    + */
    +public class AfterMoveState extends MatchState implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    /**
    +     * Initializes this instance.
    +     *
    +     * @param match The match in this state
    +     */
    +    public AfterMoveState(Match match) {
    +        super(match);
    +    }
    +
    +    /**
    +     * This method call is allowed by this class instances.
    +     */
    +    @Override
    +    public void drawCard() {
    +
    +    }
    +
    +    /**
    +     * Transitions to {@link AfterDrawState}.
    +     */
    +    @Override
    +    public void transition() {
    +        MatchState nextState = new AfterDrawState(match);
    +        match.setState(nextState);
    +
    +        nextState.transition();
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Board.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Board.html new file mode 100644 index 00000000..53037699 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Board.html @@ -0,0 +1 @@ +Board

    Board

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total34 of 59294%9 of 5984%942997012
    placeCard(Pair, PlayableCard, Side, int)1315192%21386%2932501
    verifyCardPlacement(Pair, Card, Side)618296%32388%31433001
    setInitialCard(InitialCard, Side)56592%2466%241901
    removeHandCard(PlayableCard)51168%1150%121401
    addHandCard(PlayableCard)51066%1150%121401
    increaseResources(Card, Side)41100%4100%030501
    Board()36100%2100%020801
    static {...}35100%n/a010501
    getSymbolIfPresent(Pair, Corner)18100%2100%020401
    getAvailableResources()3100%n/a010101
    getPlacedCards()3100%n/a010101
    getCurrentHand()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Board.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Board.java.html new file mode 100644 index 00000000..d38b8c92 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Board.java.html @@ -0,0 +1,255 @@ +Board.java

    Board.java

    package it.polimi.ingsw.gamemodel;
    +
    +import it.polimi.ingsw.exceptions.CardException;
    +import it.polimi.ingsw.exceptions.HandException;
    +import it.polimi.ingsw.utils.Pair;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +import java.util.ArrayList;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * Board is the class that contains all the information relative to a {@link Player}'s status
    + */
    +public class Board implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    private final List<PlayableCard> currentHand;
    +    private final Map<Pair<Integer, Integer>, PlacedCard> placed;
    +    private final Map<Symbol, Integer> availableResources;
    +
    +    private static final Map<Pair<Integer, Integer>, Corner> diagonalOffsets = Map.of(
    +            new Pair<>(-1, +1), Corner.BOTTOM_RIGHT,
    +            new Pair<>(+1, +1), Corner.BOTTOM_LEFT,
    +            new Pair<>(-1, -1), Corner.TOP_RIGHT,
    +            new Pair<>(+1, -1), Corner.TOP_LEFT
    +    );
    +
    +    /**
    +     * Class constructor. No inputs taken as the board starts empty
    +     */
    +    public Board() {
    +        currentHand = new ArrayList<>();
    +        placed = new HashMap<>();
    +        availableResources = new HashMap<>();
    +        for (Symbol s : Symbol.getBasicResources()) {
    +            availableResources.put(s, 0);
    +        }
    +    }
    +
    +    /**
    +     * Getter for the total resources of a player
    +     *
    +     * @return the resources of a player
    +     */
    +    public Map<Symbol, Integer> getAvailableResources() {
    +        return this.availableResources;
    +    }
    +
    +    /**
    +     * Getter for the board's placed cards
    +     *
    +     * @return map containing all the placed cards indexed by their coordinates
    +     */
    +    public Map<Pair<Integer, Integer>, PlacedCard> getPlacedCards() {
    +        return this.placed;
    +    }
    +
    +    /**
    +     * Getter for the hand of the player (which must be composed of three {@link PlayableCard}), which is visible
    +     * to every player
    +     *
    +     * @return the player's hand
    +     */
    +    public List<PlayableCard> getCurrentHand() {
    +        return this.currentHand;
    +    }
    +
    +    /**
    +     * Removes a card from the hand of the player
    +     *
    +     * @param card the card that must be removed from the player's hand
    +     * @throws HandException if the player does not have exactly 3 cards in his hand
    +     */
    +    protected void removeHandCard(PlayableCard card) throws HandException {
    +        if (currentHand.size() != 3) {
    +            throw new HandException("Tried to remove a card from an empty hand!");
    +        }
    +        currentHand.remove(card);
    +    }
    +
    +    /**
    +     * Adds a card to the player's hand (which is visible to every player)
    +     *
    +     * @param card the card to put in the hand
    +     * @throws HandException if the player already has 3 cards
    +     */
    +    protected void addHandCard(PlayableCard card) throws HandException {
    +        if (currentHand.size() > 2) { // la mano ha 3 carte max
    +            throw new HandException("Tried to draw a card with a full hand!");
    +        }
    +        currentHand.addLast(card);
    +    }
    +
    +    /**
    +     * Places the initial card in the (0, 0) coordinates, on the desired side
    +     *
    +     * @param card the initial card
    +     * @param side the desired side
    +     * @throws CardException if the (0, 0) position is already occupied
    +     */
    +    protected void setInitialCard(InitialCard card, Side side) throws CardException {
    +        if (placed.get(new Pair<>(0, 0)) != null) {
    +            throw new CardException("Tried to add initial card, but one already exists!");
    +        }
    +        placed.put(new Pair<>(0, 0), new PlacedCard(card, side, 0));
    +
    +        increaseResources(card, side);
    +
    +        for (Symbol s : card.getSide(side).getCenter()) {
    +            if (Symbol.getBasicResources().contains(s)) {
    +                availableResources.put(s, availableResources.get(s) + 1);
    +            }
    +        }
    +    }
    +
    +    /**
    +     * This method will add to the board the given card (assuming the positioning is valid), and update the player's resources
    +     *
    +     * @param coord the x and y coordinates in which the card must be placed
    +     * @param card  the card to be placed
    +     * @param side  the side of the card to be placed
    +     * @param turn  the turn of the game in which the card is played
    +     * @return the points gained from playing card
    +     * @throws CardException if the card type is not known (neither a {@link ResourceCard} nor a {@link GoldCard})
    +     */
    +    protected int placeCard(Pair<Integer, Integer> coord, PlayableCard card, Side side, int turn) throws CardException {
    +        PlacedCard last = new PlacedCard(card, side, turn);
    +        this.placed.put(coord, last);
    +        int points = 0;
    +
    +        Symbol cornerSymbol;
    +        Integer x = coord.first();
    +        Integer y = coord.second();
    +
    +        for (Pair<Integer, Integer> diagOffset : diagonalOffsets.keySet()) {
    +            try {
    +                cornerSymbol = this.getSymbolIfPresent(new Pair<>(x + diagOffset.first(), y + diagOffset.second()), diagonalOffsets.get(diagOffset));
    +                if (cornerSymbol != null) {
    +                    if (Symbol.getBasicResources().contains(cornerSymbol)) {
    +                        availableResources.put(cornerSymbol, availableResources.get(cornerSymbol) - 1);
    +                    }
    +                }
    +            } catch (CardException e) {
    +                System.err.println(e.getMessage());
    +            }
    +        }
    +
    +        increaseResources(card, side);
    +
    +        for (Symbol s : card.getSide(side).getCenter()) {
    +            if (Symbol.getBasicResources().contains(s)) {
    +                availableResources.put(s, availableResources.get(s) + 1);
    +            }
    +        }
    +        if (side.equals(Side.FRONT)) {
    +            switch (card) {
    +                case GoldCard gold -> points = gold.calculatePoints(this, coord);
    +                case ResourceCard resource -> points = resource.getPoints();
    +                default -> throw new CardException("Unknown card type: " + card.getClass() + "!");
    +            }
    +        }
    +
    +        return points;
    +    }
    +
    +    private Symbol getSymbolIfPresent(Pair<Integer, Integer> coord, Corner corner) throws CardException {
    +        PlacedCard placedCard = placed.get(coord);
    +        if (placedCard == null) {
    +            return null;
    +        }
    +        return placedCard.getCard().getSide(placedCard.getPlayedSide()).getCorner(corner);
    +    }
    +
    +    /**
    +     * Checks whether the positioning is valid: the card has to be in the player's hand (note that this method won't be called on the initial card),
    +     * the given coordinates must be valid, and if the card has a requirement it must be met
    +     *
    +     * @param coord the coordinates in which the card should be played
    +     * @param card  the card to check on
    +     * @param side  the side of the card (needed for requirement check)
    +     * @return the outcome for the placement, which is valid only if all conditions are met
    +     * @throws CardException if the card is not in the player's hand
    +     */
    +    public PlacementOutcome verifyCardPlacement(Pair<Integer, Integer> coord, Card card, Side side) throws CardException {
    +        if (coord.equals(new Pair<>(0, 0))) {
    +            return PlacementOutcome.INVALID_COORDS;
    +        }
    +        if (!currentHand.contains(card)) {
    +            throw new CardException("The card is not in the player's hand!");
    +        }
    +        if (placed.containsKey(coord)) {
    +            return PlacementOutcome.INVALID_COORDS;
    +        }
    +        if (card instanceof GoldCard gold && side == Side.FRONT) {
    +            if (gold.getRequirement().timesMet(this) == 0)
    +                return PlacementOutcome.INVALID_ENOUGH_RESOURCES;
    +        }
    +
    +
    +        Integer[] offsets = {-1, +1};
    +
    +        Pair<Integer, Integer> cmp;
    +
    +        // cross-check: none exists
    +        for (Integer offset : offsets) {
    +            cmp = new Pair<>(coord.first() + offset, coord.second());
    +            if (placed.containsKey(cmp)) {
    +                return PlacementOutcome.INVALID_COORDS;
    +            }
    +
    +            cmp = new Pair<>(coord.first(), coord.second() + offset);
    +            if (placed.containsKey(cmp)) {
    +                return PlacementOutcome.INVALID_COORDS;
    +            }
    +        }
    +
    +        boolean hasAdjacent = false;
    +
    +        Integer x = coord.first();
    +        Integer y = coord.second();
    +
    +        for (Pair<Integer, Integer> diagOffset : Board.diagonalOffsets.keySet()) {
    +            cmp = new Pair<>(x + diagOffset.first(), y + diagOffset.second());
    +
    +            if (placed.get(cmp) != null) {
    +                hasAdjacent = true;
    +                if (placed.get(cmp).getPlayedCardFace().getCorner(diagonalOffsets.get(diagOffset)) == Symbol.EMPTY_CORNER) {
    +                    return PlacementOutcome.INVALID_COORDS;
    +                }
    +            }
    +        }
    +
    +        if (!hasAdjacent) {
    +            return PlacementOutcome.INVALID_COORDS;
    +        }
    +
    +        return PlacementOutcome.VALID;
    +    }
    +
    +    private void increaseResources(Card card, Side side) throws CardException {
    +        Symbol cornerSymbol;
    +        for (Corner c : Corner.values()) {
    +            cornerSymbol = card.getSide(side).getCorner(c);
    +            if (Symbol.getBasicResources().contains(cornerSymbol)) {
    +                availableResources.put(cornerSymbol, availableResources.get(cornerSymbol) + 1);
    +            }
    +        }
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Card.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Card.html new file mode 100644 index 00000000..051e3caa --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Card.html @@ -0,0 +1 @@ +Card

    Card

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total6 of 4185%1 of 683%2811015
    hashCode()40%n/a111111
    equals(Object)21890%1375%130301
    getSide(Side)11100%2100%020301
    Card()3100%n/a010201
    getId()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Card.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Card.java.html new file mode 100644 index 00000000..ca33d821 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Card.java.html @@ -0,0 +1,61 @@ +Card.java

    Card.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +import java.util.Objects;
    +
    +/**
    + * Highest abstraction of the card object, with common aspects for every card in
    + * the game (except objectives).
    + */
    +public abstract class Card implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    protected CardFace front;
    +    protected CardFace back;
    +    protected Integer id;
    +
    +    /**
    +     * Empty constructor used for deserialization.
    +     */
    +    public Card() {
    +
    +    }
    +
    +    /**
    +     * Getter for the required side of the card
    +     *
    +     * @param side the required side
    +     * @return the structure of the specified side
    +     * @see CardFace
    +     */
    +    public CardFace getSide(Side side) {
    +        return switch (side) {
    +            case FRONT -> this.front;
    +            case BACK -> this.back;
    +        };
    +    }
    +
    +    
    +    /**
    +     * @return The card ID
    +     */
    +    public Integer getId() {
    +        return this.id;
    +    }
    +
    +    @Override
    +    public boolean equals(Object o) {
    +        if (this == o) return true;
    +        if (!(o instanceof Card card)) return false;
    +
    +        return this.id.equals(card.id);
    +    }
    +
    +    @Override
    +    public int hashCode() {
    +        return Objects.hashCode(id);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/CardFace.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/CardFace.html new file mode 100644 index 00000000..f41fc5da --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/CardFace.html @@ -0,0 +1 @@ +CardFace

    CardFace

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 38100%0 of 4100%0601303
    CardFace(Symbol, Symbol, Symbol, Symbol, Set)18100%n/a010701
    getCorner(Corner)17100%4100%040501
    getCenter()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/CardFace.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/CardFace.java.html new file mode 100644 index 00000000..79c8bfab --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/CardFace.java.html @@ -0,0 +1,64 @@ +CardFace.java

    CardFace.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +import java.util.Set;
    +import it.polimi.ingsw.exceptions.CardException;
    +
    +/**
    + * Topological definition of a card's side
    + */
    +public class CardFace implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    private Symbol topLeft;
    +    private Symbol topRight;
    +    private Symbol bottomLeft;
    +    private Symbol bottomRight;
    +    private Set<Symbol> center;
    +
    +    
    +    /**
    +     * Class constructor.
    +     * 
    +     * @param topLeft Top left corner
    +     * @param topRight Top right corner
    +     * @param bottomLeft Bottom left corner
    +     * @param bottomRight Bottom right corner
    +     * @param center Center of the card
    +     */
    +    public CardFace(Symbol topLeft, Symbol topRight, Symbol bottomLeft, Symbol bottomRight, Set<Symbol> center) {
    +        this.topLeft = topLeft;
    +        this.topRight = topRight;
    +        this.bottomLeft = bottomLeft;
    +        this.bottomRight = bottomRight;
    +        this.center = center;
    +    }
    +
    +    /**
    +     * Used to get the symbol present in one of the four corners of a card
    +     *
    +     * @param corner which of the four corners we want
    +     * @return the symbol the specified corner contains
    +     * @throws CardException if the specified corner does not exist
    +     */
    +    public Symbol getCorner(Corner corner) throws CardException {
    +        return switch (corner) {
    +            case TOP_LEFT -> this.topLeft;
    +            case TOP_RIGHT -> this.topRight;
    +            case BOTTOM_LEFT -> this.bottomLeft;
    +            case BOTTOM_RIGHT -> this.bottomRight;
    +        };
    +    }
    +
    +    /**
    +     * Getter for the center of the card
    +     *
    +     * @return the set containing all symbols the center of the card contains
    +     */
    +    public Set<Symbol> getCenter() {
    +        return center;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseInitialSideState.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseInitialSideState.html new file mode 100644 index 00000000..67b3f135 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseInitialSideState.html @@ -0,0 +1 @@ +ChooseInitialSideState

    ChooseInitialSideState

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 31100%0 of 2100%040903
    transition()26100%2100%020601
    ChooseInitialSideState(Match)4100%n/a010201
    chooseInitialSide()1100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseInitialSideState.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseInitialSideState.java.html new file mode 100644 index 00000000..83a877e6 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseInitialSideState.java.html @@ -0,0 +1,44 @@ +ChooseInitialSideState.java

    ChooseInitialSideState.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Subclass of {@link MatchState}. This is the state in which the match is giving an initial card to a player and
    + * waiting him to choose its side.
    + */
    +public class ChooseInitialSideState extends MatchState implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    /**
    +     * Initializes this instance.
    +     *
    +     * @param match The match in this state
    +     */
    +    public ChooseInitialSideState(Match match) {
    +        super(match);
    +    }
    +
    +    /**
    +     * This method call is allowed by this class instances.
    +     */
    +    @Override
    +    public void chooseInitialSide() {
    +
    +    }
    +
    +    /**
    +     * Transitions to {@link NextTurnState}
    +     */
    +    @Override
    +    public void transition() {
    +        Player lastPlayer = match.getPlayers().getLast();
    +
    +        if (match.getCurrentPlayer().equals(lastPlayer))
    +            match.doInitialTurnFinish();
    +        MatchState nextState = new NextTurnState(match);
    +        match.setState(nextState);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseSecretObjectiveState.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseSecretObjectiveState.html new file mode 100644 index 00000000..816a2e7f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseSecretObjectiveState.html @@ -0,0 +1 @@ +ChooseSecretObjectiveState

    ChooseSecretObjectiveState

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 31100%0 of 2100%040903
    transition()26100%2100%020601
    ChooseSecretObjectiveState(Match)4100%n/a010201
    chooseSecretObjective()1100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseSecretObjectiveState.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseSecretObjectiveState.java.html new file mode 100644 index 00000000..61205e1c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/ChooseSecretObjectiveState.java.html @@ -0,0 +1,45 @@ +ChooseSecretObjectiveState.java

    ChooseSecretObjectiveState.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Subclass of {@link MatchState}. This is the state in which the match is giving two secret objectives to a player and
    + * waiting him to choose one of them.
    + */
    +public class ChooseSecretObjectiveState extends MatchState implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    /**
    +     * Initializes this instance.
    +     *
    +     * @param match The match in this state
    +     */
    +    public ChooseSecretObjectiveState(Match match) {
    +        super(match);
    +    }
    +
    +    /**
    +     * This method call is allowed by this class instances.
    +     */
    +    @Override
    +    public void chooseSecretObjective() {
    +
    +    }
    +
    +    /**
    +     * Transitions to {@link NextTurnState}
    +     */
    +    @Override
    +    public void transition() {
    +        Player lastPlayer = match.getPlayers().getLast();
    +
    +        if (match.getCurrentPlayer().equals(lastPlayer))
    +            match.doStart();
    +
    +        MatchState nextState = new NextTurnState(match);
    +        match.setState(nextState);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Color.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Color.html new file mode 100644 index 00000000..21861058 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Color.html @@ -0,0 +1 @@ +Color

    Color

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 27100%0 of 0n/a010501
    static {...}27100%n/a010501
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Color.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Color.java.html new file mode 100644 index 00000000..38ce2391 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Color.java.html @@ -0,0 +1,12 @@ +Color.java

    Color.java

    package it.polimi.ingsw.gamemodel;
    +
    +/**
    + * Represents pawns colors.
    + */
    +public enum Color {
    +    RED,
    +    BLUE,
    +    GREEN,
    +    YELLOW
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Corner.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Corner.html new file mode 100644 index 00000000..5b166f6c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Corner.html @@ -0,0 +1 @@ +Corner

    Corner

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 27100%0 of 0n/a010501
    static {...}27100%n/a010501
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Corner.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Corner.java.html new file mode 100644 index 00000000..b6f0f75b --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Corner.java.html @@ -0,0 +1,12 @@ +Corner.java

    Corner.java

    package it.polimi.ingsw.gamemodel;
    +
    +/**
    + * All the corners of a card, which can contain a {@link Symbol}
    + */
    +public enum Corner {
    +    TOP_LEFT,
    +    TOP_RIGHT,
    +    BOTTOM_LEFT,
    +    BOTTOM_RIGHT
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/DrawSource.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/DrawSource.html new file mode 100644 index 00000000..b3b10565 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/DrawSource.html @@ -0,0 +1 @@ +DrawSource

    DrawSource

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 39100%0 of 0n/a010701
    static {...}39100%n/a010701
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/DrawSource.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/DrawSource.java.html new file mode 100644 index 00000000..ae351d60 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/DrawSource.java.html @@ -0,0 +1,32 @@ +DrawSource.java

    DrawSource.java

    package it.polimi.ingsw.gamemodel;
    +
    +/**
    + * All the sources a player can draw from: the decks and the four visible cards.
    + */
    +public enum DrawSource {
    +    /**
    +     * Gold cards deck
    +     */
    +    GOLDS_DECK,
    +    /**
    +     * Resource cards deck
    +     */
    +    RESOURCES_DECK,
    +    /**
    +     * First gold card (first among all)
    +     */
    +    FIRST_VISIBLE,
    +    /**
    +     * Second gold card (second among all)
    +     */
    +    SECOND_VISIBLE,
    +    /**
    +     * First resource card (third among all)
    +     */
    +    THIRD_VISIBLE,
    +    /**
    +     * Second resource card (fourth among all)
    +     */
    +    FOURTH_VISIBLE
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/FinalState.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/FinalState.html new file mode 100644 index 00000000..114e1670 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/FinalState.html @@ -0,0 +1 @@ +FinalState

    FinalState

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total5 of 1154%0 of 0n/a233623
    transition()40%n/a112211
    removePlayer()10%n/a111111
    FinalState(Match)6100%n/a010301
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/FinalState.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/FinalState.java.html new file mode 100644 index 00000000..c84f280c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/FinalState.java.html @@ -0,0 +1,41 @@ +FinalState.java

    FinalState.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Subclass of {@link MatchState}. This is the state in which the match is when it's finished, so players are
    + * allowed to leave.
    + */
    +public class FinalState extends MatchState implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    /**
    +     * Initializes this instance.
    +     *
    +     * @param match The match in this state
    +     */
    +    public FinalState(Match match) {
    +        super(match);
    +
    +        match.decideWinner();
    +    }
    +
    +    /**
    +     * This method call is allowed by this class instances.
    +     */
    +    @Override
    +    public void removePlayer() {
    +        // No more transition
    +    }
    +
    +    /**
    +     * This call doesn't have any effect, apart from logging it to stderr.
    +     */
    +    @Override
    +    public void transition() {
    +        System.err.println("Transition tried in final state");
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/GameDeck.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/GameDeck.html new file mode 100644 index 00000000..71c5c283 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/GameDeck.html @@ -0,0 +1 @@ +GameDeck

    GameDeck

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 55100%0 of 6100%01101808
    pop()12100%2100%020301
    peek()9100%2100%020301
    poll()9100%2100%020301
    GameDeck()8100%n/a010301
    add(Object)5100%n/a010201
    getSize()4100%n/a010101
    shuffle()4100%n/a010201
    isEmpty()4100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/GameDeck.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/GameDeck.java.html new file mode 100644 index 00000000..7de332b2 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/GameDeck.java.html @@ -0,0 +1,96 @@ +GameDeck.java

    GameDeck.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +import java.util.ArrayList;
    +import java.util.Collections;
    +import java.util.List;
    +import it.polimi.ingsw.exceptions.DeckException;
    +
    +/**
    + * Generic used to create the decks for all the types of cards
    + *
    + * @param <T> the type of deck, which can be a {@link ResourceCard}, {@link GoldCard}, {@link InitialCard} or {@link Objective}
    + */
    +public class GameDeck<T> implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    private List<T> cardsList;
    +
    +    /**
    +     * Class constructor, takes no argument as the decks start empty
    +     */
    +    public GameDeck() {
    +        cardsList = new ArrayList<>();
    +    }
    +
    +    /**
    +     * Adds a card to the bottom of the deck
    +     *
    +     * @param card the card to add
    +     */
    +    public void add(T card) {
    +        this.cardsList.addFirst(card);
    +    }
    +
    +    /**
    +     * Getter for the deck's size
    +     *
    +     * @return the deck's size
    +     */
    +    public int getSize() {
    +        return this.cardsList.size();
    +    }
    +
    +    /**
    +     * Removes a card from the deck's top (throws exception if the deck is empty)
    +     *
    +     * @return the removed card
    +     * @throws DeckException if the deck is empty
    +     */
    +    public T pop() throws DeckException {
    +        if (this.isEmpty())
    +            throw new DeckException("Tried to draw from an empty deck!");
    +        return cardsList.removeLast();
    +    }
    +
    +    /**
    +     * Returns a card from the deck's top without removing it (returns null if empty)
    +     *
    +     * @return the card
    +     */
    +    public T peek() {
    +        if (this.isEmpty())
    +            return null;
    +        return cardsList.getLast();
    +    }
    +
    +    /**
    +     * Removes a card from the deck's top (null if the deck is empty)
    +     *
    +     * @return the removed card (null if the deck is empty)
    +     */
    +    public T poll() {
    +        if (this.isEmpty())
    +            return null;
    +        return cardsList.removeLast();
    +    }
    +
    +    /**
    +     * Shuffles the deck
    +     */
    +    public void shuffle() {
    +        Collections.shuffle(this.cardsList);
    +    }
    +
    +    /**
    +     * Checks whether the deck is empty or not
    +     *
    +     * @return whether the deck is empty or not
    +     */
    +    public boolean isEmpty() {
    +        return this.cardsList.isEmpty();
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/GoldCard.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/GoldCard.html new file mode 100644 index 00000000..9bb1e869 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/GoldCard.html @@ -0,0 +1 @@ +GoldCard

    GoldCard

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total13 of 20893%2 of 1687%31423916
    GoldCard(CardFace, Symbol, Symbol, int, QuantityRequirement)102268%1150%121901
    getPoints()30%n/a111111
    getEdges(Pair)94100%n/a0101001
    calculatePoints(Board, Pair)73100%11392%1801701
    getMultiplier()3100%n/a010101
    getRequirement()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/GoldCard.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/GoldCard.java.html new file mode 100644 index 00000000..d423d3fe --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/GoldCard.java.html @@ -0,0 +1,128 @@ +GoldCard.java

    GoldCard.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.util.EnumSet;
    +import java.util.HashSet;
    +import java.util.Map;
    +import java.util.Set;
    +import it.polimi.ingsw.exceptions.InvalidResourceException;
    +import it.polimi.ingsw.utils.Pair;
    +
    +
    +/**
    + * The front side of these cards always gives points, but needs a certain requirement to be met in order to be played
    + *
    + * @see CardFace
    + */
    +public final class GoldCard extends PlayableCard {
    +    private final Symbol multiplier;
    +    private final QuantityRequirement req;
    +
    +    /**
    +     * Class constructor. It needs to only take the front as an argument, since the back is handled by its superclass {@link PlayableCard}
    +     *
    +     * @param front      the front side of the card
    +     * @param reign      the reign of the card
    +     * @param multiplier the symbol whose number of resources multiplies the points parameter
    +     * @param points     the number every resource of the given type is worth
    +     * @param req        the requirement that must be met in order to be able to play the card
    +     * @throws InvalidResourceException if the passed resource is not in {@link Symbol#getReigns()}
    +     */
    +    public GoldCard(CardFace front, Symbol reign, Symbol multiplier, int points, QuantityRequirement req) throws InvalidResourceException {
    +        super(reign);
    +        this.front = front;
    +        this.points = points;
    +        this.req = req; // integrity check already provided in the constructor of QuantityRequirement
    +
    +        // integrity check for allowed multipliers
    +        EnumSet<Symbol> validMultiplier = Symbol.getValidMultiplier();
    +        if (!validMultiplier.contains(multiplier)) {
    +            throw new InvalidResourceException("Resource " + multiplier.toString() + " is not valid for a " + this.getClass());
    +        }
    +        this.multiplier = multiplier;
    +    }
    +
    +    
    +    /**
    +     * Getter for the GoldCard class
    +     *
    +     * @return the multiplier
    +     */
    +    public Symbol getMultiplier() {
    +        return this.multiplier;
    +    }
    +
    +    /**
    +     * Getter for the GoldCard class
    +     *
    +     * @return the quantity requirement for the gold card to be played
    +     */
    +    public QuantityRequirement getRequirement() {
    +        return this.req;
    +    }
    +
    +    /**
    +     * Getter for the GoldCard class
    +     *
    +     * @return points held by the card
    +     */
    +    public int getPoints() {
    +        return this.points;
    +    }
    +
    +    /**
    +     * Will compute the total points this card gives based on the board it's played on.
    +     * It MUST be called AFTER the placement of the gold card
    +     *
    +     * @param board the board on which we want to compute the points this card will give
    +     * @param coord the coordinates of the card just placed (needed fot corner objectives)
    +     * @return the points gained from playing the gold card
    +     */
    +    public int calculatePoints(Board board, Pair<Integer, Integer> coord) {
    +        if (this.multiplier == Symbol.NO_MULT) {
    +            return this.points;
    +        }
    +        Map<Symbol, Integer> availableResources = board.getAvailableResources();
    +
    +        int totalElements = 0;
    +
    +        // multiplier is basic resource (subset of symbols)
    +        if (Symbol.getBasicResources().contains(this.multiplier)) {
    +
    +            for (Symbol s : availableResources.keySet()) {
    +                if (s.equals(this.multiplier)) {
    +                    totalElements = availableResources.get(s);
    +                }
    +            }
    +        } else if (this.multiplier.equals(Symbol.CORNER_OBJ)) { //multiplier is a corner_objective kind
    +
    +            // Pair<Integer, Integer> currentCoord = board.getCoordinatesPlacedCard();
    +            Set<Pair<Integer, Integer>> edges = getEdges(coord);
    +
    +            Map<Pair<Integer, Integer>, PlacedCard> map = board.getPlacedCards();
    +            for (Pair<Integer, Integer> p : edges) {
    +
    +                // check if the board has a value (card) associated to the key (coordinates)
    +                if (map.get(p) != null) {
    +                    totalElements++;
    +                }
    +            }
    +        }
    +
    +        return totalElements * this.points;
    +    }
    +
    +    private static Set<Pair<Integer, Integer>> getEdges(Pair<Integer, Integer> currentCoord) {
    +        Pair<Integer, Integer> tr = new Pair<>(currentCoord.first() + 1, currentCoord.second() + 1);
    +        Pair<Integer, Integer> br = new Pair<>(currentCoord.first() + 1, currentCoord.second() - 1);
    +        Pair<Integer, Integer> tl = new Pair<>(currentCoord.first() - 1, currentCoord.second() - 1);
    +        Pair<Integer, Integer> bl = new Pair<>(currentCoord.first() - 1, currentCoord.second() + 1);
    +
    +        Set<Pair<Integer, Integer>> edges = new HashSet<>();
    +        edges.add(tr);
    +        edges.add(br);
    +        edges.add(tl);
    +        edges.add(bl);
    +        return edges;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/InitialCard.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/InitialCard.html new file mode 100644 index 00000000..a3ad4c7e --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/InitialCard.html @@ -0,0 +1 @@ +InitialCard

    InitialCard

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 26100%0 of 0n/a020702
    InitialCard(CardFace, CardFace)22100%n/a010601
    static {...}4100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/InitialCard.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/InitialCard.java.html new file mode 100644 index 00000000..4ea1f1f8 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/InitialCard.java.html @@ -0,0 +1,30 @@ +InitialCard.java

    InitialCard.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Every player has an initial card (which will automatically be placed in the
    + * center of the board)
    + */
    +public class InitialCard extends Card implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    private static Integer lastID = 0;
    +
    +    /**
    +     * The initial card only gives corners and resources, never points, so we only
    +     * need to know its topological description
    +     *
    +     * @param front the front side of the card
    +     * @param back  the back side of the card
    +     */
    +    public InitialCard(CardFace front, CardFace back) {
    +        InitialCard.lastID++;
    +        this.id = InitialCard.lastID;
    +        this.front = front;
    +        this.back = back;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Match.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Match.html new file mode 100644 index 00000000..d4561a1f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Match.html @@ -0,0 +1 @@ +Match

    Match

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total94 of 1,20292%16 of 9783%1510024276049
    drawCard(DrawSource)2714884%41780%41364101
    makeMove(Pair, PlayableCard, Side)157683%2466%2552501
    setupDecks()67592%n/a0121901
    setupBoards()64187%2100%0221201
    proposeSecretObjectives()63786%n/a0121001
    setInitialSide(Side, Map)63083%n/a0121001
    drawInitialCard()62781%n/a012901
    Match(int, GameDeck, GameDeck, GameDeck, GameDeck)59494%21083%2712401
    setSecretObjective(Objective)54690%1375%1311201
    nextPlayer()54489%1583%141901
    isRejoinable()5861%3125%230101
    lambda$isRejoinable$11(Player)2571%1150%120101
    checkObjectivesAchievement()94100%12100%0702001
    decideWinner()79100%6100%0401801
    addPlayer(Player)40100%2100%0201001
    notifyObservers(MatchObserverCallable)34100%1583%140701
    getDecksTopReigns()32100%4100%030901
    removePlayer(Player)25100%2100%020701
    setupPlayers()21100%2100%020401
    subscribeObserver(MatchObserver)14100%2100%020401
    isFull()13100%1375%130101
    sendPrivateText(Player, Player, String)7100%n/a010201
    lambda$drawCard$6(Player, DrawSource, PlayableCard, PlayableCard, MatchObserver)7100%n/a010101
    lambda$makeMove$5(Player, Pair, PlayableCard, Side, MatchObserver)7100%n/a010101
    unsubscribeObserver(MatchObserver)6100%n/a010201
    sendBroadcastText(Player, String)6100%n/a010201
    lambda$sendPrivateText$9(Player, Player, String, MatchObserver)6100%n/a010101
    lambda$setInitialSide$7(Player, Side, Map, MatchObserver)6100%n/a010101
    lambda$proposeSecretObjectives$3(Player, MatchObserver)6100%n/a010101
    lambda$drawInitialCard$2(Player, MatchObserver)6100%n/a010101
    lambda$sendBroadcastText$8(Player, String, MatchObserver)5100%n/a010101
    lambda$setSecretObjective$4(Player, Objective, MatchObserver)5100%n/a010101
    doInitialTurnFinish()4100%n/a010201
    doStart()4100%n/a010201
    setState(MatchState)4100%n/a010201
    notifyMatchStart()4100%n/a010201
    lambda$notifyObservers$10(MatchObserverCallable, MatchObserver)4100%n/a010101
    lambda$removePlayer$1(Player, MatchObserver)4100%n/a010101
    lambda$addPlayer$0(Player, MatchObserver)4100%n/a010101
    isFinished()3100%n/a010101
    isInitialTurnFinished()3100%n/a010101
    isStarted()3100%n/a010101
    getCurrentPlayer()3100%n/a010101
    getPlayers()3100%n/a010101
    getPlayersFinalRanking()3100%n/a010101
    getVisibleObjectives()3100%n/a010101
    getVisiblePlayableCards()3100%n/a010101
    getCurrentState()3100%n/a010101
    getMaxPlayers()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Match.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Match.java.html new file mode 100644 index 00000000..f26a0849 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Match.java.html @@ -0,0 +1,818 @@ +Match.java

    Match.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +import java.util.*;
    +import java.util.concurrent.ExecutorService;
    +import java.util.concurrent.Executors;
    +import it.polimi.ingsw.exceptions.*;
    +import it.polimi.ingsw.utils.Pair;
    +
    +/**
    + * Represents the match played by {@link Player} instances, therefore implements a slice of game logic
    + * using drawCard(...), setInitialSide(...), setSecretObjective(...), proposeSecretObjective(...), etc.
    + * Other methods serve the purpose of being called by {@link MatchState} subclasses in order to notify the change
    + * of the current game state or trigger some changes in the match, such as setupBoards(...),
    + * doStart(...), etc.
    + * Few methods are called by the current player of the match, used to trigger a change in the match and so notify that
    + * an event occurred, such as nextPlayer(...).
    + */
    +public class Match implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    private final List<Player> players;
    +    private final int maxPlayers;
    +    private Player currentPlayer;
    +
    +    private MatchState currentState;
    +
    +    // All cards decks
    +    private final GameDeck<InitialCard> initialsDeck;
    +    private final GameDeck<ResourceCard> resourcesDeck;
    +    private final GameDeck<GoldCard> goldsDeck;
    +    private final GameDeck<Objective> objectivesDeck;
    +
    +    // All the visible cards on the common table
    +    private final Map<DrawSource, PlayableCard> visiblePlayableCards;
    +    private Pair<Objective, Objective> visibleObjectives;
    +
    +    private Pair<Objective, Objective> currentProposedObjectives;
    +    private InitialCard currentGivenInitialCard;
    +
    +    // Denotes if the match has been started/finished
    +    private boolean started = false;
    +    private boolean initialTurnFinished = false;
    +    private boolean lastTurn = false;
    +    private boolean finished = false;
    +
    +    // Current match turn as an integer (incremental)
    +    private int turn;
    +
    +    // Players ranking of the match at the end of it.
    +    // The List order represents the ranking order, the Boolean represent if the related player is a winner.
    +    // This is needed since the match can end in a tie, in such case the first two/three players of the List will have a
    +    // True flag.
    +    private List<Pair<Player, Boolean>> playersFinalRanking;
    +
    +    // List of observers
    +    private transient List<MatchObserver> observers;
    +
    +    /**
    +     * Initializes main Match attributes and allocate the attribute players List, assuming no parameter is null.
    +     *
    +     * @param maxPlayers     maximum number of players to be added to the match, chosen by the first player joining the match
    +     * @param initialsDeck   deck of initial cards
    +     * @param resourcesDeck  deck of resource cards
    +     * @param goldsDeck      deck of gold cards
    +     * @param objectivesDeck deck of objectives
    +     * @throws IllegalArgumentException if the decks provided do not have enough cards to start a game or maxPlayers are not 2,3,4
    +     */
    +    public Match(int maxPlayers, GameDeck<InitialCard> initialsDeck, GameDeck<ResourceCard> resourcesDeck, GameDeck<GoldCard> goldsDeck, GameDeck<Objective> objectivesDeck) throws IllegalArgumentException {
    +        this.maxPlayers = maxPlayers;
    +        this.initialsDeck = initialsDeck;
    +        this.resourcesDeck = resourcesDeck;
    +        this.goldsDeck = goldsDeck;
    +        this.objectivesDeck = objectivesDeck;
    +        this.currentState = new WaitState(this);
    +
    +        if (goldsDeck.getSize() < maxPlayers + 2)
    +            throw new IllegalArgumentException("goldsDeck does not have enough cards");
    +        else if (resourcesDeck.getSize() < maxPlayers * 2 + 2)
    +            throw new IllegalArgumentException("resourcesDeck does not have enough cards");
    +        else if (initialsDeck.getSize() < maxPlayers)
    +            throw new IllegalArgumentException("initialDeck does not have enough cards");
    +        else if (objectivesDeck.getSize() < 6)
    +            throw new IllegalArgumentException("objectivesDeck does not have enough cards");
    +        else if (maxPlayers < 2 || maxPlayers > 4)
    +            throw new IllegalArgumentException("The players must be at least 2 or maximum 4");
    +
    +        this.players = new ArrayList<>();
    +        this.visiblePlayableCards = new HashMap<>();
    +    }
    +
    +    /**
    +     * Adds a new player to the match, assuming it's not null.
    +     * Note: Called by the Controller when a player joins the match.
    +     *
    +     * @param player player to be added to the match
    +     * @throws WrongStateException      if called while in a state that doesn't allow adding players
    +     * @throws AlreadyUsedUsernameException if there is already a player in the match that has the same username
    +     */
    +    public void addPlayer(Player player) throws WrongStateException, AlreadyUsedUsernameException {
    +        synchronized (this) {
    +            List<String> playersUsernames = getPlayers().stream().map(Player::getUsername).toList();
    +
    +            if (playersUsernames.contains(player.getUsername()))
    +                throw new AlreadyUsedUsernameException("The chosen username is already in use");
    +
    +            currentState.addPlayer();
    +            players.add(player);
    +            notifyObservers(observer -> observer.someoneJoined(player));
    +            currentState.transition();
    +        }
    +    }
    +
    +    /**
    +     * Removes a player from the match, assuming the player is in the match.
    +     * Note: Called by the Controller when a player quits the match.
    +     *
    +     * @param player player to be removed from the match
    +     */
    +    public void removePlayer(Player player) {
    +        synchronized (this) {
    +            if (players.contains(player)) {
    +                players.remove(player);
    +                // If in a state different from the wait state, end the match
    +                currentState.removePlayer();
    +                notifyObservers(observer -> observer.someoneQuit(player));
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Verifies if the match is full, thus no more players can join.
    +     * Note: Used by the Controller
    +     *
    +     * @return true if the match is full, false otherwise
    +     */
    +    public boolean isFull() {
    +        return !finished && players.size() == maxPlayers;
    +    }
    +
    +    /**
    +     * Modifies the current player according to the next turn: if it's the first turn, the current player is the first
    +     * one in the players List, the turn order then follows the players List order, in a circular way.
    +     * Ex. 1st -> 2nd -> 3rd ---> 1st -> 2nd etc.
    +     * Note: Called by NextTurnState every time a new turn starts.
    +     */
    +    protected void nextPlayer() {
    +        if (!players.isEmpty()) {
    +            // If player has never been initialized OR the current player is the last one
    +            if (currentPlayer == null || currentPlayer.equals(players.getLast())) {
    +                // Set currentPlayer as the first one
    +                currentPlayer = players.getFirst();
    +
    +                turn++;
    +            } else {
    +                // Get the index of the current player and choose the next one
    +                int currentPlayerIndex = players.indexOf(currentPlayer);
    +                currentPlayer = players.get(currentPlayerIndex + 1);
    +            }
    +        } else {
    +            throw new RuntimeException("No players in the match, the next player cannot be set");
    +        }
    +    }
    +
    +    /**
    +     * Verifies if the match is finished.
    +     * Note: Called by the Controller and NextTurnState.
    +     *
    +     * @return true if the match is finished, false otherwise
    +     */
    +    public boolean isFinished() {
    +        return finished;
    +    }
    +
    +    /**
    +     * Marks the initial turn as finished, assuming the initial turn hasn't finished yet.
    +     * Called by ChooseInitialCardState once the initial turn is finished.
    +     */
    +    protected void doInitialTurnFinish() {
    +        initialTurnFinished = true;
    +    }
    +
    +    /**
    +     * Verifies if the initial turn is finished.
    +     * Note: Called by NextTurnState.
    +     *
    +     * @return true if the initial turn is finished, false otherwise
    +     */
    +    public boolean isInitialTurnFinished() {
    +        return initialTurnFinished;
    +    }
    +
    +    /**
    +     * Marks the match as started, assuming the match hasn't started yet.
    +     * Note: Called by ChooseSecretObjectiveState once the match is ready to start.
    +     */
    +    protected void doStart() {
    +        started = true;
    +    }
    +
    +    /**
    +     * Verifies if the match is started.
    +     * Note: Called by NextTurnState to check when to effectively start the match.
    +     *
    +     * @return true if the match is started, false otherwise
    +     */
    +    public boolean isStarted() {
    +        return started;
    +    }
    +
    +    /**
    +     * Gets the player who's playing (or choosing the secret objective) at the moment.
    +     * Note: Used by the Controller.
    +     *
    +     * @return the player playing at the moment, null if the match has never reached NextTurnState
    +     */
    +    public Player getCurrentPlayer() {
    +        return currentPlayer;
    +    }
    +
    +    /**
    +     * Gets the match players.
    +     *
    +     * @return the match players in a List, dynamically defined as an ArrayList
    +     */
    +    public List<Player> getPlayers() {
    +        return players;
    +    }
    +
    +    /**
    +     * Sets the current match state, assuming it's not null.
    +     * Note: Called by each state to let the match enter to the next state.
    +     *
    +     * @param state the state in which the match has to be
    +     */
    +    protected void setState(MatchState state) {
    +        this.currentState = state;
    +    }
    +
    +    /**
    +     * Draws a card from the initial cards deck
    +     *
    +     * @return the card drawn from the initial cards deck
    +     * @throws WrongStateException if called while in a state that doesn't allow drawing an initial card
    +     */
    +    protected InitialCard drawInitialCard() throws WrongStateException {
    +        currentState.drawInitialCard();
    +
    +        try {
    +            currentGivenInitialCard = initialsDeck.pop();
    +        } catch (DeckException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +        // Notify observers and trigger state transition
    +        Player copy = new Player(currentPlayer);
    +        notifyObservers(observer -> observer.someoneDrewInitialCard(copy, currentGivenInitialCard));
    +        currentState.transition();
    +
    +        return currentGivenInitialCard;
    +    }
    +
    +    /**
    +     * Extracts two cards from the deck of objectives and returns them.
    +     * Note: Called by the Controller.
    +     *
    +     * @return two objective cards extracted from the objectives deck
    +     */
    +    protected Pair<Objective, Objective> proposeSecretObjectives() throws WrongStateException {
    +        currentState.proposeSecretObjectives();
    +        try {
    +            Objective obj1 = objectivesDeck.pop();
    +            Objective obj2 = objectivesDeck.pop();
    +
    +            currentProposedObjectives = new Pair<>(obj1, obj2);
    +
    +            // Notify observers and trigger state transition
    +            Player copy = new Player(currentPlayer);
    +            notifyObservers(observer -> observer.someoneDrewSecretObjective(copy, currentProposedObjectives));
    +            currentState.transition();
    +
    +            return currentProposedObjectives;
    +        } catch (DeckException e) {
    +            throw new RuntimeException(e);
    +        }
    +    }
    +
    +    /**
    +     * Checks that the given objective is one of the proposed ones to the current player
    +     * and put the discarded objective back in the objectives deck.
    +     * Note: Called by the current player
    +     *
    +     * @param objective the accepted objective by the player (NOT the discarded one)
    +     */
    +    protected void setSecretObjective(Objective objective) throws WrongChoiceException, WrongStateException {
    +        currentState.chooseSecretObjective();
    +
    +        // Get proposed objectives
    +        Objective firstProposedObjective = currentProposedObjectives.first();
    +        Objective secondProposedObjective = currentProposedObjectives.second();
    +
    +        // Check if the chosen objective is one of the proposed ones and put it back in the deck
    +        if (objective.equals(firstProposedObjective))
    +            objectivesDeck.add(secondProposedObjective);
    +        else if (objective.equals(secondProposedObjective))
    +            objectivesDeck.add(firstProposedObjective);
    +        else
    +            // If the objective is not one of the proposed ones, throw an exception
    +            throw new WrongChoiceException("The chosen objective is not one of the proposed ones");
    +
    +        // Notify observers and trigger state transition
    +        Player copy = new Player(currentPlayer);
    +        notifyObservers(observer -> observer.someoneChoseSecretObjective(copy, objective));
    +        currentState.transition();
    +    }
    +
    +    /**
    +     * Shuffles the players turns order and gives them their pawn color.
    +     * Note: Called by SetupState.
    +     */
    +    protected void setupPlayers() {
    +        // Shuffle players List
    +        Collections.shuffle(players);
    +
    +        // Set players' colors
    +        for (int i = 0; i < maxPlayers; i++) {
    +            players.get(i).setColor(Color.values()[i]);
    +        }
    +    }
    +
    +    /**
    +     * Shuffles all thr cards decks and places the visible cards on the board
    +     * Note: Called by SetupState.
    +     */
    +    protected void setupDecks() {
    +        // Shuffle each deck
    +        initialsDeck.shuffle();
    +        resourcesDeck.shuffle();
    +        goldsDeck.shuffle();
    +        objectivesDeck.shuffle();
    +
    +        try {
    +            // Pop two resources to be placed on the common table
    +            ResourceCard resourceCard1 = resourcesDeck.pop();
    +            ResourceCard resourceCard2 = resourcesDeck.pop();
    +
    +            // Pop two golds to be placed on the common table
    +            GoldCard goldCard1 = goldsDeck.pop();
    +            GoldCard goldCard2 = goldsDeck.pop();
    +
    +            // Pop two golds to be placed on the common table
    +            Objective objective1 = objectivesDeck.pop();
    +            Objective objective2 = objectivesDeck.pop();
    +
    +            // Put golds and resources in visiblePlayableCards
    +            visiblePlayableCards.put(DrawSource.FIRST_VISIBLE, goldCard1);
    +            visiblePlayableCards.put(DrawSource.SECOND_VISIBLE, goldCard2);
    +            visiblePlayableCards.put(DrawSource.THIRD_VISIBLE, resourceCard1);
    +            visiblePlayableCards.put(DrawSource.FOURTH_VISIBLE, resourceCard2);
    +
    +            visibleObjectives = new Pair<>(objective1, objective2);
    +        } catch (DeckException e) {
    +            throw new RuntimeException(e);
    +        }
    +    }
    +
    +    /**
    +     * Gives one gold card and two resource cards to each player (hand)
    +     * and sets the initial card for each of them.
    +     * Note: Called by WaitState.
    +     */
    +    protected void setupBoards() {
    +        // Give starting cards to players
    +        for (Player player : players) {
    +            try {
    +                // Pop a card from the resources deck and one from the golds deck
    +                GoldCard goldCard = goldsDeck.pop();
    +                ResourceCard resourceCard1 = resourcesDeck.pop();
    +                ResourceCard resourceCard2 = resourcesDeck.pop();
    +
    +                // Add each card to the player's hand
    +                player.getBoard().addHandCard(goldCard);
    +                player.getBoard().addHandCard(resourceCard1);
    +                player.getBoard().addHandCard(resourceCard2);
    +            } catch (Exception e) {
    +                throw new RuntimeException(e);
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Makes the chosen move on the board of the current player (known because of the internal Match state);
    +     * in particular, checks if the placement is valid, then places the card on the player's board and add points
    +     * to the player.
    +     * Note: Called by the current player.
    +     *
    +     * @param coords coordinates in which to place the card
    +     * @param card   card to place
    +     * @param side   side of the card to be placed
    +     * @throws WrongStateException  if called while in a state that doesn't allow making moves
    +     * @throws WrongChoiceException if the move is not allowed (placement not allowed, or not enough resources, or card
    +     *                              not in player's hand)
    +     */
    +    protected void makeMove(Pair<Integer, Integer> coords, PlayableCard card, Side side) throws WrongStateException, WrongChoiceException {
    +        currentState.makeMove();
    +
    +        Board currentPlayerBoard = currentPlayer.getBoard();
    +
    +        PlacementOutcome outcome;
    +        try {
    +            outcome = currentPlayerBoard.verifyCardPlacement(coords, card, side);
    +        } catch (CardException e) {
    +            throw new WrongChoiceException(e.getMessage());
    +        }
    +
    +        // If placing the card in the current player's board is allowed by rules
    +        switch (outcome) {
    +            case VALID:
    +                // Place the card in the current player's board
    +                // and save the points possibly gained because of the move
    +                int gainedPoints;
    +                try {
    +                    gainedPoints = currentPlayerBoard.placeCard(coords, card, side, turn);
    +                } catch (CardException e) {
    +                    throw new RuntimeException(e);
    +                }
    +
    +                // Remove the card from the player's hand
    +                // since it has been placed on the board
    +                try {
    +                    currentPlayerBoard.removeHandCard(card);
    +                } catch (HandException e) {
    +                    throw new RuntimeException(e);
    +                }
    +
    +                // Update the current player's points
    +                currentPlayer.addPoints(gainedPoints);
    +
    +                // If the current player reaches 20 points or more
    +                // the last turn of the match starts
    +                if (currentPlayer.getPoints() >= 20)
    +                    lastTurn = true;
    +
    +                // Notify observers and trigger state transition
    +                Player copy = new Player(currentPlayer);
    +                notifyObservers(observer -> observer.someonePlayedCard(copy, coords, card, side));
    +                currentState.transition();
    +
    +                break;
    +            case INVALID_COORDS:
    +                throw new WrongChoiceException("Invalid coordinates!");
    +            case INVALID_ENOUGH_RESOURCES:
    +                throw new WrongChoiceException("Not enough resources!");
    +        }
    +    }
    +
    +    /**
    +     * Draws a card from the passed source. If the caller wants to draw one of the four visible cards, a rule is applied:
    +     * the first and second visible cards (FIRST/SECOND_VISIBLE) will be substituted by a gold card if possible, if not,
    +     * by a resource card, if not again, they will be null (then not substituted); the first and second visible cards
    +     * (THIRD/FOURTH_VISIBLE) will be substituted by a resource card if possible, if not, by a gold card, if not again,
    +     * they will be null (then not substituted).
    +     * Note: Called by the current player.
    +     *
    +     * @param source the source to draw a card from
    +     * @return the card drawn
    +     * @throws WrongStateException  if called while in a state that doesn't allow making moves
    +     * @throws WrongChoiceException if the source does not have cards
    +     */
    +    protected PlayableCard drawCard(DrawSource source) throws WrongStateException, WrongChoiceException {
    +        PlayableCard card;
    +        PlayableCard replacementCard = null;
    +
    +        currentState.drawCard();
    +
    +        switch (source) {
    +            case GOLDS_DECK -> {
    +                try {
    +                    card = goldsDeck.pop();
    +                    replacementCard = goldsDeck.peek();
    +                } catch (DeckException e) {
    +                    throw new WrongChoiceException("The gold cards deck is empty!");
    +                }
    +            }
    +
    +            case RESOURCES_DECK -> {
    +                try {
    +                    card = resourcesDeck.pop();
    +                    replacementCard = resourcesDeck.peek();
    +                } catch (DeckException e) {
    +                    throw new WrongChoiceException("The resource cards deck is empty!");
    +                }
    +            }
    +
    +            case FIRST_VISIBLE, SECOND_VISIBLE -> {
    +                card = visiblePlayableCards.get(source);
    +
    +                // If not present (e.g. on the last turn both decks are empty, so remaining turns will be played
    +                // drawing the four visible cards, but they won't be substituted by others) throw an exception
    +                if (card == null)
    +                    throw new WrongChoiceException("There is no visible card in the chosen position!");
    +
    +                // If the golds deck is NOT empty, substitute the first/second visible
    +                // card with a new gold
    +                if (!goldsDeck.isEmpty()) {
    +                    replacementCard = goldsDeck.poll();
    +                    visiblePlayableCards.put(source, replacementCard);
    +                }
    +                // If the golds deck is empty, substitute the first/second visible
    +                // card with a resource
    +                else {
    +                    replacementCard = resourcesDeck.poll();
    +                    visiblePlayableCards.put(source, replacementCard);
    +                    // If the resources deck is empty too, the GameDeck.poll() method returns null,
    +                    // then the corresponding visible card will be null
    +                }
    +            }
    +
    +            case THIRD_VISIBLE, FOURTH_VISIBLE -> {
    +                card = visiblePlayableCards.get(source);
    +
    +                // If not present (e.g. on the last turn both decks are empty, so remaining turns will be played
    +                // drawing the four visible cards, but they won't be substituted by others) throw an exception
    +                if (card == null)
    +                    throw new WrongChoiceException("There is no visible card in the chosen position!");
    +
    +                // If the resources deck is NOT empty, substitute the third/fourth visible
    +                // card with a new resource
    +                if (!resourcesDeck.isEmpty()) {
    +                    replacementCard = resourcesDeck.poll();
    +                    visiblePlayableCards.put(source, replacementCard);
    +                }
    +                // If the resources deck is empty, substitute the third/fourth visible
    +                // card with a gold
    +                else {
    +                    replacementCard = goldsDeck.poll();
    +                    visiblePlayableCards.put(source, replacementCard);
    +                }
    +                // If the golds deck is empty too, the GameDeck.poll() method returns null,
    +                // then the corresponding visible card will be null
    +            }
    +
    +            default -> throw new RuntimeException("Unexpected value of source");
    +        }
    +
    +        if (goldsDeck.isEmpty() && resourcesDeck.isEmpty())
    +            lastTurn = true;
    +
    +        // If the current player is the last one in the match turns rotation, i.e. the last one in the players List
    +        // AND the current turn is the last one the match is now finished
    +        if (currentPlayer.equals(players.getLast()) && lastTurn)
    +            finished = true;
    +
    +        // Notify observers and trigger state transition
    +        PlayableCard replacementCardFinal = replacementCard;
    +        Player copy = new Player(currentPlayer);
    +        notifyObservers(observer -> observer.someoneDrewCard(copy, source, card, replacementCardFinal));
    +        currentState.transition();
    +
    +        return card;
    +    }
    +
    +    /**
    +     * Sets the current player's initial card side.
    +     *
    +     * @param side the side to put the initial card on
    +     * @throws WrongStateException if called while in a state that doesn't allow choosing the initial card side
    +     */
    +    protected void setInitialSide(Side side, Map<Symbol, Integer> availableResources) throws WrongStateException {
    +        currentState.chooseInitialSide();
    +
    +        try {
    +            currentPlayer.getBoard().setInitialCard(currentGivenInitialCard, side);
    +        } catch (CardException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +        currentGivenInitialCard = null;
    +
    +        // Notify observers and trigger state transition
    +        Player copy = new Player(currentPlayer);
    +        notifyObservers(observer -> observer.someoneSetInitialSide(copy, side, availableResources));
    +        currentState.transition();
    +    }
    +
    +    // Returns a Map that links each player to the number of DIFFERENT objectives achieved
    +    private Map<Player, Integer> checkObjectivesAchievement() {
    +        // Map that links each player to the number of DIFFERENT objectives achieved
    +        Map<Player, Integer> playersAchievedObjectives = new HashMap<>();
    +
    +        Objective firstObjective = visibleObjectives.first();
    +        Objective secondObjective = visibleObjectives.second();
    +
    +        for (Player p : players) {
    +            Board board = p.getBoard();
    +            Objective secretObjective = p.getSecretObjective();
    +            int numAchievedObjectives = 0;
    +
    +            // Add to the player the points of the specific objective MULTIPLIED BY how many times they met the
    +            // objective requirement
    +            if (secretObjective != null)
    +                p.addPoints(secretObjective.getPoints() * secretObjective.getReq().timesMet(board));
    +            p.addPoints(firstObjective.getPoints() * firstObjective.getReq().timesMet(board));
    +            p.addPoints(secondObjective.getPoints() * secondObjective.getReq().timesMet(board));
    +
    +            // Count the number of achieved objectives by the player
    +            if (secretObjective != null && secretObjective.getReq().timesMet(board) >= 1)
    +                numAchievedObjectives++;
    +            if (firstObjective.getReq().timesMet(board) >= 1)
    +                numAchievedObjectives++;
    +            if (secondObjective.getReq().timesMet(board) >= 1)
    +                numAchievedObjectives++;
    +
    +            playersAchievedObjectives.put(p, numAchievedObjectives);
    +        }
    +
    +        return playersAchievedObjectives;
    +    }
    +
    +    /**
    +     * Calculates the winner (or winners)
    +     */
    +    protected void decideWinner() {
    +        finished = true;
    +        playersFinalRanking = new ArrayList<>();
    +        Map<Player, Integer> achievedObjectives = checkObjectivesAchievement();
    +
    +        List<Player> sortedPlayers = players.stream()
    +                .sorted(
    +                        // Create a comparator that firstly sorts based on player points
    +                        // and secondly, in case of same points, on the number of achieved objectives
    +                        // Please note: reversed() since the default sort is ascending (min first), but the expected
    +                        // results requires a descending sort (max points/objectives first)
    +                        Comparator.comparingInt(Player::getPoints)
    +                                .thenComparing(achievedObjectives::get)
    +                                .reversed()
    +                )
    +                .toList();
    +
    +        Player bestPlayer = sortedPlayers.getFirst();
    +        int bestAchievedObjectives = achievedObjectives.get(bestPlayer);
    +        int bestPoints = bestPlayer.getPoints();
    +        boolean isWinner;
    +
    +        for (Player p : sortedPlayers) {
    +            // If the current player has as many points and as many achieved objectives as the winner,
    +            // then they're winner too
    +            isWinner = p.getPoints() == bestPoints && achievedObjectives.get(p) == bestAchievedObjectives;
    +
    +            playersFinalRanking.add(new Pair<>(p, isWinner));
    +        }
    +
    +        // Notify observers
    +        notifyObservers(MatchObserver::matchFinished);
    +    }
    +
    +    /**
    +     * Getter for the final ranking of players. Return a valid result if and only if called when the match is in the
    +     * FinalState, so it's finished.
    +     *
    +     * @return Players ranking of the match at the end of it; the List order represents the ranking order, the Boolean
    +     * represent if the related player is a winner; this is needed since the match can end in a tie, in such case the
    +     * first two/three players of the List will have a True flag
    +     */
    +    public List<Pair<Player, Boolean>> getPlayersFinalRanking() {
    +        return playersFinalRanking;
    +    }
    +
    +    /**
    +     * Returns the visible objectives.
    +     *
    +     * @return a Pair containing the two visible objectives
    +     */
    +    public Pair<Objective, Objective> getVisibleObjectives() {
    +        return visibleObjectives;
    +    }
    +
    +    /**
    +     * Getter for the four visible playable cards (i.e. resource cards and gold cards, not objectives) on the common
    +     * table.
    +     *
    +     * @return a Map that links each visible playable card to a DrawSource (restricted to FIRST_VISIBLE, SECOND_VISIBLE,
    +     * THIRD_VISIBLE, FOURTH_VISIBLE)
    +     */
    +    public Map<DrawSource, PlayableCard> getVisiblePlayableCards() {
    +        return visiblePlayableCards;
    +    }
    +
    +    /**
    +     * Getter for the current match state.
    +     *
    +     * @return the current state of the match
    +     */
    +    public MatchState getCurrentState() {
    +        return currentState;
    +    }
    +
    +    /**
    +     * Getter for the cards back on the top of the decks (i.e. those visible top cards).
    +     * Both of them always contain just a reign.
    +     *
    +     * @return Pair of two reign Symbol (see {@link Symbol}.getReigns()), the first one regards the
    +     * top card of gold cards deck, the second one regards the top card of resource cards deck
    +     */
    +    public Pair<Symbol, Symbol> getDecksTopReigns() {
    +        PlayableCard goldCard = goldsDeck.peek();
    +        PlayableCard resourceCard = resourcesDeck.peek();
    +
    +        Symbol goldReign;
    +        Symbol resourceReign;
    +
    +        if (goldCard == null) {
    +            goldReign = null;
    +        } else {
    +            goldReign = goldCard.getReign();
    +        }
    +
    +        if (resourceCard == null) {
    +            resourceReign = null;
    +        } else {
    +            resourceReign = resourceCard.getReign();
    +        }
    +
    +        return new Pair<>(goldReign, resourceReign);
    +    }
    +
    +    /**
    +     * Getter for the maximum number of player for the match
    +     *
    +     * @return The maximum number of player
    +     */
    +    public int getMaxPlayers() {
    +        return maxPlayers;
    +    }
    +
    +    /**
    +     * Adds the given MatchObserver to those observers notified on match events.
    +     *
    +     * @param observer The observer to be notified from now on when an event occurs
    +     */
    +    public void subscribeObserver(MatchObserver observer) {
    +        if (observers == null) {
    +            observers = new ArrayList<>();
    +        }
    +        observers.add(observer);
    +    }
    +
    +    /**
    +     * Removes the given MatchObserver to those observers notified on match events.
    +     *
    +     * @param observer The observer to be removed
    +     */
    +    public void unsubscribeObserver(MatchObserver observer) {
    +        observers.remove(observer);
    +    }
    +
    +    /**
    +     * Notifies all match observers that the match has started.
    +     * It's called by WaitState methods after the match setup, that's why it needs to be protected.
    +     */
    +    protected void notifyMatchStart() {
    +        notifyObservers(MatchObserver::matchStarted);
    +    }
    +
    +    /**
    +     * Sends a broadcast message in the chat. Notifies all observers of the event.
    +     * Called by Player
    +     *
    +     * @param sender player that sends the message
    +     * @param text   content of the message
    +     */
    +    protected void sendBroadcastText(Player sender, String text) {
    +        notifyObservers(observer -> observer.someoneSentBroadcastText(sender, text));
    +    }
    +
    +    /**
    +     * Sends a private message to the recipient chat. Notifies all observers of the event.
    +     * Called by Player
    +     *
    +     * @param sender    player that sends the message
    +     * @param recipient player that receives the message
    +     * @param text      content of the message
    +     */
    +    protected void sendPrivateText(Player sender, Player recipient, String text) {
    +        notifyObservers(observer -> observer.someoneSentPrivateText(sender, recipient, text));
    +    }
    +
    +    /**
    +     * Notifies asynchronously all match observers, calling the passed MatchObserverCallable on each of them.
    +     * To be more specific: creates a thread for each match observer, each thread is appointed to call the passed callable
    +     * on a MatchObserver instance; then runs all of them; finally joins on them (waiting each of them to return and exit).
    +     *
    +     * @param observerCallable The "method" to be called on each observer of the match
    +     */
    +    private void notifyObservers(MatchObserverCallable observerCallable) {
    +        if(observers == null || observers.isEmpty())
    +            return;
    +
    +        ExecutorService executor = Executors.newFixedThreadPool(observers.size());
    +
    +        for (MatchObserver observer : observers)
    +            executor.submit(() -> observerCallable.call(observer));
    +
    +        executor.shutdown();
    +    }
    +
    +    /**
    +     * If the match is rejoinable (not every player is connected)
    +     * @return if the match is rejoinable
    +     */
    +    public synchronized boolean isRejoinable() {
    +        return players.stream().anyMatch((p) -> !p.isConnected()) && isStarted();
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/MatchState.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/MatchState.html new file mode 100644 index 00000000..f26ce6a4 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/MatchState.html @@ -0,0 +1 @@ +MatchState

    MatchState

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total18 of 5366%0 of 0n/a410514410
    chooseInitialSide()50%n/a111111
    makeMove()50%n/a111111
    proposeSecretObjectives()50%n/a111111
    MatchState()30%n/a112211
    removePlayer()9100%n/a010201
    MatchState(Match)6100%n/a010301
    addPlayer()5100%n/a010101
    drawInitialCard()5100%n/a010101
    drawCard()5100%n/a010101
    chooseSecretObjective()5100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/MatchState.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/MatchState.java.html new file mode 100644 index 00000000..b85cad93 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/MatchState.java.html @@ -0,0 +1,131 @@ +MatchState.java

    MatchState.java

    package it.polimi.ingsw.gamemodel;
    +
    +import it.polimi.ingsw.exceptions.WrongStateException;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Represents an appendix of {@link Match}.
    + * Match fully delegates to this class, through composition, the role of keeping track of the current game state: it
    + * throws exceptions when a Match method is called while being in the wrong state and triggers some Match behavior
    + * (calling match.someMethod(...)) when a certain transition has occurred.
    + * Each method is supposed to be overridden by a subclass of MatchState if and only if it is allowed to be called from
    + * that specific subclass; if not overridden, the MatchState version of the method will be called and thus an exception
    + * will be thrown.
    + */
    +public abstract class MatchState implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    protected Match match;
    +
    +    /**
    +     * Empty constructor needed for deserialization.
    +     */
    +    public MatchState() {
    +
    +    }
    +
    +    protected MatchState(Match match) {
    +        this.match = match;
    +    }
    +
    +    /**
    +     * Triggers the transition in Match from the current state to the next one, this means changing the current Match's
    +     * MatchState instance to a new one, having the same static type (MatchState) but a different dynamic type (a subclass
    +     * of MatchState).
    +     */
    +    public abstract void transition();
    +
    +    /**
    +     * Checks dynamically if a player can be added in the current state, otherwise throws an exception.
    +     * The check is performed implicitly, since this version of the method is called if and only if it hasn't been
    +     * overridden by the MatchState object from which it's called.
    +     *
    +     * @throws WrongStateException if the method cannot be called in the current state
    +     */
    +    public void addPlayer() throws WrongStateException {
    +        throw new WrongStateException("addPlayer not allowed from the current match state!");
    +    }
    +
    +    /**
    +     * Checks dynamically if a player can be removed in the current state, otherwise it forces the Match to go to the
    +     * FinalState.
    +     * The check is performed implicitly, since this version of the method is called if and only if it hasn't been
    +     * overridden by the MatchState instance from which it's called (just WaitState overrides it).
    +     */
    +    public void removePlayer() {
    +        // Exceptionally force the match to go to FinalState
    +        // since a player has quit in a state that wasn't WaitState
    +        match.setState(new FinalState(match));
    +    }
    +
    +    /**
    +     * Checks dynamically if an initial card can be drawn in the current state, otherwise throws an exception.
    +     * The check is performed implicitly, since this version of the method is called if and only if it hasn't been
    +     * overridden by the MatchState object from which it's called.
    +     *
    +     * @throws WrongStateException if the method cannot be called in the current state
    +     */
    +    public void drawInitialCard() throws WrongStateException {
    +        throw new WrongStateException("drawInitialCard not allowed in the current match state!");
    +    }
    +
    +    /**
    +     * Checks dynamically if a player can choose the initial card side in the current state, otherwise throws an exception.
    +     * The check is performed implicitly, since this version of the method is called if and only if it hasn't been
    +     * overridden by the MatchState object from which it's called.
    +     *
    +     * @throws WrongStateException if the method cannot be called in the current state
    +     */
    +    public void chooseInitialSide() throws WrongStateException {
    +        throw new WrongStateException("chooseInitialSide not allowed in the current match state!");
    +    }
    +
    +    /**
    +     * Checks dynamically if a player can make a move in the current state, otherwise throws an exception.
    +     * The check is performed implicitly, since this version of the method is called if and only if it hasn't been
    +     * overridden by the MatchState object from which it's called.
    +     *
    +     * @throws WrongStateException if the method cannot be called in the current state
    +     */
    +    public void makeMove() throws WrongStateException {
    +        throw new WrongStateException("makeMove not allowed in the current match state!");
    +    }
    +
    +    /**
    +     * Checks dynamically if a player can draw a playable card in the current state, otherwise throws an exception.
    +     * The check is performed implicitly, since this version of the method is called if and only if it hasn't been
    +     * overridden by the MatchState object from which it's called.
    +     *
    +     * @throws WrongStateException if the method cannot be called in the current state
    +     */
    +    public void drawCard() throws WrongStateException {
    +        throw new WrongStateException("drawCard not allowed in the current match state!");
    +    }
    +
    +    /**
    +     * Checks dynamically if a secret objective can be proposed to the current player in the current state, otherwise
    +     * throws an exception.
    +     * The check is performed implicitly, since this version of the method is called if and only if it hasn't been
    +     * overridden by the MatchState object from which it's called.
    +     *
    +     * @throws WrongStateException if the method cannot be called in the current state
    +     */
    +    public void proposeSecretObjectives() throws WrongStateException {
    +        throw new WrongStateException("proposeSecretObjective not allowed in the current match state!");
    +    }
    +
    +    /**
    +     * Checks dynamically if a player can choose their secret objective in the current state, otherwise throws an exception.
    +     * The check is performed implicitly, since this version of the method is called if and only if it hasn't been
    +     * overridden by the MatchState object from which it's called.
    +     *
    +     * @throws WrongStateException if the method cannot be called in the current state
    +     */
    +    public void chooseSecretObjective() throws WrongStateException {
    +        throw new WrongStateException("chooseSecretObjective not allowed in the current match state!");
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/NextTurnState.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/NextTurnState.html new file mode 100644 index 00000000..16032de2 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/NextTurnState.html @@ -0,0 +1 @@ +NextTurnState

    NextTurnState

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total10 of 7386%3 of 1275%31121905
    makeMove()5550%1150%121301
    drawInitialCard()5550%1150%121301
    transition()33100%4100%030701
    proposeSecretObjectives()14100%1375%130301
    NextTurnState(Match)6100%n/a010301
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/NextTurnState.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/NextTurnState.java.html new file mode 100644 index 00000000..1f4f354a --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/NextTurnState.java.html @@ -0,0 +1,81 @@ +NextTurnState.java

    NextTurnState.java

    package it.polimi.ingsw.gamemodel;
    +
    +import it.polimi.ingsw.exceptions.WrongStateException;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Subclass of {@link MatchState}. This is the state in which the match decides whether it must give initial cards, give
    + * secret objectives, or wait for someone to play a card, according to the current match flow.
    + */
    +public class NextTurnState extends MatchState implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    /**
    +     * Initializes this instance.
    +     *
    +     * @param match The match in this state
    +     */
    +    public NextTurnState(Match match) {
    +        super(match);
    +        match.nextPlayer();
    +    }
    +
    +    /**
    +     * This method call is allowed by this class instances if and only if the match hasn't started yet
    +     * and the initial card side choosing has already finished.
    +     *
    +     * @throws WrongStateException If called when the match has already started or the initial card side choosing
    +     *                             hasn't finished yet.
    +     */
    +    @Override
    +    public void proposeSecretObjectives() throws WrongStateException {
    +        if (match.isStarted() || !match.isInitialTurnFinished())
    +            throw new WrongStateException("proposeSecretObjectives called after the match was started");
    +    }
    +
    +    /**
    +     * This method call is allowed by this class instances if and only if the match has already started.
    +     * @throws WrongStateException If called when the match hasn't started yet
    +     */
    +    @Override
    +    public void makeMove() throws WrongStateException {
    +        if (!match.isStarted())
    +            throw new WrongStateException("makeMove called when match was not started yet");
    +    }
    +
    +    /**
    +     * This method call is allowed by this class instances if and only if the initial card side choosing
    +     * hasn't finished yet.
    +     * @throws WrongStateException If called when the initial card side choosing has already finished.
    +     */
    +    @Override
    +    public void drawInitialCard() throws WrongStateException {
    +        if (match.isInitialTurnFinished())
    +            throw new WrongStateException("drawInitialCard called after the initial turn was finished");
    +    }
    +
    +    /**
    +     * Transitions to:
    +     *  - {@link AfterMoveState} if the match has already started;
    +     *  - {@link ChooseInitialSideState} if the initial card side choosing hasn't finished yet;
    +     *  - {@link ChooseSecretObjectiveState} if the match hasn't started yet and the initial card side choosing has
    +     *    already finished;
    +     */
    +    @Override
    +    public void transition() {
    +        MatchState nextState;
    +
    +        if (match.isStarted())
    +            nextState = new AfterMoveState(match);
    +        else if (!match.isInitialTurnFinished())
    +            nextState = new ChooseInitialSideState(match);
    +        else
    +            nextState = new ChooseSecretObjectiveState(match);
    +
    +        match.setState(nextState);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Objective.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Objective.html new file mode 100644 index 00000000..79f564d8 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Objective.html @@ -0,0 +1 @@ +Objective

    Objective

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total2 of 5496%1 of 475%1811606
    equals(Object)21789%1375%131601
    Objective(int, Requirement)22100%n/a010601
    static {...}4100%n/a010101
    getPoints()3100%n/a010101
    getReq()3100%n/a010101
    getID()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Objective.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Objective.java.html new file mode 100644 index 00000000..40718cc7 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Objective.java.html @@ -0,0 +1,70 @@ +Objective.java

    Objective.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Every player has a secret objective, and at the start of the game two objectives common to every
    + * player get randomly chosen. The objective asks for a certain requirement to be satisfied and gives points only when
    + * the game ends, and does not stack on itself (e.g. if an objective requires three feathers and a player has 6, he will receive the points only once)
    + */
    +public class Objective implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    private int points;
    +    private Requirement req;
    +    private static Integer lastID = 0;
    +    private Integer id;
    +
    +    /**
    +     * Class constructor. It is composed only of a requirement (using polymorphism) and the points it gives
    +     *
    +     * @param points the number of points the objective will give (which is always an absolute number, it never depends on any resource)
    +     * @param req    the requirement to satisfy in order to receive the points
    +     */
    +    public Objective(int points, Requirement req) {
    +        Objective.lastID++;
    +        this.id = Objective.lastID;
    +        this.points = points;
    +        this.req = req;
    +    }
    +
    +    /**
    +     * Getter for the Objective class
    +     *
    +     * @return the points held by the objective card.
    +     */
    +    public int getPoints() {
    +        return this.points;
    +    }
    +
    +    /**
    +     * Getter for the Objective class
    +     *
    +     * @return the requirement for the objective card to be placed.
    +     */
    +    public Requirement getReq() {
    +        return this.req;
    +    }
    +
    +    /**
    +     * @return the id of the objective card
    +     */
    +    public Integer getID() {
    +        return this.id;
    +    }
    +
    +    @Override
    +    public boolean equals(Object obj) {
    +        if (obj == this)
    +            return true;
    +        if (!(obj instanceof Objective))
    +            return false;
    +
    +        Objective other = (Objective) obj;
    +        return other.getID().equals(this.id);
    +    }
    +}
    +
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacedCard.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacedCard.html new file mode 100644 index 00000000..7c4e5fec --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacedCard.html @@ -0,0 +1 @@ +PlacedCard

    PlacedCard

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total3 of 2788%0 of 0n/a151915
    getTurn()30%n/a111111
    PlacedCard(Card, Side, int)12100%n/a010501
    getPlayedCardFace()6100%n/a010101
    getCard()3100%n/a010101
    getPlayedSide()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacedCard.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacedCard.java.html new file mode 100644 index 00000000..fe807b81 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacedCard.java.html @@ -0,0 +1,68 @@ +PlacedCard.java

    PlacedCard.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * This class handles the card already placed on the board, since we need to remember which card covers which
    + */
    +public class PlacedCard implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    private Card card;
    +    private int turn;
    +    private Side playedSide;
    +
    +    /**
    +     * Class constructor, which only needs to initialize the card and the turn it is played, as well as the side it was played on
    +     *
    +     * @param card       the {@link Card} played
    +     * @param playedSide the side the card was played on
    +     * @param turn       the turn said card is played. Needed to know which card covers which, since a card played in a certain turn will
    +     *                   always cover one played before
    +     */
    +    public PlacedCard(Card card, Side playedSide, int turn) {
    +        this.card = card;
    +        this.turn = turn;
    +        this.playedSide = playedSide;
    +    }
    +
    +    /**
    +     * Getter for the PlacedCard class
    +     *
    +     * @return the card just placed.
    +     */
    +    public Card getCard() {
    +        return this.card;
    +    }
    +
    +    /**
    +     * Getter for the PlacedCard class
    +     *
    +     * @return turn in which the card was just placed.
    +     */
    +    public int getTurn() {
    +        return this.turn;
    +    }
    +
    +    /**
    +     * Getter for the PlacedCard class
    +     *
    +     * @return side the card was played
    +     */
    +    public Side getPlayedSide() {
    +        return this.playedSide;
    +    }
    +
    +
    +    /**
    +     * Getter for the Card face
    +     *
    +     * @return the topological description of the side the card was played on
    +     */
    +    public CardFace getPlayedCardFace() {
    +        return this.card.getSide(this.playedSide);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacementOutcome.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacementOutcome.html new file mode 100644 index 00000000..e788754e --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacementOutcome.html @@ -0,0 +1 @@ +PlacementOutcome

    PlacementOutcome

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 21100%0 of 0n/a010401
    static {...}21100%n/a010401
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacementOutcome.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacementOutcome.java.html new file mode 100644 index 00000000..ffa35cb8 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlacementOutcome.java.html @@ -0,0 +1,14 @@ +PlacementOutcome.java

    PlacementOutcome.java

    package it.polimi.ingsw.gamemodel;
    +
    +/**
    + * Before placing a card, its placement must be verified. This enum is used to know if it is a valid one and, if it isn't, what went wrong
    + *
    + * @see Board#verifyCardPlacement(it.polimi.ingsw.utils.Pair, Card, Side)
    + */
    +public enum PlacementOutcome {
    +    VALID,
    +    INVALID_COORDS,
    +    INVALID_ENOUGH_RESOURCES
    +}
    +
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/PlayableCard.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlayableCard.html new file mode 100644 index 00000000..f1b6018f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlayableCard.html @@ -0,0 +1 @@ +PlayableCard

    PlayableCard

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total13 of 5877%1 of 250%2541514
    PlayableCard(Symbol)103879%1150%1221101
    PlayableCard()30%n/a112211
    static {...}4100%n/a010101
    getReign()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/PlayableCard.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlayableCard.java.html new file mode 100644 index 00000000..eb694c90 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/PlayableCard.java.html @@ -0,0 +1,62 @@ +PlayableCard.java

    PlayableCard.java

    package it.polimi.ingsw.gamemodel;
    +
    +import it.polimi.ingsw.exceptions.InvalidResourceException;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +import java.util.Set;
    +
    +/**
    + * Class that represents every kind of card that can be played during the game.
    + * All these cards have at least a side (the back) that does not require any
    + * resource to be played.
    + *
    + * @see CardFace
    + */
    +public abstract sealed class PlayableCard extends Card implements Serializable permits GoldCard, ResourceCard {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    protected int points;
    +    protected Symbol reign;
    +    private static Integer lastID = 0;
    +
    +    /**
    +     * Constructor for PlayableCard. Since the only common aspects are that they
    +     * have a reign and that the back is made up of
    +     * only full corners (no resources) and the center gives a resource of their
    +     * reign
    +     *
    +     * @param reign the reign of the card
    +     * @throws InvalidResourceException if the passed resource is not in
    +     *                                  {@link Symbol#getReigns()}
    +     */
    +    public PlayableCard(Symbol reign) throws InvalidResourceException {
    +        PlayableCard.lastID++;
    +        this.id = PlayableCard.lastID;
    +        if (Symbol.getReigns().contains(reign)) {
    +            this.points = 0;
    +            this.reign = reign;
    +            this.back = new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER,
    +                    Set.of(reign));
    +        } else {
    +            throw new InvalidResourceException(
    +                    "Resource " + reign.toString() + " is not valid for a " + this.getClass());
    +        }
    +    }
    +
    +    public PlayableCard() {
    +
    +    }
    +
    +    /**
    +     * Getter for the card reign
    +     *
    +     * @return the card's reign
    +     * @see Symbol#getReigns()
    +     */
    +    public Symbol getReign() {
    +        return this.reign;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Player.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Player.html new file mode 100644 index 00000000..17b2a582 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Player.html @@ -0,0 +1 @@ +Player

    Player

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total44 of 33086%8 of 2060%9311074121
    setConnected(boolean)120%n/a114411
    drawCard(DrawSource)52583%1150%121801
    chooseInitialCardSide(Side)52382%1150%121601
    chooseSecretObjective(Objective)52382%1150%121701
    playCard(Pair, PlayableCard, Side)52281%1150%121601
    drawSecretObjectives()51777%1150%121401
    drawInitialCard()51777%1150%121401
    equals(Object)22893%2675%250401
    hashCode()35100%n/a010101
    Player(Player)27100%n/a010801
    Player(String, Match)20100%n/a010701
    isConnected()10100%n/a010201
    sendPrivateText(Player, String)7100%n/a010201
    addPoints(int)7100%n/a010201
    sendBroadcastText(String)6100%n/a010201
    setColor(Color)4100%n/a010201
    getBoard()3100%n/a010101
    getPoints()3100%n/a010101
    getPawnColor()3100%n/a010101
    getSecretObjective()3100%n/a010101
    getUsername()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Player.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Player.java.html new file mode 100644 index 00000000..72fa8a11 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Player.java.html @@ -0,0 +1,268 @@ +Player.java

    Player.java

    package it.polimi.ingsw.gamemodel;
    +
    +import it.polimi.ingsw.exceptions.HandException;
    +import it.polimi.ingsw.exceptions.WrongChoiceException;
    +import it.polimi.ingsw.exceptions.WrongStateException;
    +import it.polimi.ingsw.exceptions.WrongTurnException;
    +import it.polimi.ingsw.utils.Pair;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +import java.util.Objects;
    +
    +/**
    + * Represents each in-game user, so acts also as a gateway receiving input by the Controller.
    + * It's also responsible for the board's logic, which is a slice of the game logic.
    + */
    +public class Player implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    private final String username;
    +    private final Match match;
    +    private int points;
    +    private final Board board;
    +    private Color pawnColor;
    +    private Objective secretObjective;
    +    /**
    +     * If the player is connected
    +     */
    +    private boolean connected;
    +
    +    /**
    +     * Initializes the main player's attributes.
    +     *
    +     * @param username the player's username
    +     * @param match    the match the player belongs to
    +     */
    +    public Player(String username, Match match) {
    +        this.username = username;
    +        this.match = match;
    +
    +        this.connected = true;
    +        //Initialize values
    +        board = new Board();
    +        points = 0;
    +    }
    +
    +    /**
    +     * Initializes the current instance from a copy reference
    +     *
    +     * @param player The player to make a copy of
    +     */
    +    public Player(Player player) {
    +        this.username = player.username;
    +        this.match = player.match;
    +        this.board = player.board;
    +        this.points = player.points;
    +        this.pawnColor = player.pawnColor;
    +        this.secretObjective = player.secretObjective;
    +    }
    +
    +    @Override
    +    public boolean equals(Object o) {
    +        if (this == o) return true;
    +        if (!(o instanceof Player player)) return false;
    +
    +        return username.equals(player.username) &&
    +                match.equals(player.match);
    +    }
    +
    +    @Override
    +    public int hashCode() {
    +        return Objects.hash(username, match, points, board, pawnColor, secretObjective);
    +    }
    +
    +    /**
    +     * Places a card on the player's board, on the give side and in the given position, assuming it's valid.
    +     *
    +     * @param coords x and y position in which the card is played (where 0, 0 is the initial card)
    +     * @param card   the card to be placed
    +     * @param side   whether the card should be placed on the front or on the back
    +     * @throws WrongChoiceException If the chosen card cannot be player (placement not allowed, or not enough resources,
    +     *                              or card not in the player's hand)
    +     * @throws WrongStateException  If a card cannot be played in this match state
    +     * @throws WrongTurnException   If it's the turn of this player.
    +     */
    +    public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) throws WrongTurnException, WrongStateException, WrongChoiceException {
    +        synchronized (match) {
    +            if (match.getCurrentPlayer().equals(this))
    +                match.makeMove(coords, card, side);
    +            else
    +                throw new WrongTurnException("Only the current player can play cards");
    +        }
    +    }
    +
    +    /**
    +     * Gets two objectives from the match objectives deck considered to be secret.
    +     *
    +     * @return a pair of objectives
    +     * @throws WrongStateException if called during the wrong match state
    +     * @throws WrongTurnException  if called by the player when it's not its turn
    +     */
    +    public Pair<Objective, Objective> drawSecretObjectives() throws WrongStateException, WrongTurnException {
    +        synchronized (match) {
    +            if (match.getCurrentPlayer().equals(this)) {
    +                return match.proposeSecretObjectives();
    +            } else {
    +                throw new WrongTurnException("Only the current player can draw secret objectives");
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Gets an initial card from the match.
    +     *
    +     * @return an initial card
    +     * @throws WrongTurnException  if called by the player when it's not its turn
    +     * @throws WrongStateException if called during the wrong match state
    +     */
    +    public InitialCard drawInitialCard() throws WrongTurnException, WrongStateException {
    +        synchronized (match) {
    +            if (match.getCurrentPlayer().equals(this))
    +                return match.drawInitialCard();
    +            else
    +                throw new WrongTurnException("Only the current player can draw the initial card");
    +        }
    +    }
    +
    +    /**
    +     * Chooses the initial card side.
    +     *
    +     * @param side the side of the initial card
    +     * @throws WrongTurnException  if called by the player when it's not its turn
    +     * @throws WrongStateException if called during the wrong match state
    +     */
    +    public void chooseInitialCardSide(Side side) throws WrongTurnException, WrongStateException {
    +        synchronized (match) {
    +            if (match.getCurrentPlayer().equals(this))
    +                match.setInitialSide(side, board.getAvailableResources());
    +            else
    +                throw new WrongTurnException("Only the current player can choose the initial card side");
    +        }
    +    }
    +
    +    /**
    +     * Adds a card to the player's hand, popping it from the required source
    +     *
    +     * @param source represents the source of the draw, which can be either one of the two decks or one of the four cards on the table
    +     * @throws WrongTurnException   if called by the player when it's not its turn
    +     * @throws WrongChoiceException if called on a drawing source which is empty (e.g. empty deck)
    +     * @throws WrongStateException  if called during the wrong match state
    +     * @throws HandException if the player already has three cards in their hand
    +     */
    +    public void drawCard(DrawSource source) throws HandException, WrongStateException, WrongChoiceException, WrongTurnException {
    +        synchronized (match) {
    +            if (match.getCurrentPlayer().equals(this)) {
    +                PlayableCard card = match.drawCard(source);
    +                board.addHandCard(card);
    +            } else {
    +                throw new WrongTurnException("Only the current player can draw cards");
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Sets the player private objective (only at the start of the game).
    +     *
    +     * @param objective the chosen objective between the two proposed
    +     * @throws WrongTurnException   if called by the player when it's not its turn
    +     * @throws WrongStateException  if called during the wrong match state
    +     * @throws WrongChoiceException if called on an objective which is not one of the proposed ones
    +     */
    +    public void chooseSecretObjective(Objective objective) throws WrongTurnException, WrongStateException, WrongChoiceException {
    +        synchronized (match) {
    +            if (match.getCurrentPlayer().equals(this)) {
    +                match.setSecretObjective(objective);
    +                secretObjective = objective;
    +            } else {
    +                throw new WrongTurnException("Only the current player can choose an objective");
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Sends a message in public chat
    +     *
    +     * @param text content of the message
    +     */
    +    public void sendBroadcastText(String text) {
    +        this.match.sendBroadcastText(this, text);
    +    }
    +
    +    /**
    +     * Sends a private message to the specified recipient
    +     *
    +     * @param recipient recipient of the message
    +     * @param text      content of the message
    +     */
    +    public void sendPrivateText(Player recipient, String text) {
    +        this.match.sendPrivateText(this, recipient, text);
    +    }
    +
    +    /**
    +     * Getter for the player's board.
    +     */
    +    public Board getBoard() {
    +        return board;
    +    }
    +
    +    /**
    +     * Getter for the player's points.
    +     */
    +    public int getPoints() {
    +        return points;
    +    }
    +
    +    /**
    +     * Getter for the player's pawn color.
    +     */
    +    public Color getPawnColor() {
    +        return pawnColor;
    +    }
    +
    +    /**
    +     * Setter for the player's color.
    +     */
    +    protected void setColor(Color color) {
    +        this.pawnColor = color;
    +    }
    +
    +    /**
    +     * Getter for the player's secret objective.
    +     *
    +     * @see #chooseSecretObjective(Objective)
    +     */
    +    public Objective getSecretObjective() {
    +        return secretObjective;
    +    }
    +
    +    /**
    +     * Adds points to the player.
    +     *
    +     * @param points number of points to add to the player
    +     */
    +    protected void addPoints(int points) {
    +        this.points += points;
    +    }
    +
    +    /**
    +     * Getter for the player's username.
    +     */
    +    public String getUsername() {
    +        return username;
    +    }
    +
    +    public boolean isConnected() {
    +        synchronized (match) {
    +            return connected;
    +        }
    +    }
    +
    +    public void setConnected(boolean connected) {
    +        synchronized (match) {
    +            this.connected = connected;
    +        }
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/PositionRequirement.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/PositionRequirement.html new file mode 100644 index 00000000..c54e692f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/PositionRequirement.html @@ -0,0 +1 @@ +PositionRequirement

    PositionRequirement

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total13 of 17292%1 of 2095%21323013
    PositionRequirement(Map)102470%1375%131801
    getReqs()30%n/a111111
    timesMet(Board)135100%16100%0902101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/PositionRequirement.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/PositionRequirement.java.html new file mode 100644 index 00000000..cc3ba1af --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/PositionRequirement.java.html @@ -0,0 +1,93 @@ +PositionRequirement.java

    PositionRequirement.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +import java.util.ArrayList;
    +import java.util.EnumSet;
    +import java.util.List;
    +import java.util.Map;
    +import it.polimi.ingsw.exceptions.InvalidResourceException;
    +import it.polimi.ingsw.utils.Pair;
    +
    +/**
    + * This class handles requirements involving relative positioning of cards, e.g. three red cards placed in the top right corner of each other
    + */
    +public class PositionRequirement extends Requirement implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    private Map<Pair<Integer, Integer>, Symbol> reqs;
    +
    +    /**
    +     * Note that, since this requirement only cares about relative positioning, there must always be
    +     * an element whose key is (0, 0)
    +     *
    +     * @param reqs The relative positioning of the cards (of which we only care about the faction).
    +     */
    +    public PositionRequirement(Map<Pair<Integer, Integer>, Symbol> reqs) throws InvalidResourceException {
    +        EnumSet<Symbol> validResources = Symbol.getReigns();
    +        for (Symbol s : reqs.values()) {
    +            if (!validResources.contains(s)) {
    +                throw new InvalidResourceException("Resource " + s.toString() + " is not valid for a " + this.getClass().toString());
    +            }
    +        }
    +
    +        this.reqs = reqs;
    +    }
    +
    +    /**
    +     * The requirement will be satisfied if the board has cards of the specified faction in the correct relative positions
    +     *
    +     * @param board the {@link Board} on which the requirement must be checked
    +     * @return whether the board actually meets the requirement or not
    +     */
    +    @Override
    +    public int timesMet(Board board) {
    +        Map<Pair<Integer, Integer>, PlacedCard> placedCards = board.getPlacedCards();
    +        List<Pair<Integer, Integer>> alreadyUsed = new ArrayList<>();
    +
    +        PlacedCard cmpPlaced;
    +        Card cmp;
    +
    +        boolean requirementMatched;
    +        int timesMet = 0;
    +
    +        Pair<Integer, Integer> tmp;
    +
    +        for (Pair<Integer, Integer> coord : placedCards.keySet()) {
    +            requirementMatched = true;
    +            // for each card in the board
    +            for (Pair<Integer, Integer> offset : this.reqs.keySet()) {
    +                tmp = new Pair<>(coord.first() + offset.first(), coord.second() + offset.second());
    +                cmpPlaced = placedCards.get(tmp);
    +                if (cmpPlaced != null) { // card in required position does not exist so go next
    +                    cmp = cmpPlaced.getCard();
    +                    // if the card is not a playable it is the initial (so go next), and if the reign is not matched go next
    +                    if ((!(cmp instanceof PlayableCard)) || ((PlayableCard) cmp).getReign() != this.reqs.get(offset) || alreadyUsed.indexOf(tmp) != -1) {
    +                        requirementMatched = false;
    +                    }
    +                } else {
    +                    requirementMatched = false;
    +                }
    +            }
    +            if (requirementMatched) {
    +                for (Pair<Integer, Integer> offset : reqs.keySet()) {
    +                    alreadyUsed.add(new Pair<>(coord.first() + offset.first(), coord.second() + offset.second()));
    +                }
    +                timesMet++;
    +            }
    +        }
    +        return timesMet;
    +    }
    +
    +    /**
    +     * Getter for the PositionRequirement class
    +     * @return the positioning requirement for the objective card to be activated
    +     *
    +     */
    +    public Map<Pair<Integer, Integer>, Symbol> getReqs(){
    +        return this.reqs;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/QuantityRequirement.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/QuantityRequirement.html new file mode 100644 index 00000000..9e2dc49c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/QuantityRequirement.html @@ -0,0 +1 @@ +QuantityRequirement

    QuantityRequirement

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total18 of 8177%4 of 1060%4821713
    QuantityRequirement(Map)102470%1375%131801
    timesMet(Board)53988%3350%240801
    getReqs()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/QuantityRequirement.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/QuantityRequirement.java.html new file mode 100644 index 00000000..32cf71e3 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/QuantityRequirement.java.html @@ -0,0 +1,65 @@ +QuantityRequirement.java

    QuantityRequirement.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +import java.util.EnumSet;
    +import java.util.Map;
    +import it.polimi.ingsw.exceptions.InvalidResourceException;
    +
    +/**
    + * This class handles requirements involving relative positioning of cards, e.g. three red cards placed in the top right corner of each other
    + */
    +public class QuantityRequirement extends Requirement implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    private Map<Symbol, Integer> reqs;
    +
    +    /**
    +     * Class constructor. Only valid symbols are the ones returned by {@link Symbol#getBasicResources()}
    +     *
    +     * @param reqs how many resources of a certain type are needed to fulfill the requirement.
    +     * @throws InvalidResourceException if a requirement is not made up only of those symbols
    +     */
    +    public QuantityRequirement(Map<Symbol, Integer> reqs) throws InvalidResourceException {
    +        EnumSet<Symbol> validResources = Symbol.getBasicResources();
    +        for (Symbol s : reqs.keySet()) {
    +            if (!validResources.contains(s)) {
    +                throw new InvalidResourceException("Resource " + s.toString() + " is not valid for a " + this.getClass().toString());
    +            }
    +        }
    +        this.reqs = reqs;
    +    }
    +
    +    /**
    +     * The requirement will be satisfied if the board has enough resources of the specified type
    +     *
    +     * @param board the board on which we check the requirement
    +     * @return whether the requirement is satisfied or not
    +     */
    +    @Override
    +    public int timesMet(Board board) {
    +        Map<Symbol, Integer> availableResources = board.getAvailableResources();
    +        Integer min = null;
    +        Integer curr;
    +
    +        for (Symbol req : reqs.keySet()) {
    +            curr = availableResources.get(req) / reqs.get(req);
    +            if (min == null || curr < min) {
    +                min = curr;
    +            }
    +        }
    +
    +        return min;
    +    }
    +
    +    /**
    +     * Getter for the QuantityRequirement class
    +     *
    +     * @return Map representing the card's placement requirements
    +     */
    +    public Map<Symbol, Integer> getReqs() {
    +        return this.reqs;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Requirement.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Requirement.html new file mode 100644 index 00000000..07293268 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Requirement.html @@ -0,0 +1 @@ +Requirement

    Requirement

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 3100%0 of 0n/a010201
    Requirement()3100%n/a010201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Requirement.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Requirement.java.html new file mode 100644 index 00000000..f8a5051f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Requirement.java.html @@ -0,0 +1,30 @@ +Requirement.java

    Requirement.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * A condition must be met in order to play a golden card and to get points from the objectives. Those requirements are both represented by this class
    + */
    +public abstract class Requirement implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    /**
    +     * Empty class constructor. The actual constructor resides in the subclasses, but this method is used to know
    +     * what to expect when creating a new Requirement, allowing the use of polymorphism
    +     *
    +     * @see Symbol
    +     */
    +    public Requirement() {
    +    }
    +
    +    /**
    +     * Will be implemented on the concrete classes, as they have different kind of conditions
    +     *
    +     * @param board the board that will be used to check if the requirement is met
    +     * @return whether the requirement is met or not
    +     */
    +    public abstract int timesMet(Board board);
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/ResourceCard.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/ResourceCard.html new file mode 100644 index 00000000..f2636a91 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/ResourceCard.html @@ -0,0 +1 @@ +ResourceCard

    ResourceCard

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 13100%0 of 0n/a020502
    ResourceCard(CardFace, Symbol, int)10100%n/a010401
    getPoints()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/ResourceCard.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/ResourceCard.java.html new file mode 100644 index 00000000..7a9a2915 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/ResourceCard.java.html @@ -0,0 +1,38 @@ +ResourceCard.java

    ResourceCard.java

    package it.polimi.ingsw.gamemodel;
    +
    +import it.polimi.ingsw.exceptions.InvalidResourceException;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Card that does not require any conditions to be played.
    + */
    +public final class ResourceCard extends PlayableCard implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    /**
    +     * Class constructor. It needs to only take the front as an argument, since the back is handled by its superclass {@link PlayableCard}
    +     *
    +     * @param front  the front side of the card
    +     * @param reign  the reign of the card
    +     * @param points the number of points the card gives (must be an absolute value)
    +     * @throws InvalidResourceException if the passed resource is not in {@link Symbol#getReigns()}
    +     */
    +    public ResourceCard(CardFace front, Symbol reign, int points) throws InvalidResourceException {
    +        super(reign);
    +        this.front = front;
    +        this.points = points;
    +    }
    +
    +    /**
    +     * Getter for the ResourceCard class
    +     *
    +     * @return points held by the card
    +     */
    +    public int getPoints() {
    +        return this.points;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Side.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Side.html new file mode 100644 index 00000000..4c409137 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Side.html @@ -0,0 +1 @@ +Side

    Side

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total25 of 5352%4 of 40%3641114
    fromString(String)250%40%334411
    static {...}17100%n/a010301
    Side(String, int, String)8100%n/a010301
    toString()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Side.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Side.java.html new file mode 100644 index 00000000..f7c705f1 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Side.java.html @@ -0,0 +1,36 @@ +Side.java

    Side.java

    package it.polimi.ingsw.gamemodel;
    +
    +/**
    + * Represents a card side.
    + */
    +public enum Side {
    +    FRONT("front"),
    +    BACK("back");
    +
    +    private String string;
    +
    +    Side(String string) {
    +        this.string = string;
    +    }
    +    
    +    @Override
    +    public String toString() {
    +        return this.string;
    +    }
    +
    +    /**
    +     * Return a instance of this enum from its corresponding string representation.
    +     *
    +     * @param sideString The side represented as a string
    +     * @return The side instance
    +     */
    +    public Side fromString(String sideString) {
    +        for (Side side : Side.values()) {
    +            if (side.toString().equals(sideString)) {
    +                return side;
    +            }
    +        }
    +        return null;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Symbol.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Symbol.html new file mode 100644 index 00000000..5c6560f4 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Symbol.html @@ -0,0 +1 @@ +Symbol

    Symbol

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 178100%0 of 0n/a0501605
    static {...}69100%n/a0101201
    getValidCorner()37100%n/a010101
    getValidMultiplier()37100%n/a010101
    getBasicResources()29100%n/a010101
    getReigns()6100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/Symbol.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/Symbol.java.html new file mode 100644 index 00000000..3a148b10 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/Symbol.java.html @@ -0,0 +1,95 @@ +Symbol.java

    Symbol.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.util.EnumSet;
    +
    +/**
    + * Contains all the possible symbols a corner can store or a multiplier can have.
    + * Besides the basic 4 factions and 3 symbols, there is also EMPTY_CORNER, which represents a corner without the
    + * possibility of placing another card on top of it (missing slot), FULL_CORNER which represents a valid corner without any symbol and
    + * CORNER_OBJ which represents a {@link QuantityRequirement} in which the multiplier is how many corners the card covered
    + */
    +public enum Symbol {
    +    ANIMAL,
    +    PLANT,
    +    INSECT,
    +    FUNGUS,
    +    FEATHER,
    +    INKWELL,
    +    PARCHMENT,
    +    EMPTY_CORNER,
    +    FULL_CORNER,
    +    NO_MULT,
    +    CORNER_OBJ;
    +
    +    /**
    +     * Generates subset containing only the four basic reigns
    +     *
    +     * @return the subset containing only the four basic reigns
    +     */
    +    static public EnumSet<Symbol> getReigns() {
    +        return EnumSet.of(
    +                ANIMAL,
    +                PLANT,
    +                INSECT,
    +                FUNGUS
    +        );
    +    }
    +
    +    /**
    +     * Generates subset containing only the basic resources (4 reigns and 3 "symbols")
    +     *
    +     * @return the subset containing only the basic resources (4 reigns and 3 "symbols")
    +     */
    +    static public EnumSet<Symbol> getBasicResources() {
    +        return EnumSet.of(
    +                ANIMAL,
    +                PLANT,
    +                INSECT,
    +                FUNGUS,
    +                FEATHER,
    +                INKWELL,
    +                PARCHMENT
    +        );
    +    }
    +
    +    /**
    +     * Generates subset containing all the valid Symbols a corner can contain
    +     *
    +     * @return the subset containing all the valid Symbols a corner can contain
    +     */
    +    static public EnumSet<Symbol> getValidCorner() {
    +        return EnumSet.of(
    +                ANIMAL,
    +                PLANT,
    +                INSECT,
    +                FUNGUS,
    +                FEATHER,
    +                INKWELL,
    +                PARCHMENT,
    +                EMPTY_CORNER,
    +                FULL_CORNER
    +        );
    +    }
    +
    +    /**
    +     * Generates subset containing all the symbols a {@link GoldCard} multiplier can be
    +     *
    +     * @return the subset containing all the symbols a {@link GoldCard} multiplier can be
    +     */
    +    static public EnumSet<Symbol> getValidMultiplier() {
    +        return EnumSet.of(
    +                ANIMAL,
    +                PLANT,
    +                INSECT,
    +                FUNGUS,
    +                FEATHER,
    +                INKWELL,
    +                PARCHMENT,
    +                NO_MULT,
    +                CORNER_OBJ
    +        );
    +    }
    +
    +}
    +
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/WaitState.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/WaitState.html new file mode 100644 index 00000000..ebe72001 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/WaitState.html @@ -0,0 +1 @@ +WaitState

    WaitState

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 41100%0 of 2100%0501404
    transition()35100%2100%0201001
    WaitState(Match)4100%n/a010201
    removePlayer()1100%n/a010101
    addPlayer()1100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/WaitState.java.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/WaitState.java.html new file mode 100644 index 00000000..56c5c613 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/WaitState.java.html @@ -0,0 +1,57 @@ +WaitState.java

    WaitState.java

    package it.polimi.ingsw.gamemodel;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Subclass of {@link MatchState}. This is the state in which the match is when accepting new players or them leaving,
    + * that is to say: before the match is full and so it starts.
    + */
    +public class WaitState extends MatchState implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +
    +    /**
    +     * Initializes this instance.
    +     *
    +     * @param match The match in this state
    +     */
    +    public WaitState(Match match) {
    +        super(match);
    +    }
    +
    +    /**
    +     * Transitions to {@link NextTurnState}.
    +     */
    +    @Override
    +    public void transition() {
    +        synchronized (match) {
    +            if (match.isFull()) {
    +                match.setupDecks();
    +                match.setupPlayers();
    +                match.setupBoards();
    +
    +                MatchState nextState = new NextTurnState(match);
    +                match.setState(nextState);
    +
    +                // Notify observers
    +                match.notifyMatchStart();
    +            }
    +        }
    +    }
    +
    +    /**
    +     * This method call is allowed by this class instances.
    +     */
    +    @Override
    +    public void removePlayer() {
    +    }
    +
    +    /**
    +     * This method call is allowed by this class instances.
    +     */
    +    @Override
    +    public void addPlayer() {
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/index.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/index.html new file mode 100644 index 00000000..d3aea692 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.gamemodel

    it.polimi.ingsw.gamemodel

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total298 of 3,52991%50 of 26881%603147076114176029
    Match941,10892%168183%151002427604901
    Player4428686%81260%931107412101
    Board3455894%95084%94299701201
    Side252852%40%364111401
    QuantityRequirement186377%4660%482171301
    MatchState183566%n/a41051441001
    GoldCard1319593%21487%3142391601
    PositionRequirement1315992%11995%2132301301
    PlayableCard134577%1150%254151401
    NextTurnState6386%3975%3112190501
    Card3585%1583%281101501
    FinalState54%n/a23362301
    PlacedCard2488%n/a15191501
    Objective5296%1375%181160601
    Symbol178100%n/a050160501
    GameDeck55100%6100%0110180801
    WaitState41100%2100%050140401
    DrawSource39100%n/a01070101
    CardFace38100%4100%060130301
    ChooseInitialSideState31100%2100%04090301
    ChooseSecretObjectiveState31100%2100%04090301
    Color27100%n/a01050101
    Corner27100%n/a01050101
    AfterDrawState26100%2100%03070201
    InitialCard26100%n/a02070201
    PlacementOutcome21100%n/a01040101
    AfterMoveState18100%n/a03070301
    ResourceCard13100%n/a02050201
    Requirement100%n/a01020101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.gamemodel/index.source.html b/deliveries/Test results/it.polimi.ingsw.gamemodel/index.source.html new file mode 100644 index 00000000..be7dc67e --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.gamemodel/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.gamemodel

    it.polimi.ingsw.gamemodel

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total298 of 3,52991%50 of 26881%603147076114176029
    Match.java941,10892%168183%151002427604901
    Player.java4428686%81260%931107412101
    Board.java3455894%95084%94299701201
    Side.java252852%40%364111401
    QuantityRequirement.java186377%4660%482171301
    MatchState.java183566%n/a41051441001
    GoldCard.java1319593%21487%3142391601
    PositionRequirement.java1315992%11995%2132301301
    PlayableCard.java134577%1150%254151401
    NextTurnState.java6386%3975%3112190501
    Card.java3585%1583%281101501
    FinalState.java54%n/a23362301
    PlacedCard.java2488%n/a15191501
    Objective.java5296%1375%181160601
    Symbol.java178100%n/a050160501
    GameDeck.java55100%6100%0110180801
    WaitState.java41100%2100%050140401
    DrawSource.java39100%n/a01070101
    CardFace.java38100%4100%060130301
    ChooseInitialSideState.java31100%2100%04090301
    ChooseSecretObjectiveState.java31100%2100%04090301
    Color.java27100%n/a01050101
    Corner.java27100%n/a01050101
    InitialCard.java26100%n/a02070201
    AfterDrawState.java26100%2100%03070201
    PlacementOutcome.java21100%n/a01040101
    AfterMoveState.java18100%n/a03070301
    ResourceCard.java13100%n/a02050201
    Requirement.java100%n/a01020101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ActionMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ActionMessage.html new file mode 100644 index 00000000..b61ead65 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ActionMessage.html @@ -0,0 +1 @@ +ActionMessage

    ActionMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total3 of 2085%0 of 0n/a131613
    getAction()30%n/a111111
    ActionMessage(String)14100%n/a010401
    getUsername()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ActionMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ActionMessage.java.html new file mode 100644 index 00000000..f69fafcf --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ActionMessage.java.html @@ -0,0 +1,42 @@ +ActionMessage.java

    ActionMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +import it.polimi.ingsw.network.messages.Message;
    +
    +/**
    + * Messages sent by clients to the server to express a user intention to do an
    + * action
    + */
    +public sealed abstract class ActionMessage extends Message permits ChooseInitialCardSideMessage, ChooseSecretObjectiveMessage,
    +        CreateMatchMessage, DrawCardMessage, DrawInitialCardMessage, DrawSecretObjectivesMessage, GetAvailableMatchesMessage,
    +        JoinMatchMessage, PlayCardMessage, SendBroadcastTextMessage, SendPrivateTextMessage {
    +    private String action;
    +    private String username;
    +
    +    
    +    /**
    +     * Class constructor.
    +     * 
    +     * @param username The player who wants to perform the action
    +     */
    +    public ActionMessage(String username) {
    +        super();
    +        this.action = this.getClass().getSimpleName().replace("Message", "");
    +        this.username = username;
    +    }
    +
    +    /**
    +     * @return name of the action
    +     */
    +    public String getAction() {
    +        return action;
    +    }
    +
    +    /**
    +     * @return username of the player
    +     */
    +    public String getUsername() {
    +        return username;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseInitialCardSideMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseInitialCardSideMessage.html new file mode 100644 index 00000000..4ec4a3bb --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseInitialCardSideMessage.html @@ -0,0 +1 @@ +ChooseInitialCardSideMessage

    ChooseInitialCardSideMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total10 of 100%0 of 0n/a224422
    ChooseInitialCardSideMessage(String, Side)70%n/a113311
    getSide()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseInitialCardSideMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseInitialCardSideMessage.java.html new file mode 100644 index 00000000..f9243dce --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseInitialCardSideMessage.java.html @@ -0,0 +1,31 @@ +ChooseInitialCardSideMessage.java

    ChooseInitialCardSideMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +import it.polimi.ingsw.gamemodel.Side;
    +
    +/**
    + * The action communicates the player's choice of the initial card's side. It can only happen before the first turn of the game.
    + * If the action is successful, {@link it.polimi.ingsw.network.messages.responses.SomeoneDrewCardMessage} response is sent to every client.
    + */
    +public final class ChooseInitialCardSideMessage extends ActionMessage {
    +    private Side side;
    +
    +    /**
    +     * @return chosen side
    +     */
    +    public Side getSide() {
    +        return side;
    +    }
    +
    +    
    +    /**
    +     * Class constructor.
    +     * 
    +     * @param username The username of the player that wants to choose the initial card side
    +     * @param side The chosen card side
    +     */
    +    public ChooseInitialCardSideMessage(String username, Side side) {
    +        super(username);
    +        this.side = side;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseSecretObjectiveMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseSecretObjectiveMessage.html new file mode 100644 index 00000000..ff23ad9b --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseSecretObjectiveMessage.html @@ -0,0 +1 @@ +ChooseSecretObjectiveMessage

    ChooseSecretObjectiveMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total10 of 100%0 of 0n/a224422
    ChooseSecretObjectiveMessage(String, Integer)70%n/a113311
    getObjectiveID()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseSecretObjectiveMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseSecretObjectiveMessage.java.html new file mode 100644 index 00000000..ae6e919c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/ChooseSecretObjectiveMessage.java.html @@ -0,0 +1,30 @@ +ChooseSecretObjectiveMessage.java

    ChooseSecretObjectiveMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +/**
    + * The action communicates the intention of a player to choose his secret objective. It can only happen before the first turn of the game.
    + * If the action is successful, a {@link it.polimi.ingsw.network.messages.responses.SomeoneChoseSecretObjectiveMessage} response is sent to every client.
    + */
    +public final class ChooseSecretObjectiveMessage extends ActionMessage {
    +    private Integer objectiveID;
    +
    +    /**
    +     * @return Chosen objective
    +     */
    +    public Integer getObjectiveID() {
    +        return objectiveID;
    +    }
    +
    +    
    +    /**
    +     * Class constructor.
    +     * 
    +     * @param username The username of the player that wants to choose secret objective
    +     * @param objectiveID The chosen objective's ID
    +     */
    +    public ChooseSecretObjectiveMessage(String username, Integer objectiveID) {
    +        super(username);
    +        this.objectiveID = objectiveID;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/CreateMatchMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/CreateMatchMessage.html new file mode 100644 index 00000000..b814ca7a --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/CreateMatchMessage.html @@ -0,0 +1 @@ +CreateMatchMessage

    CreateMatchMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 16100%0 of 0n/a030603
    CreateMatchMessage(String, String, int)10100%n/a010401
    getMatchName()3100%n/a010101
    getMaxPlayers()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/CreateMatchMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/CreateMatchMessage.java.html new file mode 100644 index 00000000..6eace6c1 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/CreateMatchMessage.java.html @@ -0,0 +1,32 @@ +CreateMatchMessage.java

    CreateMatchMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +/**
    + * The action communicates (to the server) the intention of a client to create a new match.
    + */
    +public final class CreateMatchMessage extends ActionMessage {
    +    private final String matchName;
    +    private final int maxPlayers;
    +
    +    public CreateMatchMessage(String username, String matchName, int maxPlayers) {
    +        super(username);
    +        this.matchName = matchName;
    +        this.maxPlayers = maxPlayers;
    +    }
    +
    +    /***
    +     *
    +     * @return Name of the match
    +     */
    +    public String getMatchName() {
    +        return matchName;
    +    }
    +
    +    /***
    +     *
    +     * @return Number of maximum players (must be between 2 and 4)
    +     */
    +    public int getMaxPlayers() {
    +        return maxPlayers;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawCardMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawCardMessage.html new file mode 100644 index 00000000..da56bd96 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawCardMessage.html @@ -0,0 +1 @@ +DrawCardMessage

    DrawCardMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 10100%0 of 0n/a020402
    DrawCardMessage(String, DrawSource)7100%n/a010301
    getSource()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawCardMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawCardMessage.java.html new file mode 100644 index 00000000..dee66c67 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawCardMessage.java.html @@ -0,0 +1,24 @@ +DrawCardMessage.java

    DrawCardMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +import it.polimi.ingsw.gamemodel.DrawSource;
    +
    +/**
    + * The action communicates the intention of a player to draw a card. It can only happen during the player's own turn.
    + * If the action is successful, a {@link it.polimi.ingsw.network.messages.responses.SomeoneDrewInitialCardMessage} response is sent to every client.
    + */
    +public final class DrawCardMessage extends ActionMessage {
    +    private DrawSource source;
    +
    +    /**
    +     * @return chosen source for the draw
    +     */
    +    public DrawSource getSource() {
    +        return source;
    +    }
    +
    +    public DrawCardMessage(String username, DrawSource source) {
    +        super(username);
    +        this.source = source;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawInitialCardMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawInitialCardMessage.html new file mode 100644 index 00000000..8f79fc8c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawInitialCardMessage.html @@ -0,0 +1 @@ +DrawInitialCardMessage

    DrawInitialCardMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 4100%0 of 0n/a010201
    DrawInitialCardMessage(String)4100%n/a010201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawInitialCardMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawInitialCardMessage.java.html new file mode 100644 index 00000000..b1e351cb --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawInitialCardMessage.java.html @@ -0,0 +1,13 @@ +DrawInitialCardMessage.java

    DrawInitialCardMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +/**
    + * It communicates the intention of a player to draw the initial card. It can only happen before the first turn of the game.
    + * - If the action is successful, a {@link it.polimi.ingsw.network.messages.responses.SomeoneDrewInitialCardMessage} response is sent to every client.
    + */
    +public final class DrawInitialCardMessage extends ActionMessage {
    +    public DrawInitialCardMessage(String username) {
    +        super(username);
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawSecretObjectivesMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawSecretObjectivesMessage.html new file mode 100644 index 00000000..83245260 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawSecretObjectivesMessage.html @@ -0,0 +1 @@ +DrawSecretObjectivesMessage

    DrawSecretObjectivesMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total4 of 40%0 of 0n/a112211
    DrawSecretObjectivesMessage(String)40%n/a112211
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawSecretObjectivesMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawSecretObjectivesMessage.java.html new file mode 100644 index 00000000..1587b973 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/DrawSecretObjectivesMessage.java.html @@ -0,0 +1,13 @@ +DrawSecretObjectivesMessage.java

    DrawSecretObjectivesMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +/**
    + * It communicates the intention of a player to draw the (2) secret objectives. It can only happen before the first turn of the game.
    + * If the action is successful, a {@link it.polimi.ingsw.network.messages.responses.SomeoneDrewSecretObjectivesMessage} response is sent to every client.
    + */
    +public final class DrawSecretObjectivesMessage extends ActionMessage {
    +
    +    public DrawSecretObjectivesMessage(String username) {
    +        super(username);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/GetAvailableMatchesMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/GetAvailableMatchesMessage.html new file mode 100644 index 00000000..7a7d1185 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/GetAvailableMatchesMessage.html @@ -0,0 +1 @@ +GetAvailableMatchesMessage

    GetAvailableMatchesMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 4100%0 of 0n/a010201
    GetAvailableMatchesMessage(String)4100%n/a010201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/GetAvailableMatchesMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/GetAvailableMatchesMessage.java.html new file mode 100644 index 00000000..94788f19 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/GetAvailableMatchesMessage.java.html @@ -0,0 +1,12 @@ +GetAvailableMatchesMessage.java

    GetAvailableMatchesMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +/**
    + * The client asks for an updated version of the lobby;
    + * The server returns an {@link it.polimi.ingsw.network.messages.responses.AvailableMatchesMessage} response.
    + */
    +public final class GetAvailableMatchesMessage extends ActionMessage {
    +    public GetAvailableMatchesMessage(String username) {
    +        super(username);
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/JoinMatchMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/JoinMatchMessage.html new file mode 100644 index 00000000..2a827c86 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/JoinMatchMessage.html @@ -0,0 +1 @@ +JoinMatchMessage

    JoinMatchMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 10100%0 of 0n/a020402
    JoinMatchMessage(String, String)7100%n/a010301
    getMatchName()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/JoinMatchMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/JoinMatchMessage.java.html new file mode 100644 index 00000000..d26f2f82 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/JoinMatchMessage.java.html @@ -0,0 +1,21 @@ +JoinMatchMessage.java

    JoinMatchMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +/**
    + * The action communicates the intention of a client to join a match.
    + */
    +public final class JoinMatchMessage extends ActionMessage {
    +    private final String matchName;
    +
    +    public JoinMatchMessage(String username, String matchName) {
    +        super(username);
    +        this.matchName = matchName;
    +    }
    +
    +    /**
    +     * @return Name of the match to join
    +     */
    +    public String getMatchName() {
    +        return matchName;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/PlayCardMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/PlayCardMessage.html new file mode 100644 index 00000000..8a1bdab5 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/PlayCardMessage.html @@ -0,0 +1 @@ +PlayCardMessage

    PlayCardMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 32100%0 of 0n/a0501005
    PlayCardMessage(String, Pair, Integer, Side)20100%n/a010601
    getX()3100%n/a010101
    getY()3100%n/a010101
    getCardID()3100%n/a010101
    getSide()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/PlayCardMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/PlayCardMessage.java.html new file mode 100644 index 00000000..1ea1ca6f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/PlayCardMessage.java.html @@ -0,0 +1,53 @@ +PlayCardMessage.java

    PlayCardMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +import it.polimi.ingsw.gamemodel.Side;
    +import it.polimi.ingsw.utils.Pair;
    +
    +/**
    + * The action communicates the intention of the player to place a card on its board. It can only happen during the player's own turn.
    + * If the action is successful, a {@link it.polimi.ingsw.network.messages.responses.SomeonePlayedCardMessage} response is sent to every client.
    + */
    +public final class PlayCardMessage extends ActionMessage {
    +    private final Integer x, y;
    +    private final Integer cardID;
    +    private final Side side;
    +
    +    /**
    +     * @return x coordinate of the played card
    +     */
    +    public Integer getX() {
    +        return x;
    +    }
    +
    +    /**
    +     * @return y coordinate of the played card
    +     */
    +    public Integer getY() {
    +        return y;
    +    }
    +
    +    /**
    +     * @return id of the played card
    +     */
    +    public Integer getCardID() {
    +        return cardID;
    +    }
    +
    +    /**
    +     * @return side of the played card
    +     */
    +    public Side getSide() {
    +        return side;
    +    }
    +
    +
    +    public PlayCardMessage(String username, Pair<Integer, Integer> coords, Integer cardID, Side side) {
    +        super(username);
    +        this.x = coords.first();
    +        this.y = coords.second();
    +        this.cardID = cardID;
    +        this.side = side;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendBroadcastTextMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendBroadcastTextMessage.html new file mode 100644 index 00000000..00851cc5 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendBroadcastTextMessage.html @@ -0,0 +1 @@ +SendBroadcastTextMessage

    SendBroadcastTextMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 10100%0 of 0n/a020402
    SendBroadcastTextMessage(String, String)7100%n/a010301
    getText()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendBroadcastTextMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendBroadcastTextMessage.java.html new file mode 100644 index 00000000..66b58726 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendBroadcastTextMessage.java.html @@ -0,0 +1,19 @@ +SendBroadcastTextMessage.java

    SendBroadcastTextMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +/**
    + * SendBroadcastTextMessage
    + */
    +public final class SendBroadcastTextMessage extends ActionMessage {
    +    private final String text;
    +
    +    public SendBroadcastTextMessage(String username, String text) {
    +        super(username);
    +        this.text = text;
    +    }
    +
    +    public String getText() {
    +        return text;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendPrivateTextMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendPrivateTextMessage.html new file mode 100644 index 00000000..aa256e42 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendPrivateTextMessage.html @@ -0,0 +1 @@ +SendPrivateTextMessage

    SendPrivateTextMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 16100%0 of 0n/a030603
    SendPrivateTextMessage(String, String, String)10100%n/a010401
    getRecipient()3100%n/a010101
    getText()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendPrivateTextMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendPrivateTextMessage.java.html new file mode 100644 index 00000000..72a94d31 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/SendPrivateTextMessage.java.html @@ -0,0 +1,25 @@ +SendPrivateTextMessage.java

    SendPrivateTextMessage.java

    package it.polimi.ingsw.network.messages.actions;
    +
    +/**
    + * SendPrivateTextMessage
    + */
    +public final class SendPrivateTextMessage extends ActionMessage {
    +    private final String recipient;
    +    private final String text;
    +
    +    public SendPrivateTextMessage(String username, String recipient, String text) {
    +        super(username);
    +        this.recipient = recipient;
    +        this.text = text;
    +    }
    +
    +    public String getRecipient() {
    +        return recipient;
    +    }
    +
    +    public String getText() {
    +        return text;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/index.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/index.html new file mode 100644 index 00000000..60a03f3b --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.network.messages.actions

    it.polimi.ingsw.network.messages.actions

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total27 of 14681%0 of 0n/a6271154627312
    ChooseInitialCardSideMessage100%n/a22442211
    ChooseSecretObjectiveMessage100%n/a22442211
    DrawSecretObjectivesMessage40%n/a11221111
    ActionMessage31785%n/a13161301
    PlayCardMessage32100%n/a050100501
    SendPrivateTextMessage16100%n/a03060301
    CreateMatchMessage16100%n/a03060301
    DrawCardMessage10100%n/a02040201
    SendBroadcastTextMessage10100%n/a02040201
    JoinMatchMessage10100%n/a02040201
    DrawInitialCardMessage4100%n/a01020101
    GetAvailableMatchesMessage4100%n/a01020101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.actions/index.source.html b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/index.source.html new file mode 100644 index 00000000..c845e8bd --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.actions/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.network.messages.actions

    it.polimi.ingsw.network.messages.actions

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total27 of 14681%0 of 0n/a6271154627312
    ChooseSecretObjectiveMessage.java100%n/a22442211
    ChooseInitialCardSideMessage.java100%n/a22442211
    DrawSecretObjectivesMessage.java40%n/a11221111
    ActionMessage.java31785%n/a13161301
    PlayCardMessage.java32100%n/a050100501
    SendPrivateTextMessage.java16100%n/a03060301
    CreateMatchMessage.java16100%n/a03060301
    SendBroadcastTextMessage.java10100%n/a02040201
    DrawCardMessage.java10100%n/a02040201
    JoinMatchMessage.java10100%n/a02040201
    DrawInitialCardMessage.java4100%n/a01020101
    GetAvailableMatchesMessage.java4100%n/a01020101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.errors/ErrorMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.errors/ErrorMessage.html new file mode 100644 index 00000000..265243b1 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.errors/ErrorMessage.html @@ -0,0 +1 @@ +ErrorMessage

    ErrorMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total15 of 150%0 of 0n/a336633
    ErrorMessage(String, String)90%n/a114411
    getError()30%n/a111111
    getMessage()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.errors/ErrorMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.errors/ErrorMessage.java.html new file mode 100644 index 00000000..2b5938ca --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.errors/ErrorMessage.java.html @@ -0,0 +1,33 @@ +ErrorMessage.java

    ErrorMessage.java

    package it.polimi.ingsw.network.messages.errors;
    +
    +import it.polimi.ingsw.network.messages.Message;
    +
    +/**
    + * Sent to the clients when an error happens
    + */
    +public class ErrorMessage extends Message {
    +    private final String message;
    +    private final String error;
    +
    +    public ErrorMessage(String message, String error) {
    +        this.message = message;
    +        this.error = error;
    +    }
    +
    +    /**
    +     * Getter for the error code of the message
    +     * @return error code of the message
    +     */
    +    public String getError() {
    +        return error;
    +    }
    +
    +    /**
    +     * Getter for the message in human language
    +     * @return the mesage
    +     */
    +    public String getMessage() {
    +        return message;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.errors/index.html b/deliveries/Test results/it.polimi.ingsw.network.messages.errors/index.html new file mode 100644 index 00000000..9bf49f8b --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.errors/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.network.messages.errors

    it.polimi.ingsw.network.messages.errors

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total15 of 150%0 of 0n/a33663311
    ErrorMessage150%n/a33663311
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.errors/index.source.html b/deliveries/Test results/it.polimi.ingsw.network.messages.errors/index.source.html new file mode 100644 index 00000000..a7aebc16 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.errors/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.network.messages.errors

    it.polimi.ingsw.network.messages.errors

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total15 of 150%0 of 0n/a33663311
    ErrorMessage.java150%n/a33663311
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/AvailableMatchesMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/AvailableMatchesMessage.html new file mode 100644 index 00000000..dfa42c94 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/AvailableMatchesMessage.html @@ -0,0 +1 @@ +AvailableMatchesMessage

    AvailableMatchesMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total3 of 3992%0 of 0n/a141614
    getMatches()30%n/a111111
    encodeMatch(String, Match)14100%n/a010101
    AvailableMatchesMessage(Map)13100%n/a010401
    lambda$new$0(String, Match)9100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/AvailableMatchesMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/AvailableMatchesMessage.java.html new file mode 100644 index 00000000..e6754a14 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/AvailableMatchesMessage.java.html @@ -0,0 +1,42 @@ +AvailableMatchesMessage.java

    AvailableMatchesMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.Map;
    +import it.polimi.ingsw.gamemodel.Match;
    +import it.polimi.ingsw.utils.AvailableMatch;
    +
    +/**
    + * This response is sent when a user is connected to the server.
    + */
    +public final class AvailableMatchesMessage extends ResponseMessage {
    +
    +    private final List<AvailableMatch> matches;
    +
    +    
    +    /**
    +     * Class constructor.
    +     * 
    +     * @param availableMatches The available matches present on server
    +     */
    +    public AvailableMatchesMessage(Map<String, Match> availableMatches) {
    +        super(null);
    +        matches = new ArrayList<>();
    +        availableMatches.forEach((n, m) -> matches.add(encodeMatch(n, m)));
    +    }
    +
    +    /**
    +     * @return a list containing a JsonObject for each match with properties:
    +     * name - name of the match
    +     * maxPlayers - maximum number of players
    +     * joinedPlayers - number of players in the match
    +     */
    +    public List<AvailableMatch> getMatches() {
    +        return matches;
    +    }
    +
    +    private final AvailableMatch encodeMatch(String name, Match match) {
    +        return new AvailableMatch(name, match.getMaxPlayers(), match.getPlayers().size(), match.isRejoinable());
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchFinishedMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchFinishedMessage.html new file mode 100644 index 00000000..5c892273 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchFinishedMessage.html @@ -0,0 +1 @@ +MatchFinishedMessage

    MatchFinishedMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total37 of 370%0 of 0n/a445544
    MatchFinishedMessage(List)140%n/a113311
    createLeaderboardEntry(Player, Boolean)110%n/a111111
    lambda$new$0(Pair)90%n/a111111
    getRanking()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchFinishedMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchFinishedMessage.java.html new file mode 100644 index 00000000..e08be001 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchFinishedMessage.java.html @@ -0,0 +1,35 @@ +MatchFinishedMessage.java

    MatchFinishedMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +import java.util.List;
    +import java.util.stream.Collectors;
    +import it.polimi.ingsw.gamemodel.Player;
    +import it.polimi.ingsw.utils.LeaderboardEntry;
    +import it.polimi.ingsw.utils.Pair;
    +
    +/**
    + * This response is sent to each player when the match is finished
    + */
    +public final class MatchFinishedMessage extends ResponseMessage {
    +    private final List<LeaderboardEntry> ranking;
    +
    +    /**
    +     * @return a list of JSONObject with properties
    +     * username (String) - username of the current player
    +     * points (Integer) - total number of points gained during the match
    +     * winner (boolean) - if the current player is also the winner of the game
    +     */
    +    public List<LeaderboardEntry> getRanking() {
    +        return ranking;
    +    }
    +
    +    public MatchFinishedMessage(List<Pair<Player, Boolean>> finalRanking) {
    +        super(null);
    +        ranking = finalRanking.stream().map(p -> createLeaderboardEntry(p.first(), p.second())).collect(Collectors.toList());
    +    }
    +
    +    private LeaderboardEntry createLeaderboardEntry(Player p, Boolean b) {
    +        return new LeaderboardEntry(p.getUsername(), p.getPoints(), b);
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchResumedMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchResumedMessage.html new file mode 100644 index 00000000..18125f8c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchResumedMessage.html @@ -0,0 +1 @@ +MatchResumedMessage

    MatchResumedMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total70 of 700%0 of 0n/a121224241212
    MatchResumedMessage(Map, Map, Pair, Map, Pair, Integer, Map, Map, Map, String, boolean)370%n/a11131311
    getPlayersUsernamesAndPawns()30%n/a111111
    getPlayersHands()30%n/a111111
    getVisibleObjectives()30%n/a111111
    getVisiblePlayableCards()30%n/a111111
    getDecksTopReigns()30%n/a111111
    getSecretObjective()30%n/a111111
    getAvailableResources()30%n/a111111
    getPlacedCards()30%n/a111111
    getPlayerPoints()30%n/a111111
    getCurrentPlayer()30%n/a111111
    isDrawPhase()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchResumedMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchResumedMessage.java.html new file mode 100644 index 00000000..3fde9c1c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchResumedMessage.java.html @@ -0,0 +1,126 @@ +MatchResumedMessage.java

    MatchResumedMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +import java.util.List;
    +import java.util.Map;
    +import it.polimi.ingsw.gamemodel.Color;
    +import it.polimi.ingsw.gamemodel.DrawSource;
    +import it.polimi.ingsw.gamemodel.Symbol;
    +import it.polimi.ingsw.utils.Pair;
    +import it.polimi.ingsw.utils.PlacedCardRecord;
    +
    +/**
    + * This response is sent to the user who just rejoined a match. All the parameters refer to the
    + * status of the match before the server crashed
    + */
    +public final class MatchResumedMessage extends ResponseMessage {
    +    private final Map<String, Color> playersUsernamesAndPawns;
    +    private final Map<String, List<Integer>> playersHands;
    +    private final Pair<Integer, Integer> visibleObjectives;
    +    private final Map<DrawSource, Integer> visiblePlayableCards;
    +    private final Pair<Symbol, Symbol> decksTopReigns;
    +    private final Integer secretObjective;
    +    private final Map<String, Map<Symbol, Integer>> availableResources;
    +    private final Map<String, Map<Integer, PlacedCardRecord>> placedCards;
    +    private final Map<String, Integer> playerPoints;
    +    private final String currentPlayer;
    +    private final boolean drawPhase;
    +
    +    public MatchResumedMessage(Map<String, Color> playersUsernamesAndPawns,
    +            Map<String, List<Integer>> playersHands, Pair<Integer, Integer> visibleObjectives,
    +            Map<DrawSource, Integer> visiblePlayableCards, Pair<Symbol, Symbol> decksTopReigns,
    +            Integer secretObjective, Map<String, Map<Symbol, Integer>> availableResources,
    +            Map<String, Map<Integer, PlacedCardRecord>> placedCards,
    +            Map<String, Integer> playerPoints, String currentPlayer, boolean drawPhase) {
    +        super(null);
    +        this.playersUsernamesAndPawns = playersUsernamesAndPawns;
    +        this.playersHands = playersHands;
    +        this.visibleObjectives = visibleObjectives;
    +        this.visiblePlayableCards = visiblePlayableCards;
    +        this.decksTopReigns = decksTopReigns;
    +        this.secretObjective = secretObjective;
    +        this.availableResources = availableResources;
    +        this.placedCards = placedCards;
    +        this.playerPoints = playerPoints;
    +        this.currentPlayer = currentPlayer;
    +        this.drawPhase = drawPhase;
    +    }
    +
    +
    +    /**
    +     * @return A map from players' username to pawn color
    +     */
    +    public Map<String, Color> getPlayersUsernamesAndPawns() {
    +        return playersUsernamesAndPawns;
    +    }
    +
    +    /**
    +     * @return A map from players' username to their hand
    +     */
    +    public Map<String, List<Integer>> getPlayersHands() {
    +        return playersHands;
    +    }
    +
    +    /**
    +     * @return The two visible objectives common to every player
    +     */
    +    public Pair<Integer, Integer> getVisibleObjectives() {
    +        return visibleObjectives;
    +    }
    +
    +    /**
    +     * @return The four drawable cards visible to everyone
    +     */
    +    public Map<DrawSource, Integer> getVisiblePlayableCards() {
    +        return visiblePlayableCards;
    +    }
    +
    +    /**
    +     * @return The reign of the two decks (resource and gold)
    +     */
    +    public Pair<Symbol, Symbol> getDecksTopReigns() {
    +        return decksTopReigns;
    +    }
    +
    +    /**
    +     * @return The secret objective ID of the player
    +     */
    +    public Integer getSecretObjective() {
    +        return secretObjective;
    +    }
    +
    +    /**
    +     * @return A map from players' username to their available resources
    +     */
    +    public Map<String, Map<Symbol, Integer>> getAvailableResources() {
    +        return availableResources;
    +    }
    +
    +    /**
    +     * @return A map from players' username to their board
    +     */
    +    public Map<String, Map<Integer, PlacedCardRecord>> getPlacedCards() {
    +        return placedCards;
    +    }
    +
    +    /**
    +     * @return A map from players' username to their points
    +     */
    +    public Map<String, Integer> getPlayerPoints() {
    +        return playerPoints;
    +    }
    +
    +    /**
    +     * @return Username of the player currently playing his turn
    +     */
    +    public String getCurrentPlayer() {
    +        return currentPlayer;
    +    }
    +
    +    /**
    +     * @return Whether the current player should play or draw a card
    +     */
    +    public boolean isDrawPhase() {
    +        return drawPhase;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchStartedMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchStartedMessage.html new file mode 100644 index 00000000..76924528 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchStartedMessage.html @@ -0,0 +1 @@ +MatchStartedMessage

    MatchStartedMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total15 of 14089%0 of 2100%5952458
    getVisibleObjectives()30%n/a111111
    getVisibleCards()30%n/a111111
    getVisibleDeckReigns()30%n/a111111
    getPlayerHands()30%n/a111111
    getPlayerPawnColors()30%n/a111111
    MatchStartedMessage(Pair, Map, Pair, List)114100%2100%0201901
    lambda$new$0(DrawSource, PlayableCard)8100%n/a010101
    lambda$new$1(int)3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchStartedMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchStartedMessage.java.html new file mode 100644 index 00000000..59a75363 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/MatchStartedMessage.java.html @@ -0,0 +1,90 @@ +MatchStartedMessage.java

    MatchStartedMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.utils.Pair;
    +
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * Sent when the required amount of players is reached and the match is about to start.
    + */
    +public final class MatchStartedMessage extends ResponseMessage {
    +    private final Integer[] visibleObjectives;
    +    private final Map<DrawSource, Integer> visibleCards;
    +    private final Symbol[] visibleDeckReigns;
    +    private final Map<String, Integer[]> playerHands;
    +    private final Map<String, Color> playerPawnColors;
    +
    +    /**
    +     * @return IDs of the visible objectives
    +     */
    +    public Integer[] getVisibleObjectives() {
    +        return visibleObjectives;
    +    }
    +
    +    /**
    +     * @return a Map that maps to each visible draw source the ID of the card
    +     */
    +    public Map<DrawSource, Integer> getVisibleCards() {
    +        return visibleCards;
    +    }
    +
    +    /**
    +     * @return Array of Symbol that contains the reign of top-card
    +     * of both the gold and the resource deck, in the first and second slot respectively
    +     */
    +    public Symbol[] getVisibleDeckReigns() {
    +        return visibleDeckReigns;
    +    }
    +
    +    /**
    +     * @return Map mapping to each player username, the list of the cards they have in the hand
    +     */
    +    public Map<String, Integer[]> getPlayerHands() {
    +        return playerHands;
    +    }
    +
    +    /**
    +     * @return Map containing for each palyer username, the Color of their pawn
    +     */
    +    public Map<String, Color> getPlayerPawnColors() {
    +        return playerPawnColors;
    +    }
    +
    +
    +    /**
    +     * Calculates the needed parameters given some information from the match
    +     *
    +     * @param objectives Pair containing the two visible objectives
    +     * @param cards      Map that for each visible draw source maps the visible card
    +     * @param deckReigns Pair containing the reign of the two visible cards on top of the deck.
    +     *                   The first is for the Golds deck, while the second for the resources deck.
    +     * @param players    List of the players in the match
    +     */
    +    public MatchStartedMessage(Pair<Objective, Objective> objectives, Map<DrawSource, PlayableCard> cards, Pair<Symbol, Symbol> deckReigns, List<Player> players) {
    +        super(null);
    +        this.visibleObjectives = new Integer[]{null, null};
    +        this.visibleDeckReigns = new Symbol[]{null, null};
    +        visibleObjectives[0] = objectives.first().getID();
    +        visibleObjectives[1] = objectives.second().getID();
    +        visibleCards = new HashMap<>();
    +        cards.forEach((d, c) -> visibleCards.put(d, c.getId()));
    +        visibleDeckReigns[0] = deckReigns.first();
    +        visibleDeckReigns[1] = deckReigns.second();
    +        // Calculate player hands and colors
    +        playerHands = new HashMap<String, Integer[]>();
    +        playerPawnColors = new HashMap<String, Color>();
    +        for (Player p : players) {
    +            Integer[] result;
    +            result = p.getBoard().getCurrentHand().stream()
    +                    .mapToInt(Card::getId)
    +                    .boxed().toArray(Integer[]::new);
    +            playerPawnColors.put(p.getUsername(), p.getPawnColor());
    +            playerHands.put(p.getUsername(), result);
    +        }
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/ResponseMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/ResponseMessage.html new file mode 100644 index 00000000..130ca0b4 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/ResponseMessage.html @@ -0,0 +1 @@ +ResponseMessage

    ResponseMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total6 of 2070%0 of 0n/a232623
    getUsername()30%n/a111111
    getResponse()30%n/a111111
    ResponseMessage(String)14100%n/a010401
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/ResponseMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/ResponseMessage.java.html new file mode 100644 index 00000000..020567f4 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/ResponseMessage.java.html @@ -0,0 +1,36 @@ +ResponseMessage.java

    ResponseMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +import it.polimi.ingsw.network.messages.Message;
    +
    +/**
    + * Messages sent from the server to the clients to update them about another
    + * user's move or to the consequence of their action
    + */
    +public sealed class ResponseMessage extends Message permits AvailableMatchesMessage, MatchFinishedMessage, MatchStartedMessage,
    +        SomeoneJoinedMessage, SomeoneQuitMessage, SomeoneChoseSecretObjectiveMessage, SomeoneDrewCardMessage, SomeoneDrewInitialCardMessage,
    +        SomeoneDrewSecretObjectivesMessage, SomeonePlayedCardMessage, SomeoneSetInitialSideMessage,
    +        SomeoneSentBroadcastTextMessage, SomeoneSentPrivateTextMessage, MatchResumedMessage {
    +    private final String username;
    +    private final String response = this.getClass().getSimpleName().replace("Message", "");
    +
    +    /**
    +     * @return username of the user that did the action
    +     * null if not specified by the protocol
    +     */
    +    public String getUsername() {
    +        return username;
    +    }
    +
    +    /**
    +     * @return repsonse type
    +     */
    +    public String getResponse() {
    +        return response;
    +    }
    +
    +    public ResponseMessage(String username) {
    +        this.username = username;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneChoseSecretObjectiveMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneChoseSecretObjectiveMessage.html new file mode 100644 index 00000000..56c20ca8 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneChoseSecretObjectiveMessage.html @@ -0,0 +1 @@ +SomeoneChoseSecretObjectiveMessage

    SomeoneChoseSecretObjectiveMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total10 of 100%0 of 0n/a224422
    SomeoneChoseSecretObjectiveMessage(String, Integer)70%n/a113311
    getObjectiveID()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneChoseSecretObjectiveMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneChoseSecretObjectiveMessage.java.html new file mode 100644 index 00000000..56e67083 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneChoseSecretObjectiveMessage.java.html @@ -0,0 +1,22 @@ +SomeoneChoseSecretObjectiveMessage.java

    SomeoneChoseSecretObjectiveMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +/**
    + * This response is sent to each user in the match when a user chooses his secret objective.
    + */
    +public final class SomeoneChoseSecretObjectiveMessage extends ResponseMessage {
    +    private final Integer objectiveID;
    +
    +    /**
    +     * @return ID of the chosen objective. Is null if the player it is sent to not the current player
    +     */
    +    public Integer getObjectiveID() {
    +        return objectiveID;
    +    }
    +
    +    public SomeoneChoseSecretObjectiveMessage(String username, Integer objectiveID) {
    +        super(username);
    +        this.objectiveID = objectiveID;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewCardMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewCardMessage.html new file mode 100644 index 00000000..c196d82c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewCardMessage.html @@ -0,0 +1 @@ +SomeoneDrewCardMessage

    SomeoneDrewCardMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total40 of 400%4 of 40%77121255
    SomeoneDrewCardMessage(String, DrawSource, Integer, Integer, Pair)280%40%338811
    getDrawSource()30%n/a111111
    getCardID()30%n/a111111
    getReplacementCardID()30%n/a111111
    getDeckTopReigns()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewCardMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewCardMessage.java.html new file mode 100644 index 00000000..3536addf --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewCardMessage.java.html @@ -0,0 +1,59 @@ +SomeoneDrewCardMessage.java

    SomeoneDrewCardMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +import it.polimi.ingsw.gamemodel.DrawSource;
    +import it.polimi.ingsw.gamemodel.Symbol;
    +import it.polimi.ingsw.utils.Pair;
    +
    +import javax.swing.plaf.synth.SynthButtonUI;
    +
    +/**
    + * This response is sent to each user in the match when a user draws a card.
    + */
    +public final class SomeoneDrewCardMessage extends ResponseMessage {
    +    private final DrawSource drawSource;
    +    private final Integer cardID;
    +    private final Integer replacementCardID;
    +    private final Pair<Symbol, Symbol> deckTopReigns;
    +
    +    /**
    +     * @return Source from which the card is drawn.
    +     */
    +    public DrawSource getDrawSource() {
    +        return drawSource;
    +    }
    +
    +    /**
    +     * @return ID of the card drawn by the player
    +     */
    +    public Integer getCardID() {
    +        return cardID;
    +    }
    +
    +    /**
    +     * @return ID of the card that replaced the drawn card. Not available if the source is GOLDS_DECK or RESOURCES_DECK
    +     */
    +    public Integer getReplacementCardID() {
    +        return replacementCardID;
    +    }
    +
    +    /**
    +     * @return Reign of the replaced card
    +     */
    +    public Pair<Symbol, Symbol> getDeckTopReigns() {
    +        return deckTopReigns;
    +    }
    +
    +    public SomeoneDrewCardMessage(String username, DrawSource source, Integer cardID, Integer replacementCardID, Pair<Symbol, Symbol> deckTopReigns) {
    +        super(username);
    +        this.drawSource = source;
    +        this.cardID = cardID;
    +        this.deckTopReigns = deckTopReigns;
    +        if (!source.equals(DrawSource.GOLDS_DECK) && !source.equals(DrawSource.RESOURCES_DECK)) {
    +            this.replacementCardID = replacementCardID;
    +        } else {
    +            this.replacementCardID = null;
    +        }
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewInitialCardMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewInitialCardMessage.html new file mode 100644 index 00000000..fb6ffd84 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewInitialCardMessage.html @@ -0,0 +1 @@ +SomeoneDrewInitialCardMessage

    SomeoneDrewInitialCardMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total10 of 100%0 of 0n/a224422
    SomeoneDrewInitialCardMessage(String, Integer)70%n/a113311
    getInitialCardID()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewInitialCardMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewInitialCardMessage.java.html new file mode 100644 index 00000000..a452989d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewInitialCardMessage.java.html @@ -0,0 +1,20 @@ +SomeoneDrewInitialCardMessage.java

    SomeoneDrewInitialCardMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +/**
    + * This response is sent to each user in the match when a user draws an initial card.
    + */
    +public final class SomeoneDrewInitialCardMessage extends ResponseMessage {
    +    private final Integer initialCardID;
    +
    +    public SomeoneDrewInitialCardMessage(String username, Integer initialCardID) {
    +        super(username);
    +        this.initialCardID = initialCardID;
    +    }
    +
    +    /* ID of the given initial card */
    +    public Integer getInitialCardID() {
    +        return initialCardID;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewSecretObjectivesMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewSecretObjectivesMessage.html new file mode 100644 index 00000000..fbff7850 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewSecretObjectivesMessage.html @@ -0,0 +1 @@ +SomeoneDrewSecretObjectivesMessage

    SomeoneDrewSecretObjectivesMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total3 of 2085%0 of 0n/a131613
    getSecondID()30%n/a111111
    SomeoneDrewSecretObjectivesMessage(String, Pair)14100%n/a010401
    getFirstID()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewSecretObjectivesMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewSecretObjectivesMessage.java.html new file mode 100644 index 00000000..5498a063 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneDrewSecretObjectivesMessage.java.html @@ -0,0 +1,31 @@ +SomeoneDrewSecretObjectivesMessage.java

    SomeoneDrewSecretObjectivesMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +import it.polimi.ingsw.utils.Pair;
    +
    +/**
    + * This response is sent to each user in the match when a user draws the two secret objectives.
    + */
    +public final class SomeoneDrewSecretObjectivesMessage extends ResponseMessage {
    +    private final Integer firstID, secondID;
    +
    +    /**
    +     * @return ID of the first objective card drawn. Is null if the player it is sent to not the current player
    +     */
    +    public Integer getFirstID() {
    +        return firstID;
    +    }
    +
    +    /**
    +     * @return ID of the second objective card drawn. Is null if the player it is sent to not the current player
    +     */
    +    public Integer getSecondID() {
    +        return secondID;
    +    }
    +
    +    public SomeoneDrewSecretObjectivesMessage(String username, Pair<Integer, Integer> IDs) {
    +        super(username);
    +        this.firstID = IDs.first();
    +        this.secondID = IDs.second();
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneJoinedMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneJoinedMessage.html new file mode 100644 index 00000000..a1318659 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneJoinedMessage.html @@ -0,0 +1 @@ +SomeoneJoinedMessage

    SomeoneJoinedMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total6 of 2070%0 of 0n/a232623
    getJoinedPlayers()30%n/a111111
    getMaxPlayers()30%n/a111111
    SomeoneJoinedMessage(String, List, int)14100%n/a010401
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneJoinedMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneJoinedMessage.java.html new file mode 100644 index 00000000..a7e3f543 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneJoinedMessage.java.html @@ -0,0 +1,34 @@ +SomeoneJoinedMessage.java

    SomeoneJoinedMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +import it.polimi.ingsw.gamemodel.Player;
    +
    +import java.util.List;
    +
    +/**
    + * This response is sent when a player joins the current match.
    + */
    +public final class SomeoneJoinedMessage extends ResponseMessage {
    +    private final List<String> joinedPlayers;
    +    private final int maxPlayers;
    +
    +    public SomeoneJoinedMessage(String username, List<Player> joinedPlayers, int maxPlayers) {
    +        super(username);
    +        this.joinedPlayers = joinedPlayers.stream().map(Player::getUsername).toList();
    +        this.maxPlayers = maxPlayers;
    +    }
    +
    +    /**
    +     * @return Usernames of players currently in the match
    +     */
    +    public List<String> getJoinedPlayers() {
    +        return joinedPlayers;
    +    }
    +
    +    /**
    +     * @return Maximum amount of players the match can hold
    +     */
    +    public int getMaxPlayers() {
    +        return maxPlayers;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeonePlayedCardMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeonePlayedCardMessage.html new file mode 100644 index 00000000..3a8b64bb --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeonePlayedCardMessage.html @@ -0,0 +1 @@ +SomeonePlayedCardMessage

    SomeonePlayedCardMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total45 of 450%0 of 0n/a77141477
    SomeonePlayedCardMessage(String, Pair, Integer, Side, int, Map)270%n/a118811
    getX()30%n/a111111
    getY()30%n/a111111
    getCardID()30%n/a111111
    getSide()30%n/a111111
    getPoints()30%n/a111111
    getAvailableResources()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeonePlayedCardMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeonePlayedCardMessage.java.html new file mode 100644 index 00000000..44131a91 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeonePlayedCardMessage.java.html @@ -0,0 +1,71 @@ +SomeonePlayedCardMessage.java

    SomeonePlayedCardMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +import java.util.Map;
    +import it.polimi.ingsw.gamemodel.Side;
    +import it.polimi.ingsw.gamemodel.Symbol;
    +import it.polimi.ingsw.utils.Pair;
    +
    +/**
    + * SomeonePlayedCardMessage
    + */
    +public final class SomeonePlayedCardMessage extends ResponseMessage {
    +    private final Integer x, y;
    +    private final Integer cardID;
    +    private final Side side;
    +    private final Integer points;
    +    private final Map<Symbol, Integer> availableResources;
    +
    +    /**
    +     * @return x coordinate of the played card
    +     */
    +    public Integer getX() {
    +        return x;
    +    }
    +
    +    /**
    +     * @return y coordinate of the played card
    +     */
    +    public Integer getY() {
    +        return y;
    +    }
    +
    +    /**
    +     * @return ID of the played card
    +     */
    +    public Integer getCardID() {
    +        return cardID;
    +    }
    +
    +    /**
    +     * @return Side in which the card has been played. It can be either FRONT or BACK
    +     */
    +    public Side getSide() {
    +        return side;
    +    }
    +
    +    /**
    +     * @return Total points of the player after he placed the card
    +     */
    +    public Integer getPoints() {
    +        return points;
    +    }
    +
    +    /**
    +     * @return Resources possessed by the player after he placed the card
    +     */
    +    public Map<Symbol, Integer> getAvailableResources() {
    +        return availableResources;
    +    }
    +
    +    public SomeonePlayedCardMessage(String username, Pair<Integer, Integer> coords, Integer cardID, Side side, int points, Map<Symbol, Integer> availableResources) {
    +        super(username);
    +        this.x = coords.first();
    +        this.y = coords.second();
    +        this.cardID = cardID;
    +        this.side = side;
    +        this.points = points;
    +        this.availableResources = availableResources;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneQuitMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneQuitMessage.html new file mode 100644 index 00000000..7a4ae522 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneQuitMessage.html @@ -0,0 +1 @@ +SomeoneQuitMessage

    SomeoneQuitMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total6 of 1662%0 of 0n/a232623
    getJoinedPlayers()30%n/a111111
    isEndMatch()30%n/a111111
    SomeoneQuitMessage(String, int, boolean)10100%n/a010401
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneQuitMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneQuitMessage.java.html new file mode 100644 index 00000000..a3f4ebcf --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneQuitMessage.java.html @@ -0,0 +1,30 @@ +SomeoneQuitMessage.java

    SomeoneQuitMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +/**
    + * This response is sent when a player quits the current match.
    + */
    +public final class SomeoneQuitMessage extends ResponseMessage {
    +    private final int joinedPlayers;
    +    private final boolean endMatch;
    +
    +    public SomeoneQuitMessage(String username, int joinedPlayers, boolean endMatch) {
    +        super(username);
    +        this.joinedPlayers = joinedPlayers;
    +        this.endMatch = endMatch;
    +    }
    +
    +    /**
    +     * @return Username of the player that just quit the match
    +     */
    +    public int getJoinedPlayers() {
    +        return joinedPlayers;
    +    }
    +
    +    /**
    +     * @return true if the quit caused the match to interrupt, false otherwise
    +     */
    +    public boolean isEndMatch() {
    +        return endMatch;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentBroadcastTextMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentBroadcastTextMessage.html new file mode 100644 index 00000000..1de98e11 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentBroadcastTextMessage.html @@ -0,0 +1 @@ +SomeoneSentBroadcastTextMessage

    SomeoneSentBroadcastTextMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total3 of 1070%0 of 0n/a121412
    getText()30%n/a111111
    SomeoneSentBroadcastTextMessage(String, String)7100%n/a010301
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentBroadcastTextMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentBroadcastTextMessage.java.html new file mode 100644 index 00000000..d57c4821 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentBroadcastTextMessage.java.html @@ -0,0 +1,19 @@ +SomeoneSentBroadcastTextMessage.java

    SomeoneSentBroadcastTextMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +/**
    + * SomeoneSentBroadcastTextMessage
    + */
    +public final class SomeoneSentBroadcastTextMessage extends ResponseMessage {
    +    private final String text;
    +
    +    public SomeoneSentBroadcastTextMessage(String username, String text) {
    +        super(username);
    +        this.text = text;
    +    }
    +
    +    public String getText() {
    +        return text;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentPrivateTextMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentPrivateTextMessage.html new file mode 100644 index 00000000..d50e4af9 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentPrivateTextMessage.html @@ -0,0 +1 @@ +SomeoneSentPrivateTextMessage

    SomeoneSentPrivateTextMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total6 of 1662%0 of 0n/a232623
    getRecipient()30%n/a111111
    getText()30%n/a111111
    SomeoneSentPrivateTextMessage(String, String, String)10100%n/a010401
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentPrivateTextMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentPrivateTextMessage.java.html new file mode 100644 index 00000000..4f2eb823 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSentPrivateTextMessage.java.html @@ -0,0 +1,25 @@ +SomeoneSentPrivateTextMessage.java

    SomeoneSentPrivateTextMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +/**
    + * SomeoneSentPrivateTextMessage
    + */
    +public final class SomeoneSentPrivateTextMessage extends ResponseMessage {
    +    private final String recipient;
    +    private final String text;
    +
    +    public SomeoneSentPrivateTextMessage(String sender, String recipient, String text) {
    +        super(sender);
    +        this.recipient = recipient;
    +        this.text = text;
    +    }
    +
    +    public String getRecipient() {
    +        return recipient;
    +    }
    +
    +    public String getText() {
    +        return text;
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSetInitialSideMessage.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSetInitialSideMessage.html new file mode 100644 index 00000000..780bc6ce --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSetInitialSideMessage.html @@ -0,0 +1 @@ +SomeoneSetInitialSideMessage

    SomeoneSetInitialSideMessage

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total16 of 160%0 of 0n/a336633
    SomeoneSetInitialSideMessage(String, Side, Map)100%n/a114411
    getAvailableResources()30%n/a111111
    getSide()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSetInitialSideMessage.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSetInitialSideMessage.java.html new file mode 100644 index 00000000..58554c67 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/SomeoneSetInitialSideMessage.java.html @@ -0,0 +1,34 @@ +SomeoneSetInitialSideMessage.java

    SomeoneSetInitialSideMessage.java

    package it.polimi.ingsw.network.messages.responses;
    +
    +import java.util.Map;
    +import it.polimi.ingsw.gamemodel.Side;
    +import it.polimi.ingsw.gamemodel.Symbol;
    +
    +/**
    + * This response is sent to each user in the match when a user chosees the initial side of a card.
    + */
    +public final class SomeoneSetInitialSideMessage extends ResponseMessage {
    +    private final Side side;
    +    private final Map<Symbol, Integer> availableResources;
    +
    +    /**
    +     * @return Available resources of player after setting the initial card
    +     */
    +    public Map<Symbol, Integer> getAvailableResources() {
    +        return availableResources;
    +    }
    +
    +    /**
    +     * @return Side of the initial card.
    +     */
    +    public Side getSide() {
    +        return side;
    +    }
    +
    +    public SomeoneSetInitialSideMessage(String username, Side side, Map<Symbol, Integer> availableResources) {
    +        super(username);
    +        this.side = side;
    +        this.availableResources = availableResources;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/index.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/index.html new file mode 100644 index 00000000..336d2e73 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.network.messages.responses

    it.polimi.ingsw.network.messages.responses

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total276 of 50945%4 of 633%5367851335164715
    MatchResumedMessage700%n/a12122424121211
    SomeonePlayedCardMessage450%n/a7714147711
    SomeoneDrewCardMessage400%40%7712125511
    MatchFinishedMessage370%n/a44554411
    SomeoneSetInitialSideMessage160%n/a33663311
    MatchStartedMessage1512589%2100%595245801
    SomeoneChoseSecretObjectiveMessage100%n/a22442211
    SomeoneDrewInitialCardMessage100%n/a22442211
    ResponseMessage61470%n/a23262301
    SomeoneJoinedMessage61470%n/a23262301
    SomeoneQuitMessage61062%n/a23262301
    SomeoneSentPrivateTextMessage61062%n/a23262301
    AvailableMatchesMessage33692%n/a14161401
    SomeoneDrewSecretObjectivesMessage31785%n/a13161301
    SomeoneSentBroadcastTextMessage3770%n/a12141201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages.responses/index.source.html b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/index.source.html new file mode 100644 index 00000000..29f8efb3 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages.responses/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.network.messages.responses

    it.polimi.ingsw.network.messages.responses

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total276 of 50945%4 of 633%5367851335164715
    MatchResumedMessage.java700%n/a12122424121211
    SomeonePlayedCardMessage.java450%n/a7714147711
    SomeoneDrewCardMessage.java400%40%7712125511
    MatchFinishedMessage.java370%n/a44554411
    SomeoneSetInitialSideMessage.java160%n/a33663311
    MatchStartedMessage.java1512589%2100%595245801
    SomeoneChoseSecretObjectiveMessage.java100%n/a22442211
    SomeoneDrewInitialCardMessage.java100%n/a22442211
    ResponseMessage.java61470%n/a23262301
    SomeoneJoinedMessage.java61470%n/a23262301
    SomeoneQuitMessage.java61062%n/a23262301
    SomeoneSentPrivateTextMessage.java61062%n/a23262301
    AvailableMatchesMessage.java33692%n/a14161401
    SomeoneDrewSecretObjectivesMessage.java31785%n/a13161301
    SomeoneSentBroadcastTextMessage.java3770%n/a12141201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages/Message.html b/deliveries/Test results/it.polimi.ingsw.network.messages/Message.html new file mode 100644 index 00000000..c8a49602 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages/Message.html @@ -0,0 +1 @@ +Message

    Message

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 3100%0 of 0n/a010101
    Message()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages/Message.java.html b/deliveries/Test results/it.polimi.ingsw.network.messages/Message.java.html new file mode 100644 index 00000000..e943a1d4 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages/Message.java.html @@ -0,0 +1,8 @@ +Message.java

    Message.java

    package it.polimi.ingsw.network.messages;
    +
    +/**
    + * Message
    + */
    +public abstract class Message {
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages/index.html b/deliveries/Test results/it.polimi.ingsw.network.messages/index.html new file mode 100644 index 00000000..b1975172 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.network.messages

    it.polimi.ingsw.network.messages

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total0 of 3100%0 of 0n/a01010101
    Message3100%n/a01010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.messages/index.source.html b/deliveries/Test results/it.polimi.ingsw.network.messages/index.source.html new file mode 100644 index 00000000..712272d5 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.messages/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.network.messages

    it.polimi.ingsw.network.messages

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total0 of 3100%0 of 0n/a01010101
    Message.java3100%n/a01010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientListener.html b/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientListener.html new file mode 100644 index 00000000..774c62c1 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientListener.html @@ -0,0 +1 @@ +ClientListener

    ClientListener

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total109 of 37370%14 of 2951%152937113110
    executeRequest(String)724136%8327%810233501
    setPlayerController()179785%2675%2663601
    sendError(String, Exception)130%n/a114411
    ClientListener(Socket, Server)54590%n/a0121501
    listen()12996%2466%2411001
    close(Match)12095%2250%231701
    createPlayerController(String, Match)13100%n/a010301
    lambda$new$1(Integer, GoldCard)7100%n/a010101
    lambda$new$0(Integer, ResourceCard)7100%n/a010101
    run()5100%n/a010301
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientListener.java.html b/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientListener.java.html new file mode 100644 index 00000000..48302e3d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientListener.java.html @@ -0,0 +1,268 @@ +ClientListener.java

    ClientListener.java

    package it.polimi.ingsw.network.tcp;
    +
    +import java.io.IOException;
    +import java.net.Socket;
    +import java.util.HashMap;
    +import java.util.Map;
    +import com.google.gson.JsonParseException;
    +import it.polimi.ingsw.controllers.PlayerControllerTCP;
    +import it.polimi.ingsw.exceptions.AlreadyUsedUsernameException;
    +import it.polimi.ingsw.exceptions.ChosenMatchException;
    +import it.polimi.ingsw.exceptions.WrongNameException;
    +import it.polimi.ingsw.exceptions.WrongStateException;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.network.messages.actions.*;
    +import it.polimi.ingsw.network.messages.errors.ErrorMessage;
    +import it.polimi.ingsw.network.messages.responses.AvailableMatchesMessage;
    +import it.polimi.ingsw.network.messages.responses.ResponseMessage;
    +import it.polimi.ingsw.server.Server;
    +import it.polimi.ingsw.utils.CardsManager;
    +import it.polimi.ingsw.utils.MessageJsonParser;
    +import it.polimi.ingsw.utils.Pair;
    +
    +/*
    + * actual connection procedure: - socket accepted - socket asks for available matches, giving its
    + * name to server - when received, it communicates which match it wants to join - only then a
    + * PlayerController will be created, with said match - from there the constructor is done, a player
    + * has joined and it just has to listen
    + */
    +
    +/**
    + * Every time a socket gets accepted by the TCP server, a new ClientListener will be created with
    + * it, and it will:
    + * <ul>
    + * <li>Acquire the client's username
    + * <li>Make the client (which is still not a {@link Player}) choose/create a {@link Match} to join
    + * <li>Create its {@link PlayerControllerTCP}, which will also make him join such {@link Match}
    + * <li>Listen for any message received and, execute the corresponding action.
    + * </ul>
    + * 
    + * Note that this will just require the action to be executed, but it's {@link PlayerControllerTCP}
    + * that actually calls the {@link Player} methods
    + */
    +public class ClientListener extends Thread {
    +    private Socket socket;
    +    private PlayerControllerTCP playerController;
    +    private MessageJsonParser parser;
    +    private IOHandler io;
    +    private Server server;
    +    private Match match;
    +    private Map<Integer, Objective> objectives;
    +    private Map<Integer, PlayableCard> playableCards;
    +
    +    /**
    +     * Class constructor. Needs to have a reference to the server instance since it needs to handle
    +     * the match assignment
    +     *
    +     * @param socket the socket that required a connection
    +     * @param server the instance of {@link Server} that's running
    +     */
    +    public ClientListener(Socket socket, Server server) {
    +        try {
    +            this.socket = socket;
    +            this.io = new IOHandler(this.socket);
    +            this.server = server;
    +            this.parser = new MessageJsonParser();
    +
    +            this.objectives = CardsManager.getInstance().getObjectives();
    +            Map<Integer, ResourceCard> resources = CardsManager.getInstance().getResourceCards();
    +            Map<Integer, GoldCard> golds = CardsManager.getInstance().getGoldCards();
    +
    +            this.playableCards = new HashMap<>();
    +            resources.forEach((id, card) -> this.playableCards.put(id, card));
    +            golds.forEach((id, card) -> this.playableCards.put(id, card));
    +
    +        } catch (IOException e) {
    +            this.sendError("Failed to create Listener thread", e);
    +        }
    +    }
    +
    +
    +    /**
    +     * Sends error message with custom text
    +     *
    +     * @param prompt the text to be shown
    +     * @param exception the exception type
    +     */
    +    private void sendError(String prompt, Exception exception) {
    +        try {
    +            this.io.writeMsg(new ErrorMessage(prompt, exception.getClass().getName()));
    +        } catch (Exception ignored) {
    +        }
    +    }
    +
    +
    +    /**
    +     * Loops until a player controller is created
    +     *
    +     * @throws IOException if there was an I/O error
    +     */
    +    private void setPlayerController() {
    +        ActionMessage msg;
    +        String username = null;
    +        Match match = null;
    +        ResponseMessage availableMatches;
    +        boolean shouldLoop = true;
    +
    +        while (shouldLoop) {
    +            try {
    +                msg = (ActionMessage) this.parser.toMessage(this.io.readMsg());
    +                if (msg == null) {
    +                    shouldLoop = false;
    +                } else {
    +                    switch (msg) {
    +                        case GetAvailableMatchesMessage getAvailableMatchesMessage:
    +                            username = getAvailableMatchesMessage.getUsername();
    +                            availableMatches = new AvailableMatchesMessage(
    +                                    this.server.getJoinableMatchesMap());
    +                            this.io.writeMsg(availableMatches);
    +                            break;
    +
    +                        case CreateMatchMessage createMatchMessage:
    +                            username = createMatchMessage.getUsername();
    +                            this.server.createMatch(createMatchMessage.getMatchName(),
    +                                    createMatchMessage.getMaxPlayers());
    +                            match = this.server.getMatch(createMatchMessage.getMatchName());
    +
    +                            this.createPlayerController(username, match);
    +                            shouldLoop = false;
    +                            break;
    +
    +                        case JoinMatchMessage joinMatchMessage:
    +                            username = joinMatchMessage.getUsername();
    +                            match = this.server.getMatch(joinMatchMessage.getMatchName());
    +
    +                            this.createPlayerController(username, match);
    +                            shouldLoop = false;
    +                            break;
    +
    +                        default:
    +                            break;
    +                    }
    +                }
    +            } catch (JsonParseException | ClassNotFoundException e) {
    +                // message is not correctly formatted, ignore
    +            } catch (ChosenMatchException | WrongStateException | AlreadyUsedUsernameException
    +                    | IllegalArgumentException | WrongNameException e) {
    +                this.sendError(e.getMessage(), e);
    +            } catch (IOException e) {
    +                this.close(match);
    +            }
    +        }
    +        this.match = match;
    +    }
    +
    +
    +    /**
    +     * Tries to actually create the player controller with the acquired information
    +     *
    +     * @param username The chosen username
    +     * @param match The match to join
    +     * @throws AlreadyUsedUsernameException If the match already contains the chosen username
    +     * @throws WrongStateException If the match currently does not accept new players
    +     * @throws ChosenMatchException If the match does not exist or is not valid
    +     */
    +    private void createPlayerController(String username, Match match)
    +            throws AlreadyUsedUsernameException, IllegalArgumentException, WrongStateException,
    +            ChosenMatchException, WrongNameException {
    +        this.playerController = new PlayerControllerTCP(username, match, this.io);
    +        this.playerController.sendJoined();
    +    }
    +
    +    /**
    +     * This parses the message received from socket's input stream and executes the request such
    +     * message carried. If the message is not one of the expected types, it will just be ignored
    +     *
    +     * @param msg The received message (received as a string)
    +     *
    +     * @see ActionMessage
    +     */
    +    private void executeRequest(String msg) {
    +        try {
    +
    +            ActionMessage message = (ActionMessage) parser.toMessage(msg);
    +            if (msg != null) {
    +                switch (message) {
    +                    case ChooseSecretObjectiveMessage actionMsg:
    +                        this.playerController.chooseSecretObjective(
    +                                this.objectives.get(actionMsg.getObjectiveID()));
    +                        break;
    +                    case ChooseInitialCardSideMessage actionMsg:
    +                        this.playerController.chooseInitialCardSide(actionMsg.getSide());
    +                        break;
    +                    case DrawCardMessage actionMsg:
    +                        this.playerController.drawCard(actionMsg.getSource());
    +                        break;
    +                    case DrawInitialCardMessage actionMsg:
    +                        this.playerController.drawInitialCard();
    +                        break;
    +                    case DrawSecretObjectivesMessage actionMsg:
    +                        this.playerController.drawSecretObjectives();
    +                        break;
    +                    case SendBroadcastTextMessage actionMsg:
    +                        this.playerController.sendBroadcastText(actionMsg.getText());
    +                        break;
    +                    case SendPrivateTextMessage actionMsg:
    +                        this.playerController.sendPrivateText(actionMsg.getRecipient(),
    +                                actionMsg.getText());
    +                        break;
    +                    case PlayCardMessage actionMsg:
    +                        Pair<Integer, Integer> coords =
    +                                new Pair<>(actionMsg.getX(), actionMsg.getY());
    +                        PlayableCard card = this.playableCards.get(actionMsg.getCardID());
    +                        this.playerController.playCard(coords, card, actionMsg.getSide());
    +                        break;
    +                    default:
    +                        break;
    +                }
    +            }
    +        } catch (JsonParseException e) {
    +            // Nothing to do here: it was either a ping or a wrongly formatted message
    +        }
    +
    +    }
    +
    +    /**
    +     * Main loop. This will just wait for anything to be put on the input stream and then call
    +     * {@link ClientListener#executeRequest(String)}
    +     */
    +    public void listen() {
    +        try {
    +            while (!this.socket.isClosed() && this.socket.isConnected()) {
    +                String msg = this.io.readMsg();
    +                // if msg is null, it means the socket was closed client side. Quit all
    +                if (msg == null) {
    +                    throw new IOException("Socket closed");
    +                }
    +                this.executeRequest(msg);
    +            }
    +        } catch (IOException | ClassNotFoundException e) {
    +            this.close(match);
    +        }
    +    }
    +
    +    /**
    +     * This will close socket and input/output handlers, if not null
    +     */
    +    private void close(Match match) {
    +        try {
    +            match.removePlayer(this.playerController.getPlayer());
    +            if (this.socket != null && !this.socket.isClosed()) {
    +                this.io.close();
    +                this.socket.close();
    +            }
    +        } catch (IOException | NullPointerException e) {
    +        }
    +    }
    +
    +    /**
    +     * Since the class extends {@link Thread} it needs to implement {@link Thread#run()}.
    +     * Specifically, this will just run {@link ClientListener#listen()}
    +     */
    +    @Override
    +    public void run() {
    +        this.setPlayerController();
    +        this.listen();
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientReceiver.html b/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientReceiver.html new file mode 100644 index 00000000..b17e0679 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientReceiver.html @@ -0,0 +1 @@ +ClientReceiver

    ClientReceiver

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total623 of 6230%29 of 290%37371461461616
    parseMessage(String)2870%190%1717767611
    resumeMatch(MatchResumedMessage)1110%n/a11252511
    lambda$getPlacedMap$0(Map, Integer, PlacedCardRecord)580%40%338811
    ClientReceiver(NetworkHandlerTCP, Socket)370%n/a11111111
    run()250%40%338811
    sendError(String)190%n/a116611
    getPlayable(Integer)160%20%224411
    lambda$parseMessage$6(Map, String, Integer[])140%n/a113311
    getPlacedMap(Map)110%n/a113311
    lambda$resumeMatch$2(Map.Entry)110%n/a112211
    lambda$parseMessage$7(Map, DrawSource, Integer)80%n/a111111
    lambda$resumeMatch$4(Map, String, Map)80%n/a111111
    lambda$resumeMatch$3(Map.Entry)60%n/a111111
    lambda$run$8(String)40%n/a112211
    lambda$parseMessage$5(Integer)40%n/a111111
    lambda$resumeMatch$1(Integer)40%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientReceiver.java.html b/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientReceiver.java.html new file mode 100644 index 00000000..7efda5e0 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.tcp/ClientReceiver.java.html @@ -0,0 +1,275 @@ +ClientReceiver.java

    ClientReceiver.java

    package it.polimi.ingsw.network.tcp;
    +
    +import java.io.IOException;
    +import java.net.Socket;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.stream.Collectors;
    +import it.polimi.ingsw.client.frontend.GraphicalView;
    +import it.polimi.ingsw.client.network.NetworkHandlerTCP;
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.network.messages.errors.ErrorMessage;
    +import it.polimi.ingsw.network.messages.responses.*;
    +import it.polimi.ingsw.utils.CardsManager;
    +import it.polimi.ingsw.utils.Pair;
    +import it.polimi.ingsw.utils.PlacedCardRecord;
    +
    +/**
    + * Receives messages from server to client
    + */
    +public class ClientReceiver implements Runnable {
    +    private NetworkHandlerTCP networkHandler;
    +    private Socket socket;
    +    private IOHandler io;
    +    private Map<Integer, InitialCard> initialCards;
    +    private Map<Integer, ResourceCard> resourceCards;
    +    private Map<Integer, GoldCard> goldCards;
    +    private Map<Integer, Objective> objectives;
    +
    +
    +    /**
    +     * Class constructor.
    +     * 
    +     * @param networkHandler The network view that should call the {@link GraphicalView} methods
    +     * @param socket The socket opened
    +     * 
    +     * @throws IOException If there was an error with the socket's streams
    +     */
    +    public ClientReceiver(NetworkHandlerTCP networkHandler, Socket socket) throws IOException {
    +        this.networkHandler = networkHandler;
    +        this.socket = socket;
    +        this.io = new IOHandler(socket);
    +        this.io = networkHandler.getIO();
    +
    +        CardsManager cardsManager = CardsManager.getInstance();
    +        this.initialCards = cardsManager.getInitialCards();
    +        this.resourceCards = cardsManager.getResourceCards();
    +        this.goldCards = cardsManager.getGoldCards();
    +        this.objectives = cardsManager.getObjectives();
    +    }
    +
    +
    +    /**
    +     * Get a playable card by its ID.
    +     * 
    +     * @param cardID The card ID
    +     * 
    +     * @return The playable card
    +     */
    +    private PlayableCard getPlayable(Integer cardID) {
    +        PlayableCard card = this.resourceCards.get(cardID);
    +        if (card == null) {
    +            return this.goldCards.get(cardID);
    +        }
    +        return card;
    +    }
    +
    +    /**
    +     * Parses a map from coordinates to {@link PlacedCard} to a map from coordinates to
    +     * {@link PlacedCardRecord}.
    +     * 
    +     * @param board The map from coordinates to {@link PlacedCard}
    +     * 
    +     * @return The map from coordinates to {@link PlacedCardRecord}
    +     */
    +    private Map<Pair<Integer, Integer>, PlacedCard> getPlacedMap(
    +            Map<Integer, PlacedCardRecord> board) {
    +        Map<Pair<Integer, Integer>, PlacedCard> result = new HashMap<>();
    +
    +        board.forEach((turn, placedCardRecord) -> {
    +            if (placedCardRecord.x().equals(0) && placedCardRecord.y().equals(0)) {
    +                result.put(new Pair<Integer, Integer>(placedCardRecord.x(), placedCardRecord.y()),
    +                        new PlacedCard(this.initialCards.get(placedCardRecord.cardID()),
    +                                placedCardRecord.side(), turn));
    +            } else {
    +                result.put(new Pair<Integer, Integer>(placedCardRecord.x(), placedCardRecord.y()),
    +                        new PlacedCard(this.getPlayable(placedCardRecord.cardID()),
    +                                placedCardRecord.side(), turn));
    +            }
    +        });
    +
    +        return result;
    +    }
    +
    +
    +    /**
    +     * Parses the message and resumes the match.
    +     * 
    +     * @param msg The message containing the match status
    +     * 
    +     * @throws IOException if there was a problem with the socket stream
    +     */
    +    private void resumeMatch(MatchResumedMessage msg) throws IOException {
    +        Map<String, Color> playersUsernamesAndPawns = new HashMap<>();
    +        Map<String, List<PlayableCard>> playersHands = new HashMap<>();
    +        Pair<Objective, Objective> visibleObjectives;
    +        Map<DrawSource, PlayableCard> visiblePlayableCards = new HashMap<>();
    +        Pair<Symbol, Symbol> decksTopReigns;
    +        Objective secretObjective;
    +        Map<String, Map<Symbol, Integer>> availableResources = new HashMap<>();
    +        Map<String, Map<Pair<Integer, Integer>, PlacedCard>> placedCards = new HashMap<>();
    +        Map<String, Integer> playerPoints = new HashMap<>();
    +        String currentPlayer;
    +        boolean drawPhase;
    +
    +        playersUsernamesAndPawns = msg.getPlayersUsernamesAndPawns();
    +        playersHands = msg.getPlayersHands().entrySet().stream()
    +                .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().stream()
    +                        .map(cardID -> this.getPlayable(cardID)).collect(Collectors.toList())));
    +        Pair<Integer, Integer> visibleObjectivesID = msg.getVisibleObjectives();
    +        visibleObjectives =
    +                new Pair<Objective, Objective>(this.objectives.get(visibleObjectivesID.first()),
    +                        this.objectives.get(visibleObjectivesID.second()));
    +        visiblePlayableCards = msg.getVisiblePlayableCards().entrySet().stream().collect(
    +                Collectors.toMap(Map.Entry::getKey, entry -> this.getPlayable(entry.getValue())));
    +        decksTopReigns = msg.getDecksTopReigns();
    +        secretObjective = this.objectives.get(msg.getSecretObjective());
    +        availableResources = msg.getAvailableResources();
    +        msg.getPlacedCards()
    +                .forEach((player, board) -> placedCards.put(player, this.getPlacedMap(board)));
    +        playerPoints = msg.getPlayerPoints();
    +        currentPlayer = msg.getCurrentPlayer();
    +        drawPhase = msg.isDrawPhase();
    +
    +        this.networkHandler.matchResumed(playersUsernamesAndPawns, playersHands, visibleObjectives,
    +                visiblePlayableCards, decksTopReigns, secretObjective, availableResources,
    +                placedCards, playerPoints, currentPlayer, drawPhase);
    +    }
    +
    +    /**
    +     * Parses a message and calls the corresponding
    +     * {@link it.polimi.ingsw.client.network.NetworkHandler}'s view.
    +     * 
    +     * @param message The message to be parsed
    +     */
    +    private void parseMessage(String message) {
    +        try {
    +            ResponseMessage response = (ResponseMessage) io.stringToMsg(message);
    +            String username = response.getUsername();
    +            switch (response) {
    +                case AvailableMatchesMessage msg:
    +                    this.networkHandler.receiveAvailableMatches(msg.getMatches());
    +                    break;
    +                case MatchResumedMessage msg:
    +                    this.resumeMatch(msg);
    +                    break;
    +                case MatchStartedMessage msg:
    +                    Map<String, List<PlayableCard>> hands = new HashMap<>();
    +                    msg.getPlayerHands()
    +                            .forEach((player, hand) -> hands.put(player,
    +                                    List.of(hand).stream().map(card -> this.getPlayable(card))
    +                                            .collect(Collectors.toList())));
    +
    +                    Pair<Objective, Objective> objectives = new Pair<Objective, Objective>(
    +                            this.objectives.get(msg.getVisibleObjectives()[0]),
    +                            this.objectives.get(msg.getVisibleObjectives()[1]));
    +
    +                    Map<DrawSource, PlayableCard> visibles = new HashMap<>();
    +                    msg.getVisibleCards().forEach(
    +                            (source, card) -> visibles.put(source, this.getPlayable(card)));
    +
    +                    Pair<Symbol, Symbol> decksTop = new Pair<Symbol, Symbol>(
    +                            msg.getVisibleDeckReigns()[0], msg.getVisibleDeckReigns()[1]);
    +
    +                    this.networkHandler.matchStarted(msg.getPlayerPawnColors(), hands, objectives,
    +                            visibles, decksTop);
    +                    break;
    +                case SomeoneDrewInitialCardMessage msg:
    +                    if (username.equals(this.networkHandler.getUsername())) {
    +                        this.networkHandler
    +                                .giveInitialCard(this.initialCards.get(msg.getInitialCardID()));
    +                    } else {
    +                        this.networkHandler.someoneDrewInitialCard(username,
    +                                this.initialCards.get(msg.getInitialCardID()));
    +                    }
    +                    break;
    +                case SomeoneDrewSecretObjectivesMessage msg:
    +                    if (username.equals(this.networkHandler.getUsername())) {
    +                        Pair<Objective, Objective> objs =
    +                                new Pair<>(this.objectives.get(msg.getFirstID()),
    +                                        this.objectives.get(msg.getSecondID()));
    +                        this.networkHandler.giveSecretObjectives(objs);
    +                    } else {
    +                        this.networkHandler.someoneDrewSecretObjective(username);
    +                    }
    +                    break;
    +                case SomeoneSetInitialSideMessage msg:
    +                    this.networkHandler.someoneSetInitialSide(username, msg.getSide(),
    +                            msg.getAvailableResources());
    +                    break;
    +                case SomeoneChoseSecretObjectiveMessage msg:
    +                    this.networkHandler.someoneChoseSecretObjective(username);
    +                    break;
    +                case SomeonePlayedCardMessage msg:
    +                    Pair<Integer, Integer> coords =
    +                            new Pair<Integer, Integer>(msg.getX(), msg.getY());
    +                    this.networkHandler.someonePlayedCard(username, coords,
    +                            this.getPlayable(msg.getCardID()), msg.getSide(), msg.getPoints(),
    +                            msg.getAvailableResources());
    +                    break;
    +                case SomeoneDrewCardMessage msg:
    +                    this.networkHandler.someoneDrewCard(username, msg.getDrawSource(),
    +                            this.getPlayable(msg.getCardID()),
    +                            this.getPlayable(msg.getReplacementCardID()), msg.getDeckTopReigns());
    +                    break;
    +                case SomeoneJoinedMessage msg:
    +                    this.networkHandler.someoneJoined(username, msg.getJoinedPlayers());
    +                    break;
    +                case SomeoneQuitMessage msg:
    +                    this.networkHandler.someoneQuit(username);
    +                    break;
    +                case MatchFinishedMessage msg:
    +                    this.networkHandler.matchFinished(msg.getRanking());
    +                    break;
    +                case SomeoneSentBroadcastTextMessage msg:
    +                    this.networkHandler.someoneSentBroadcastText(username, msg.getText());
    +                    break;
    +                case SomeoneSentPrivateTextMessage msg:
    +                    this.networkHandler.someoneSentPrivateText(username, msg.getText());
    +                    break;
    +                default:
    +                    break;
    +            }
    +        } catch (Exception e) {
    +            this.sendError(message);
    +        }
    +
    +    }
    +
    +
    +    /**
    +     * Sends an error to the server.
    +     * 
    +     * @param message The error message
    +     */
    +    private void sendError(String message) {
    +        try {
    +            ErrorMessage msg = (ErrorMessage) this.io.stringToMsg(message);
    +            Exception exception = new Exception(msg.getMessage());
    +            this.networkHandler.notifyError(exception);
    +        } catch (Exception e) {
    +            // Nothing to do, received an invalid object
    +        }
    +    }
    +
    +    
    +    /**
    +     * Receives answers from the server and tries to parse it (in a new thread)
    +     */
    +    @Override
    +    public void run() {
    +        String message;
    +        while (!this.socket.isClosed() && this.socket.isConnected()) {
    +            try {
    +                message = this.io.readMsg();
    +                final String finalMessage = message;
    +                new Thread(() -> {
    +                    this.parseMessage(finalMessage);
    +                }).start();
    +            } catch (IOException | ClassNotFoundException e) {
    +            }
    +        }
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.tcp/IOHandler.html b/deliveries/Test results/it.polimi.ingsw.network.tcp/IOHandler.html new file mode 100644 index 00000000..15a2ad86 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.tcp/IOHandler.html @@ -0,0 +1 @@ +IOHandler

    IOHandler

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total17 of 8479%2 of 450%4962427
    writeMsg(String)110%n/a114411
    stringToMsg(String)50%n/a111111
    close()11493%2250%231701
    IOHandler(Socket)31100%n/a010601
    writeMsg(Message)13100%n/a010401
    msgToString(Message)5100%n/a010101
    readMsg()4100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.tcp/IOHandler.java.html b/deliveries/Test results/it.polimi.ingsw.network.tcp/IOHandler.java.html new file mode 100644 index 00000000..b359d9bc --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.tcp/IOHandler.java.html @@ -0,0 +1,110 @@ +IOHandler.java

    IOHandler.java

    package it.polimi.ingsw.network.tcp;
    +
    +import java.io.*;
    +import java.net.Socket;
    +import java.net.SocketException;
    +import it.polimi.ingsw.network.messages.Message;
    +import it.polimi.ingsw.utils.MessageJsonParser;
    +
    +/**
    + * This class will handle all the IO operations for a certain socket.
    + *
    + * @see ObjectInputStream
    + * @see ObjectOutputStream
    + * @see MessageJsonParser
    + */
    +public class IOHandler {
    +    private final BufferedReader inputReader;
    +    private final BufferedWriter outputWriter;
    +
    +    private final MessageJsonParser parser;
    +
    +    private final Socket socket;
    +
    +    /**
    +     * Class constructor. It takes a {@link Socket} as a parameter to open its
    +     * {@link ObjectOutputStream} and {@link ObjectInputStream}.
    +     */
    +    public IOHandler(Socket socket) throws IOException {
    +
    +        this.socket = socket;
    +        this.outputWriter = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
    +        this.inputReader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    +
    +        this.parser = new MessageJsonParser();
    +    }
    +
    +    /**
    +     * Acquires a {@link Message} from the socket's input stream.
    +     *
    +     * @return the string representing the message
    +     * @throws IOException if the remote communication failed
    +     * @throws ClassNotFoundException if the class of the received object could not be found
    +     */
    +    public String readMsg() throws IOException, ClassNotFoundException {
    +        return this.inputReader.readLine();
    +    }
    +
    +    /**
    +     * Writes a {@link Message} to the socket's output stream.
    +     *
    +     * @param msg The (parsed) message to write
    +     * @throws IOException if the remote communication failed
    +     */
    +    public void writeMsg(String msg) throws IOException {
    +        this.outputWriter.write(msg);
    +        this.outputWriter.newLine();
    +        this.outputWriter.flush();
    +    }
    +
    +    /**
    +     * Writes a {@link Message} to the socket's output stream.
    +     *
    +     * @param msg The (not yet parsed) message to write
    +     * @throws IOException if the remote communication failed
    +     */
    +    public void writeMsg(Message msg) throws IOException {
    +        this.outputWriter.write(this.msgToString(msg));
    +        this.outputWriter.newLine();
    +        this.outputWriter.flush();
    +    }
    +
    +    /**
    +     * Converts a {@link Message} to its corresponding Json.
    +     *
    +     * @param msg The message to be parsed
    +     * @return the corresponding Json
    +     */
    +    public String msgToString(Message msg) {
    +        return this.parser.toJson(msg);
    +    }
    +
    +    /**
    +     * Converts a Json string to its corresponding {@link Message}.
    +     *
    +     * @param msg The Json to be parsed
    +     * @return the corresponding object
    +     */
    +    public Message stringToMsg(String msg) {
    +        return this.parser.toMessage(msg);
    +    }
    +
    +    /**
    +     * Closes the input and output streams, if not null.
    +     *
    +     * @throws IOException if the streams could not be accessed
    +     */
    +    public void close() throws IOException {
    +        try {
    +            if (this.inputReader != null) {
    +                this.inputReader.close();
    +            }
    +            if (this.outputWriter != null) {
    +                this.outputWriter.close();
    +            }
    +        } catch (SocketException e) {
    +            // socket already closed, no need to do anything
    +        }
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.tcp/TCPServer.html b/deliveries/Test results/it.polimi.ingsw.network.tcp/TCPServer.html new file mode 100644 index 00000000..b7019042 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.tcp/TCPServer.html @@ -0,0 +1 @@ +TCPServer

    TCPServer

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total11 of 4173%1 of 250%1361502
    listen()81666%1150%124801
    TCPServer(Integer, Server)31482%n/a012701
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.tcp/TCPServer.java.html b/deliveries/Test results/it.polimi.ingsw.network.tcp/TCPServer.java.html new file mode 100644 index 00000000..b8695f7e --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.tcp/TCPServer.java.html @@ -0,0 +1,50 @@ +TCPServer.java

    TCPServer.java

    package it.polimi.ingsw.network.tcp;
    +
    +import java.io.IOException;
    +import java.net.ServerSocket;
    +import java.net.Socket;
    +import it.polimi.ingsw.gamemodel.Match;
    +import it.polimi.ingsw.server.Server;
    +
    +/**
    + * Class containing the {@link ServerSocket}. This will just accept sockets and
    + * start the {@link ClientListener} with it
    + */
    +public class TCPServer {
    +    private ServerSocket serverSocketTCP;
    +    private Server server;
    +
    +    /**
    +     * Class constructor. It will open a {@link ServerSocket} on the specified port
    +     *
    +     * @param port   the port on which the server should be started
    +     * @param server the {@link Server} object that contains all the {@link Match}
    +     *               objects
    +     */
    +    public TCPServer(Integer port, Server server) {
    +        try {
    +            this.serverSocketTCP = new ServerSocket(port);
    +            this.server = server;
    +        } catch (Exception e) {
    +            e.printStackTrace();
    +        }
    +    }
    +
    +    /**
    +     * Main loop. Until the {@link ServerSocket} is not closed, it will listen for
    +     * any {@link Socket} that tries to connect and accept them. Finally, it will
    +     * start a new {@link ClientListener} with it
    +     */
    +    public void listen() {
    +        while (!this.serverSocketTCP.isClosed()) {
    +            try {
    +                Socket socket = this.serverSocketTCP.accept();
    +                new ClientListener(socket, server).start();
    +            } catch (IOException e) {
    +                System.out.println("Failed to accept socket");
    +                e.printStackTrace();
    +            }
    +        }
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.tcp/index.html b/deliveries/Test results/it.polimi.ingsw.network.tcp/index.html new file mode 100644 index 00000000..e43999e8 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.tcp/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.network.tcp

    it.polimi.ingsw.network.tcp

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total760 of 1,12132%46 of 6428%5778195298193514
    ClientReceiver6230%290%3737146146161611
    ClientListener10926470%141551%15293711311001
    IOHandler176779%2250%496242701
    TCPServer113073%1150%136150201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.network.tcp/index.source.html b/deliveries/Test results/it.polimi.ingsw.network.tcp/index.source.html new file mode 100644 index 00000000..3fb80cd5 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.network.tcp/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.network.tcp

    it.polimi.ingsw.network.tcp

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total760 of 1,12132%46 of 6428%5778195298193514
    ClientReceiver.java6230%290%3737146146161611
    ClientListener.java10926470%141551%15293711311001
    IOHandler.java176779%2250%496242701
    TCPServer.java113073%1150%136150201
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.server/MatchStatusObserver.html b/deliveries/Test results/it.polimi.ingsw.server/MatchStatusObserver.html new file mode 100644 index 00000000..f9d6c55d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.server/MatchStatusObserver.html @@ -0,0 +1 @@ +MatchStatusObserver

    MatchStatusObserver

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total72 of 8515%0 of 0n/a101527351015
    serializeMatch()410%n/a11121211
    removeSerializedMatch()110%n/a113311
    matchFinished()90%n/a113311
    someonePlayedCard(Player, Pair, PlayableCard, Side)30%n/a112211
    someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard)30%n/a112211
    matchStarted()10%n/a111111
    someoneDrewInitialCard(Player, InitialCard)10%n/a111111
    someoneSetInitialSide(Player, Side, Map)10%n/a111111
    someoneDrewSecretObjective(Player, Pair)10%n/a111111
    someoneChoseSecretObjective(Player, Objective)10%n/a111111
    MatchStatusObserver(String, Map)9100%n/a010401
    someoneJoined(Player)1100%n/a010101
    someoneQuit(Player)1100%n/a010101
    someoneSentBroadcastText(Player, String)1100%n/a010101
    someoneSentPrivateText(Player, Player, String)1100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.server/MatchStatusObserver.java.html b/deliveries/Test results/it.polimi.ingsw.server/MatchStatusObserver.java.html new file mode 100644 index 00000000..f9d9e330 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.server/MatchStatusObserver.java.html @@ -0,0 +1,151 @@ +MatchStatusObserver.java

    MatchStatusObserver.java

    package it.polimi.ingsw.server;
    +
    +import it.polimi.ingsw.gamemodel.*;
    +import it.polimi.ingsw.utils.Pair;
    +
    +import java.io.*;
    +import java.util.Map;
    +
    +/**
    + * Subclass of {@link MatchObserver} supposed to perform routine actions, which means actions that are to be
    + * performed when there's a state transition, BUT that are not related to a specific player.
    + * It's current main function is to serialize the match from which it receives notifications.
    + */
    +public class MatchStatusObserver implements MatchObserver {
    +    private final String matchName;
    +    private final Map<String, Match> matches;
    +
    +    /**
    +     * Initializes this instance main attributes.
    +     *
    +     * @param matchName The match name to which this instance is attached and listens to.
    +     * @param matches All the matches of the server
    +     */
    +    public MatchStatusObserver(String matchName, Map<String, Match> matches) {
    +        this.matchName = matchName;
    +        this.matches = matches;
    +    }
    +
    +    /**
    +     * Does nothing.
    +     */
    +    @Override
    +    public void matchStarted() {
    +    }
    +
    +    /**
    +     * Does nothing.
    +     */
    +    @Override
    +    public void someoneJoined(Player someone) {
    +    }
    +
    +    /**
    +     * Does nothing.
    +     */
    +    @Override
    +    public void someoneQuit(Player someone) {
    +    }
    +
    +    /**
    +     * Does nothing.
    +     */
    +    @Override
    +    public void someoneDrewInitialCard(Player someone, InitialCard card) {
    +    }
    +
    +    /**
    +     * Does nothing.
    +     */
    +    @Override
    +    public void someoneSetInitialSide(Player someone, Side side, Map<Symbol, Integer> availableResources) {
    +    }
    +
    +    /**
    +     * Does nothing.
    +     */
    +    @Override
    +    public void someoneDrewSecretObjective(Player someone, Pair<Objective, Objective> objectives) {
    +    }
    +
    +    /**
    +     * Does nothing.
    +     */
    +    @Override
    +    public void someoneChoseSecretObjective(Player someone, Objective objective) {
    +    }
    +
    +    /**
    +     * Serializes the match and saves it in the disk. This method parameters are not used.
    +     *
    +     * @param someone Not used by this method.
    +     * @param coords  Not used by this method.
    +     * @param card    Not used by this method.
    +     * @param side    Not used by this method.
    +     */
    +    @Override
    +    public void someonePlayedCard(Player someone, Pair<Integer, Integer> coords, PlayableCard card, Side side) {
    +        serializeMatch();
    +    }
    +
    +    /**
    +     * Serializes the match and saves it in the disk. This method parameters are not used.
    +     *
    +     * @param someone Not used by this method.
    +     * @param card    Not used by this method.
    +     */
    +    @Override
    +    public void someoneDrewCard(Player someone, DrawSource source, PlayableCard card, PlayableCard replacementCard) {
    +        serializeMatch();
    +    }
    +
    +    /**
    +     * Does nothing.
    +     */
    +    @Override
    +    public void someoneSentBroadcastText(Player someone, String text) {
    +    }
    +
    +    /**
    +     * Does nothing.
    +     */
    +    @Override
    +    public void someoneSentPrivateText(Player someone, Player recipient, String text) {
    +    }
    +
    +    /**
    +     * Removes this match serialization file from the disk and removes this match instance from the list of matches
    +     * available in the {@link Server}.
    +     */
    +    @Override
    +    public void matchFinished() {
    +        matches.remove(matchName);
    +        removeSerializedMatch();
    +    }
    +
    +    /**
    +     * Utility method that serializes the match and saves it in the disk.
    +     */
    +    private void serializeMatch() {
    +        try {
    +            FileOutputStream fileOut = new FileOutputStream(matchName + ".match");
    +            ObjectOutputStream out = new ObjectOutputStream(fileOut);
    +            Match m = matches.get(matchName);
    +            synchronized (m) {
    +                out.writeObject(m);
    +                out.close();
    +                fileOut.close();
    +            }
    +        } catch (IOException e) {
    +            System.err.println("The match \"" + matchName + "\" cannot be serialized due to I/O errors");
    +        }
    +    }
    +
    +    // Utility method that removes a serialized match from the disk.
    +    private void removeSerializedMatch() {
    +        File file = new File(matchName + ".match");
    +        file.delete();
    +    }
    +}
    +
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.server/Server.html b/deliveries/Test results/it.polimi.ingsw.server/Server.html new file mode 100644 index 00000000..c70bb610 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.server/Server.html @@ -0,0 +1 @@ +Server

    Server

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total282 of 38827%20 of 2416%212759821015
    loadCrashedMatches()750%40%33171711
    joinMatch(String, String)560%80%55101011
    getJoinableMatches()540%20%22111111
    main(String[])380%20%22121211
    startTCPServer()180%n/a113311
    lambda$getJoinableMatches$0(String)110%20%221111
    createMatch(String, int)103477%2250%2321001
    startRMIServer()90%n/a113311
    lambda$loadCrashedMatches$1(File, String)50%n/a111111
    lambda$loadCrashedMatches$2(Player)40%n/a111111
    ping()20%n/a111111
    getJoinableMatchesMap()35100%2100%020601
    getNewMatch(int)17100%n/a010301
    Server(int, int)14100%n/a010501
    getMatch(String)6100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.server/Server.java.html b/deliveries/Test results/it.polimi.ingsw.server/Server.java.html new file mode 100644 index 00000000..f493af69 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.server/Server.java.html @@ -0,0 +1,257 @@ +Server.java

    Server.java

    package it.polimi.ingsw.server;
    +
    +import it.polimi.ingsw.client.network.NetworkHandler;
    +import it.polimi.ingsw.client.network.NetworkHandlerRMI;
    +import it.polimi.ingsw.controllers.PlayerController;
    +import it.polimi.ingsw.controllers.PlayerControllerRMI;
    +import it.polimi.ingsw.controllers.PlayerControllerRMIInterface;
    +import it.polimi.ingsw.exceptions.AlreadyUsedUsernameException;
    +import it.polimi.ingsw.exceptions.ChosenMatchException;
    +import it.polimi.ingsw.exceptions.WrongNameException;
    +import it.polimi.ingsw.exceptions.WrongStateException;
    +import it.polimi.ingsw.gamemodel.Match;
    +import it.polimi.ingsw.network.tcp.TCPServer;
    +import it.polimi.ingsw.utils.AvailableMatch;
    +import it.polimi.ingsw.utils.DeckCreator;
    +import it.polimi.ingsw.utils.GuiUtil;
    +
    +import java.io.File;
    +import java.io.FileInputStream;
    +import java.io.IOException;
    +import java.io.ObjectInputStream;
    +import java.rmi.RemoteException;
    +import java.rmi.registry.LocateRegistry;
    +import java.rmi.registry.Registry;
    +import java.rmi.server.UnicastRemoteObject;
    +import java.util.ArrayList;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * The server class of this application. It's appointed with managing remote interactions with clients
    + * ({@link NetworkHandler}) before the match starts, after that {@link PlayerController} will ensure the
    + * communication.
    + * To be specific, it stores all the {@link Match} instances available (not full) or being played at the moment,
    + * creates them when requested by clients and restores them from disk (since periodically serialized) after a
    + * Server crash.
    + */
    +public class Server extends UnicastRemoteObject implements ServerRMIInterface {
    +    private final Map<String, Match> matches;
    +    private final int portRMI;
    +    private final int portTCP;
    +
    +    /**
    +     * Initializes this Server instance and its attributes.
    +     *
    +     * @param portRMI The RMI port to listen to
    +     * @param portTCP The TCP port to listen to
    +     * @throws RemoteException If this instance couldn't be exported on the public RMI registry, so there's been a
    +     *                         connection error
    +     */
    +    public Server(int portRMI, int portTCP) throws RemoteException {
    +        super();
    +
    +        this.portRMI = portRMI;
    +        this.portTCP = portTCP;
    +
    +        matches = new HashMap<>();
    +    }
    +
    +    /**
    +     * Returns the available matches as {@link AvailableMatch} instances.
    +     * This method is called just by remote {@link NetworkHandlerRMI} instances.
    +     *
    +     * @return The list of Match which are not full yet.
    +     */
    +    @Override
    +    public List<AvailableMatch> getJoinableMatches() {
    +        // List of names of matches that are not full (then joinable)
    +        List<String> joinableMatches = matches.keySet().stream()
    +                .filter(name -> !matches.get(name).isFull())
    +                .toList();
    +        List<AvailableMatch> result = new ArrayList<>();
    +
    +        for (String name : matches.keySet()) {
    +            Match match = matches.get(name);
    +            int maxPlayers = match.getMaxPlayers();
    +            int currentPlayers = match.getPlayers().size();
    +
    +            result.add(new AvailableMatch(name, maxPlayers, currentPlayers, match.isRejoinable()));
    +        }
    +
    +        return result;
    +    }
    +
    +    /**
    +     * Lets the calling view join on a match with the given player username, if possible; gives back to the client
    +     * an instance of its PlayerControllerRMI, to start communicating through it with the match.
    +     * This method is called just by remote {@link NetworkHandlerRMI} instances.
    +     *
    +     * @param matchName The unique name of the match to join to
    +     * @param username  The chosen player username
    +     * @return An instance of PlayerControllerRMI, used exclusively by the calling view
    +     * @throws ChosenMatchException         If the chosen match is either already full or doesn't exist
    +     * @throws AlreadyUsedUsernameException If the given username is already taken
    +     * @throws WrongStateException          If the match is in a state during which doesn't allow players to join any more
    +     * @throws WrongNameException           If the name is not valid
    +     * @throws RemoteException              If the exportation of this object in the RMI registry failed
    +     */
    +    @Override
    +    public PlayerControllerRMIInterface joinMatch(String matchName, String username) throws ChosenMatchException, WrongStateException, AlreadyUsedUsernameException, WrongNameException, RemoteException {
    +        if (!GuiUtil.isValidName(username))
    +            throw new WrongNameException("The username must be alphanumeric with maximum 32 characters");
    +        if (!matches.containsKey(matchName))
    +            throw new ChosenMatchException("The chosen match doesn't exist");
    +        if (matches.get(matchName).isFull() && !matches.get(matchName).isRejoinable())
    +            throw new ChosenMatchException("The chosen match is already full");
    +
    +        Match chosenMatch = matches.get(matchName);
    +        PlayerControllerRMI controller = new PlayerControllerRMI(username, chosenMatch);
    +
    +        UnicastRemoteObject.exportObject(controller, portRMI);
    +
    +        return controller;
    +    }
    +
    +    /**
    +     * Create a new blank match.
    +     *
    +     * @param matchName  The unique name to give to the new match
    +     * @param maxPlayers The maximum number of player allowed on the new match
    +     * @throws ChosenMatchException If the given match name is already taken
    +     * @throws WrongNameException   If the chosen player username doesn't meet the alphanumerical criteria
    +     */
    +    @Override
    +    public void createMatch(String matchName, int maxPlayers) throws ChosenMatchException, WrongNameException {
    +        if (!GuiUtil.isValidName(matchName)) {
    +            throw new WrongNameException("The match name must be alphanumeric with maximum 32 characters");
    +        }
    +        synchronized (matches) {
    +            if (matches.containsKey(matchName))
    +                throw new ChosenMatchException("A match with the chosen name already exists");
    +
    +            Match newMatch = getNewMatch(maxPlayers);
    +            newMatch.subscribeObserver(new MatchStatusObserver(matchName, matches));
    +            matches.put(matchName, newMatch);
    +        }
    +    }
    +
    +    /**
    +     * Pings the server in order to perceive if the connection is still alive and working.
    +     * Always return true, since the false is implicit in returning a {@link RemoteException}
    +     * when the connection is not working anymore.
    +     *
    +     * @return True if the connection is alive, false otherwise
    +     */
    +    @Override
    +    public boolean ping() {
    +        return true;
    +    }
    +
    +    /**
    +     * @return
    +     */
    +    public Map<String, Match> getJoinableMatchesMap() {
    +        synchronized (matches) {
    +            HashMap<String, Match> result = new HashMap<>();
    +            for (String name : matches.keySet()) {
    +                result.put(name, matches.get(name));
    +            }
    +            return result;
    +        }
    +    }
    +
    +    /**
    +     * Gets a {@link Match} from those saved in the server.
    +     *
    +     * @param name The unique name of the match
    +     * @return The match instance
    +     */
    +    public Match getMatch(String name) {
    +        return matches.get(name);
    +    }
    +
    +    /**
    +     * Start the RMI server.
    +     *
    +     * @throws RemoteException If the remote registry couldn't be exported or the communication with it failed.
    +     */
    +    public void startRMIServer() throws RemoteException {
    +        Registry registry = LocateRegistry.createRegistry(portRMI);
    +        registry.rebind("CodexNaturalisRMIServer", this);
    +    }
    +
    +    /**
    +     * Starts the TCP server.
    +     */
    +    public void startTCPServer() {
    +        TCPServer tcpServer = new TCPServer(portTCP, this);
    +        new Thread(tcpServer::listen).start();
    +    }
    +
    +    public static void main(String[] args) throws RemoteException {
    +        int portRMI;
    +        int portTCP;
    +
    +        // If some arguments are missing, notify it to the user and exit
    +        if (args.length < 2) {
    +            System.err.println("Arguments missing, run the server executable with RMI port and TCP port arguments.");
    +            System.err.println("Defaulting to RMI 2222 and TCP 9999 ports...");
    +            portRMI = 2222;
    +            portTCP = 9999;
    +        } else {
    +            portRMI = Integer.parseInt(args[0]);
    +            portTCP = Integer.parseInt(args[1]);
    +        }
    +
    +        Server server = new Server(portRMI, portTCP);
    +
    +        server.loadCrashedMatches();
    +        server.startRMIServer();
    +        server.startTCPServer();
    +    }
    +
    +    /**
    +     * Utility method used to restore all the matches saved in the disk after the server crashed.
    +     */
    +    private void loadCrashedMatches() {
    +        // Look for *.match files in the current directory
    +        File dir = new File(".");
    +        File[] files = dir.listFiles((file, name) -> name.toLowerCase().endsWith(".match"));
    +        // If any file is found
    +        if (files != null) {
    +            for (File file : files) {
    +                try {
    +                    // Read each .match file from disk
    +                    FileInputStream fileIn = new FileInputStream(file);
    +                    ObjectInputStream in = new ObjectInputStream(fileIn);
    +
    +                    // Deserialize the .match file in a Match object
    +                    String matchName = file.getName().replaceAll("(?i)(.*)\\.match", "$1");
    +                    Match match = (Match) in.readObject();
    +                    matches.put(matchName, match);
    +                    match.getPlayers().forEach((p) -> p.setConnected(false));
    +                    match.subscribeObserver(new MatchStatusObserver(matchName, matches));
    +                    in.close();
    +                    fileIn.close();
    +                } catch (IOException | ClassNotFoundException e) {
    +                    System.err.println("A match couldn't be loaded from disk");
    +                }
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Utility method to create a new blank match. It cannot be called remotely (e.g. by RMI)
    +     *
    +     * @param maxPlayers The maximum number of players allowed
    +     * @return The new match instance
    +     */
    +    private static Match getNewMatch(int maxPlayers) {
    +        DeckCreator creator = new DeckCreator();
    +        return new Match(maxPlayers, creator.createInitialDeck(), creator.createResourceDeck(), creator.createGoldDeck(),
    +                creator.createObjectiveDeck());
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.server/index.html b/deliveries/Test results/it.polimi.ingsw.server/index.html new file mode 100644 index 00000000..959f1d84 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.server/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.server

    it.polimi.ingsw.server

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total354 of 47325%20 of 2416%314286117203002
    Server28210627%20416%21275982101501
    MatchStatusObserver721315%n/a10152735101501
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.server/index.source.html b/deliveries/Test results/it.polimi.ingsw.server/index.source.html new file mode 100644 index 00000000..a437ed22 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.server/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.server

    it.polimi.ingsw.server

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total354 of 47325%20 of 2416%314286117203002
    Server.java28210627%20416%21275982101501
    MatchStatusObserver.java721315%n/a10152735101501
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/AvailableMatch.html b/deliveries/Test results/it.polimi.ingsw.utils/AvailableMatch.html new file mode 100644 index 00000000..ec347b7a --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/AvailableMatch.html @@ -0,0 +1 @@ +AvailableMatch

    AvailableMatch

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 15100%0 of 0n/a010101
    AvailableMatch(String, Integer, Integer, boolean)15100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/AvailableMatch.java.html b/deliveries/Test results/it.polimi.ingsw.utils/AvailableMatch.java.html new file mode 100644 index 00000000..630b03cf --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/AvailableMatch.java.html @@ -0,0 +1,18 @@ +AvailableMatch.java

    AvailableMatch.java

    package it.polimi.ingsw.utils;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * AvailableMatches
    + *
    + * @param name The match name
    + * @param maxPlayers The max number of players allowed in the match
    + * @param currentPlayers The number of currently joined players
    + * @param isRejoinable Whether the match has been resumed after a server crash
    + */
    +public record AvailableMatch(String name, Integer maxPlayers, Integer currentPlayers, boolean isRejoinable) implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/CardJsonParser$CardTypeAdapter.html b/deliveries/Test results/it.polimi.ingsw.utils/CardJsonParser$CardTypeAdapter.html new file mode 100644 index 00000000..4bde32f1 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/CardJsonParser$CardTypeAdapter.html @@ -0,0 +1 @@ +CardJsonParser.CardTypeAdapter

    CardJsonParser.CardTypeAdapter

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total18 of 12785%2 of 875%2942305
    deserialize(JsonElement, Type, JsonDeserializationContext)183968%2466%2441301
    decodeMap(JsonObject)33100%2100%020601
    decodePair(String)29100%n/a010301
    lambda$deserialize$0(JsonObject, Symbol)5100%n/a010101
    CardJsonParser.CardTypeAdapter(CardJsonParser)3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/CardJsonParser.html b/deliveries/Test results/it.polimi.ingsw.utils/CardJsonParser.html new file mode 100644 index 00000000..dd24e4f1 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/CardJsonParser.html @@ -0,0 +1 @@ +CardJsonParser

    CardJsonParser

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 19100%0 of 0n/a020302
    CardJsonParser()16100%n/a010201
    getCardBuilder()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/CardJsonParser.java.html b/deliveries/Test results/it.polimi.ingsw.utils/CardJsonParser.java.html new file mode 100644 index 00000000..0835c6ec --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/CardJsonParser.java.html @@ -0,0 +1,87 @@ +CardJsonParser.java

    CardJsonParser.java

    package it.polimi.ingsw.utils;
    +
    +import com.google.gson.*;
    +import it.polimi.ingsw.exceptions.InvalidResourceException;
    +import it.polimi.ingsw.gamemodel.PositionRequirement;
    +import it.polimi.ingsw.gamemodel.QuantityRequirement;
    +import it.polimi.ingsw.gamemodel.Requirement;
    +import it.polimi.ingsw.gamemodel.Symbol;
    +
    +import java.lang.reflect.Type;
    +import java.util.EnumSet;
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +/**
    + * Parser of Cards, implements a custom parser for Requirement
    + */
    +public class CardJsonParser {
    +    Gson cardBuilder = new GsonBuilder().registerTypeAdapter(Requirement.class, (new CardTypeAdapter())).setPrettyPrinting().create();
    +
    +    /**
    +     * Returns a Gson builder with pretty print and custom Requirement deserializer
    +     *
    +     * @return
    +     */
    +    public Gson getCardBuilder() {
    +        return cardBuilder;
    +    }
    +
    +    private class CardTypeAdapter implements JsonDeserializer<Requirement> {
    +        @Override
    +        public Requirement deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
    +            JsonObject requirementObject = json.getAsJsonObject();
    +            EnumSet<Symbol> symbols = Symbol.getBasicResources();
    +            // Check the reqs property
    +            if (requirementObject.has("reqs")) {
    +                JsonObject reqObject = requirementObject.get("reqs").getAsJsonObject();
    +                // If reqs has pairs inside, then it's a PositionRequirement
    +                if (reqObject.has("Pair[first=0, second=0]")) {
    +                    try {
    +                        // Manually create a Positional Requirement
    +                        Map<Pair<Integer, Integer>, Symbol> reqmap = decodeMap(reqObject);
    +                        return new PositionRequirement(reqmap);
    +                    } catch (InvalidResourceException e) {
    +                        throw new RuntimeException(e);
    +                    }
    +                    // If reqs has symbols inside, then it's a QuantityRequirement
    +                } else if (symbols.stream().anyMatch(s -> reqObject.has(s.toString()))) {
    +                    return context.deserialize(requirementObject, QuantityRequirement.class);
    +                } else {
    +                    throw new JsonParseException(json.toString());
    +                }
    +            } else {
    +                throw new JsonParseException(json.toString());
    +            }
    +        }
    +
    +        /**
    +         * Deserializes pair object
    +         *
    +         * @param pair string of the encoded pair
    +         * @return The decoded Pair object
    +         */
    +        private Pair<Integer, Integer> decodePair(String pair) {
    +            String values = pair.replace("Pair[first=", "").replace(" second=", "").replace("]", "");
    +            String[] a = values.split(",");
    +            return new Pair<>(Integer.parseInt(a[0]), Integer.parseInt(a[1]));
    +        }
    +
    +        /**
    +         * Deserializes the map containing the positional requirement
    +         *
    +         * @param j
    +         * @return
    +         */
    +        private Map<Pair<Integer, Integer>, Symbol> decodeMap(JsonObject j) {
    +            Map<Pair<Integer, Integer>, Symbol> map = new HashMap<>();
    +            Map<String, JsonElement> jsonmap = j.asMap();
    +            for (String pairstring : jsonmap.keySet()) {
    +                map.put(decodePair(pairstring), Symbol.valueOf(jsonmap.get(pairstring).getAsString()));
    +            }
    +            return map;
    +        }
    +
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$1.html b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$1.html new file mode 100644 index 00000000..f2d6d1df --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$1.html @@ -0,0 +1 @@ +CardsManager.new TypeToken() {...}

    CardsManager.new TypeToken() {...}

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 3100%0 of 0n/a010101
    {...}3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$2.html b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$2.html new file mode 100644 index 00000000..1eda52b7 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$2.html @@ -0,0 +1 @@ +CardsManager.new TypeToken() {...}

    CardsManager.new TypeToken() {...}

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 3100%0 of 0n/a010101
    {...}3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$3.html b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$3.html new file mode 100644 index 00000000..9da04902 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$3.html @@ -0,0 +1 @@ +CardsManager.new TypeToken() {...}

    CardsManager.new TypeToken() {...}

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 3100%0 of 0n/a010101
    {...}3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$4.html b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$4.html new file mode 100644 index 00000000..805dc8ea --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager$4.html @@ -0,0 +1 @@ +CardsManager.new TypeToken() {...}

    CardsManager.new TypeToken() {...}

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 3100%0 of 0n/a010101
    {...}3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/CardsManager.html b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager.html new file mode 100644 index 00000000..f2d9c78b --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager.html @@ -0,0 +1 @@ +CardsManager

    CardsManager

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total26 of 12579%0 of 0n/a1982819
    getPlayableCards()140%n/a114411
    CardsManager()67192%n/a0121501
    getResource(String)6960%n/a012301
    static {...}5100%n/a010101
    getInitialCards()3100%n/a010101
    getGoldCards()3100%n/a010101
    getResourceCards()3100%n/a010101
    getObjectives()3100%n/a010101
    getInstance()2100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/CardsManager.java.html b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager.java.html new file mode 100644 index 00000000..f3e5d31d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/CardsManager.java.html @@ -0,0 +1,117 @@ +CardsManager.java

    CardsManager.java

    package it.polimi.ingsw.utils;
    +
    +import com.google.gson.Gson;
    +import com.google.gson.reflect.TypeToken;
    +import it.polimi.ingsw.gamemodel.*;
    +
    +import java.io.FileReader;
    +import java.io.IOException;
    +import java.lang.reflect.Type;
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +/**
    + * Singleton that represents a collection of all cards actually existing in the Game, so only those used
    + * in the Match instances.
    + * It's appointed to initialise them with instances to be de-serialized from a file and make them available
    + * through getters.
    + */
    +public final class CardsManager {
    +    private static final CardsManager singletonInstance = new CardsManager();
    +
    +    private final Map<Integer, InitialCard> initialCards;
    +    private final Map<Integer, GoldCard> goldCards;
    +    private final Map<Integer, ResourceCard> resourceCards;
    +    private final Map<Integer, Objective> objectives;
    +
    +    /**
    +     * Private constructor since the singleton pattern is being used.
    +     * Read from the JSON files, de-serialise the content in Map<Integer, XXX> objects, initialize the private attributes
    +     * with these values.
    +     */
    +    private CardsManager() {
    +        CardJsonParser parser = new CardJsonParser();
    +        Gson gson = parser.getCardBuilder();
    +
    +        Type initialCardsType = new TypeToken<Map<Integer, InitialCard>>() { }.getType();
    +        Type goldCardsType = new TypeToken<Map<Integer, GoldCard>>() { }.getType();
    +        Type resourceCardsType = new TypeToken<Map<Integer, ResourceCard>>() { }.getType();
    +        Type objectivesType = new TypeToken<Map<Integer, Objective>>() {}.getType();
    +
    +        try {
    +            initialCards = gson.fromJson(getResource("/json/initial_card.json"), initialCardsType);
    +            goldCards = gson.fromJson(getResource("/json/gold_card.json"), goldCardsType);
    +            resourceCards = gson.fromJson(getResource("/json/resource_card.json"), resourceCardsType);
    +            objectives = gson.fromJson(getResource("/json/objective_card.json"), objectivesType);
    +        } catch (Exception e) {
    +            throw new RuntimeException(e);
    +        }
    +    }
    +
    +    private String getResource(String path) {
    +        try {
    +            return new String(this.getClass().getResourceAsStream(path).readAllBytes());
    +        } catch (IOException e) {
    +            throw new RuntimeException(e);
    +        }
    +    }
    +
    +    /**
    +     * Getter for the only possible instance available of this class, so used instead of a constructor.
    +     *
    +     * @return Always the same CardsManager instance
    +     */
    +    public static CardsManager getInstance() {
    +        return singletonInstance;
    +    }
    +
    +    /**
    +     * Getter for the initial cards
    +     *
    +     * @return Map that matches an int ID to the corresponding initial card
    +     */
    +    public Map<Integer, InitialCard> getInitialCards() {
    +        return initialCards;
    +    }
    +
    +    /**
    +     * Getter for the gold cards
    +     *
    +     * @return Map that matches an int ID to the corresponding gold card
    +     */
    +    public Map<Integer, GoldCard> getGoldCards() {
    +        return goldCards;
    +    }
    +
    +    /**
    +     * Getter for the resource cards
    +     *
    +     * @return Map that matches an int ID to the corresponding resource card
    +     */
    +    public Map<Integer, ResourceCard> getResourceCards() {
    +        return resourceCards;
    +    }
    +
    +    /**
    +     * Getter for the objectives
    +     *
    +     * @return Map that matches an int ID to the corresponding objective
    +     */
    +    public Map<Integer, Objective> getObjectives() {
    +        return objectives;
    +    }
    +
    +    /**
    +     * Getter for the playable cards
    +     *
    +     * @return Map that matches an int ID to the corresponding playable card
    +     */
    +    public Map<Integer, PlayableCard> getPlayableCards() {
    +        Map<Integer, PlayableCard> playableCards = new HashMap<>();
    +        playableCards.putAll(goldCards);
    +        playableCards.putAll(resourceCards);
    +
    +        return playableCards;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/CardsSerializer.html b/deliveries/Test results/it.polimi.ingsw.utils/CardsSerializer.html new file mode 100644 index 00000000..9fb049cc --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/CardsSerializer.html @@ -0,0 +1 @@ +CardsSerializer

    CardsSerializer

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total3,711 of 3,7110%0 of 0n/a2273573522
    main(String[])3,7080%n/a1173473411
    CardsSerializer()0%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/CardsSerializer.java.html b/deliveries/Test results/it.polimi.ingsw.utils/CardsSerializer.java.html new file mode 100644 index 00000000..cb262868 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/CardsSerializer.java.html @@ -0,0 +1,916 @@ +CardsSerializer.java

    CardsSerializer.java

    package it.polimi.ingsw.utils;
    +
    +import com.google.gson.Gson;
    +import it.polimi.ingsw.exceptions.InvalidResourceException;
    +import it.polimi.ingsw.gamemodel.*;
    +
    +import java.io.FileWriter;
    +import java.io.IOException;
    +import java.util.*;
    +
    +/**
    + * Serialize game cards into json
    + */
    +public class CardsSerializer {
    +
    +    /**
    +     * Function that serializes the cards
    +     * @param args arguments
    +     */
    +    public static void main(String[] args) {
    +        // cards
    +        InitialCard initialCard;
    +        Objective objectiveCard;
    +        ResourceCard resourceCard;
    +        GoldCard goldCard;
    +
    +        //placeholders
    +        Symbol topLeft, topRight, bottomLeft, bottomRight, reign, multiplier;
    +        int points;
    +        QuantityRequirement requirements;
    +
    +        // maps
    +        Map<Integer, InitialCard> initialCardMap = new HashMap<>();
    +        Map<Integer, Objective> objectiveCardMap = new HashMap<>();
    +        Map<Integer, ResourceCard> resourceCardMap = new HashMap<>();
    +        Map<Integer, GoldCard> goldCardMap = new HashMap<>();
    +
    +        //1) initial cards map----------------------------------------------------------------------------------------------
    +        initialCard = new InitialCard(
    +                new CardFace(Symbol.INSECT, Symbol.FUNGUS, Symbol.PLANT, Symbol.ANIMAL, Collections.emptySet()),
    +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.EMPTY_CORNER, Symbol.EMPTY_CORNER,
    +                        new HashSet<>(Set.of(Symbol.ANIMAL, Symbol.INSECT, Symbol.PLANT)))
    +        );
    +        initialCardMap.put(initialCard.getId(), initialCard);
    +
    +        initialCard = new InitialCard(
    +                new CardFace(Symbol.PLANT, Symbol.ANIMAL, Symbol.FUNGUS, Symbol.INSECT, Collections.emptySet()),
    +                new CardFace(Symbol.ANIMAL, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FUNGUS,
    +                        new HashSet<>(Set.of(Symbol.FUNGUS)))
    +        );
    +        initialCardMap.put(initialCard.getId(), initialCard);
    +
    +        initialCard = new InitialCard(
    +                new CardFace(Symbol.INSECT, Symbol.ANIMAL, Symbol.FUNGUS, Symbol.PLANT, Collections.emptySet()),
    +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER,
    +                        new HashSet<>(Set.of(Symbol.PLANT, Symbol.FUNGUS)))
    +        );
    +        initialCardMap.put(initialCard.getId(), initialCard);
    +
    +        initialCard = new InitialCard(
    +                new CardFace(Symbol.FUNGUS, Symbol.PLANT, Symbol.INSECT, Symbol.ANIMAL, Collections.emptySet()),
    +                new CardFace(Symbol.FULL_CORNER, Symbol.PLANT, Symbol.INSECT, Symbol.FULL_CORNER,
    +                        new HashSet<>(Set.of(Symbol.INSECT)))
    +        );
    +        initialCardMap.put(initialCard.getId(), initialCard);
    +
    +        initialCard = new InitialCard(
    +                new CardFace(Symbol.PLANT, Symbol.INSECT, Symbol.ANIMAL, Symbol.FUNGUS, Collections.emptySet()),
    +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER,
    +                        new HashSet<>(Set.of(Symbol.ANIMAL, Symbol.INSECT)))
    +        );
    +        initialCardMap.put(initialCard.getId(), initialCard);
    +
    +        initialCard = new InitialCard(
    +                new CardFace(Symbol.FUNGUS, Symbol.ANIMAL, Symbol.PLANT, Symbol.INSECT, Collections.emptySet()),
    +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.EMPTY_CORNER, Symbol.EMPTY_CORNER,
    +                        new HashSet<>(Set.of(Symbol.PLANT, Symbol.ANIMAL, Symbol.FUNGUS)))
    +        );
    +        initialCardMap.put(initialCard.getId(), initialCard);
    +
    +        //2) objective cards map--------------------------------------------------------------------------------------------
    +        //2.1) quantity objective
    +
    +        try {
    +            objectiveCard = new Objective(2, new QuantityRequirement(Map.of(Symbol.INSECT, 3)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(2, new QuantityRequirement(Map.of(Symbol.FUNGUS, 3)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(2, new QuantityRequirement(Map.of(Symbol.ANIMAL, 3)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(2, new QuantityRequirement(Map.of(Symbol.PLANT, 3)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(3, new QuantityRequirement(
    +                    Map.of(Symbol.FEATHER, 1, Symbol.INKWELL, 1, Symbol.PARCHMENT, 1)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(2, new QuantityRequirement(Map.of(Symbol.FEATHER, 2)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(2, new QuantityRequirement(Map.of(Symbol.INKWELL, 2)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(2, new QuantityRequirement(Map.of(Symbol.PARCHMENT, 2)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +        } catch (InvalidResourceException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +        //2.2) positional objective - nb: coordinates are relative
    +        try {
    +            objectiveCard = new Objective(2, new PositionRequirement(Map.of(
    +                    new Pair<>(0, 0), Symbol.FUNGUS, new Pair<>(1, 1), Symbol.FUNGUS, new Pair<>(2, 2), Symbol.FUNGUS)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(2, new PositionRequirement(Map.of(
    +                    new Pair<>(0, 0), Symbol.ANIMAL, new Pair<>(1, 1), Symbol.ANIMAL, new Pair<>(2, 2), Symbol.ANIMAL)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(2, new PositionRequirement(Map.of(
    +                    new Pair<>(0, 0), Symbol.PLANT, new Pair<>(1, -1), Symbol.PLANT, new Pair<>(2, -2), Symbol.PLANT)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(2, new PositionRequirement(Map.of(
    +                    new Pair<>(0, 0), Symbol.INSECT, new Pair<>(1, -1), Symbol.INSECT, new Pair<>(2, -2), Symbol.INSECT)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(3, new PositionRequirement(Map.of(
    +                    new Pair<>(0, 0), Symbol.ANIMAL, new Pair<>(1, -1), Symbol.INSECT, new Pair<>(1, -2), Symbol.INSECT)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(3, new PositionRequirement(Map.of(
    +                    new Pair<>(0, 0), Symbol.FUNGUS, new Pair<>(-1, -1), Symbol.ANIMAL, new Pair<>(-1, -2), Symbol.ANIMAL)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(3, new PositionRequirement(Map.of(
    +                    new Pair<>(0, 0), Symbol.FUNGUS, new Pair<>(0, -1), Symbol.FUNGUS, new Pair<>(1, -2), Symbol.PLANT)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +
    +            objectiveCard = new Objective(3, new PositionRequirement(Map.of(
    +                    new Pair<>(0, 0), Symbol.PLANT, new Pair<>(0, -1), Symbol.PLANT, new Pair<>(-1, -2), Symbol.INSECT)));
    +            objectiveCardMap.put(objectiveCard.getID(), objectiveCard);
    +        } catch (InvalidResourceException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +        //3) resource cards map---------------------------------------------------------------------------------------------
    +        //3.1) zero points
    +        points = 0;
    +
    +        try {
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.INSECT;
    +            bottomRight = Symbol.INSECT;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FEATHER;
    +            bottomLeft = Symbol.ANIMAL;
    +            bottomRight = Symbol.INSECT;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.INSECT;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.INSECT;
    +            bottomRight = Symbol.FULL_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.PLANT;
    +            topRight = Symbol.PLANT;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.ANIMAL;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.ANIMAL;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.INSECT;
    +            topRight = Symbol.PLANT;
    +            bottomLeft = Symbol.INKWELL;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FUNGUS;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FUNGUS;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FUNGUS;
    +            topRight = Symbol.FUNGUS;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.ANIMAL;
    +            bottomRight = Symbol.ANIMAL;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FUNGUS;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FUNGUS;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.INSECT;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.INSECT;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.PLANT;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.PLANT;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.INSECT;
    +            bottomLeft = Symbol.FEATHER;
    +            bottomRight = Symbol.PLANT;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.FUNGUS;
    +            topRight = Symbol.PLANT;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.INKWELL;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.INSECT;
    +            bottomLeft = Symbol.INKWELL;
    +            bottomRight = Symbol.ANIMAL;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.PARCHMENT;
    +            topRight = Symbol.INSECT;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FUNGUS;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FEATHER;
    +            bottomLeft = Symbol.PLANT;
    +            bottomRight = Symbol.FUNGUS;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FUNGUS;
    +            topRight = Symbol.INSECT;
    +            bottomLeft = Symbol.PARCHMENT;
    +            bottomRight = Symbol.FULL_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.INKWELL;
    +            topRight = Symbol.FUNGUS;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.ANIMAL;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.PLANT;
    +            topRight = Symbol.ANIMAL;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.PARCHMENT;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FUNGUS;
    +            bottomRight = Symbol.FUNGUS;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.ANIMAL;
    +            topRight = Symbol.ANIMAL;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.PLANT;
    +            bottomRight = Symbol.PLANT;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.PARCHMENT;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.PLANT;
    +            bottomRight = Symbol.ANIMAL;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.FEATHER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.ANIMAL;
    +            bottomRight = Symbol.FUNGUS;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.PLANT;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.PLANT;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.INSECT;
    +            topRight = Symbol.INSECT;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +        } catch (InvalidResourceException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +        //3.2) one point
    +        points = 1;
    +
    +        try {
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.INSECT;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FUNGUS;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FUNGUS;
    +            bottomRight = Symbol.FULL_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.ANIMAL;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.PLANT;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.ANIMAL;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FUNGUS;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.ANIMAL;
    +            bottomRight = Symbol.FULL_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.INSECT;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.PLANT;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.PLANT;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.INSECT;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.ANIMAL;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.ANIMAL;
    +            bottomRight = Symbol.FULL_CORNER;
    +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, 0);
    +            resourceCardMap.put(resourceCard.getId(), resourceCard);
    +        } catch (InvalidResourceException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +        //4) gold cards map-------------------------------------------------------------------------------------------------
    +        //4.1) with object multiplier (1pt)
    +        points = 1;
    +
    +        try {
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.PARCHMENT;
    +            bottomRight = Symbol.FULL_CORNER;
    +            multiplier = Symbol.PARCHMENT;
    +            requirements = new QuantityRequirement(Map.of(Symbol.INSECT, 2, Symbol.ANIMAL, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.PARCHMENT;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            multiplier = Symbol.PARCHMENT;
    +            requirements = new QuantityRequirement(Map.of(Symbol.FUNGUS, 2, Symbol.INSECT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.PARCHMENT;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            multiplier = Symbol.PARCHMENT;
    +            requirements = new QuantityRequirement(Map.of(Symbol.PLANT, 2, Symbol.FUNGUS, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.PARCHMENT;
    +            multiplier = Symbol.PARCHMENT;
    +            requirements = new QuantityRequirement(Map.of(Symbol.ANIMAL, 2, Symbol.PLANT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FEATHER;
    +            multiplier = Symbol.FEATHER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.FUNGUS, 2, Symbol.ANIMAL, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FEATHER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            multiplier = Symbol.FEATHER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.ANIMAL, 2, Symbol.FUNGUS, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.FEATHER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            multiplier = Symbol.FEATHER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.PLANT, 2, Symbol.INSECT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FEATHER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            multiplier = Symbol.FEATHER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.INSECT, 2, Symbol.PLANT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.INKWELL;
    +            bottomRight = Symbol.FULL_CORNER;
    +            multiplier = Symbol.INKWELL;
    +            requirements = new QuantityRequirement(Map.of(Symbol.PLANT, 2, Symbol.ANIMAL, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.INKWELL;
    +            multiplier = Symbol.INKWELL;
    +            requirements = new QuantityRequirement(Map.of(Symbol.INSECT, 2, Symbol.FUNGUS, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.INKWELL;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            multiplier = Symbol.INKWELL;
    +            requirements = new QuantityRequirement(Map.of(Symbol.ANIMAL, 2, Symbol.INSECT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.INKWELL;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            multiplier = Symbol.INKWELL;
    +            requirements = new QuantityRequirement(Map.of(Symbol.FUNGUS, 2, Symbol.PLANT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +        } catch (InvalidResourceException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +        //4.2) with corner multiplier (2pt)
    +        points = 2;
    +        multiplier = Symbol.CORNER_OBJ;
    +
    +        try {
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.ANIMAL, 3, Symbol.PLANT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.ANIMAL, 3, Symbol.INSECT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.ANIMAL, 3, Symbol.FUNGUS, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.FUNGUS, 3, Symbol.ANIMAL, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.FUNGUS, 3, Symbol.PLANT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.FUNGUS, 3, Symbol.INSECT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.INSECT, 3, Symbol.ANIMAL, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.INSECT, 3, Symbol.PLANT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.INSECT, 3, Symbol.FUNGUS, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.PLANT, 3, Symbol.INSECT, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.PLANT, 3, Symbol.FUNGUS, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.PLANT, 3, Symbol.ANIMAL, 1));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +        } catch (InvalidResourceException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +        //4.3) with no multiplier (3/5pt)
    +        points = 3;
    +        multiplier = Symbol.NO_MULT;
    +
    +        try {
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FEATHER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.ANIMAL, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.PARCHMENT;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.ANIMAL, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.INKWELL;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.ANIMAL, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.INKWELL;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.FUNGUS, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FEATHER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.FUNGUS, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.PARCHMENT;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.FUNGUS, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.INKWELL;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.INSECT, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.PARCHMENT;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.INSECT, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FEATHER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.INSECT, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.PARCHMENT;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.PLANT, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FEATHER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.PLANT, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.INKWELL;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.PLANT, 3));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +        } catch (InvalidResourceException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +        points = 5;
    +        multiplier = Symbol.NO_MULT;
    +
    +        try {
    +            reign = Symbol.ANIMAL;
    +            topLeft = Symbol.EMPTY_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.FULL_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.ANIMAL, 5));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.FUNGUS;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.EMPTY_CORNER;
    +            bottomLeft = Symbol.FULL_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.FUNGUS, 5));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.INSECT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.INSECT, 5));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +
    +            reign = Symbol.PLANT;
    +            topLeft = Symbol.FULL_CORNER;
    +            topRight = Symbol.FULL_CORNER;
    +            bottomLeft = Symbol.EMPTY_CORNER;
    +            bottomRight = Symbol.EMPTY_CORNER;
    +            requirements = new QuantityRequirement(Map.of(Symbol.PLANT, 5));
    +            goldCard = new GoldCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, multiplier, points, requirements);
    +            goldCardMap.put(goldCard.getId(), goldCard);
    +        } catch (InvalidResourceException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +        //5) to json--------------------------------------------------------------------------------------------------------
    +        CardJsonParser parser = new CardJsonParser();
    +        Gson gson = parser.getCardBuilder();
    +        try {
    +            String path = "src/main/resources/json/";
    +            System.out.println(gson.toJson(initialCardMap));
    +            FileWriter file;
    +            file = new FileWriter(path + "initial_card.json");
    +            file.write(gson.toJson(initialCardMap));
    +            file.close();
    +
    +            file = new FileWriter(path + "objective_card.json");
    +            file.write(gson.toJson(objectiveCardMap));
    +            file.close();
    +
    +            file = new FileWriter(path + "resource_card.json");
    +            file.write(gson.toJson(resourceCardMap));
    +            file.close();
    +
    +            file = new FileWriter(path + "gold_card.json");
    +            file.write(gson.toJson(goldCardMap));
    +            file.close();
    +        } catch (IOException e) {
    +            throw new RuntimeException(e);
    +        }
    +
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/DeckCreator.html b/deliveries/Test results/it.polimi.ingsw.utils/DeckCreator.html new file mode 100644 index 00000000..d4deb5e2 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/DeckCreator.html @@ -0,0 +1 @@ +DeckCreator

    DeckCreator

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 99100%0 of 8100%0902505
    createInitialDeck()24100%2100%020601
    createResourceDeck()24100%2100%020601
    createGoldDeck()24100%2100%020601
    createObjectiveDeck()24100%2100%020601
    DeckCreator()3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/DeckCreator.java.html b/deliveries/Test results/it.polimi.ingsw.utils/DeckCreator.java.html new file mode 100644 index 00000000..3c9b417b --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/DeckCreator.java.html @@ -0,0 +1,73 @@ +DeckCreator.java

    DeckCreator.java

    package it.polimi.ingsw.utils;
    +
    +import it.polimi.ingsw.gamemodel.*;
    +
    +import java.util.Map;
    +
    +/**
    + * This is a temporary class, used to have all the logic related to deck creation in a single place, so that
    + * when it will be implemented correctly we know where to modify it
    + */
    +public class DeckCreator {
    +
    +    /**
    +     * Create the deck of initial cards
    +     * @return a gamedeck of initial cards
    +     */
    +    public GameDeck<InitialCard> createInitialDeck() {
    +        GameDeck<InitialCard> deck = new GameDeck<>();
    +        Map<Integer, InitialCard> cards = CardsManager.getInstance().getInitialCards();
    +
    +        for (InitialCard card : cards.values()) {
    +            deck.add(card);
    +        }
    +
    +        return deck;
    +    }
    +
    +    /**
    +     * Create the deck of resource cards
    +     * @return a gamedeck of resource cards
    +     */
    +    public GameDeck<ResourceCard> createResourceDeck() {
    +        GameDeck<ResourceCard> deck = new GameDeck<>();
    +        Map<Integer, ResourceCard> cards = CardsManager.getInstance().getResourceCards();
    +
    +        for (ResourceCard card : cards.values()) {
    +            deck.add(card);
    +        }
    +
    +        return deck;
    +    }
    +
    +    /**
    +     * Create the deck of gold cards
    +     * @return a gamedeck of gold cards
    +     */
    +    public GameDeck<GoldCard> createGoldDeck() {
    +        GameDeck<GoldCard> deck = new GameDeck<>();
    +        Map<Integer, GoldCard> cards = CardsManager.getInstance().getGoldCards();
    +
    +        for (GoldCard card : cards.values()) {
    +            deck.add(card);
    +        }
    +
    +        return deck;
    +    }
    +
    +    /**
    +     * Create the deck of objective cards
    +     * @return a gamedeck of objective cards
    +     */
    +    public GameDeck<Objective> createObjectiveDeck() {
    +        GameDeck<Objective> deck = new GameDeck<>();
    +        Map<Integer, Objective> cards = CardsManager.getInstance().getObjectives();
    +
    +        for (Objective card : cards.values()) {
    +            deck.add(card);
    +        }
    +
    +        return deck;
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/GuiUtil.html b/deliveries/Test results/it.polimi.ingsw.utils/GuiUtil.html new file mode 100644 index 00000000..c3499a72 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/GuiUtil.html @@ -0,0 +1 @@ +GuiUtil

    GuiUtil

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total160 of 1737%16 of 160%242633381315
    getExceptionTitle(Exception)380%60%667711
    getImagePath(PlayableCard, Side)340%40%335511
    applyCSS(Parent, String)140%n/a112211
    getHexFromColor(Color)130%40%445511
    getImagePath(Objective, Side)120%20%223311
    getResourcesBack(Symbol)80%n/a112211
    getGoldsBack(Symbol)80%n/a112211
    getLoader(String)70%n/a111111
    getImagePath(InitialCard, Side)70%n/a111111
    getPawnImagePath(Color)70%n/a111111
    getFromFXML(String)60%n/a112211
    GuiUtil()30%n/a111111
    getBlackPawnImagePath()30%n/a111111
    static {...}9100%n/a010401
    isValidName(String)4100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/GuiUtil.java.html b/deliveries/Test results/it.polimi.ingsw.utils/GuiUtil.java.html new file mode 100644 index 00000000..61f9fded --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/GuiUtil.java.html @@ -0,0 +1,170 @@ +GuiUtil.java

    GuiUtil.java

    package it.polimi.ingsw.utils;
    +
    +import it.polimi.ingsw.client.frontend.gui.GraphicalApplication;
    +import it.polimi.ingsw.exceptions.AlreadyUsedUsernameException;
    +import it.polimi.ingsw.exceptions.WrongChoiceException;
    +import it.polimi.ingsw.exceptions.WrongStateException;
    +import it.polimi.ingsw.exceptions.WrongTurnException;
    +import it.polimi.ingsw.gamemodel.*;
    +import javafx.fxml.FXMLLoader;
    +
    +import java.io.IOException;
    +import java.rmi.RemoteException;
    +import java.util.Locale;
    +
    +public class GuiUtil {
    +    public static String playableCardsPath = "/images/playable_cards";
    +    public static String objectivesPath = "/images/objectives";
    +    public static String initialsPath = "/images/initial_cards";
    +    public static String pawnsPath = "/images/pawn_colors";
    +
    +    /**
    +     * Get a node from the given FXML
    +     * @param path path of the fxml
    +     * @return the requested node
    +     * @param <T> type of the expected node
    +     * @throws IOException if there are errors reading the file
    +     */
    +    public static <T>T getFromFXML(String path) throws IOException {
    +        FXMLLoader loader = GuiUtil.getLoader(path);
    +        return loader.load();
    +    }
    +
    +    /**
    +     * Check if the username/match name is valid
    +     * The name must be alphanumeric and between 1 and 32 characters
    +     * @param name string to check
    +     * @return if the name is valid
    +     */
    +    public static boolean isValidName(String name) {
    +        return name.matches("^[a-zA-Z0-9]{1,32}$");
    +    }
    +
    +    /**
    +     * Get the loader from the specified path
    +     * @param path file path of fxml
    +     * @return loader
    +     */
    +    public static FXMLLoader getLoader(String path) {
    +        return new FXMLLoader(GraphicalApplication.class.getResource(path));
    +    }
    +
    +    /**
    +     * Applies the specified CSS to a javafx scene parent
    +     * @param w The parent to apply the css to
    +     * @param path Path of the css file
    +     */
    +    public static void applyCSS(javafx.scene.Parent w, String path) {
    +        w.getStylesheets().addAll(GraphicalApplication.class.getResource(path).toExternalForm());
    +    }
    +
    +    /**
    +     * Get the image path of a playable card
    +     * @param card card to get the image
    +     * @param side side of the card
    +     * @return the path as a string
    +     */
    +    public static String getImagePath(PlayableCard card, Side side) {
    +        if (side.equals(Side.FRONT)) {
    +            return playableCardsPath + "/" + card.getId() + ".png";
    +        } else {
    +            return switch (card){
    +                case GoldCard ignored -> getGoldsBack(card.getReign());
    +                case ResourceCard ignored -> getResourcesBack(card.getReign());
    +            };
    +        }
    +    }
    +
    +    /**
    +     * Get the back of a resource card
    +     * @param symbol symbol of the resource card
    +     * @return the path as a string
    +     */
    +    public static String getResourcesBack(Symbol symbol) {
    +        String reign = symbol.toString().toUpperCase();
    +        return playableCardsPath + "/" + reign + "-resources-back.png";
    +    }
    +
    +    /**
    +     * Get the back of a gold card
    +     * @param symbol symbol of the gold card
    +     * @return the path as a string
    +     */
    +    public static String getGoldsBack(Symbol symbol) {
    +        String reign = symbol.toString().toUpperCase();
    +        return playableCardsPath + "/" + reign + "-golds-back.png";
    +    }
    +
    +    /**
    +     * Get the image path of an intial card
    +     * @param card card to get the image
    +     * @param side side of the card
    +     * @return the path as a string
    +     */
    +    public static String getImagePath(InitialCard card, Side side) {
    +        return initialsPath + "/" + side.toString() + "/" + card.getId() + ".png";
    +    }
    +
    +    /**
    +     * Get the image path of an objective card
    +     * @param obj card to get the image
    +     * @param side side of the card
    +     * @return the path as a string
    +     */
    +    public static String getImagePath(Objective obj, Side side) {
    +        if (side.equals(Side.FRONT))
    +            return objectivesPath + "/" + obj.getID() + ".png";
    +        else
    +            return objectivesPath + "/objectives-back.png";
    +    }
    +
    +    /**
    +     * Get image path of a pawn
    +     * @param color color of the pawn
    +     * @return the path as a string
    +     */
    +    public static String getPawnImagePath(Color color) {
    +        return pawnsPath + "/" + color.toString().toLowerCase(Locale.ROOT) + "-pawn.png";
    +    }
    +
    +    /**
    +     * Get image path of the black pawn
    +     * @return the path as a string
    +     */
    +    public static String getBlackPawnImagePath() {
    +        return pawnsPath + "/black-pawn.png";
    +    }
    +
    +    /**
    +     * Get the hex code of the given color
    +     * @param color color to convert
    +     * @return the hex code of color
    +     */
    +    public static String getHexFromColor(Color color) {
    +        return switch (color) {
    +            case RED -> "#C00402";
    +            case BLUE -> "#0C6692";
    +            case GREEN -> "#195C00";
    +            case YELLOW -> "#BEA013";
    +        };
    +    }
    +
    +    /**
    +     * Translate exception type into human-readable titles
    +     * @param e exception to translate
    +     * @return human-readable title
    +     */
    +    public static String getExceptionTitle(Exception e) {
    +        return switch (e) {
    +            case WrongStateException ignored -> "Wrong turn!";
    +            case WrongChoiceException ignored -> "Wrong move!";
    +            case AlreadyUsedUsernameException ignored -> "Username already used!";
    +            case WrongTurnException ignored -> "It is not your turn!";
    +            case RemoteException ignored -> "Connection error";
    +            default -> "Error!";
    +        };
    +    }
    +
    +}
    +
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/LeaderboardEntry.html b/deliveries/Test results/it.polimi.ingsw.utils/LeaderboardEntry.html new file mode 100644 index 00000000..8d65deb0 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/LeaderboardEntry.html @@ -0,0 +1 @@ +LeaderboardEntry

    LeaderboardEntry

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 12100%0 of 0n/a010101
    LeaderboardEntry(String, Integer, boolean)12100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/LeaderboardEntry.java.html b/deliveries/Test results/it.polimi.ingsw.utils/LeaderboardEntry.java.html new file mode 100644 index 00000000..e03ef98d --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/LeaderboardEntry.java.html @@ -0,0 +1,13 @@ +LeaderboardEntry.java

    LeaderboardEntry.java

    package it.polimi.ingsw.utils;
    +
    +import java.io.Serializable;
    +
    +/**
    + * LeaderboardEntry
    + *
    + * @param username The username of the player corresponding to this entry
    + * @param points the points obtained by the player during the game
    + * @param winner wheter the player is the winner or not (in case of draw, only the player with most objectives fullfilled wins)
    + */
    +public record LeaderboardEntry(String username, Integer points, boolean winner) implements Serializable { }
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/MessageJsonParser$MessageTypeAdapter.html b/deliveries/Test results/it.polimi.ingsw.utils/MessageJsonParser$MessageTypeAdapter.html new file mode 100644 index 00000000..2b7ccf72 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/MessageJsonParser$MessageTypeAdapter.html @@ -0,0 +1 @@ +MessageJsonParser.MessageTypeAdapter

    MessageJsonParser.MessageTypeAdapter

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total24 of 9273%3 of 862%3941715
    deserialize(JsonElement, Type, JsonDeserializationContext)183163%3350%243801
    convertError(String, JsonObject, JsonDeserializationContext)60%n/a111111
    convertClass(Class, String, JsonObject, JsonDeserializationContext)26100%2100%020701
    lambda$convertClass$0(String, Class)8100%n/a010101
    MessageJsonParser.MessageTypeAdapter(MessageJsonParser)3100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/MessageJsonParser.html b/deliveries/Test results/it.polimi.ingsw.utils/MessageJsonParser.html new file mode 100644 index 00000000..dc393f36 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/MessageJsonParser.html @@ -0,0 +1 @@ +MessageJsonParser

    MessageJsonParser

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total3 of 3691%0 of 0n/a141814
    getMessageBuilder()30%n/a111111
    MessageJsonParser()15100%n/a010301
    toMessage(String)13100%n/a010301
    toJson(Message)5100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/MessageJsonParser.java.html b/deliveries/Test results/it.polimi.ingsw.utils/MessageJsonParser.java.html new file mode 100644 index 00000000..bda00c2c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/MessageJsonParser.java.html @@ -0,0 +1,72 @@ +MessageJsonParser.java

    MessageJsonParser.java

    package it.polimi.ingsw.utils;
    +
    +import com.google.gson.*;
    +import it.polimi.ingsw.network.messages.Message;
    +import it.polimi.ingsw.network.messages.actions.ActionMessage;
    +import it.polimi.ingsw.network.messages.errors.ErrorMessage;
    +import it.polimi.ingsw.network.messages.responses.ResponseMessage;
    +
    +import java.lang.reflect.Type;
    +import java.util.Arrays;
    +import java.util.Optional;
    +
    +public class MessageJsonParser {
    +
    +    Gson messageBuilder;
    +
    +    public MessageJsonParser() {
    +        messageBuilder = new GsonBuilder().registerTypeAdapter(Message.class, new MessageTypeAdapter()).create();
    +    }
    +
    +    public Gson getMessageBuilder() {
    +        return messageBuilder;
    +    }
    +
    +
    +    public Message toMessage(String json) {
    +        try {
    +            return messageBuilder.fromJson(json, Message.class);
    +        } catch (Exception e) {
    +            throw new JsonParseException("Error converting to message");
    +        }
    +    }
    +
    +    public String toJson(Message m) {
    +        return messageBuilder.toJson(m);
    +    }
    +
    +    private class MessageTypeAdapter implements JsonDeserializer<Message> {
    +
    +        @Override
    +        public Message deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
    +            JsonObject messageObject = json.getAsJsonObject();
    +
    +            if (messageObject.has("action")) {
    +                return convertClass(ActionMessage.class, messageObject.get("action").getAsString(), messageObject, context);
    +            } else if (messageObject.has("response")) {
    +                return convertClass(ResponseMessage.class, messageObject.get("response").getAsString(), messageObject, context);
    +            } else if (messageObject.has("error")) {
    +                return convertError(messageObject.get("error").getAsString(), messageObject, context);
    +            } else {
    +                throw new JsonParseException("Wrong message type");
    +            }
    +        }
    +
    +        private Message convertError(String type, JsonObject messageObject, JsonDeserializationContext context) {
    +            return context.deserialize(messageObject, ErrorMessage.class);
    +        }
    +
    +        private Message convertClass(Class<?> mainClass, String type, JsonObject messageObject, JsonDeserializationContext context) {
    +            Class<?>[] classes = mainClass.getPermittedSubclasses();
    +            Optional<Class<?>> resultClass = Arrays.stream(classes)
    +                    .filter(a -> type.equals(a.getSimpleName().replace("Message", "")))
    +                    .findFirst();
    +            if (resultClass.isEmpty()) {
    +                throw new JsonParseException("Value is not found");
    +            } else {
    +                return context.deserialize(messageObject, resultClass.get());
    +            }
    +        }
    +    }
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/Pair.html b/deliveries/Test results/it.polimi.ingsw.utils/Pair.html new file mode 100644 index 00000000..e6dafa55 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/Pair.html @@ -0,0 +1 @@ +Pair

    Pair

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total0 of 9100%0 of 0n/a010101
    Pair(Object, Object)9100%n/a010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/Pair.java.html b/deliveries/Test results/it.polimi.ingsw.utils/Pair.java.html new file mode 100644 index 00000000..763806b9 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/Pair.java.html @@ -0,0 +1,18 @@ +Pair.java

    Pair.java

    package it.polimi.ingsw.utils;
    +
    +import java.io.Serial;
    +import java.io.Serializable;
    +
    +/**
    + * Represents a pair of generic values.
    + *
    + * @param first The first value of the pair
    + * @param second The second value of the pair
    + * @param <T> The type of the first value
    + * @param <U> The type of the second value
    + */
    +public record Pair<T, U>(T first, U second) implements Serializable {
    +    @Serial
    +    private static final long serialVersionUID = 1L;
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/PlacedCardRecord.html b/deliveries/Test results/it.polimi.ingsw.utils/PlacedCardRecord.html new file mode 100644 index 00000000..4dca9794 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/PlacedCardRecord.html @@ -0,0 +1 @@ +PlacedCardRecord

    PlacedCardRecord

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total15 of 150%0 of 0n/a111111
    PlacedCardRecord(Integer, Integer, Integer, Side)150%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/PlacedCardRecord.java.html b/deliveries/Test results/it.polimi.ingsw.utils/PlacedCardRecord.java.html new file mode 100644 index 00000000..b01bb57f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/PlacedCardRecord.java.html @@ -0,0 +1,15 @@ +PlacedCardRecord.java

    PlacedCardRecord.java

    package it.polimi.ingsw.utils;
    +
    +import it.polimi.ingsw.gamemodel.Side;
    +
    +/**
    + * PlacedCardRecord
    + *
    + * @param cardID The card ID
    + * @param x The x coordinate
    + * @param y The y coordinate
    + * @param side The chosen side
    + */
    +public record PlacedCardRecord(Integer cardID, Integer x, Integer y, Side side) {
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/RequestStatus.html b/deliveries/Test results/it.polimi.ingsw.utils/RequestStatus.html new file mode 100644 index 00000000..8d9bfa1f --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/RequestStatus.html @@ -0,0 +1 @@ +RequestStatus

    RequestStatus

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total21 of 210%0 of 0n/a114411
    static {...}210%n/a114411
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/RequestStatus.java.html b/deliveries/Test results/it.polimi.ingsw.utils/RequestStatus.java.html new file mode 100644 index 00000000..6d6ed82c --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/RequestStatus.java.html @@ -0,0 +1,14 @@ +RequestStatus.java

    RequestStatus.java

    package it.polimi.ingsw.utils;
    +
    +import it.polimi.ingsw.controllers.PlayerController;
    +import it.polimi.ingsw.server.Server;
    +
    +/**
    + * Represents the status of a remote request sent to a remove {@link Server} or {@link PlayerController}.
    + */
    +public enum RequestStatus {
    +    PENDING,
    +    SUCCESSFUL,
    +    FAILED;
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/TUICardParser.html b/deliveries/Test results/it.polimi.ingsw.utils/TUICardParser.html new file mode 100644 index 00000000..dc7014b6 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/TUICardParser.html @@ -0,0 +1 @@ +TUICardParser

    TUICardParser

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
    Total1,597 of 1,5970%114 of 1140%1011012962962626
    processObjectiveCenter(Map, Objective)1830%110%77353511
    parseCard(Card, Pair, Pair, Boolean)1440%80%77222211
    processCenter(Map, Pair, Set, GoldCard)1320%80%66252511
    processCenter(Map, Set, InitialCard)1280%60%55202011
    positioningClassifier(Map, Map)1210%160%99202011
    processCenter(Map, Pair, Set, ResourceCard)900%60%44151511
    processCorners(Map, Map, Pair, String)870%70%66181811
    assembleCard(StringBuilder, Map, Map)750%40%33121211
    getTopLeftCorner(Pair, Symbol, String, String)700%20%22101011
    getBottomLeftCorner(Pair, Symbol, String, String)700%20%22101011
    getPrefixCoord(Pair, int)600%70%779911
    acquireCornerSymbols(Map, Card, Boolean)590%20%22131311
    processObjectiveCorners(Map, Pair)470%n/a117711
    getTopRightCorner(Pair, Symbol, String, String)460%20%22101011
    getBottomRightCorner(Pair, Symbol, String, String)460%20%22101011
    parseObjective(Objective, Pair)390%n/a119911
    getQuantityString(Map, String)360%20%225511
    getPlayableCoord(Integer, Integer)340%n/a115511
    getPosixIcon(Symbol)290%50%557711
    getRightIcon(Symbol)250%100%1010111111
    getRightColor(Symbol)210%80%889911
    getGenericBack(Symbol, Pair)180%n/a114411
    acquireCenterSymbols(Set, Card, Boolean)150%20%223311
    getObjectiveSpace(Integer)110%40%445511
    getColorAndIcon(Symbol)80%n/a111111
    TUICardParser()30%n/a111111
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/TUICardParser.java.html b/deliveries/Test results/it.polimi.ingsw.utils/TUICardParser.java.html new file mode 100644 index 00000000..aa8d099e --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/TUICardParser.java.html @@ -0,0 +1,574 @@ +TUICardParser.java

    TUICardParser.java

    package it.polimi.ingsw.utils;
    +
    +import java.util.*;
    +import it.polimi.ingsw.exceptions.CardException;
    +import it.polimi.ingsw.exceptions.InvalidResourceException;
    +import it.polimi.ingsw.gamemodel.*;
    +
    +
    +public class TUICardParser {
    +
    +    public String getGenericBack(Symbol reign, Pair<Integer, Integer> coord) {
    +        try {
    +            PlayableCard card = new ResourceCard(null, reign, 0);
    +            return parseCard(card, coord, null, false);
    +        } catch (InvalidResourceException | CardException e) {
    +            return "";
    +        }
    +    }
    +
    +
    +
    +
    +    // PARSERS
    +    
    +    /**
    +     * Generates a printable string representing a {@link Card} of any type
    +     * 
    +     * @param card the card to be parsed
    +     * @param coord where to place the card (relative to the terminal, not {@link Board})
    +     * @param displayCoord coordinates to display on the card (null if none should be displayed)
    +     * @param isFacingUp wheter the card is facing up or down
    +     * 
    +     * @return The parsed card
    +     * 
    +     * @throws CardException 
    +     */
    +    public String parseCard(Card card, Pair<Integer, Integer> coord, Pair<Integer, Integer> displayCoord, Boolean isFacingUp)
    +            throws CardException {
    +
    +        // acquire information
    +        Map<Corner, Symbol> cornersToProcess = new HashMap<>();
    +        acquireCornerSymbols(cornersToProcess, card, isFacingUp);
    +
    +        Set<Symbol> centerToProcess = new HashSet<>();
    +        acquireCenterSymbols(centerToProcess, card, isFacingUp);
    +
    +        String cardColor;
    +        switch (card) {
    +            case InitialCard initialCard -> cardColor = "\033[0m";
    +            case GoldCard goldCard -> cardColor = getRightColor(goldCard.getReign());
    +            case ResourceCard resourceCard -> cardColor = getRightColor(resourceCard.getReign());
    +            default -> throw new CardException("Invalid card type: " + card.getClass() + "!");
    +        }
    +
    +
    +        // process information
    +        Map<Corner, List<String>> cornersAsString = new HashMap<>();
    +        processCorners(cornersAsString, cornersToProcess, coord, cardColor);
    +
    +        Map<Integer, String> centerAsString = new HashMap<>();
    +        switch (card) {
    +            case InitialCard initialCard -> processCenter(centerAsString, centerToProcess, initialCard);
    +            case GoldCard goldCard -> processCenter(centerAsString, displayCoord, centerToProcess, goldCard);
    +            case ResourceCard resourceCard -> processCenter(centerAsString, displayCoord, centerToProcess, resourceCard);
    +            default -> throw new CardException("Invalid card type: " + card.getClass() + "!");
    +        }
    +
    +        // assemble the string
    +        String newLine = "\n";
    +        StringBuilder printableCard = new StringBuilder(cardColor).append(newLine);
    +        assembleCard(printableCard, cornersAsString, centerAsString); // if it doesn't work, use the safe version assembleCardSafe
    +        printableCard.append(newLine);
    +
    +        // card assembled
    +        return printableCard.toString();
    +    }
    +
    +    public String parseObjective(Objective card, Pair<Integer, Integer> coord) {
    +
    +        // process information
    +        Map<Corner, List<String>> cornersAsString = new HashMap<>();
    +        processObjectiveCorners(cornersAsString, coord);
    +
    +        Map<Integer, String> centerAsString = new HashMap<>();
    +        processObjectiveCenter(centerAsString, card);
    +
    +        // assemble the string
    +        String newLine = "\n", cardColor = "\033[0m";
    +        StringBuilder printableCard = new StringBuilder(cardColor).append(newLine);
    +        assembleCard(printableCard, cornersAsString, centerAsString); // if it doesn't work, use the safe version assembleCardSafe
    +        printableCard.append(newLine);
    +
    +        // card assembled
    +        return printableCard.toString();
    +    }
    +
    +
    +    // NO JAVADOC
    +    // ASSEMBLERERS
    +    private void assembleCard(StringBuilder printableCard, Map<Corner, List<String>> cornersAsString, Map<Integer, String> centerAsString) {
    +
    +        List<Corner> left = new ArrayList<>(), right = new ArrayList<>();
    +        left.add(Corner.TOP_LEFT);
    +        left.add(Corner.BOTTOM_LEFT);
    +        right.add(Corner.TOP_RIGHT);
    +        right.add(Corner.BOTTOM_RIGHT);
    +
    +        int i, j, k;
    +        for (i = 0; i < 6; i++) {
    +            j = (i <= 2) ? 0 : 1;
    +            k = i % 3;
    +
    +            printableCard.append(cornersAsString.get(left.get(j)).get(k));
    +            printableCard.append(centerAsString.get(i));
    +            printableCard.append(cornersAsString.get(right.get(j)).get(k));
    +        }
    +
    +    }
    +
    +
    +    // ACQUIRES
    +
    +    private void acquireCornerSymbols(Map<Corner, Symbol> cornersToProcess, Card card, Boolean isFacingUp) {
    +        try {
    +            Side side = (isFacingUp) ? Side.FRONT : Side.BACK;
    +            Symbol topLeft = card.getSide(side).getCorner(Corner.TOP_LEFT);
    +            Symbol topRight = card.getSide(side).getCorner(Corner.TOP_RIGHT);
    +            Symbol bottomLeft = card.getSide(side).getCorner(Corner.BOTTOM_LEFT);
    +            Symbol bottomRight = card.getSide(side).getCorner(Corner.BOTTOM_RIGHT);
    +
    +            cornersToProcess.put(Corner.TOP_LEFT, topLeft);
    +            cornersToProcess.put(Corner.TOP_RIGHT, topRight);
    +            cornersToProcess.put(Corner.BOTTOM_LEFT, bottomLeft);
    +            cornersToProcess.put(Corner.BOTTOM_RIGHT, bottomRight);
    +        } catch (CardException e) {
    +            throw new RuntimeException(e);
    +        }
    +    }
    +
    +    private void acquireCenterSymbols(Set<Symbol> centerToProcess, Card card, Boolean isFacingUp) {
    +        Side side = (isFacingUp) ? Side.FRONT : Side.BACK;
    +        centerToProcess.addAll(card.getSide(side).getCenter());
    +    }
    +
    +
    +    // PROCESSERS
    +
    +    private void processCorners(Map<Corner, List<String>> cornersAsString, Map<Corner, Symbol> cornersToProcess,
    +            Pair<Integer, Integer> coord, String borderColor) {
    +
    +        List<String> singleCorner;
    +        String suffix;
    +
    +        for (Corner corner : cornersToProcess.keySet()) {
    +            singleCorner = new ArrayList<>();
    +
    +            switch (corner) {
    +                case Corner.TOP_LEFT:
    +                    suffix = "";
    +                    singleCorner.addAll(getTopLeftCorner(coord, cornersToProcess.get(corner), suffix, borderColor));
    +                    break;
    +
    +                case Corner.TOP_RIGHT:
    +                    suffix = "\n";
    +                    singleCorner.addAll(getTopRightCorner(coord, cornersToProcess.get(corner), suffix, borderColor));
    +                    break;
    +
    +                case Corner.BOTTOM_LEFT:
    +                    suffix = "";
    +                    singleCorner.addAll(getBottomLeftCorner(coord, cornersToProcess.get(corner), suffix, borderColor));
    +                    break;
    +
    +                case Corner.BOTTOM_RIGHT:
    +                    suffix = "\n";
    +                    singleCorner.addAll(getBottomRightCorner(coord, cornersToProcess.get(corner), suffix, borderColor));
    +                    break;
    +
    +                default:
    +                    break;
    +
    +            }
    +            cornersAsString.put(corner, singleCorner);
    +        }
    +    }
    +
    +    private String getPlayableCoord(Integer x, Integer y) {
    +        String coords = "(" + x.toString() + "," + y.toString() + ")";
    +        Integer preSpacesNumber = (8 - coords.length()) / 2; // center is 8 chars
    +        String preSpaces = " ".repeat(preSpacesNumber);
    +        String postSpaces = " ".repeat(8 - preSpacesNumber - coords.length());
    +
    +        return preSpaces + coords + postSpaces;
    +    }
    +
    +    // only considers cases of goldcards with 1 or 2 different symbols as placement requirement
    +    private void processCenter(Map<Integer, String> centerAsString, Pair<Integer, Integer> displayCoord, Set<Symbol> centerToProcess,
    +            GoldCard card) {
    +        centerAsString.put(0, "────────");
    +        if (displayCoord != null) {
    +            centerAsString.put(2, getPlayableCoord(displayCoord.first(), displayCoord.second()));
    +        } else {
    +            centerAsString.put(2, "        ");
    +        }
    +        centerAsString.put(5, "────────");
    +
    +        String colorReset = getRightColor(card.getReign());
    +
    +        if (centerToProcess.isEmpty()) {
    +            centerAsString.put(3, "        ");
    +            centerAsString.put(1, "   " + getRightColor(card.getMultiplier()) + String.valueOf(card.getPoints())
    +                    + getRightIcon(card.getMultiplier()) + colorReset + "  ");
    +
    +            String prefixSpace, postfixSpace;
    +            switch (card.getRequirement().getReqs().size()) {
    +                case 1:
    +                    prefixSpace = "   ";
    +                    postfixSpace = "  ";
    +                    break;
    +                case 2:
    +                    prefixSpace = postfixSpace = " ";
    +                    break;
    +                case 3:
    +                    prefixSpace = postfixSpace = "";
    +                    break;
    +                default:
    +                    prefixSpace = postfixSpace = "";
    +                    break;
    +            };
    +            centerAsString.put(4, prefixSpace + getQuantityString(card.getRequirement().getReqs(), colorReset) + postfixSpace);
    +
    +            return;
    +        }
    +
    +        centerAsString.put(1, "        ");
    +        centerAsString.put(3, "   " + getRightColor(card.getReign()) + "1" + getRightIcon(card.getReign()) + "  "); // back
    +        centerAsString.put(4, "        ");
    +    }
    +
    +    private void processCenter(Map<Integer, String> centerAsString, Pair<Integer, Integer> displayCoord, Set<Symbol> centerToProcess,
    +            ResourceCard card) {
    +        centerAsString.put(0, "────────");
    +        if (displayCoord != null) {
    +            centerAsString.put(2, getPlayableCoord(displayCoord.first(), displayCoord.second()));
    +        } else {
    +            centerAsString.put(2, "        ");
    +        }
    +        centerAsString.put(4, "        ");
    +        centerAsString.put(5, "────────");
    +
    +        if (centerToProcess.isEmpty()) {
    +            if (card.getPoints() == 0) {
    +                centerAsString.put(1, "        ");
    +            } else {
    +                centerAsString.put(1, "   " + String.valueOf(card.getPoints()) + "    ");
    +            }
    +
    +            centerAsString.put(3, "        ");
    +            return;
    +        }
    +
    +        centerAsString.put(1, "        ");
    +        centerAsString.put(3, "   " + getRightColor(card.getReign()) + "1" + getRightIcon(card.getReign()) + "  "); // back
    +    }
    +
    +    private void processCenter(Map<Integer, String> centerAsString, Set<Symbol> centerToProcess, InitialCard card) {
    +        String colorReset = "\033[0m";
    +
    +        centerAsString.put(0, colorReset + "────────");
    +        centerAsString.put(1, colorReset + "        ");
    +        centerAsString.put(4, colorReset + "        ");
    +        centerAsString.put(5, colorReset + "────────");
    +
    +        if (centerToProcess.isEmpty()) {
    +            centerAsString.put(2, colorReset + "   ╔╗   ");
    +            centerAsString.put(3, colorReset + "   ╚╝   ");
    +            return;
    +        }
    +
    +        Symbol[] symbols = centerToProcess.toArray(new Symbol[0]);
    +
    +        centerAsString.put(2, "   " + getRightColor(symbols[0]) + "1" + getRightIcon(symbols[0]) + colorReset + "  ");
    +        switch (centerToProcess.size()) {
    +            case 1:
    +                centerAsString.put(3, "        ");
    +                break;
    +            case 2:
    +                centerAsString.put(3, "   " + getRightColor(symbols[1]) + "1" + getRightIcon(symbols[1]) + colorReset + "  ");
    +                break;
    +            case 3:
    +                centerAsString.put(3, " " + getRightColor(symbols[1]) + "1" + getRightIcon(symbols[1]) + getRightColor(symbols[2]) + "1"
    +                        + getRightIcon(symbols[2]) + colorReset + " ");
    +                break;
    +            default:
    +                break;
    +        }
    +    }
    +
    +    private void processObjectiveCorners(Map<Corner, List<String>> cornersAsString, Pair<Integer, Integer> coord) {
    +        String leftSuffix = "", rightSuffix = "\n";
    +        Symbol symbol = Symbol.EMPTY_CORNER;
    +
    +        cornersAsString.put(Corner.TOP_LEFT, getTopLeftCorner(coord, symbol, leftSuffix, "\033[0m"));
    +        cornersAsString.put(Corner.TOP_RIGHT, getTopRightCorner(coord, symbol, rightSuffix, "\033[0m"));
    +        cornersAsString.put(Corner.BOTTOM_LEFT, getBottomLeftCorner(coord, symbol, leftSuffix, "\033[0m"));
    +        cornersAsString.put(Corner.BOTTOM_RIGHT, getBottomRightCorner(coord, symbol, rightSuffix, "\033[0m"));
    +    }
    +
    +
    +
    +    private void processObjectiveCenter(Map<Integer, String> centerAsString, Objective objective) {
    +
    +        centerAsString.put(0, "────────");
    +        centerAsString.put(1, "   " + String.valueOf(objective.getPoints()) + "    ");
    +        centerAsString.put(5, "────────");
    +
    +        switch (objective.getReq()) {
    +            case PositionRequirement positionRequirement:
    +                positioningClassifier(centerAsString, positionRequirement.getReqs());
    +                break;
    +            case QuantityRequirement quantityRequirement:
    +                Map<Symbol, Integer> req = quantityRequirement.getReqs();
    +                int size = req.size();
    +                centerAsString.put(2, "        ");
    +                centerAsString.put(4, "        ");
    +                int reqSize = req.size();
    +                if (reqSize < 3) {
    +                    String space = getObjectiveSpace(size);
    +                    if (space != null) {
    +                        centerAsString.put(3, space + " " + getQuantityString(req, "\033[0m") + space);
    +                        break;
    +                    }
    +                } else {
    +                    int firstHalf = size / 2;
    +                    String space = getObjectiveSpace(firstHalf);
    +                    Map<Symbol, Integer> first = new HashMap<>(), second = new HashMap<>();
    +                    int cycle = 0;
    +                    for (Symbol s : req.keySet()) {
    +                        if (cycle < firstHalf)
    +                            first.put(s, req.get(s));
    +                        else
    +                            second.put(s, req.get(s));
    +                        cycle++;
    +                    }
    +
    +                    centerAsString.put(3, space + " " + getQuantityString(first, "\033[0m") + space);
    +                    space = getObjectiveSpace(size - firstHalf);
    +                    centerAsString.put(4, space + getQuantityString(second, "\033[0m") + space);
    +                }
    +                break;
    +            default:
    +                throw new IllegalStateException("Unexpected value: " + objective.getReq());
    +        }
    +
    +
    +    }
    +
    +    // GETTERS
    +
    +    private String getQuantityString(Map<Symbol, Integer> reqs, String borderColor) {
    +
    +        StringBuilder reqString = new StringBuilder();
    +
    +        for (Symbol symbol : reqs.keySet())
    +            reqString.append(getRightColor(symbol)).append(String.valueOf(reqs.get(symbol))).append(getRightIcon(symbol))
    +                    .append(borderColor);
    +
    +        return reqString.toString();
    +
    +    }
    +
    +    private String getPrefixCoord(Pair<Integer, Integer> coord, int linePosition) {
    +        int x = coord.first(), y = coord.second();
    +
    +        return switch (linePosition) {
    +            case 1 -> "\033[" + String.valueOf(y) + ";" + String.valueOf(x) + "H";
    +            case 2 -> "\033[" + String.valueOf(y + 1) + ";" + String.valueOf(x) + "H";
    +            case 3 -> "\033[" + String.valueOf(y + 2) + ";" + String.valueOf(x) + "H";
    +            case 4 -> "\033[" + String.valueOf(y + 3) + ";" + String.valueOf(x) + "H";
    +            case 5 -> "\033[" + String.valueOf(y + 4) + ";" + String.valueOf(x) + "H";
    +            case 6 -> "\033[" + String.valueOf(y + 5) + ";" + String.valueOf(x) + "H";
    +            default -> "";
    +        };
    +
    +    }
    +
    +    private String getColorAndIcon(Symbol symbol) {
    +        return getRightColor(symbol) + getRightIcon(symbol);
    +    }
    +
    +    /**
    +     * The method is a getter for the TUI-relative color of a specific symbol.
    +     * 
    +     * @param symbol the specified symbol
    +     * @return the color code as String
    +     */
    +    public String getRightColor(Symbol symbol) {
    +        return switch (symbol) {
    +            case FUNGUS -> "\033[31m";
    +            case ANIMAL -> "\033[34m";
    +            case PLANT -> "\033[32m";
    +            case INSECT -> "\033[35m";
    +
    +            case INKWELL -> "\033[33m";
    +            case PARCHMENT -> "\033[33m";
    +            case FEATHER -> "\033[33m";
    +            default -> "";
    +        };
    +    }
    +
    +    /**
    +     * The method is a getter for the TUI-relative icon of a specific symbol.
    +     * 
    +     * @param symbol the specified symbol
    +     * @return the symbol icon as String
    +     */
    +    public String getRightIcon(Symbol symbol) {
    +        return switch (symbol) {
    +            case FULL_CORNER, EMPTY_CORNER -> "  ";
    +            case FUNGUS -> "󰟟 ";
    +            case ANIMAL -> " ";
    +            case PLANT -> " ";
    +            case INSECT -> "󱖉 ";
    +            case INKWELL -> "󱄮 ";
    +            case PARCHMENT -> " ";
    +            case FEATHER -> " ";
    +            case CORNER_OBJ -> "󱨈 ";
    +            default -> "  ";
    +        };
    +    }
    +
    +    private List<String> getTopLeftCorner(Pair<Integer, Integer> coord, Symbol symbol, String suffix, String borderColor) {
    +        List<String> corner = new ArrayList<>();
    +
    +        switch (symbol) {
    +            case Symbol.EMPTY_CORNER:
    +                corner.add(getPrefixCoord(coord, 1) + "┌────" + suffix);
    +                corner.add(getPrefixCoord(coord, 2) + "│    " + suffix);
    +                corner.add(getPrefixCoord(coord, 3) + "│    " + suffix);
    +                break;
    +
    +            default:
    +                corner.add(getPrefixCoord(coord, 1) + "┌───┬" + suffix);
    +                corner.add(getPrefixCoord(coord, 2) + "│ " + getColorAndIcon(symbol) + borderColor + "│" + suffix);
    +                corner.add(getPrefixCoord(coord, 3) + "├───┘" + suffix);
    +                break;
    +        }
    +
    +        return corner;
    +    }
    +
    +    private List<String> getTopRightCorner(Pair<Integer, Integer> coord, Symbol symbol, String suffix, String borderColor) {
    +
    +        List<String> corner = new ArrayList<>();
    +
    +        switch (symbol) {
    +            case Symbol.EMPTY_CORNER:
    +                corner.add("────┐" + suffix);
    +                corner.add("    │" + suffix);
    +                corner.add("    │" + suffix);
    +                break;
    +
    +            default:
    +                corner.add("┬───┐" + suffix);
    +                corner.add("│ " + getColorAndIcon(symbol) + borderColor + "│" + suffix);
    +                corner.add("└───┤" + suffix);
    +                break;
    +        }
    +
    +        return corner;
    +    }
    +
    +    private List<String> getBottomLeftCorner(Pair<Integer, Integer> coord, Symbol symbol, String suffix, String borderColor) {
    +
    +        List<String> corner = new ArrayList<>();
    +
    +        switch (symbol) {
    +            case Symbol.EMPTY_CORNER:
    +                corner.add(getPrefixCoord(coord, 4) + "│    " + suffix);
    +                corner.add(getPrefixCoord(coord, 5) + "│    " + suffix);
    +                corner.add(getPrefixCoord(coord, 6) + "└────" + suffix);
    +                break;
    +
    +            default:
    +                corner.add(getPrefixCoord(coord, 4) + "├───┐" + suffix);
    +                corner.add(getPrefixCoord(coord, 5) + "│ " + getColorAndIcon(symbol) + borderColor + "│" + suffix);
    +                corner.add(getPrefixCoord(coord, 6) + "└───┴" + suffix);
    +                break;
    +        }
    +
    +        return corner;
    +    }
    +
    +    private List<String> getBottomRightCorner(Pair<Integer, Integer> coord, Symbol symbol, String suffix, String borderColor) {
    +
    +        List<String> corner = new ArrayList<>();
    +
    +        switch (symbol) {
    +            case Symbol.EMPTY_CORNER:
    +                corner.add("    │" + suffix);
    +                corner.add("    │" + suffix);
    +                corner.add("────┘" + suffix);
    +                break;
    +
    +            default:
    +                corner.add("┌───┤" + suffix);
    +                corner.add("│ " + getColorAndIcon(symbol) + borderColor + "│" + suffix);
    +                corner.add("┴───┘" + suffix);
    +                break;
    +        }
    +
    +        return corner;
    +    }
    +
    +    private String getPosixIcon(Symbol symbol) {
    +
    +        String icon = "▆▆", suffix = "\033[0m";
    +
    +        return switch (symbol) {
    +            case FUNGUS -> "\033[31m" + icon + suffix;
    +            case ANIMAL -> "\033[36m" + icon + suffix;
    +            case PLANT -> "\033[32m" + icon + suffix;
    +            case INSECT -> "\033[35m" + icon + suffix;
    +            default -> icon + suffix;
    +        };
    +
    +
    +    }
    +
    +
    +    // UTILS
    +    private void positioningClassifier(Map<Integer, String> centerAsString, Map<Pair<Integer, Integer>, Symbol> reqs) {
    +        Pair<Integer, Integer> bottomMost = null;
    +        Pair<Integer, Integer> leftMost = null;
    +
    +
    +        for (Pair<Integer, Integer> coord : reqs.keySet()) {
    +            if (bottomMost == null || coord.second() < bottomMost.second()) {
    +                bottomMost = coord;
    +            }
    +            if (leftMost == null || coord.first() < leftMost.first()) {
    +                leftMost = coord;
    +            }
    +        }
    +
    +        Integer col, row;
    +        for (Pair<Integer, Integer> coord : reqs.keySet()) {
    +            row = 2 - (coord.second() - bottomMost.second()); // 2 (max) - (curr - offset): we go top to bottom
    +            col = coord.first() - leftMost.first(); // simply offset
    +
    +            // String building (with horizontal spaces)
    +            String tmp = "";
    +            for (int i = 0; i < col; i++) {
    +                tmp += "  ";
    +            }
    +            tmp += getPosixIcon(reqs.get(coord));
    +            for (int i = col; i < 3; i++) {
    +                tmp += "  ";
    +            }
    +
    +            centerAsString.put(row + 2, tmp); // +2: start from second line of card
    +        }
    +    }
    +
    +    private String getObjectiveSpace(Integer size) {
    +        return switch (size) {
    +            case 1 -> "  ";
    +            case 2 -> " ";
    +            case 3 -> "";
    +            default -> null;
    +        };
    +    }
    +
    +}
    +
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/index.html b/deliveries/Test results/it.polimi.ingsw.utils/index.html new file mode 100644 index 00000000..b82cb080 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/index.html @@ -0,0 +1 @@ +it.polimi.ingsw.utils

    it.polimi.ingsw.utils

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total5,575 of 6,0638%135 of 15412%1361801,0861,1814682418
    CardsSerializer3,7110%n/a227357352211
    TUICardParser1,5970%1140%101101296296262611
    GuiUtil1607%160%24263338131501
    CardsManager9979%n/a198281901
    MessageJsonParser.MessageTypeAdapter6873%3562%394171501
    RequestStatus0%n/a11441111
    CardJsonParser.CardTypeAdapter10985%2675%294230501
    PlacedCardRecord0%n/a11111111
    MessageJsonParser3391%n/a14181401
    DeckCreator99100%8100%090250501
    CardJsonParser100%n/a02030201
    AvailableMatch100%n/a01010101
    LeaderboardEntry100%n/a01010101
    Pair100%n/a01010101
    CardsManager.new TypeToken() {...}100%n/a01010101
    CardsManager.new TypeToken() {...}100%n/a01010101
    CardsManager.new TypeToken() {...}100%n/a01010101
    CardsManager.new TypeToken() {...}100%n/a01010101
    \ No newline at end of file diff --git a/deliveries/Test results/it.polimi.ingsw.utils/index.source.html b/deliveries/Test results/it.polimi.ingsw.utils/index.source.html new file mode 100644 index 00000000..db709598 --- /dev/null +++ b/deliveries/Test results/it.polimi.ingsw.utils/index.source.html @@ -0,0 +1 @@ +it.polimi.ingsw.utils

    it.polimi.ingsw.utils

    ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
    Total5,575 of 6,0638%135 of 15412%1361801,0861,1814682418
    CardsSerializer.java3,7110%n/a227357352211
    TUICardParser.java1,5970%1140%101101296296262611
    GuiUtil.java1607%160%24263338131501
    MessageJsonParser.java10178%3562%4135252902
    CardsManager.java11181%n/a11382811305
    RequestStatus.java0%n/a11441111
    CardJsonParser.java12887%2675%2114260702
    PlacedCardRecord.java0%n/a11111111
    DeckCreator.java99100%8100%090250501
    AvailableMatch.java100%n/a01010101
    LeaderboardEntry.java100%n/a01010101
    Pair.java100%n/a01010101
    \ No newline at end of file diff --git a/deliveries/Test results/jacoco-resources/branchfc.gif b/deliveries/Test results/jacoco-resources/branchfc.gif new file mode 100644 index 00000000..989b46d3 Binary files /dev/null and b/deliveries/Test results/jacoco-resources/branchfc.gif differ diff --git a/deliveries/Test results/jacoco-resources/branchnc.gif b/deliveries/Test results/jacoco-resources/branchnc.gif new file mode 100644 index 00000000..1933e07c Binary files /dev/null and b/deliveries/Test results/jacoco-resources/branchnc.gif differ diff --git a/deliveries/Test results/jacoco-resources/branchpc.gif b/deliveries/Test results/jacoco-resources/branchpc.gif new file mode 100644 index 00000000..cbf711b7 Binary files /dev/null and b/deliveries/Test results/jacoco-resources/branchpc.gif differ diff --git a/deliveries/Test results/jacoco-resources/bundle.gif b/deliveries/Test results/jacoco-resources/bundle.gif new file mode 100644 index 00000000..fca9c53e Binary files /dev/null and b/deliveries/Test results/jacoco-resources/bundle.gif differ diff --git a/deliveries/Test results/jacoco-resources/class.gif b/deliveries/Test results/jacoco-resources/class.gif new file mode 100644 index 00000000..eb348fb0 Binary files /dev/null and b/deliveries/Test results/jacoco-resources/class.gif differ diff --git a/deliveries/Test results/jacoco-resources/down.gif b/deliveries/Test results/jacoco-resources/down.gif new file mode 100644 index 00000000..440a14db Binary files /dev/null and b/deliveries/Test results/jacoco-resources/down.gif differ diff --git a/deliveries/Test results/jacoco-resources/greenbar.gif b/deliveries/Test results/jacoco-resources/greenbar.gif new file mode 100644 index 00000000..0ba65672 Binary files /dev/null and b/deliveries/Test results/jacoco-resources/greenbar.gif differ diff --git a/deliveries/Test results/jacoco-resources/group.gif b/deliveries/Test results/jacoco-resources/group.gif new file mode 100644 index 00000000..a4ea580d Binary files /dev/null and b/deliveries/Test results/jacoco-resources/group.gif differ diff --git a/deliveries/Test results/jacoco-resources/method.gif b/deliveries/Test results/jacoco-resources/method.gif new file mode 100644 index 00000000..7d24707e Binary files /dev/null and b/deliveries/Test results/jacoco-resources/method.gif differ diff --git a/deliveries/Test results/jacoco-resources/package.gif b/deliveries/Test results/jacoco-resources/package.gif new file mode 100644 index 00000000..131c28da Binary files /dev/null and b/deliveries/Test results/jacoco-resources/package.gif differ diff --git a/deliveries/Test results/jacoco-resources/prettify.css b/deliveries/Test results/jacoco-resources/prettify.css new file mode 100644 index 00000000..be5166e0 --- /dev/null +++ b/deliveries/Test results/jacoco-resources/prettify.css @@ -0,0 +1,13 @@ +/* Pretty printing styles. Used with prettify.js. */ + +.str { color: #2A00FF; } +.kwd { color: #7F0055; font-weight:bold; } +.com { color: #3F5FBF; } +.typ { color: #606; } +.lit { color: #066; } +.pun { color: #660; } +.pln { color: #000; } +.tag { color: #008; } +.atn { color: #606; } +.atv { color: #080; } +.dec { color: #606; } diff --git a/deliveries/Test results/jacoco-resources/prettify.js b/deliveries/Test results/jacoco-resources/prettify.js new file mode 100644 index 00000000..b2766fe0 --- /dev/null +++ b/deliveries/Test results/jacoco-resources/prettify.js @@ -0,0 +1,1510 @@ +// Copyright (C) 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +/** + * @fileoverview + * some functions for browser-side pretty printing of code contained in html. + *

    + * + * For a fairly comprehensive set of languages see the + * README + * file that came with this source. At a minimum, the lexer should work on a + * number of languages including C and friends, Java, Python, Bash, SQL, HTML, + * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk + * and a subset of Perl, but, because of commenting conventions, doesn't work on + * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class. + *

    + * Usage:

      + *
    1. include this source file in an html page via + * {@code } + *
    2. define style rules. See the example page for examples. + *
    3. mark the {@code
      } and {@code } tags in your source with
      + *    {@code class=prettyprint.}
      + *    You can also use the (html deprecated) {@code } tag, but the pretty
      + *    printer needs to do more substantial DOM manipulations to support that, so
      + *    some css styles may not be preserved.
      + * </ol>
      + * That's it.  I wanted to keep the API as simple as possible, so there's no
      + * need to specify which language the code is in, but if you wish, you can add
      + * another class to the {@code <pre>} or {@code <code>} element to specify the
      + * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
      + * starts with "lang-" followed by a file extension, specifies the file type.
      + * See the "lang-*.js" files in this directory for code that implements
      + * per-language file handlers.
      + * <p>
      + * Change log:<br>
      + * cbeust, 2006/08/22
      + * <blockquote>
      + *   Java annotations (start with "@") are now captured as literals ("lit")
      + * </blockquote>
      + * @requires console
      + */
      +
      +// JSLint declarations
      +/*global console, document, navigator, setTimeout, window */
      +
      +/**
      + * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
      + * UI events.
      + * If set to {@code false}, {@code prettyPrint()} is synchronous.
      + */
      +window['PR_SHOULD_USE_CONTINUATION'] = true;
      +
      +/** the number of characters between tab columns */
      +window['PR_TAB_WIDTH'] = 8;
      +
      +/** Walks the DOM returning a properly escaped version of innerHTML.
      +  * @param {Node} node
      +  * @param {Array.<string>} out output buffer that receives chunks of HTML.
      +  */
      +window['PR_normalizedHtml']
      +
      +/** Contains functions for creating and registering new language handlers.
      +  * @type {Object}
      +  */
      +  = window['PR']
      +
      +/** Pretty print a chunk of code.
      +  *
      +  * @param {string} sourceCodeHtml code as html
      +  * @return {string} code as html, but prettier
      +  */
      +  = window['prettyPrintOne']
      +/** Find all the {@code <pre>} and {@code <code>} tags in the DOM with
      +  * {@code class=prettyprint} and prettify them.
      +  * @param {Function?} opt_whenDone if specified, called when the last entry
      +  *     has been finished.
      +  */
      +  = window['prettyPrint'] = void 0;
      +
      +/** browser detection. @extern @returns false if not IE, otherwise the major version. */
      +window['_pr_isIE6'] = function () {
      +  var ieVersion = navigator && navigator.userAgent &&
      +      navigator.userAgent.match(/\bMSIE ([678])\./);
      +  ieVersion = ieVersion ? +ieVersion[1] : false;
      +  window['_pr_isIE6'] = function () { return ieVersion; };
      +  return ieVersion;
      +};
      +
      +
      +(function () {
      +  // Keyword lists for various languages.
      +  var FLOW_CONTROL_KEYWORDS =
      +      "break continue do else for if return while ";
      +  var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " +
      +      "double enum extern float goto int long register short signed sizeof " +
      +      "static struct switch typedef union unsigned void volatile ";
      +  var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " +
      +      "new operator private protected public this throw true try typeof ";
      +  var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " +
      +      "concept concept_map const_cast constexpr decltype " +
      +      "dynamic_cast explicit export friend inline late_check " +
      +      "mutable namespace nullptr reinterpret_cast static_assert static_cast " +
      +      "template typeid typename using virtual wchar_t where ";
      +  var JAVA_KEYWORDS = COMMON_KEYWORDS +
      +      "abstract boolean byte extends final finally implements import " +
      +      "instanceof null native package strictfp super synchronized throws " +
      +      "transient ";
      +  var CSHARP_KEYWORDS = JAVA_KEYWORDS +
      +      "as base by checked decimal delegate descending event " +
      +      "fixed foreach from group implicit in interface internal into is lock " +
      +      "object out override orderby params partial readonly ref sbyte sealed " +
      +      "stackalloc string select uint ulong unchecked unsafe ushort var ";
      +  var JSCRIPT_KEYWORDS = COMMON_KEYWORDS +
      +      "debugger eval export function get null set undefined var with " +
      +      "Infinity NaN ";
      +  var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for " +
      +      "goto if import last local my next no our print package redo require " +
      +      "sub undef unless until use wantarray while BEGIN END ";
      +  var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "and as assert class def del " +
      +      "elif except exec finally from global import in is lambda " +
      +      "nonlocal not or pass print raise try with yield " +
      +      "False True None ";
      +  var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS + "alias and begin case class def" +
      +      " defined elsif end ensure false in module next nil not or redo rescue " +
      +      "retry self super then true undef unless until when yield BEGIN END ";
      +  var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi " +
      +      "function in local set then until ";
      +  var ALL_KEYWORDS = (
      +      CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS + PERL_KEYWORDS +
      +      PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS);
      +
      +  // token style names.  correspond to css classes
      +  /** token style for a string literal */
      +  var PR_STRING = 'str';
      +  /** token style for a keyword */
      +  var PR_KEYWORD = 'kwd';
      +  /** token style for a comment */
      +  var PR_COMMENT = 'com';
      +  /** token style for a type */
      +  var PR_TYPE = 'typ';
      +  /** token style for a literal value.  e.g. 1, null, true. */
      +  var PR_LITERAL = 'lit';
      +  /** token style for a punctuation string. */
      +  var PR_PUNCTUATION = 'pun';
      +  /** token style for a punctuation string. */
      +  var PR_PLAIN = 'pln';
      +
      +  /** token style for an sgml tag. */
      +  var PR_TAG = 'tag';
      +  /** token style for a markup declaration such as a DOCTYPE. */
      +  var PR_DECLARATION = 'dec';
      +  /** token style for embedded source. */
      +  var PR_SOURCE = 'src';
      +  /** token style for an sgml attribute name. */
      +  var PR_ATTRIB_NAME = 'atn';
      +  /** token style for an sgml attribute value. */
      +  var PR_ATTRIB_VALUE = 'atv';
      +
      +  /**
      +   * A class that indicates a section of markup that is not code, e.g. to allow
      +   * embedding of line numbers within code listings.
      +   */
      +  var PR_NOCODE = 'nocode';
      +
      +  /** A set of tokens that can precede a regular expression literal in
      +    * javascript.
      +    * http://www.mozilla.org/js/language/js20/rationale/syntax.html has the full
      +    * list, but I've removed ones that might be problematic when seen in
      +    * languages that don't support regular expression literals.
      +    *
      +    * <p>Specifically, I've removed any keywords that can't precede a regexp
      +    * literal in a syntactically legal javascript program, and I've removed the
      +    * "in" keyword since it's not a keyword in many languages, and might be used
      +    * as a count of inches.
      +    *
      +    * <p>The link a above does not accurately describe EcmaScript rules since
      +    * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
      +    * very well in practice.
      +    *
      +    * @private
      +    */
      +  var REGEXP_PRECEDER_PATTERN = function () {
      +      var preceders = [
      +          "!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=",
      +          "&=", "(", "*", "*=", /* "+", */ "+=", ",", /* "-", */ "-=",
      +          "->", /*".", "..", "...", handled below */ "/", "/=", ":", "::", ";",
      +          "<", "<<", "<<=", "<=", "=", "==", "===", ">",
      +          ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[",
      +          "^", "^=", "^^", "^^=", "{", "|", "|=", "||",
      +          "||=", "~" /* handles =~ and !~ */,
      +          "break", "case", "continue", "delete",
      +          "do", "else", "finally", "instanceof",
      +          "return", "throw", "try", "typeof"
      +          ];
      +      var pattern = '(?:^^|[+-]';
      +      for (var i = 0; i < preceders.length; ++i) {
      +        pattern += '|' + preceders[i].replace(/([^=<>:&a-z])/g, '\\$1');
      +      }
      +      pattern += ')\\s*';  // matches at end, and matches empty string
      +      return pattern;
      +      // CAVEAT: this does not properly handle the case where a regular
      +      // expression immediately follows another since a regular expression may
      +      // have flags for case-sensitivity and the like.  Having regexp tokens
      +      // adjacent is not valid in any language I'm aware of, so I'm punting.
      +      // TODO: maybe style special characters inside a regexp as punctuation.
      +    }();
      +
      +  // Define regexps here so that the interpreter doesn't have to create an
      +  // object each time the function containing them is called.
      +  // The language spec requires a new object created even if you don't access
      +  // the $1 members.
      +  var pr_amp = /&/g;
      +  var pr_lt = /</g;
      +  var pr_gt = />/g;
      +  var pr_quot = /\"/g;
      +  /** like textToHtml but escapes double quotes to be attribute safe. */
      +  function attribToHtml(str) {
      +    return str.replace(pr_amp, '&amp;')
      +        .replace(pr_lt, '&lt;')
      +        .replace(pr_gt, '&gt;')
      +        .replace(pr_quot, '&quot;');
      +  }
      +
      +  /** escapest html special characters to html. */
      +  function textToHtml(str) {
      +    return str.replace(pr_amp, '&amp;')
      +        .replace(pr_lt, '&lt;')
      +        .replace(pr_gt, '&gt;');
      +  }
      +
      +
      +  var pr_ltEnt = /&lt;/g;
      +  var pr_gtEnt = /&gt;/g;
      +  var pr_aposEnt = /&apos;/g;
      +  var pr_quotEnt = /&quot;/g;
      +  var pr_ampEnt = /&amp;/g;
      +  var pr_nbspEnt = /&nbsp;/g;
      +  /** unescapes html to plain text. */
      +  function htmlToText(html) {
      +    var pos = html.indexOf('&');
      +    if (pos < 0) { return html; }
      +    // Handle numeric entities specially.  We can't use functional substitution
      +    // since that doesn't work in older versions of Safari.
      +    // These should be rare since most browsers convert them to normal chars.
      +    for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0;) {
      +      var end = html.indexOf(';', pos);
      +      if (end >= 0) {
      +        var num = html.substring(pos + 3, end);
      +        var radix = 10;
      +        if (num && num.charAt(0) === 'x') {
      +          num = num.substring(1);
      +          radix = 16;
      +        }
      +        var codePoint = parseInt(num, radix);
      +        if (!isNaN(codePoint)) {
      +          html = (html.substring(0, pos) + String.fromCharCode(codePoint) +
      +                  html.substring(end + 1));
      +        }
      +      }
      +    }
      +
      +    return html.replace(pr_ltEnt, '<')
      +        .replace(pr_gtEnt, '>')
      +        .replace(pr_aposEnt, "'")
      +        .replace(pr_quotEnt, '"')
      +        .replace(pr_nbspEnt, ' ')
      +        .replace(pr_ampEnt, '&');
      +  }
      +
      +  /** is the given node's innerHTML normally unescaped? */
      +  function isRawContent(node) {
      +    return 'XMP' === node.tagName;
      +  }
      +
      +  var newlineRe = /[\r\n]/g;
      +  /**
      +   * Are newlines and adjacent spaces significant in the given node's innerHTML?
      +   */
      +  function isPreformatted(node, content) {
      +    // PRE means preformatted, and is a very common case, so don't create
      +    // unnecessary computed style objects.
      +    if ('PRE' === node.tagName) { return true; }
      +    if (!newlineRe.test(content)) { return true; }  // Don't care
      +    var whitespace = '';
      +    // For disconnected nodes, IE has no currentStyle.
      +    if (node.currentStyle) {
      +      whitespace = node.currentStyle.whiteSpace;
      +    } else if (window.getComputedStyle) {
      +      // Firefox makes a best guess if node is disconnected whereas Safari
      +      // returns the empty string.
      +      whitespace = window.getComputedStyle(node, null).whiteSpace;
      +    }
      +    return !whitespace || whitespace === 'pre';
      +  }
      +
      +  function normalizedHtml(node, out, opt_sortAttrs) {
      +    switch (node.nodeType) {
      +      case 1:  // an element
      +        var name = node.tagName.toLowerCase();
      +
      +        out.push('<', name);
      +        var attrs = node.attributes;
      +        var n = attrs.length;
      +        if (n) {
      +          if (opt_sortAttrs) {
      +            var sortedAttrs = [];
      +            for (var i = n; --i >= 0;) { sortedAttrs[i] = attrs[i]; }
      +            sortedAttrs.sort(function (a, b) {
      +                return (a.name < b.name) ? -1 : a.name === b.name ? 0 : 1;
      +              });
      +            attrs = sortedAttrs;
      +          }
      +          for (var i = 0; i < n; ++i) {
      +            var attr = attrs[i];
      +            if (!attr.specified) { continue; }
      +            out.push(' ', attr.name.toLowerCase(),
      +                     '="', attribToHtml(attr.value), '"');
      +          }
      +        }
      +        out.push('>');
      +        for (var child = node.firstChild; child; child = child.nextSibling) {
      +          normalizedHtml(child, out, opt_sortAttrs);
      +        }
      +        if (node.firstChild || !/^(?:br|link|img)$/.test(name)) {
      +          out.push('<\/', name, '>');
      +        }
      +        break;
      +      case 3: case 4: // text
      +        out.push(textToHtml(node.nodeValue));
      +        break;
      +    }
      +  }
      +
      +  /**
      +   * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
      +   * matches the union o the sets o strings matched d by the input RegExp.
      +   * Since it matches globally, if the input strings have a start-of-input
      +   * anchor (/^.../), it is ignored for the purposes of unioning.
      +   * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
      +   * @return {RegExp} a global regex.
      +   */
      +  function combinePrefixPatterns(regexs) {
      +    var capturedGroupIndex = 0;
      +
      +    var needToFoldCase = false;
      +    var ignoreCase = false;
      +    for (var i = 0, n = regexs.length; i < n; ++i) {
      +      var regex = regexs[i];
      +      if (regex.ignoreCase) {
      +        ignoreCase = true;
      +      } else if (/[a-z]/i.test(regex.source.replace(
      +                     /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
      +        needToFoldCase = true;
      +        ignoreCase = false;
      +        break;
      +      }
      +    }
      +
      +    function decodeEscape(charsetPart) {
      +      if (charsetPart.charAt(0) !== '\\') { return charsetPart.charCodeAt(0); }
      +      switch (charsetPart.charAt(1)) {
      +        case 'b': return 8;
      +        case 't': return 9;
      +        case 'n': return 0xa;
      +        case 'v': return 0xb;
      +        case 'f': return 0xc;
      +        case 'r': return 0xd;
      +        case 'u': case 'x':
      +          return parseInt(charsetPart.substring(2), 16)
      +              || charsetPart.charCodeAt(1);
      +        case '0': case '1': case '2': case '3': case '4':
      +        case '5': case '6': case '7':
      +          return parseInt(charsetPart.substring(1), 8);
      +        default: return charsetPart.charCodeAt(1);
      +      }
      +    }
      +
      +    function encodeEscape(charCode) {
      +      if (charCode < 0x20) {
      +        return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
      +      }
      +      var ch = String.fromCharCode(charCode);
      +      if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
      +        ch = '\\' + ch;
      +      }
      +      return ch;
      +    }
      +
      +    function caseFoldCharset(charSet) {
      +      var charsetParts = charSet.substring(1, charSet.length - 1).match(
      +          new RegExp(
      +              '\\\\u[0-9A-Fa-f]{4}'
      +              + '|\\\\x[0-9A-Fa-f]{2}'
      +              + '|\\\\[0-3][0-7]{0,2}'
      +              + '|\\\\[0-7]{1,2}'
      +              + '|\\\\[\\s\\S]'
      +              + '|-'
      +              + '|[^-\\\\]',
      +              'g'));
      +      var groups = [];
      +      var ranges = [];
      +      var inverse = charsetParts[0] === '^';
      +      for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
      +        var p = charsetParts[i];
      +        switch (p) {
      +          case '\\B': case '\\b':
      +          case '\\D': case '\\d':
      +          case '\\S': case '\\s':
      +          case '\\W': case '\\w':
      +            groups.push(p);
      +            continue;
      +        }
      +        var start = decodeEscape(p);
      +        var end;
      +        if (i + 2 < n && '-' === charsetParts[i + 1]) {
      +          end = decodeEscape(charsetParts[i + 2]);
      +          i += 2;
      +        } else {
      +          end = start;
      +        }
      +        ranges.push([start, end]);
      +        // If the range might intersect letters, then expand it.
      +        if (!(end < 65 || start > 122)) {
      +          if (!(end < 65 || start > 90)) {
      +            ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
      +          }
      +          if (!(end < 97 || start > 122)) {
      +            ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
      +          }
      +        }
      +      }
      +
      +      // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
      +      // -> [[1, 12], [14, 14], [16, 17]]
      +      ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
      +      var consolidatedRanges = [];
      +      var lastRange = [NaN, NaN];
      +      for (var i = 0; i < ranges.length; ++i) {
      +        var range = ranges[i];
      +        if (range[0] <= lastRange[1] + 1) {
      +          lastRange[1] = Math.max(lastRange[1], range[1]);
      +        } else {
      +          consolidatedRanges.push(lastRange = range);
      +        }
      +      }
      +
      +      var out = ['['];
      +      if (inverse) { out.push('^'); }
      +      out.push.apply(out, groups);
      +      for (var i = 0; i < consolidatedRanges.length; ++i) {
      +        var range = consolidatedRanges[i];
      +        out.push(encodeEscape(range[0]));
      +        if (range[1] > range[0]) {
      +          if (range[1] + 1 > range[0]) { out.push('-'); }
      +          out.push(encodeEscape(range[1]));
      +        }
      +      }
      +      out.push(']');
      +      return out.join('');
      +    }
      +
      +    function allowAnywhereFoldCaseAndRenumberGroups(regex) {
      +      // Split into character sets, escape sequences, punctuation strings
      +      // like ('(', '(?:', ')', '^'), and runs of characters that do not
      +      // include any of the above.
      +      var parts = regex.source.match(
      +          new RegExp(
      +              '(?:'
      +              + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
      +              + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
      +              + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
      +              + '|\\\\[0-9]+'  // a back-reference or octal escape
      +              + '|\\\\[^ux0-9]'  // other escape sequence
      +              + '|\\(\\?[:!=]'  // start of a non-capturing group
      +              + '|[\\(\\)\\^]'  // start/emd of a group, or line start
      +              + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
      +              + ')',
      +              'g'));
      +      var n = parts.length;
      +
      +      // Maps captured group numbers to the number they will occupy in
      +      // the output or to -1 if that has not been determined, or to
      +      // undefined if they need not be capturing in the output.
      +      var capturedGroups = [];
      +
      +      // Walk over and identify back references to build the capturedGroups
      +      // mapping.
      +      for (var i = 0, groupIndex = 0; i < n; ++i) {
      +        var p = parts[i];
      +        if (p === '(') {
      +          // groups are 1-indexed, so max group index is count of '('
      +          ++groupIndex;
      +        } else if ('\\' === p.charAt(0)) {
      +          var decimalValue = +p.substring(1);
      +          if (decimalValue && decimalValue <= groupIndex) {
      +            capturedGroups[decimalValue] = -1;
      +          }
      +        }
      +      }
      +
      +      // Renumber groups and reduce capturing groups to non-capturing groups
      +      // where possible.
      +      for (var i = 1; i < capturedGroups.length; ++i) {
      +        if (-1 === capturedGroups[i]) {
      +          capturedGroups[i] = ++capturedGroupIndex;
      +        }
      +      }
      +      for (var i = 0, groupIndex = 0; i < n; ++i) {
      +        var p = parts[i];
      +        if (p === '(') {
      +          ++groupIndex;
      +          if (capturedGroups[groupIndex] === undefined) {
      +            parts[i] = '(?:';
      +          }
      +        } else if ('\\' === p.charAt(0)) {
      +          var decimalValue = +p.substring(1);
      +          if (decimalValue && decimalValue <= groupIndex) {
      +            parts[i] = '\\' + capturedGroups[groupIndex];
      +          }
      +        }
      +      }
      +
      +      // Remove any prefix anchors so that the output will match anywhere.
      +      // ^^ really does mean an anchored match though.
      +      for (var i = 0, groupIndex = 0; i < n; ++i) {
      +        if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
      +      }
      +
      +      // Expand letters to groupts to handle mixing of case-sensitive and
      +      // case-insensitive patterns if necessary.
      +      if (regex.ignoreCase && needToFoldCase) {
      +        for (var i = 0; i < n; ++i) {
      +          var p = parts[i];
      +          var ch0 = p.charAt(0);
      +          if (p.length >= 2 && ch0 === '[') {
      +            parts[i] = caseFoldCharset(p);
      +          } else if (ch0 !== '\\') {
      +            // TODO: handle letters in numeric escapes.
      +            parts[i] = p.replace(
      +                /[a-zA-Z]/g,
      +                function (ch) {
      +                  var cc = ch.charCodeAt(0);
      +                  return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
      +                });
      +          }
      +        }
      +      }
      +
      +      return parts.join('');
      +    }
      +
      +    var rewritten = [];
      +    for (var i = 0, n = regexs.length; i < n; ++i) {
      +      var regex = regexs[i];
      +      if (regex.global || regex.multiline) { throw new Error('' + regex); }
      +      rewritten.push(
      +          '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
      +    }
      +
      +    return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
      +  }
      +
      +  var PR_innerHtmlWorks = null;
      +  function getInnerHtml(node) {
      +    // inner html is hopelessly broken in Safari 2.0.4 when the content is
      +    // an html description of well formed XML and the containing tag is a PRE
      +    // tag, so we detect that case and emulate innerHTML.
      +    if (null === PR_innerHtmlWorks) {
      +      var testNode = document.createElement('PRE');
      +      testNode.appendChild(
      +          document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
      +      PR_innerHtmlWorks = !/</.test(testNode.innerHTML);
      +    }
      +
      +    if (PR_innerHtmlWorks) {
      +      var content = node.innerHTML;
      +      // XMP tags contain unescaped entities so require special handling.
      +      if (isRawContent(node)) {
      +        content = textToHtml(content);
      +      } else if (!isPreformatted(node, content)) {
      +        content = content.replace(/(<br\s*\/?>)[\r\n]+/g, '$1')
      +            .replace(/(?:[\r\n]+[ \t]*)+/g, ' ');
      +      }
      +      return content;
      +    }
      +
      +    var out = [];
      +    for (var child = node.firstChild; child; child = child.nextSibling) {
      +      normalizedHtml(child, out);
      +    }
      +    return out.join('');
      +  }
      +
      +  /** returns a function that expand tabs to spaces.  This function can be fed
      +    * successive chunks of text, and will maintain its own internal state to
      +    * keep track of how tabs are expanded.
      +    * @return {function (string) : string} a function that takes
      +    *   plain text and return the text with tabs expanded.
      +    * @private
      +    */
      +  function makeTabExpander(tabWidth) {
      +    var SPACES = '                ';
      +    var charInLine = 0;
      +
      +    return function (plainText) {
      +      // walk over each character looking for tabs and newlines.
      +      // On tabs, expand them.  On newlines, reset charInLine.
      +      // Otherwise increment charInLine
      +      var out = null;
      +      var pos = 0;
      +      for (var i = 0, n = plainText.length; i < n; ++i) {
      +        var ch = plainText.charAt(i);
      +
      +        switch (ch) {
      +          case '\t':
      +            if (!out) { out = []; }
      +            out.push(plainText.substring(pos, i));
      +            // calculate how much space we need in front of this part
      +            // nSpaces is the amount of padding -- the number of spaces needed
      +            // to move us to the next column, where columns occur at factors of
      +            // tabWidth.
      +            var nSpaces = tabWidth - (charInLine % tabWidth);
      +            charInLine += nSpaces;
      +            for (; nSpaces >= 0; nSpaces -= SPACES.length) {
      +              out.push(SPACES.substring(0, nSpaces));
      +            }
      +            pos = i + 1;
      +            break;
      +          case '\n':
      +            charInLine = 0;
      +            break;
      +          default:
      +            ++charInLine;
      +        }
      +      }
      +      if (!out) { return plainText; }
      +      out.push(plainText.substring(pos));
      +      return out.join('');
      +    };
      +  }
      +
      +  var pr_chunkPattern = new RegExp(
      +      '[^<]+'  // A run of characters other than '<'
      +      + '|<\!--[\\s\\S]*?--\>'  // an HTML comment
      +      + '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>'  // a CDATA section
      +      // a probable tag that should not be highlighted
      +      + '|<\/?[a-zA-Z](?:[^>\"\']|\'[^\']*\'|\"[^\"]*\")*>'
      +      + '|<',  // A '<' that does not begin a larger chunk
      +      'g');
      +  var pr_commentPrefix = /^<\!--/;
      +  var pr_cdataPrefix = /^<!\[CDATA\[/;
      +  var pr_brPrefix = /^<br\b/i;
      +  var pr_tagNameRe = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/;
      +
      +  /** split markup into chunks of html tags (style null) and
      +    * plain text (style {@link #PR_PLAIN}), converting tags which are
      +    * significant for tokenization (<br>) into their textual equivalent.
      +    *
      +    * @param {string} s html where whitespace is considered significant.
      +    * @return {Object} source code and extracted tags.
      +    * @private
      +    */
      +  function extractTags(s) {
      +    // since the pattern has the 'g' modifier and defines no capturing groups,
      +    // this will return a list of all chunks which we then classify and wrap as
      +    // PR_Tokens
      +    var matches = s.match(pr_chunkPattern);
      +    var sourceBuf = [];
      +    var sourceBufLen = 0;
      +    var extractedTags = [];
      +    if (matches) {
      +      for (var i = 0, n = matches.length; i < n; ++i) {
      +        var match = matches[i];
      +        if (match.length > 1 && match.charAt(0) === '<') {
      +          if (pr_commentPrefix.test(match)) { continue; }
      +          if (pr_cdataPrefix.test(match)) {
      +            // strip CDATA prefix and suffix.  Don't unescape since it's CDATA
      +            sourceBuf.push(match.substring(9, match.length - 3));
      +            sourceBufLen += match.length - 12;
      +          } else if (pr_brPrefix.test(match)) {
      +            // <br> tags are lexically significant so convert them to text.
      +            // This is undone later.
      +            sourceBuf.push('\n');
      +            ++sourceBufLen;
      +          } else {
      +            if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) {
      +              // A <span class="nocode"> will start a section that should be
      +              // ignored.  Continue walking the list until we see a matching end
      +              // tag.
      +              var name = match.match(pr_tagNameRe)[2];
      +              var depth = 1;
      +              var j;
      +              end_tag_loop:
      +              for (j = i + 1; j < n; ++j) {
      +                var name2 = matches[j].match(pr_tagNameRe);
      +                if (name2 && name2[2] === name) {
      +                  if (name2[1] === '/') {
      +                    if (--depth === 0) { break end_tag_loop; }
      +                  } else {
      +                    ++depth;
      +                  }
      +                }
      +              }
      +              if (j < n) {
      +                extractedTags.push(
      +                    sourceBufLen, matches.slice(i, j + 1).join(''));
      +                i = j;
      +              } else {  // Ignore unclosed sections.
      +                extractedTags.push(sourceBufLen, match);
      +              }
      +            } else {
      +              extractedTags.push(sourceBufLen, match);
      +            }
      +          }
      +        } else {
      +          var literalText = htmlToText(match);
      +          sourceBuf.push(literalText);
      +          sourceBufLen += literalText.length;
      +        }
      +      }
      +    }
      +    return { source: sourceBuf.join(''), tags: extractedTags };
      +  }
      +
      +  /** True if the given tag contains a class attribute with the nocode class. */
      +  function isNoCodeTag(tag) {
      +    return !!tag
      +        // First canonicalize the representation of attributes
      +        .replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,
      +                 ' $1="$2$3$4"')
      +        // Then look for the attribute we want.
      +        .match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/);
      +  }
      +
      +  /**
      +   * Apply the given language handler to sourceCode and add the resulting
      +   * decorations to out.
      +   * @param {number} basePos the index of sourceCode within the chunk of source
      +   *    whose decorations are already present on out.
      +   */
      +  function appendDecorations(basePos, sourceCode, langHandler, out) {
      +    if (!sourceCode) { return; }
      +    var job = {
      +      source: sourceCode,
      +      basePos: basePos
      +    };
      +    langHandler(job);
      +    out.push.apply(out, job.decorations);
      +  }
      +
      +  /** Given triples of [style, pattern, context] returns a lexing function,
      +    * The lexing function interprets the patterns to find token boundaries and
      +    * returns a decoration list of the form
      +    * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
      +    * where index_n is an index into the sourceCode, and style_n is a style
      +    * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
      +    * all characters in sourceCode[index_n-1:index_n].
      +    *
      +    * The stylePatterns is a list whose elements have the form
      +    * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
      +    *
      +    * Style is a style constant like PR_PLAIN, or can be a string of the
      +    * form 'lang-FOO', where FOO is a language extension describing the
      +    * language of the portion of the token in $1 after pattern executes.
      +    * E.g., if style is 'lang-lisp', and group 1 contains the text
      +    * '(hello (world))', then that portion of the token will be passed to the
      +    * registered lisp handler for formatting.
      +    * The text before and after group 1 will be restyled using this decorator
      +    * so decorators should take care that this doesn't result in infinite
      +    * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
      +    * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
      +    * '<script>foo()<\/script>', which would cause the current decorator to
      +    * be called with '<script>' which would not match the same rule since
      +    * group 1 must not be empty, so it would be instead styled as PR_TAG by
      +    * the generic tag rule.  The handler registered for the 'js' extension would
      +    * then be called with 'foo()', and finally, the current decorator would
      +    * be called with '<\/script>' which would not match the original rule and
      +    * so the generic tag rule would identify it as a tag.
      +    *
      +    * Pattern must only match prefixes, and if it matches a prefix, then that
      +    * match is considered a token with the same style.
      +    *
      +    * Context is applied to the last non-whitespace, non-comment token
      +    * recognized.
      +    *
      +    * Shortcut is an optional string of characters, any of which, if the first
      +    * character, gurantee that this pattern and only this pattern matches.
      +    *
      +    * @param {Array} shortcutStylePatterns patterns that always start with
      +    *   a known character.  Must have a shortcut string.
      +    * @param {Array} fallthroughStylePatterns patterns that will be tried in
      +    *   order if the shortcut ones fail.  May have shortcuts.
      +    *
      +    * @return {function (Object)} a
      +    *   function that takes source code and returns a list of decorations.
      +    */
      +  function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
      +    var shortcuts = {};
      +    var tokenizer;
      +    (function () {
      +      var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
      +      var allRegexs = [];
      +      var regexKeys = {};
      +      for (var i = 0, n = allPatterns.length; i < n; ++i) {
      +        var patternParts = allPatterns[i];
      +        var shortcutChars = patternParts[3];
      +        if (shortcutChars) {
      +          for (var c = shortcutChars.length; --c >= 0;) {
      +            shortcuts[shortcutChars.charAt(c)] = patternParts;
      +          }
      +        }
      +        var regex = patternParts[1];
      +        var k = '' + regex;
      +        if (!regexKeys.hasOwnProperty(k)) {
      +          allRegexs.push(regex);
      +          regexKeys[k] = null;
      +        }
      +      }
      +      allRegexs.push(/[\0-\uffff]/);
      +      tokenizer = combinePrefixPatterns(allRegexs);
      +    })();
      +
      +    var nPatterns = fallthroughStylePatterns.length;
      +    var notWs = /\S/;
      +
      +    /**
      +     * Lexes job.source and produces an output array job.decorations of style
      +     * classes preceded by the position at which they start in job.source in
      +     * order.
      +     *
      +     * @param {Object} job an object like {@code
      +     *    source: {string} sourceText plain text,
      +     *    basePos: {int} position of job.source in the larger chunk of
      +     *        sourceCode.
      +     * }
      +     */
      +    var decorate = function (job) {
      +      var sourceCode = job.source, basePos = job.basePos;
      +      /** Even entries are positions in source in ascending order.  Odd enties
      +        * are style markers (e.g., PR_COMMENT) that run from that position until
      +        * the end.
      +        * @type {Array.<number|string>}
      +        */
      +      var decorations = [basePos, PR_PLAIN];
      +      var pos = 0;  // index into sourceCode
      +      var tokens = sourceCode.match(tokenizer) || [];
      +      var styleCache = {};
      +
      +      for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
      +        var token = tokens[ti];
      +        var style = styleCache[token];
      +        var match = void 0;
      +
      +        var isEmbedded;
      +        if (typeof style === 'string') {
      +          isEmbedded = false;
      +        } else {
      +          var patternParts = shortcuts[token.charAt(0)];
      +          if (patternParts) {
      +            match = token.match(patternParts[1]);
      +            style = patternParts[0];
      +          } else {
      +            for (var i = 0; i < nPatterns; ++i) {
      +              patternParts = fallthroughStylePatterns[i];
      +              match = token.match(patternParts[1]);
      +              if (match) {
      +                style = patternParts[0];
      +                break;
      +              }
      +            }
      +
      +            if (!match) {  // make sure that we make progress
      +              style = PR_PLAIN;
      +            }
      +          }
      +
      +          isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
      +          if (isEmbedded && !(match && typeof match[1] === 'string')) {
      +            isEmbedded = false;
      +            style = PR_SOURCE;
      +          }
      +
      +          if (!isEmbedded) { styleCache[token] = style; }
      +        }
      +
      +        var tokenStart = pos;
      +        pos += token.length;
      +
      +        if (!isEmbedded) {
      +          decorations.push(basePos + tokenStart, style);
      +        } else {  // Treat group 1 as an embedded block of source code.
      +          var embeddedSource = match[1];
      +          var embeddedSourceStart = token.indexOf(embeddedSource);
      +          var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
      +          if (match[2]) {
      +            // If embeddedSource can be blank, then it would match at the
      +            // beginning which would cause us to infinitely recurse on the
      +            // entire token, so we catch the right context in match[2].
      +            embeddedSourceEnd = token.length - match[2].length;
      +            embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
      +          }
      +          var lang = style.substring(5);
      +          // Decorate the left of the embedded source
      +          appendDecorations(
      +              basePos + tokenStart,
      +              token.substring(0, embeddedSourceStart),
      +              decorate, decorations);
      +          // Decorate the embedded source
      +          appendDecorations(
      +              basePos + tokenStart + embeddedSourceStart,
      +              embeddedSource,
      +              langHandlerForExtension(lang, embeddedSource),
      +              decorations);
      +          // Decorate the right of the embedded section
      +          appendDecorations(
      +              basePos + tokenStart + embeddedSourceEnd,
      +              token.substring(embeddedSourceEnd),
      +              decorate, decorations);
      +        }
      +      }
      +      job.decorations = decorations;
      +    };
      +    return decorate;
      +  }
      +
      +  /** returns a function that produces a list of decorations from source text.
      +    *
      +    * This code treats ", ', and ` as string delimiters, and \ as a string
      +    * escape.  It does not recognize perl's qq() style strings.
      +    * It has no special handling for double delimiter escapes as in basic, or
      +    * the tripled delimiters used in python, but should work on those regardless
      +    * although in those cases a single string literal may be broken up into
      +    * multiple adjacent string literals.
      +    *
      +    * It recognizes C, C++, and shell style comments.
      +    *
      +    * @param {Object} options a set of optional parameters.
      +    * @return {function (Object)} a function that examines the source code
      +    *     in the input job and builds the decoration list.
      +    */
      +  function sourceDecorator(options) {
      +    var shortcutStylePatterns = [], fallthroughStylePatterns = [];
      +    if (options['tripleQuotedStrings']) {
      +      // '''multi-line-string''', 'single-line-string', and double-quoted
      +      shortcutStylePatterns.push(
      +          [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
      +           null, '\'"']);
      +    } else if (options['multiLineStrings']) {
      +      // 'multi-line-string', "multi-line-string"
      +      shortcutStylePatterns.push(
      +          [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
      +           null, '\'"`']);
      +    } else {
      +      // 'single-line-string', "single-line-string"
      +      shortcutStylePatterns.push(
      +          [PR_STRING,
      +           /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
      +           null, '"\'']);
      +    }
      +    if (options['verbatimStrings']) {
      +      // verbatim-string-literal production from the C# grammar.  See issue 93.
      +      fallthroughStylePatterns.push(
      +          [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
      +    }
      +    if (options['hashComments']) {
      +      if (options['cStyleComments']) {
      +        // Stop C preprocessor declarations at an unclosed open comment
      +        shortcutStylePatterns.push(
      +            [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
      +             null, '#']);
      +        fallthroughStylePatterns.push(
      +            [PR_STRING,
      +             /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
      +             null]);
      +      } else {
      +        shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
      +      }
      +    }
      +    if (options['cStyleComments']) {
      +      fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
      +      fallthroughStylePatterns.push(
      +          [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
      +    }
      +    if (options['regexLiterals']) {
      +      var REGEX_LITERAL = (
      +          // A regular expression literal starts with a slash that is
      +          // not followed by * or / so that it is not confused with
      +          // comments.
      +          '/(?=[^/*])'
      +          // and then contains any number of raw characters,
      +          + '(?:[^/\\x5B\\x5C]'
      +          // escape sequences (\x5C),
      +          +    '|\\x5C[\\s\\S]'
      +          // or non-nesting character sets (\x5B\x5D);
      +          +    '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
      +          // finally closed by a /.
      +          + '/');
      +      fallthroughStylePatterns.push(
      +          ['lang-regex',
      +           new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
      +           ]);
      +    }
      +
      +    var keywords = options['keywords'].replace(/^\s+|\s+$/g, '');
      +    if (keywords.length) {
      +      fallthroughStylePatterns.push(
      +          [PR_KEYWORD,
      +           new RegExp('^(?:' + keywords.replace(/\s+/g, '|') + ')\\b'), null]);
      +    }
      +
      +    shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
      +    fallthroughStylePatterns.push(
      +        // TODO(mikesamuel): recognize non-latin letters and numerals in idents
      +        [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
      +        [PR_TYPE,        /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null],
      +        [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
      +        [PR_LITERAL,
      +         new RegExp(
      +             '^(?:'
      +             // A hex number
      +             + '0x[a-f0-9]+'
      +             // or an octal or decimal number,
      +             + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
      +             // possibly in scientific notation
      +             + '(?:e[+\\-]?\\d+)?'
      +             + ')'
      +             // with an optional modifier like UL for unsigned long
      +             + '[a-z]*', 'i'),
      +         null, '0123456789'],
      +        [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]);
      +
      +    return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
      +  }
      +
      +  var decorateSource = sourceDecorator({
      +        'keywords': ALL_KEYWORDS,
      +        'hashComments': true,
      +        'cStyleComments': true,
      +        'multiLineStrings': true,
      +        'regexLiterals': true
      +      });
      +
      +  /** Breaks {@code job.source} around style boundaries in
      +    * {@code job.decorations} while re-interleaving {@code job.extractedTags},
      +    * and leaves the result in {@code job.prettyPrintedHtml}.
      +    * @param {Object} job like {
      +    *    source: {string} source as plain text,
      +    *    extractedTags: {Array.<number|string>} extractedTags chunks of raw
      +    *                   html preceded by their position in {@code job.source}
      +    *                   in order
      +    *    decorations: {Array.<number|string} an array of style classes preceded
      +    *                 by the position at which they start in job.source in order
      +    * }
      +    * @private
      +    */
      +  function recombineTagsAndDecorations(job) {
      +    var sourceText = job.source;
      +    var extractedTags = job.extractedTags;
      +    var decorations = job.decorations;
      +
      +    var html = [];
      +    // index past the last char in sourceText written to html
      +    var outputIdx = 0;
      +
      +    var openDecoration = null;
      +    var currentDecoration = null;
      +    var tagPos = 0;  // index into extractedTags
      +    var decPos = 0;  // index into decorations
      +    var tabExpander = makeTabExpander(window['PR_TAB_WIDTH']);
      +
      +    var adjacentSpaceRe = /([\r\n ]) /g;
      +    var startOrSpaceRe = /(^| ) /gm;
      +    var newlineRe = /\r\n?|\n/g;
      +    var trailingSpaceRe = /[ \r\n]$/;
      +    var lastWasSpace = true;  // the last text chunk emitted ended with a space.
      +
      +    // See bug 71 and http://stackoverflow.com/questions/136443/why-doesnt-ie7-
      +    var isIE678 = window['_pr_isIE6']();
      +    var lineBreakHtml = (
      +        isIE678
      +        ? (job.sourceNode.tagName === 'PRE'
      +           // Use line feeds instead of <br>s so that copying and pasting works
      +           // on IE.
      +           // Doing this on other browsers breaks lots of stuff since \r\n is
      +           // treated as two newlines on Firefox.
      +           ? (isIE678 === 6 ? '&#160;\r\n' :
      +              isIE678 === 7 ? '&#160;<br>\r' : '&#160;\r')
      +           // IE collapses multiple adjacent <br>s into 1 line break.
      +           // Prefix every newline with '&#160;' to prevent such behavior.
      +           // &nbsp; is the same as &#160; but works in XML as well as HTML.
      +           : '&#160;<br />')
      +        : '<br />');
      +
      +    // Look for a class like linenums or linenums:<n> where <n> is the 1-indexed
      +    // number of the first line.
      +    var numberLines = job.sourceNode.className.match(/\blinenums\b(?::(\d+))?/);
      +    var lineBreaker;
      +    if (numberLines) {
      +      var lineBreaks = [];
      +      for (var i = 0; i < 10; ++i) {
      +        lineBreaks[i] = lineBreakHtml + '</li><li class="L' + i + '">';
      +      }
      +      var lineNum = numberLines[1] && numberLines[1].length
      +          ? numberLines[1] - 1 : 0;  // Lines are 1-indexed
      +      html.push('<ol class="linenums"><li class="L', (lineNum) % 10, '"');
      +      if (lineNum) {
      +        html.push(' value="', lineNum + 1, '"');
      +      }
      +      html.push('>');
      +      lineBreaker = function () {
      +        var lb = lineBreaks[++lineNum % 10];
      +        // If a decoration is open, we need to close it before closing a list-item
      +        // and reopen it on the other side of the list item.
      +        return openDecoration
      +            ? ('</span>' + lb + '<span class="' + openDecoration + '">') : lb;
      +      };
      +    } else {
      +      lineBreaker = lineBreakHtml;
      +    }
      +
      +    // A helper function that is responsible for opening sections of decoration
      +    // and outputing properly escaped chunks of source
      +    function emitTextUpTo(sourceIdx) {
      +      if (sourceIdx > outputIdx) {
      +        if (openDecoration && openDecoration !== currentDecoration) {
      +          // Close the current decoration
      +          html.push('</span>');
      +          openDecoration = null;
      +        }
      +        if (!openDecoration && currentDecoration) {
      +          openDecoration = currentDecoration;
      +          html.push('<span class="', openDecoration, '">');
      +        }
      +        // This interacts badly with some wikis which introduces paragraph tags
      +        // into pre blocks for some strange reason.
      +        // It's necessary for IE though which seems to lose the preformattedness
      +        // of <pre> tags when their innerHTML is assigned.
      +        // http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
      +        // and it serves to undo the conversion of <br>s to newlines done in
      +        // chunkify.
      +        var htmlChunk = textToHtml(
      +            tabExpander(sourceText.substring(outputIdx, sourceIdx)))
      +            .replace(lastWasSpace
      +                     ? startOrSpaceRe
      +                     : adjacentSpaceRe, '$1&#160;');
      +        // Keep track of whether we need to escape space at the beginning of the
      +        // next chunk.
      +        lastWasSpace = trailingSpaceRe.test(htmlChunk);
      +        html.push(htmlChunk.replace(newlineRe, lineBreaker));
      +        outputIdx = sourceIdx;
      +      }
      +    }
      +
      +    while (true) {
      +      // Determine if we're going to consume a tag this time around.  Otherwise
      +      // we consume a decoration or exit.
      +      var outputTag;
      +      if (tagPos < extractedTags.length) {
      +        if (decPos < decorations.length) {
      +          // Pick one giving preference to extractedTags since we shouldn't open
      +          // a new style that we're going to have to immediately close in order
      +          // to output a tag.
      +          outputTag = extractedTags[tagPos] <= decorations[decPos];
      +        } else {
      +          outputTag = true;
      +        }
      +      } else {
      +        outputTag = false;
      +      }
      +      // Consume either a decoration or a tag or exit.
      +      if (outputTag) {
      +        emitTextUpTo(extractedTags[tagPos]);
      +        if (openDecoration) {
      +          // Close the current decoration
      +          html.push('</span>');
      +          openDecoration = null;
      +        }
      +        html.push(extractedTags[tagPos + 1]);
      +        tagPos += 2;
      +      } else if (decPos < decorations.length) {
      +        emitTextUpTo(decorations[decPos]);
      +        currentDecoration = decorations[decPos + 1];
      +        decPos += 2;
      +      } else {
      +        break;
      +      }
      +    }
      +    emitTextUpTo(sourceText.length);
      +    if (openDecoration) {
      +      html.push('</span>');
      +    }
      +    if (numberLines) { html.push('</li></ol>'); }
      +    job.prettyPrintedHtml = html.join('');
      +  }
      +
      +  /** Maps language-specific file extensions to handlers. */
      +  var langHandlerRegistry = {};
      +  /** Register a language handler for the given file extensions.
      +    * @param {function (Object)} handler a function from source code to a list
      +    *      of decorations.  Takes a single argument job which describes the
      +    *      state of the computation.   The single parameter has the form
      +    *      {@code {
      +    *        source: {string} as plain text.
      +    *        decorations: {Array.<number|string>} an array of style classes
      +    *                     preceded by the position at which they start in
      +    *                     job.source in order.
      +    *                     The language handler should assigned this field.
      +    *        basePos: {int} the position of source in the larger source chunk.
      +    *                 All positions in the output decorations array are relative
      +    *                 to the larger source chunk.
      +    *      } }
      +    * @param {Array.<string>} fileExtensions
      +    */
      +  function registerLangHandler(handler, fileExtensions) {
      +    for (var i = fileExtensions.length; --i >= 0;) {
      +      var ext = fileExtensions[i];
      +      if (!langHandlerRegistry.hasOwnProperty(ext)) {
      +        langHandlerRegistry[ext] = handler;
      +      } else if ('console' in window) {
      +        console['warn']('cannot override language handler %s', ext);
      +      }
      +    }
      +  }
      +  function langHandlerForExtension(extension, source) {
      +    if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
      +      // Treat it as markup if the first non whitespace character is a < and
      +      // the last non-whitespace character is a >.
      +      extension = /^\s*</.test(source)
      +          ? 'default-markup'
      +          : 'default-code';
      +    }
      +    return langHandlerRegistry[extension];
      +  }
      +  registerLangHandler(decorateSource, ['default-code']);
      +  registerLangHandler(
      +      createSimpleLexer(
      +          [],
      +          [
      +           [PR_PLAIN,       /^[^<?]+/],
      +           [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
      +           [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
      +           // Unescaped content in an unknown language
      +           ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
      +           ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
      +           [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
      +           ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
      +           // Unescaped content in javascript.  (Or possibly vbscript).
      +           ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
      +           // Contains unescaped stylesheet content
      +           ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
      +           ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
      +          ]),
      +      ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
      +  registerLangHandler(
      +      createSimpleLexer(
      +          [
      +           [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
      +           [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
      +           ],
      +          [
      +           [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
      +           [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
      +           ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
      +           [PR_PUNCTUATION,  /^[=<>\/]+/],
      +           ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
      +           ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
      +           ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
      +           ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
      +           ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
      +           ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
      +           ]),
      +      ['in.tag']);
      +  registerLangHandler(
      +      createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': CPP_KEYWORDS,
      +          'hashComments': true,
      +          'cStyleComments': true
      +        }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': 'null true false'
      +        }), ['json']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': CSHARP_KEYWORDS,
      +          'hashComments': true,
      +          'cStyleComments': true,
      +          'verbatimStrings': true
      +        }), ['cs']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': JAVA_KEYWORDS,
      +          'cStyleComments': true
      +        }), ['java']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': SH_KEYWORDS,
      +          'hashComments': true,
      +          'multiLineStrings': true
      +        }), ['bsh', 'csh', 'sh']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': PYTHON_KEYWORDS,
      +          'hashComments': true,
      +          'multiLineStrings': true,
      +          'tripleQuotedStrings': true
      +        }), ['cv', 'py']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': PERL_KEYWORDS,
      +          'hashComments': true,
      +          'multiLineStrings': true,
      +          'regexLiterals': true
      +        }), ['perl', 'pl', 'pm']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': RUBY_KEYWORDS,
      +          'hashComments': true,
      +          'multiLineStrings': true,
      +          'regexLiterals': true
      +        }), ['rb']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': JSCRIPT_KEYWORDS,
      +          'cStyleComments': true,
      +          'regexLiterals': true
      +        }), ['js']);
      +  registerLangHandler(
      +      createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
      +
      +  function applyDecorator(job) {
      +    var sourceCodeHtml = job.sourceCodeHtml;
      +    var opt_langExtension = job.langExtension;
      +
      +    // Prepopulate output in case processing fails with an exception.
      +    job.prettyPrintedHtml = sourceCodeHtml;
      +
      +    try {
      +      // Extract tags, and convert the source code to plain text.
      +      var sourceAndExtractedTags = extractTags(sourceCodeHtml);
      +      /** Plain text. @type {string} */
      +      var source = sourceAndExtractedTags.source;
      +      job.source = source;
      +      job.basePos = 0;
      +
      +      /** Even entries are positions in source in ascending order.  Odd entries
      +        * are tags that were extracted at that position.
      +        * @type {Array.<number|string>}
      +        */
      +      job.extractedTags = sourceAndExtractedTags.tags;
      +
      +      // Apply the appropriate language handler
      +      langHandlerForExtension(opt_langExtension, source)(job);
      +      // Integrate the decorations and tags back into the source code to produce
      +      // a decorated html string which is left in job.prettyPrintedHtml.
      +      recombineTagsAndDecorations(job);
      +    } catch (e) {
      +      if ('console' in window) {
      +        console['log'](e && e['stack'] ? e['stack'] : e);
      +      }
      +    }
      +  }
      +
      +  function prettyPrintOne(sourceCodeHtml, opt_langExtension) {
      +    var job = {
      +      sourceCodeHtml: sourceCodeHtml,
      +      langExtension: opt_langExtension
      +    };
      +    applyDecorator(job);
      +    return job.prettyPrintedHtml;
      +  }
      +
      +  function prettyPrint(opt_whenDone) {
      +    function byTagName(tn) { return document.getElementsByTagName(tn); }
      +    // fetch a list of nodes to rewrite
      +    var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
      +    var elements = [];
      +    for (var i = 0; i < codeSegments.length; ++i) {
      +      for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
      +        elements.push(codeSegments[i][j]);
      +      }
      +    }
      +    codeSegments = null;
      +
      +    var clock = Date;
      +    if (!clock['now']) {
      +      clock = { 'now': function () { return (new Date).getTime(); } };
      +    }
      +
      +    // The loop is broken into a series of continuations to make sure that we
      +    // don't make the browser unresponsive when rewriting a large page.
      +    var k = 0;
      +    var prettyPrintingJob;
      +
      +    function doWork() {
      +      var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
      +                     clock.now() + 250 /* ms */ :
      +                     Infinity);
      +      for (; k < elements.length && clock.now() < endTime; k++) {
      +        var cs = elements[k];
      +        // [JACOCO] 'prettyprint' -> 'source'
      +        if (cs.className && cs.className.indexOf('source') >= 0) {
      +          // If the classes includes a language extensions, use it.
      +          // Language extensions can be specified like
      +          //     <pre class="prettyprint lang-cpp">
      +          // the language extension "cpp" is used to find a language handler as
      +          // passed to PR_registerLangHandler.
      +          var langExtension = cs.className.match(/\blang-(\w+)\b/);
      +          if (langExtension) { langExtension = langExtension[1]; }
      +
      +          // make sure this is not nested in an already prettified element
      +          var nested = false;
      +          for (var p = cs.parentNode; p; p = p.parentNode) {
      +            if ((p.tagName === 'pre' || p.tagName === 'code' ||
      +                 p.tagName === 'xmp') &&
      +                // [JACOCO] 'prettyprint' -> 'source'
      +                p.className && p.className.indexOf('source') >= 0) {
      +              nested = true;
      +              break;
      +            }
      +          }
      +          if (!nested) {
      +            // fetch the content as a snippet of properly escaped HTML.
      +            // Firefox adds newlines at the end.
      +            var content = getInnerHtml(cs);
      +            content = content.replace(/(?:\r\n?|\n)$/, '');
      +
      +            // do the pretty printing
      +            prettyPrintingJob = {
      +              sourceCodeHtml: content,
      +              langExtension: langExtension,
      +              sourceNode: cs
      +            };
      +            applyDecorator(prettyPrintingJob);
      +            replaceWithPrettyPrintedHtml();
      +          }
      +        }
      +      }
      +      if (k < elements.length) {
      +        // finish up in a continuation
      +        setTimeout(doWork, 250);
      +      } else if (opt_whenDone) {
      +        opt_whenDone();
      +      }
      +    }
      +
      +    function replaceWithPrettyPrintedHtml() {
      +      var newContent = prettyPrintingJob.prettyPrintedHtml;
      +      if (!newContent) { return; }
      +      var cs = prettyPrintingJob.sourceNode;
      +
      +      // push the prettified html back into the tag.
      +      if (!isRawContent(cs)) {
      +        // just replace the old html with the new
      +        cs.innerHTML = newContent;
      +      } else {
      +        // we need to change the tag to a <pre> since <xmp>s do not allow
      +        // embedded tags such as the span tags used to attach styles to
      +        // sections of source code.
      +        var pre = document.createElement('PRE');
      +        for (var i = 0; i < cs.attributes.length; ++i) {
      +          var a = cs.attributes[i];
      +          if (a.specified) {
      +            var aname = a.name.toLowerCase();
      +            if (aname === 'class') {
      +              pre.className = a.value;  // For IE 6
      +            } else {
      +              pre.setAttribute(a.name, a.value);
      +            }
      +          }
      +        }
      +        pre.innerHTML = newContent;
      +
      +        // remove the old
      +        cs.parentNode.replaceChild(pre, cs);
      +        cs = pre;
      +      }
      +    }
      +
      +    doWork();
      +  }
      +
      +  window['PR_normalizedHtml'] = normalizedHtml;
      +  window['prettyPrintOne'] = prettyPrintOne;
      +  window['prettyPrint'] = prettyPrint;
      +  window['PR'] = {
      +        'combinePrefixPatterns': combinePrefixPatterns,
      +        'createSimpleLexer': createSimpleLexer,
      +        'registerLangHandler': registerLangHandler,
      +        'sourceDecorator': sourceDecorator,
      +        'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
      +        'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
      +        'PR_COMMENT': PR_COMMENT,
      +        'PR_DECLARATION': PR_DECLARATION,
      +        'PR_KEYWORD': PR_KEYWORD,
      +        'PR_LITERAL': PR_LITERAL,
      +        'PR_NOCODE': PR_NOCODE,
      +        'PR_PLAIN': PR_PLAIN,
      +        'PR_PUNCTUATION': PR_PUNCTUATION,
      +        'PR_SOURCE': PR_SOURCE,
      +        'PR_STRING': PR_STRING,
      +        'PR_TAG': PR_TAG,
      +        'PR_TYPE': PR_TYPE
      +      };
      +})();
      diff --git a/deliveries/Test results/jacoco-resources/redbar.gif b/deliveries/Test results/jacoco-resources/redbar.gif
      new file mode 100644
      index 00000000..c2f71469
      Binary files /dev/null and b/deliveries/Test results/jacoco-resources/redbar.gif differ
      diff --git a/deliveries/Test results/jacoco-resources/report.css b/deliveries/Test results/jacoco-resources/report.css
      new file mode 100644
      index 00000000..dd936bca
      --- /dev/null
      +++ b/deliveries/Test results/jacoco-resources/report.css	
      @@ -0,0 +1,243 @@
      +body, td {
      +  font-family:sans-serif;
      +  font-size:10pt;
      +}
      +
      +h1 {
      +  font-weight:bold;
      +  font-size:18pt;
      +}
      +
      +.breadcrumb {
      +  border:#d6d3ce 1px solid;
      +  padding:2px 4px 2px 4px;
      +}
      +
      +.breadcrumb .info {
      +  float:right;
      +}
      +
      +.breadcrumb .info a {
      +  margin-left:8px;
      +}
      +
      +.el_report {
      +  padding-left:18px;
      +  background-image:url(report.gif);
      +  background-position:left center;
      +  background-repeat:no-repeat;
      +}
      +
      +.el_group {
      +  padding-left:18px;
      +  background-image:url(group.gif);
      +  background-position:left center;
      +  background-repeat:no-repeat;
      +}
      +
      +.el_bundle {
      +  padding-left:18px;
      +  background-image:url(bundle.gif);
      +  background-position:left center;
      +  background-repeat:no-repeat;
      +}
      +
      +.el_package {
      +  padding-left:18px;
      +  background-image:url(package.gif);
      +  background-position:left center;
      +  background-repeat:no-repeat;
      +}
      +
      +.el_class {
      +  padding-left:18px;
      +  background-image:url(class.gif);
      +  background-position:left center;
      +  background-repeat:no-repeat;
      +}
      +
      +.el_source {
      +  padding-left:18px;
      +  background-image:url(source.gif);
      +  background-position:left center;
      +  background-repeat:no-repeat;
      +}
      +
      +.el_method {
      +  padding-left:18px;
      +  background-image:url(method.gif);
      +  background-position:left center;
      +  background-repeat:no-repeat;
      +}
      +
      +.el_session {
      +  padding-left:18px;
      +  background-image:url(session.gif);
      +  background-position:left center;
      +  background-repeat:no-repeat;
      +}
      +
      +pre.source {
      +  border:#d6d3ce 1px solid;
      +  font-family:monospace;
      +}
      +
      +pre.source ol {
      +  margin-bottom: 0px;
      +  margin-top: 0px;
      +}
      +
      +pre.source li {
      +  border-left: 1px solid #D6D3CE;
      +  color: #A0A0A0;
      +  padding-left: 0px;
      +}
      +
      +pre.source span.fc {
      +  background-color:#ccffcc;
      +}
      +
      +pre.source span.nc {
      +  background-color:#ffaaaa;
      +}
      +
      +pre.source span.pc {
      +  background-color:#ffffcc;
      +}
      +
      +pre.source span.bfc {
      +  background-image: url(branchfc.gif);
      +  background-repeat: no-repeat;
      +  background-position: 2px center;
      +}
      +
      +pre.source span.bfc:hover {
      +  background-color:#80ff80;
      +}
      +
      +pre.source span.bnc {
      +  background-image: url(branchnc.gif);
      +  background-repeat: no-repeat;
      +  background-position: 2px center;
      +}
      +
      +pre.source span.bnc:hover {
      +  background-color:#ff8080;
      +}
      +
      +pre.source span.bpc {
      +  background-image: url(branchpc.gif);
      +  background-repeat: no-repeat;
      +  background-position: 2px center;
      +}
      +
      +pre.source span.bpc:hover {
      +  background-color:#ffff80;
      +}
      +
      +table.coverage {
      +  empty-cells:show;
      +  border-collapse:collapse;
      +}
      +
      +table.coverage thead {
      +  background-color:#e0e0e0;
      +}
      +
      +table.coverage thead td {
      +  white-space:nowrap;
      +  padding:2px 14px 0px 6px;
      +  border-bottom:#b0b0b0 1px solid;
      +}
      +
      +table.coverage thead td.bar {
      +  border-left:#cccccc 1px solid;
      +}
      +
      +table.coverage thead td.ctr1 {
      +  text-align:right;
      +  border-left:#cccccc 1px solid;
      +}
      +
      +table.coverage thead td.ctr2 {
      +  text-align:right;
      +  padding-left:2px;
      +}
      +
      +table.coverage thead td.sortable {
      +  cursor:pointer;
      +  background-image:url(sort.gif);
      +  background-position:right center;
      +  background-repeat:no-repeat;
      +}
      +
      +table.coverage thead td.up {
      +  background-image:url(up.gif);
      +}
      +
      +table.coverage thead td.down {
      +  background-image:url(down.gif);
      +}
      +
      +table.coverage tbody td {
      +  white-space:nowrap;
      +  padding:2px 6px 2px 6px;
      +  border-bottom:#d6d3ce 1px solid;
      +}
      +
      +table.coverage tbody tr:hover {
      +  background: #f0f0d0 !important;
      +}
      +
      +table.coverage tbody td.bar {
      +  border-left:#e8e8e8 1px solid;
      +}
      +
      +table.coverage tbody td.ctr1 {
      +  text-align:right;
      +  padding-right:14px;
      +  border-left:#e8e8e8 1px solid;
      +}
      +
      +table.coverage tbody td.ctr2 {
      +  text-align:right;
      +  padding-right:14px;
      +  padding-left:2px;
      +}
      +
      +table.coverage tfoot td {
      +  white-space:nowrap;
      +  padding:2px 6px 2px 6px;
      +}
      +
      +table.coverage tfoot td.bar {
      +  border-left:#e8e8e8 1px solid;
      +}
      +
      +table.coverage tfoot td.ctr1 {
      +  text-align:right;
      +  padding-right:14px;
      +  border-left:#e8e8e8 1px solid;
      +}
      +
      +table.coverage tfoot td.ctr2 {
      +  text-align:right;
      +  padding-right:14px;
      +  padding-left:2px;
      +}
      +
      +.footer {
      +  margin-top:20px;
      +  border-top:#d6d3ce 1px solid;
      +  padding-top:2px;
      +  font-size:8pt;
      +  color:#a0a0a0;
      +}
      +
      +.footer a {
      +  color:#a0a0a0;
      +}
      +
      +.right {
      +  float:right;
      +}
      diff --git a/deliveries/Test results/jacoco-resources/report.gif b/deliveries/Test results/jacoco-resources/report.gif
      new file mode 100644
      index 00000000..8547be50
      Binary files /dev/null and b/deliveries/Test results/jacoco-resources/report.gif differ
      diff --git a/deliveries/Test results/jacoco-resources/session.gif b/deliveries/Test results/jacoco-resources/session.gif
      new file mode 100644
      index 00000000..0151bad8
      Binary files /dev/null and b/deliveries/Test results/jacoco-resources/session.gif differ
      diff --git a/deliveries/Test results/jacoco-resources/sort.gif b/deliveries/Test results/jacoco-resources/sort.gif
      new file mode 100644
      index 00000000..6757c2c3
      Binary files /dev/null and b/deliveries/Test results/jacoco-resources/sort.gif differ
      diff --git a/deliveries/Test results/jacoco-resources/sort.js b/deliveries/Test results/jacoco-resources/sort.js
      new file mode 100644
      index 00000000..9dcb0e8b
      --- /dev/null
      +++ b/deliveries/Test results/jacoco-resources/sort.js	
      @@ -0,0 +1,148 @@
      +/*******************************************************************************
      + * Copyright (c) 2009, 2024 Mountainminds GmbH & Co. KG and Contributors
      + * This program and the accompanying materials are made available under
      + * the terms of the Eclipse Public License 2.0 which is available at
      + * http://www.eclipse.org/legal/epl-2.0
      + *
      + * SPDX-License-Identifier: EPL-2.0
      + *
      + * Contributors:
      + *    Marc R. Hoffmann - initial API and implementation
      + *
      + *******************************************************************************/
      +
      +(function () {
      +
      +  /**
      +   * Sets the initial sorting derived from the hash.
      +   *
      +   * @param linkelementids
      +   *          list of element ids to search for links to add sort inidcator
      +   *          hash links
      +   */
      +  function initialSort(linkelementids) {
      +    window.linkelementids = linkelementids;
      +    var hash = window.location.hash;
      +    if (hash) {
      +      var m = hash.match(/up-./);
      +      if (m) {
      +        var header = window.document.getElementById(m[0].charAt(3));
      +        if (header) {
      +          sortColumn(header, true);
      +        }
      +        return;
      +      }
      +      var m = hash.match(/dn-./);
      +      if (m) {
      +        var header = window.document.getElementById(m[0].charAt(3));
      +        if (header) {
      +          sortColumn(header, false);
      +        }
      +        return
      +      }
      +    }
      +  }
      +
      +  /**
      +   * Sorts the columns with the given header dependening on the current sort state.
      +   */
      +  function toggleSort(header) {
      +    var sortup = header.className.indexOf('down ') == 0;
      +    sortColumn(header, sortup);
      +  }
      +
      +  /**
      +   * Sorts the columns with the given header in the given direction.
      +   */
      +  function sortColumn(header, sortup) {
      +    var table = header.parentNode.parentNode.parentNode;
      +    var body = table.tBodies[0];
      +    var colidx = getNodePosition(header);
      +
      +    resetSortedStyle(table);
      +
      +    var rows = body.rows;
      +    var sortedrows = [];
      +    for (var i = 0; i < rows.length; i++) {
      +      r = rows[i];
      +      sortedrows[parseInt(r.childNodes[colidx].id.slice(1))] = r;
      +    }
      +
      +    var hash;
      +
      +    if (sortup) {
      +      for (var i = sortedrows.length - 1; i >= 0; i--) {
      +        body.appendChild(sortedrows[i]);
      +      }
      +      header.className = 'up ' + header.className;
      +      hash = 'up-' + header.id;
      +    } else {
      +      for (var i = 0; i < sortedrows.length; i++) {
      +        body.appendChild(sortedrows[i]);
      +      }
      +      header.className = 'down ' + header.className;
      +      hash = 'dn-' + header.id;
      +    }
      +
      +    setHash(hash);
      +  }
      +
      +  /**
      +   * Adds the sort indicator as a hash to the document URL and all links.
      +   */
      +  function setHash(hash) {
      +    window.document.location.hash = hash;
      +    ids = window.linkelementids;
      +    for (var i = 0; i < ids.length; i++) {
      +        setHashOnAllLinks(document.getElementById(ids[i]), hash);
      +    }
      +  }
      +
      +  /**
      +   * Extend all links within the given tag with the given hash.
      +   */
      +  function setHashOnAllLinks(tag, hash) {
      +    links = tag.getElementsByTagName("a");
      +    for (var i = 0; i < links.length; i++) {
      +        var a = links[i];
      +        var href = a.href;
      +        var hashpos = href.indexOf("#");
      +        if (hashpos != -1) {
      +            href = href.substring(0, hashpos);
      +        }
      +        a.href = href + "#" + hash;
      +    }
      +  }
      +
      +  /**
      +   * Calculates the position of a element within its parent.
      +   */
      +  function getNodePosition(element) {
      +    var pos = -1;
      +    while (element) {
      +      element = element.previousSibling;
      +      pos++;
      +    }
      +    return pos;
      +  }
      +
      +  /**
      +   * Remove the sorting indicator style from all headers.
      +   */
      +  function resetSortedStyle(table) {
      +    for (var c = table.tHead.firstChild.firstChild; c; c = c.nextSibling) {
      +      if (c.className) {
      +        if (c.className.indexOf('down ') == 0) {
      +          c.className = c.className.slice(5);
      +        }
      +        if (c.className.indexOf('up ') == 0) {
      +          c.className = c.className.slice(3);
      +        }
      +      }
      +    }
      +  }
      +
      +  window['initialSort'] = initialSort;
      +  window['toggleSort'] = toggleSort;
      +
      +})();
      diff --git a/deliveries/Test results/jacoco-resources/source.gif b/deliveries/Test results/jacoco-resources/source.gif
      new file mode 100644
      index 00000000..b226e41c
      Binary files /dev/null and b/deliveries/Test results/jacoco-resources/source.gif differ
      diff --git a/deliveries/Test results/jacoco-resources/up.gif b/deliveries/Test results/jacoco-resources/up.gif
      new file mode 100644
      index 00000000..58ed2166
      Binary files /dev/null and b/deliveries/Test results/jacoco-resources/up.gif differ
      diff --git a/deliveries/Test results/jacoco-sessions.html b/deliveries/Test results/jacoco-sessions.html
      new file mode 100644
      index 00000000..a8471be0
      --- /dev/null
      +++ b/deliveries/Test results/jacoco-sessions.html	
      @@ -0,0 +1 @@
      +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="jacoco-resources/report.gif" type="image/gif"/><title>Sessions</title></head><body><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="jacoco-sessions.html" class="el_session">Sessions</a></span><a href="index.html" class="el_report">AM08</a> &gt; <span class="el_session">Sessions</span></div><h1>Sessions</h1><p>This coverage report is based on execution data from the following sessions:</p><table class="coverage" cellspacing="0"><thead><tr><td>Session</td><td>Start Time</td><td>Dump Time</td></tr></thead><tbody><tr><td><span class="el_session">fedora-6702067</span></td><td>27 Jun 2024, 20:20:17</td><td>27 Jun 2024, 20:20:18</td></tr></tbody></table><p>Execution data for the following classes is considered in this report:</p><table class="coverage" cellspacing="0"><thead><tr><td>Class</td><td>Id</td></tr></thead><tbody><tr><td><span class="el_class">com.google.gson.FieldNamingPolicy</span></td><td><code>0a431b7ccf188940</code></td></tr><tr><td><span class="el_class">com.google.gson.FieldNamingPolicy.1</span></td><td><code>74e60530f9dfd5a6</code></td></tr><tr><td><span class="el_class">com.google.gson.FieldNamingPolicy.2</span></td><td><code>cca6591a7aa10fd3</code></td></tr><tr><td><span class="el_class">com.google.gson.FieldNamingPolicy.3</span></td><td><code>a2f613527e2eaacb</code></td></tr><tr><td><span class="el_class">com.google.gson.FieldNamingPolicy.4</span></td><td><code>25ad3abbe4ffbf08</code></td></tr><tr><td><span class="el_class">com.google.gson.FieldNamingPolicy.5</span></td><td><code>f93cdbb054f52c88</code></td></tr><tr><td><span class="el_class">com.google.gson.FieldNamingPolicy.6</span></td><td><code>2a1206b1c4908ca0</code></td></tr><tr><td><span class="el_class">com.google.gson.FieldNamingPolicy.7</span></td><td><code>35873bf09a0f69ab</code></td></tr><tr><td><span class="el_class">com.google.gson.Gson</span></td><td><code>da3bd92272cbd456</code></td></tr><tr><td><span class="el_class">com.google.gson.Gson.1</span></td><td><code>f6cd4ad1d61de94a</code></td></tr><tr><td><span class="el_class">com.google.gson.Gson.2</span></td><td><code>048c0886544ac3bd</code></td></tr><tr><td><span class="el_class">com.google.gson.Gson.4</span></td><td><code>adeea904026d13b5</code></td></tr><tr><td><span class="el_class">com.google.gson.Gson.5</span></td><td><code>ea095da195b9b882</code></td></tr><tr><td><span class="el_class">com.google.gson.Gson.FutureTypeAdapter</span></td><td><code>a097e08cbf64be63</code></td></tr><tr><td><span class="el_class">com.google.gson.GsonBuilder</span></td><td><code>20ea51d3d47bfe98</code></td></tr><tr><td><span class="el_class">com.google.gson.JsonElement</span></td><td><code>8e68bfe2990b6166</code></td></tr><tr><td><span class="el_class">com.google.gson.JsonObject</span></td><td><code>c74b674fddf98884</code></td></tr><tr><td><span class="el_class">com.google.gson.JsonParseException</span></td><td><code>be88b75c0bdd5322</code></td></tr><tr><td><span class="el_class">com.google.gson.JsonPrimitive</span></td><td><code>cb19b4b84588590d</code></td></tr><tr><td><span class="el_class">com.google.gson.JsonSyntaxException</span></td><td><code>82f98e8bc50f78c5</code></td></tr><tr><td><span class="el_class">com.google.gson.LongSerializationPolicy</span></td><td><code>0383e8018575dd2d</code></td></tr><tr><td><span class="el_class">com.google.gson.LongSerializationPolicy.1</span></td><td><code>cff239f5198750ee</code></td></tr><tr><td><span class="el_class">com.google.gson.LongSerializationPolicy.2</span></td><td><code>f8175a77e442ec4a</code></td></tr><tr><td><span class="el_class">com.google.gson.ReflectionAccessFilter.FilterResult</span></td><td><code>8c9e6e5c775020a6</code></td></tr><tr><td><span class="el_class">com.google.gson.ToNumberPolicy</span></td><td><code>6b3f5eb48341c0f7</code></td></tr><tr><td><span class="el_class">com.google.gson.ToNumberPolicy.1</span></td><td><code>3e28bcbd9e18f906</code></td></tr><tr><td><span class="el_class">com.google.gson.ToNumberPolicy.2</span></td><td><code>9ed1f6c68a8f7a31</code></td></tr><tr><td><span class="el_class">com.google.gson.ToNumberPolicy.3</span></td><td><code>78745d4a07673284</code></td></tr><tr><td><span class="el_class">com.google.gson.ToNumberPolicy.4</span></td><td><code>4f0bc632663193b9</code></td></tr><tr><td><span class="el_class">com.google.gson.TypeAdapter</span></td><td><code>7a64c3a789da42ac</code></td></tr><tr><td><span class="el_class">com.google.gson.TypeAdapter.1</span></td><td><code>efdceb75ee487fe0</code></td></tr><tr><td><span class="el_class">com.google.gson.internal..Gson.Preconditions</span></td><td><code>c5a0b63a729bc255</code></td></tr><tr><td><span class="el_class">com.google.gson.internal..Gson.Types</span></td><td><code>075fefc736c60661</code></td></tr><tr><td><span class="el_class">com.google.gson.internal..Gson.Types.GenericArrayTypeImpl</span></td><td><code>4af431a845b6e29a</code></td></tr><tr><td><span class="el_class">com.google.gson.internal..Gson.Types.ParameterizedTypeImpl</span></td><td><code>a29dd84dfe58e0b4</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.ConstructorConstructor</span></td><td><code>e7948d4a6e742881</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.ConstructorConstructor.11</span></td><td><code>890966e0f4c0ad6c</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.ConstructorConstructor.13</span></td><td><code>9d8e7ece98b5f4fb</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.ConstructorConstructor.17</span></td><td><code>6fa71c4c15cc504d</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.ConstructorConstructor.18</span></td><td><code>c64dcca82c50be00</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.ConstructorConstructor.19</span></td><td><code>3ddda7258ff1e73a</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.Excluder</span></td><td><code>4d346e66e07e8a82</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.JsonReaderInternalAccess</span></td><td><code>a64aa20bd74e6d9e</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.LazilyParsedNumber</span></td><td><code>f48327fb8a1c7bbb</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.LinkedTreeMap</span></td><td><code>71d40fd220c6772e</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.LinkedTreeMap.1</span></td><td><code>14388577f2177aec</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.LinkedTreeMap.EntrySet</span></td><td><code>974c530850410222</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.LinkedTreeMap.EntrySet.1</span></td><td><code>ee9b9a378aab9fc7</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.LinkedTreeMap.KeySet</span></td><td><code>a60b1558a7539db5</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.LinkedTreeMap.KeySet.1</span></td><td><code>cf917f9d70718530</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.LinkedTreeMap.LinkedTreeMapIterator</span></td><td><code>284f70de5a69bd63</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.LinkedTreeMap.Node</span></td><td><code>8403028d8ffca6d8</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.Primitives</span></td><td><code>ce797cf2bd15cce7</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.ReflectionAccessFilterHelper</span></td><td><code>14e383fb13a714c4</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.Streams</span></td><td><code>4c549020523e1b83</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.UnsafeAllocator</span></td><td><code>808b9fd504fffe3e</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.UnsafeAllocator.1</span></td><td><code>d23c39c23294d730</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.ArrayTypeAdapter</span></td><td><code>44a868616359d7c2</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.ArrayTypeAdapter.1</span></td><td><code>7a0963328ae3b822</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.CollectionTypeAdapterFactory</span></td><td><code>c89f9bd47ce9b7e4</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.CollectionTypeAdapterFactory.Adapter</span></td><td><code>5b304b7c5b05b2c8</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.DateTypeAdapter</span></td><td><code>a918f4b3cc484a9e</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.DateTypeAdapter.1</span></td><td><code>1e1e04a31853ce1a</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.DefaultDateTypeAdapter.DateType</span></td><td><code>f5c26e7a5fb2b2e3</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.DefaultDateTypeAdapter.DateType.1</span></td><td><code>5a51c2ba29853dfb</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.JsonAdapterAnnotationTypeAdapterFactory</span></td><td><code>bcd684c35ebe890f</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.JsonTreeReader</span></td><td><code>e6d559f121aca945</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.JsonTreeReader.1</span></td><td><code>4de013e8ce49d088</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.MapTypeAdapterFactory</span></td><td><code>26cec4b55889fec9</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.MapTypeAdapterFactory.Adapter</span></td><td><code>01419f28f86a5f04</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.NumberTypeAdapter</span></td><td><code>2c1c4b5a515ff5cc</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.NumberTypeAdapter.1</span></td><td><code>d669ec06e8eb62d8</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.ObjectTypeAdapter</span></td><td><code>a0d1b3562b6ad1da</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.ObjectTypeAdapter.1</span></td><td><code>39c37c9644321ab5</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.ReflectiveTypeAdapterFactory</span></td><td><code>0d13c1a2f1ec59b2</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.1</span></td><td><code>39b7a21528764da5</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.Adapter</span></td><td><code>9f10e97a066857d8</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.BoundField</span></td><td><code>6311ea5ac9b1e23f</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.FieldReflectionAdapter</span></td><td><code>386fe27afd672a9d</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.RecordAdapter</span></td><td><code>7dc52df615739aee</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.SerializationDelegatingTypeAdapter</span></td><td><code>9e9ec6ab49aab9b2</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TreeTypeAdapter</span></td><td><code>b213a171ea20c1d4</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TreeTypeAdapter.GsonContextImpl</span></td><td><code>256635e8345ba2cc</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TreeTypeAdapter.SingleTypeFactory</span></td><td><code>55705f4059759293</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper</span></td><td><code>ac5cf822186cb460</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters</span></td><td><code>3cf6f9a1586edf50</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.1</span></td><td><code>2ae19dadeff11dbe</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.10</span></td><td><code>5a87381584845381</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.11</span></td><td><code>a243fbb8a7aba34c</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.12</span></td><td><code>fe67f6f1b395ae6c</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.13</span></td><td><code>66273a0cdfa3ac71</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.14</span></td><td><code>9b7806c2dc1b05be</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.15</span></td><td><code>2af3adb5aea75163</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.16</span></td><td><code>69639ba2f5a52472</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.17</span></td><td><code>ce1de174c46287e9</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.18</span></td><td><code>eca77eb68dabd4f4</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.19</span></td><td><code>c7164cc7874c0864</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.2</span></td><td><code>56232bab96587059</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.20</span></td><td><code>6f0305af6638d64b</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.21</span></td><td><code>a9962cfefe6336c0</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.22</span></td><td><code>cc0eb6e9578978a8</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.23</span></td><td><code>2f3fc16b4a3792fe</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.24</span></td><td><code>fe6064304f8b2481</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.25</span></td><td><code>2d3db6039543d7a1</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.26</span></td><td><code>268e7fdf39fe2801</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.27</span></td><td><code>5043d45402e0c56a</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.28</span></td><td><code>3f53ce9c9ae6d154</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.29</span></td><td><code>ca40747350300a50</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.3</span></td><td><code>7c4a5e89dda44ff5</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.31</span></td><td><code>a88326082c38f744</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.32</span></td><td><code>88b8f1d696b8709c</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.33</span></td><td><code>ec31cc09bb404669</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.34</span></td><td><code>8c6d8c7d69cbdbde</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.35</span></td><td><code>d22fbffca4658ed0</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.4</span></td><td><code>476d80dfdaf927a9</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.5</span></td><td><code>e21d46a9cacad2ee</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.6</span></td><td><code>55f4d0643256bc39</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.7</span></td><td><code>264f55275d161fe1</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.8</span></td><td><code>15987f6d56f629d2</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.9</span></td><td><code>b028a26d1b82b67c</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.EnumTypeAdapter</span></td><td><code>779c132aeb8ba2e1</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.bind.TypeAdapters.EnumTypeAdapter.1</span></td><td><code>2cabfdb3d01b2a5d</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.reflect.ReflectionHelper</span></td><td><code>3193b2fabcde1eba</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.reflect.ReflectionHelper.RecordHelper</span></td><td><code>dada154aaa288ca5</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.reflect.ReflectionHelper.RecordSupportedHelper</span></td><td><code>62a4ee2a8af0afa9</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.sql.SqlDateTypeAdapter</span></td><td><code>759c80a351806a6a</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.sql.SqlDateTypeAdapter.1</span></td><td><code>5e8177dacb42fdcc</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.sql.SqlTimeTypeAdapter</span></td><td><code>c03cfadd1131b29a</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.sql.SqlTimeTypeAdapter.1</span></td><td><code>38f494c57c386f02</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.sql.SqlTimestampTypeAdapter</span></td><td><code>685ac2966df2335f</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.sql.SqlTimestampTypeAdapter.1</span></td><td><code>38e74c1f432005c2</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.sql.SqlTypesSupport</span></td><td><code>24f8c951b0c966e1</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.sql.SqlTypesSupport.1</span></td><td><code>85ef3fff6448d68a</code></td></tr><tr><td><span class="el_class">com.google.gson.internal.sql.SqlTypesSupport.2</span></td><td><code>0c921201327ae0f7</code></td></tr><tr><td><span class="el_class">com.google.gson.reflect.TypeToken</span></td><td><code>274c1e65eaca7251</code></td></tr><tr><td><span class="el_class">com.google.gson.stream.JsonReader</span></td><td><code>327227a088001db5</code></td></tr><tr><td><span class="el_class">com.google.gson.stream.JsonReader.1</span></td><td><code>06008cc20675a91c</code></td></tr><tr><td><span class="el_class">com.google.gson.stream.JsonToken</span></td><td><code>991a7375285784a1</code></td></tr><tr><td><span class="el_class">com.google.gson.stream.JsonWriter</span></td><td><code>5237887f4473c81a</code></td></tr><tr><td><a href="it.polimi.ingsw.client.frontend/ShownCard.html" class="el_class">it.polimi.ingsw.client.frontend.ShownCard</a></td><td><code>c35b7d0b822433a7</code></td></tr><tr><td><a href="it.polimi.ingsw.client.frontend.tui/BoardPosition.html" class="el_class">it.polimi.ingsw.client.frontend.tui.BoardPosition</a></td><td><code>11ee6f078e8e3877</code></td></tr><tr><td><a href="it.polimi.ingsw.client.frontend.tui/ValidPositions.html" class="el_class">it.polimi.ingsw.client.frontend.tui.ValidPositions</a></td><td><code>f32c6c46cef93a0c</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.client.frontend.tui.ValidPositionsTest</span></td><td><code>7861ef121c56fb6c</code></td></tr><tr><td><a href="it.polimi.ingsw.controllers/PlayerController.html" class="el_class">it.polimi.ingsw.controllers.PlayerController</a></td><td><code>5176af17bc78ca04</code></td></tr><tr><td><a href="it.polimi.ingsw.controllers/PlayerControllerRMI.html" class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMI</a></td><td><code>2268cfb2bba377e7</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest</span></td><td><code>71063b5e08731a71</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest.1</span></td><td><code>c877b54bdc0de4a4</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest.10</span></td><td><code>27aede3da9a45888</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest.2</span></td><td><code>6c7b54796d783955</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest.3</span></td><td><code>d3d207e492f7d85f</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest.4</span></td><td><code>28ee8771dd6c2b23</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest.5</span></td><td><code>9a1ba075abb9e965</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest.6</span></td><td><code>a74fe7572e3be6af</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest.7</span></td><td><code>2798759d7ce32a35</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest.8</span></td><td><code>8a19afcd79777881</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest.9</span></td><td><code>046bf678c74b46b3</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.controllers.PlayerControllerRMITest.TestView</span></td><td><code>53d57d74a4d8c295</code></td></tr><tr><td><a href="it.polimi.ingsw.controllers/PlayerControllerTCP.html" class="el_class">it.polimi.ingsw.controllers.PlayerControllerTCP</a></td><td><code>9580610df7168346</code></td></tr><tr><td><a href="it.polimi.ingsw.exceptions/AlreadyUsedUsernameException.html" class="el_class">it.polimi.ingsw.exceptions.AlreadyUsedUsernameException</a></td><td><code>69b30f3f8983601c</code></td></tr><tr><td><a href="it.polimi.ingsw.exceptions/CardException.html" class="el_class">it.polimi.ingsw.exceptions.CardException</a></td><td><code>1ef9fcdff56d484a</code></td></tr><tr><td><a href="it.polimi.ingsw.exceptions/DeckException.html" class="el_class">it.polimi.ingsw.exceptions.DeckException</a></td><td><code>4f306632b4f5725b</code></td></tr><tr><td><a href="it.polimi.ingsw.exceptions/WrongChoiceException.html" class="el_class">it.polimi.ingsw.exceptions.WrongChoiceException</a></td><td><code>333d6755b69a1a95</code></td></tr><tr><td><a href="it.polimi.ingsw.exceptions/WrongStateException.html" class="el_class">it.polimi.ingsw.exceptions.WrongStateException</a></td><td><code>a57056852146ac35</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/AfterDrawState.html" class="el_class">it.polimi.ingsw.gamemodel.AfterDrawState</a></td><td><code>3121e839ca155b2e</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/AfterMoveState.html" class="el_class">it.polimi.ingsw.gamemodel.AfterMoveState</a></td><td><code>67de79721c906368</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/Board.html" class="el_class">it.polimi.ingsw.gamemodel.Board</a></td><td><code>633a61a4fc77fbb0</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.gamemodel.BoardTest</span></td><td><code>3447bbed3b9c1ec0</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/Card.html" class="el_class">it.polimi.ingsw.gamemodel.Card</a></td><td><code>4da0804977317c45</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.gamemodel.Card.1</span></td><td><code>2697e43bc6f4c214</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/CardFace.html" class="el_class">it.polimi.ingsw.gamemodel.CardFace</a></td><td><code>5021caf42f4db3af</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.gamemodel.CardFace.1</span></td><td><code>060ecdea78a4b52e</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/ChooseInitialSideState.html" class="el_class">it.polimi.ingsw.gamemodel.ChooseInitialSideState</a></td><td><code>61e4b85e467914a0</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/ChooseSecretObjectiveState.html" class="el_class">it.polimi.ingsw.gamemodel.ChooseSecretObjectiveState</a></td><td><code>e6a5175f1aea48e6</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/Color.html" class="el_class">it.polimi.ingsw.gamemodel.Color</a></td><td><code>11ef8fddd22f3824</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/Corner.html" class="el_class">it.polimi.ingsw.gamemodel.Corner</a></td><td><code>72dbcfe6604abb75</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/DrawSource.html" class="el_class">it.polimi.ingsw.gamemodel.DrawSource</a></td><td><code>fcd24b37a3d9976f</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/FinalState.html" class="el_class">it.polimi.ingsw.gamemodel.FinalState</a></td><td><code>3a51ada98f8546bc</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/GameDeck.html" class="el_class">it.polimi.ingsw.gamemodel.GameDeck</a></td><td><code>31d22d3005908d2c</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.gamemodel.GameDeckTest</span></td><td><code>92d19e8bf59a94bd</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/GoldCard.html" class="el_class">it.polimi.ingsw.gamemodel.GoldCard</a></td><td><code>8ac2f7f08b5516d5</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.gamemodel.GoldCardTest</span></td><td><code>958bf0afd8218ded</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/InitialCard.html" class="el_class">it.polimi.ingsw.gamemodel.InitialCard</a></td><td><code>cddbde38a942d6a1</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/Match.html" class="el_class">it.polimi.ingsw.gamemodel.Match</a></td><td><code>fd26b4fe04742add</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.gamemodel.Match.1</span></td><td><code>6b2a912bf82a0685</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/MatchState.html" class="el_class">it.polimi.ingsw.gamemodel.MatchState</a></td><td><code>9b958c9e92ecc192</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.gamemodel.MatchTest</span></td><td><code>154431d979d54263</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/NextTurnState.html" class="el_class">it.polimi.ingsw.gamemodel.NextTurnState</a></td><td><code>d47b837510b552ff</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/Objective.html" class="el_class">it.polimi.ingsw.gamemodel.Objective</a></td><td><code>8ca6636952104634</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/PlacedCard.html" class="el_class">it.polimi.ingsw.gamemodel.PlacedCard</a></td><td><code>b7832f10d6e612a2</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/PlacementOutcome.html" class="el_class">it.polimi.ingsw.gamemodel.PlacementOutcome</a></td><td><code>37e53658d3f4f0f2</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/PlayableCard.html" class="el_class">it.polimi.ingsw.gamemodel.PlayableCard</a></td><td><code>8d4d84c746fcf049</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/Player.html" class="el_class">it.polimi.ingsw.gamemodel.Player</a></td><td><code>533bf02984493419</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/PositionRequirement.html" class="el_class">it.polimi.ingsw.gamemodel.PositionRequirement</a></td><td><code>af9ca3445a900d14</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.gamemodel.PositionRequirementTest</span></td><td><code>751ac1a9cd7788fd</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/QuantityRequirement.html" class="el_class">it.polimi.ingsw.gamemodel.QuantityRequirement</a></td><td><code>b413b265cfae2a72</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/Requirement.html" class="el_class">it.polimi.ingsw.gamemodel.Requirement</a></td><td><code>7ada340806467307</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/ResourceCard.html" class="el_class">it.polimi.ingsw.gamemodel.ResourceCard</a></td><td><code>70e57879ca664e35</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/Side.html" class="el_class">it.polimi.ingsw.gamemodel.Side</a></td><td><code>682b47354f7c16c4</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/Symbol.html" class="el_class">it.polimi.ingsw.gamemodel.Symbol</a></td><td><code>bcf650ecd0884173</code></td></tr><tr><td><a href="it.polimi.ingsw.gamemodel/WaitState.html" class="el_class">it.polimi.ingsw.gamemodel.WaitState</a></td><td><code>db6e8e43f552e2f2</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages/Message.html" class="el_class">it.polimi.ingsw.network.messages.Message</a></td><td><code>c848ce91a400774c</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.actions/ActionMessage.html" class="el_class">it.polimi.ingsw.network.messages.actions.ActionMessage</a></td><td><code>b02decbbf3e2fd44</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.actions/CreateMatchMessage.html" class="el_class">it.polimi.ingsw.network.messages.actions.CreateMatchMessage</a></td><td><code>777020d00b2961b1</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.actions/DrawCardMessage.html" class="el_class">it.polimi.ingsw.network.messages.actions.DrawCardMessage</a></td><td><code>4c461bc1c2fef936</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.actions/DrawInitialCardMessage.html" class="el_class">it.polimi.ingsw.network.messages.actions.DrawInitialCardMessage</a></td><td><code>d87c39f6c3d8fa06</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.actions/GetAvailableMatchesMessage.html" class="el_class">it.polimi.ingsw.network.messages.actions.GetAvailableMatchesMessage</a></td><td><code>3cca4b97d96edaff</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.actions/JoinMatchMessage.html" class="el_class">it.polimi.ingsw.network.messages.actions.JoinMatchMessage</a></td><td><code>1952025aed89156e</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.actions/PlayCardMessage.html" class="el_class">it.polimi.ingsw.network.messages.actions.PlayCardMessage</a></td><td><code>616da60d4803933e</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.actions/SendBroadcastTextMessage.html" class="el_class">it.polimi.ingsw.network.messages.actions.SendBroadcastTextMessage</a></td><td><code>45840a9562f76e8c</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.actions/SendPrivateTextMessage.html" class="el_class">it.polimi.ingsw.network.messages.actions.SendPrivateTextMessage</a></td><td><code>bae18b9e0ad648e3</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.responses/AvailableMatchesMessage.html" class="el_class">it.polimi.ingsw.network.messages.responses.AvailableMatchesMessage</a></td><td><code>75c750fed3546155</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.responses/MatchStartedMessage.html" class="el_class">it.polimi.ingsw.network.messages.responses.MatchStartedMessage</a></td><td><code>c5f38669b54f5eb3</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.responses/ResponseMessage.html" class="el_class">it.polimi.ingsw.network.messages.responses.ResponseMessage</a></td><td><code>1043d6a585e579c5</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.responses/SomeoneDrewSecretObjectivesMessage.html" class="el_class">it.polimi.ingsw.network.messages.responses.SomeoneDrewSecretObjectivesMessage</a></td><td><code>a8c54861b4f8725b</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.responses/SomeoneJoinedMessage.html" class="el_class">it.polimi.ingsw.network.messages.responses.SomeoneJoinedMessage</a></td><td><code>62e1b98ed43f2f6b</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.responses/SomeoneQuitMessage.html" class="el_class">it.polimi.ingsw.network.messages.responses.SomeoneQuitMessage</a></td><td><code>2c93b391dd46a1ae</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.responses/SomeoneSentBroadcastTextMessage.html" class="el_class">it.polimi.ingsw.network.messages.responses.SomeoneSentBroadcastTextMessage</a></td><td><code>8c9fa02628697ff2</code></td></tr><tr><td><a href="it.polimi.ingsw.network.messages.responses/SomeoneSentPrivateTextMessage.html" class="el_class">it.polimi.ingsw.network.messages.responses.SomeoneSentPrivateTextMessage</a></td><td><code>090e03acf9c69054</code></td></tr><tr><td><a href="it.polimi.ingsw.network.tcp/ClientListener.html" class="el_class">it.polimi.ingsw.network.tcp.ClientListener</a></td><td><code>97eff66edb82c2f0</code></td></tr><tr><td><a href="it.polimi.ingsw.network.tcp/IOHandler.html" class="el_class">it.polimi.ingsw.network.tcp.IOHandler</a></td><td><code>a9aef40008a19f6d</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.network.tcp.ServerTCPTest</span></td><td><code>deb10f87a69774c7</code></td></tr><tr><td><a href="it.polimi.ingsw.network.tcp/TCPServer.html" class="el_class">it.polimi.ingsw.network.tcp.TCPServer</a></td><td><code>2499cfbd4fa50699</code></td></tr><tr><td><a href="it.polimi.ingsw.server/MatchStatusObserver.html" class="el_class">it.polimi.ingsw.server.MatchStatusObserver</a></td><td><code>7bf469a5f1612257</code></td></tr><tr><td><a href="it.polimi.ingsw.server/Server.html" class="el_class">it.polimi.ingsw.server.Server</a></td><td><code>57163b7f396ae783</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/AvailableMatch.html" class="el_class">it.polimi.ingsw.utils.AvailableMatch</a></td><td><code>8e902e0047d26c98</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/CardJsonParser.html" class="el_class">it.polimi.ingsw.utils.CardJsonParser</a></td><td><code>014294c39c4d1ea2</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/CardJsonParser$CardTypeAdapter.html" class="el_class">it.polimi.ingsw.utils.CardJsonParser.CardTypeAdapter</a></td><td><code>1becb323c9223344</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/CardsManager.html" class="el_class">it.polimi.ingsw.utils.CardsManager</a></td><td><code>c99ab03e1f23baf2</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/CardsManager$1.html" class="el_class">it.polimi.ingsw.utils.CardsManager.1</a></td><td><code>1c8e745d950358f4</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/CardsManager$2.html" class="el_class">it.polimi.ingsw.utils.CardsManager.2</a></td><td><code>2cd37d5550513da2</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/CardsManager$3.html" class="el_class">it.polimi.ingsw.utils.CardsManager.3</a></td><td><code>8eda48cd66b9f4aa</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/CardsManager$4.html" class="el_class">it.polimi.ingsw.utils.CardsManager.4</a></td><td><code>a7daf397dae0cf1e</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.utils.CardsManagerTest</span></td><td><code>1424bace8fc9251b</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/DeckCreator.html" class="el_class">it.polimi.ingsw.utils.DeckCreator</a></td><td><code>f12967038024a1bc</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/GuiUtil.html" class="el_class">it.polimi.ingsw.utils.GuiUtil</a></td><td><code>83834eaf4af25c4b</code></td></tr><tr><td><span class="el_class">it.polimi.ingsw.utils.JsonTest</span></td><td><code>d318dbafc9fc60a2</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/LeaderboardEntry.html" class="el_class">it.polimi.ingsw.utils.LeaderboardEntry</a></td><td><code>601f9ca1ef9d389b</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/MessageJsonParser.html" class="el_class">it.polimi.ingsw.utils.MessageJsonParser</a></td><td><code>87cb91d1f3f9b72e</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/MessageJsonParser$MessageTypeAdapter.html" class="el_class">it.polimi.ingsw.utils.MessageJsonParser.MessageTypeAdapter</a></td><td><code>ddf03889187dd319</code></td></tr><tr><td><a href="it.polimi.ingsw.utils/Pair.html" class="el_class">it.polimi.ingsw.utils.Pair</a></td><td><code>405638ef90daf146</code></td></tr><tr><td><span class="el_class">org.apache.maven.plugin.surefire.log.api.NullConsoleLogger</span></td><td><code>80d79e52a7499259</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.NonAbstractClassFilter</span></td><td><code>7fa4110cdc2fc1de</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.AbstractPathConfiguration</span></td><td><code>8182fa1396653f01</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.BaseProviderFactory</span></td><td><code>82593383b8ea92d6</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.BiProperty</span></td><td><code>4945e268841ae2cb</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.BooterDeserializer</span></td><td><code>5e68b147d2c4b22f</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ClassLoaderConfiguration</span></td><td><code>dc8fd5c18ebb0e44</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.Classpath</span></td><td><code>c898ea9ca4a65da5</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ClasspathConfiguration</span></td><td><code>fbf5fb96600339ce</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.Command</span></td><td><code>eb1b53eb8cbe7b47</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.CommandReader</span></td><td><code>0c8d3ca700ec7199</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.CommandReader.1</span></td><td><code>fbfebde20e2b504c</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.CommandReader.CommandRunnable</span></td><td><code>ee59ae4d74408619</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.DumpErrorSingleton</span></td><td><code>2b476b92c5a56cec</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ForkedBooter</span></td><td><code>7c637cf5651513d1</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ForkedBooter.1</span></td><td><code>8e738e4578953efa</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ForkedBooter.2</span></td><td><code>eed8c1764882af0e</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ForkedBooter.3</span></td><td><code>c484c4542ee85d76</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ForkedBooter.4</span></td><td><code>fdd9c09c784f8eea</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ForkedBooter.5</span></td><td><code>7b8c4d35432edce6</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ForkedBooter.6</span></td><td><code>b897d54528b69e6d</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ForkedBooter.7</span></td><td><code>fe5121edb86030bc</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ForkedBooter.PingScheduler</span></td><td><code>d29065207a6b6c40</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ForkingReporterFactory</span></td><td><code>076a6c0176f6238b</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ForkingRunListener</span></td><td><code>92d4b034b32ca2c0</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.MasterProcessCommand</span></td><td><code>da65de332c2de19d</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.PpidChecker</span></td><td><code>71b8c658da2ea8d3</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.PpidChecker.1</span></td><td><code>a004a9a91ab49ba2</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.PpidChecker.ProcessInfoConsumer</span></td><td><code>73f319c21fab7e7f</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ProcessInfo</span></td><td><code>b5b56cd86f3f0b31</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.PropertiesWrapper</span></td><td><code>ae4bf137cc5290c1</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.ProviderConfiguration</span></td><td><code>d19986536a351b50</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.Shutdown</span></td><td><code>ee9c65017e107986</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.StartupConfiguration</span></td><td><code>a8cc10b01ed27439</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.SystemPropertyManager</span></td><td><code>f47497b1dde50d64</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.booter.TypeEncodedValue</span></td><td><code>5ea9766678ac06a2</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.cli.CommandLineOption</span></td><td><code>467fc7f51b73863b</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.common.junit3.JUnit3TestChecker</span></td><td><code>60f0e8645c7f9683</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.common.junit4.JUnit4ProviderUtil</span></td><td><code>2efb9b040a733f46</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.common.junit4.JUnit4Reflector</span></td><td><code>c6b492fe44aeaaad</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.common.junit4.JUnit4RunListener</span></td><td><code>e9b69f33ef0f0ee2</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.common.junit4.JUnit4RunListenerFactory</span></td><td><code>47691d741b824165</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.common.junit4.JUnit4TestChecker</span></td><td><code>0ecb2bc7979f6afe</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.common.junit4.JUnitTestFailureListener</span></td><td><code>713afbdb99a074d5</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.common.junit4.Notifier</span></td><td><code>cc79e323f237d54b</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.junit4.JUnit4Provider</span></td><td><code>ea5628d21adfaab0</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.junit4.JUnit4Provider.1</span></td><td><code>b81832311ccdea03</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.providerapi.AbstractProvider</span></td><td><code>90f3b08fe8a1c87c</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.report.ConsoleOutputCapture</span></td><td><code>b8ae904ed8536017</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.report.ConsoleOutputCapture.ForwardingPrintStream</span></td><td><code>f912ea5d2dac308e</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.report.ConsoleOutputCapture.NullOutputStream</span></td><td><code>8d05eb67510fd586</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.report.ReporterConfiguration</span></td><td><code>4281487891f02f69</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.report.SimpleReportEntry</span></td><td><code>ced572f24a462295</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.shade.org.apache.commons.io.IOUtils</span></td><td><code>31aed2fcfab3e082</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.shade.org.apache.commons.io.output.StringBuilderWriter</span></td><td><code>6d33fec8cb3374c0</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.shade.org.apache.commons.lang3.JavaVersion</span></td><td><code>a8452005cb20bb7d</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.shade.org.apache.commons.lang3.SystemUtils</span></td><td><code>aba69a973b7ba06a</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.shade.org.apache.commons.lang3.math.NumberUtils</span></td><td><code>d0156407bff7b695</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.shade.org.apache.maven.shared.utils.StringUtils</span></td><td><code>483d14212b21a3ea</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.suite.RunResult</span></td><td><code>f5c7c53a954bcafa</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.testset.DirectoryScannerParameters</span></td><td><code>2b5eeacae469cd1d</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.testset.IncludedExcludedPatterns</span></td><td><code>f39908e3b64d7090</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.testset.ResolvedTest</span></td><td><code>a598483e424232d4</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.testset.ResolvedTest.ClassMatcher</span></td><td><code>79be7f2fa77ad8d7</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.testset.ResolvedTest.MethodMatcher</span></td><td><code>7c71374a51e8e61b</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.testset.ResolvedTest.Type</span></td><td><code>90e4214668937845</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.testset.RunOrderParameters</span></td><td><code>b4c06223c3099700</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.testset.TestArtifactInfo</span></td><td><code>f703953620e80b33</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.testset.TestListResolver</span></td><td><code>7d372c99b98a147d</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.testset.TestRequest</span></td><td><code>0fa2c0cc34345df2</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.CloseableIterator</span></td><td><code>cc15bdebae86d5d2</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.DefaultRunOrderCalculator</span></td><td><code>1aeecbcd3bf6e89b</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.DefaultScanResult</span></td><td><code>7fefafdf8c793c36</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.ReflectionUtils</span></td><td><code>8d5f4b05d6d77207</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.RunOrder</span></td><td><code>d2292a6beb4b6337</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.TestsToRun</span></td><td><code>a95363e4b4ba2069</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.TestsToRun.ClassesIterator</span></td><td><code>84a139c598502c0b</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.internal.DaemonThreadFactory</span></td><td><code>21a589f6dedb169c</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.internal.DaemonThreadFactory.NamedThreadFactory</span></td><td><code>682458ca85b067a3</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.internal.DumpFileUtils</span></td><td><code>506743b77fc98f6e</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.internal.ImmutableMap</span></td><td><code>72bcae5e55b4fabb</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.internal.ImmutableMap.Node</span></td><td><code>ecc659afb4f6d68b</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.internal.ObjectUtils</span></td><td><code>69a2a92649b44645</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.internal.StringUtils</span></td><td><code>3a7e4daf0a993e1e</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.internal.StringUtils.EncodedArray</span></td><td><code>477f1d94d78cb50b</code></td></tr><tr><td><span class="el_class">org.apache.maven.surefire.util.internal.TestClassMethodNameUtils</span></td><td><code>7ccab40b69c25b60</code></td></tr><tr><td><span class="el_class">org.junit.Assert</span></td><td><code>eda6db924019425b</code></td></tr><tr><td><span class="el_class">org.junit.internal.Checks</span></td><td><code>5f543b0bb87b92da</code></td></tr><tr><td><span class="el_class">org.junit.internal.MethodSorter</span></td><td><code>a26607ae067f7352</code></td></tr><tr><td><span class="el_class">org.junit.internal.MethodSorter.1</span></td><td><code>d3997b4bdb7889c1</code></td></tr><tr><td><span class="el_class">org.junit.internal.MethodSorter.2</span></td><td><code>c8e6351cbf098013</code></td></tr><tr><td><span class="el_class">org.junit.internal.builders.AllDefaultPossibilitiesBuilder</span></td><td><code>4f18a1d7932cb8ab</code></td></tr><tr><td><span class="el_class">org.junit.internal.builders.AnnotatedBuilder</span></td><td><code>0faf353d180c9332</code></td></tr><tr><td><span class="el_class">org.junit.internal.builders.IgnoredBuilder</span></td><td><code>e152f333c53967a6</code></td></tr><tr><td><span class="el_class">org.junit.internal.builders.JUnit3Builder</span></td><td><code>4a2cc8e608e1275e</code></td></tr><tr><td><span class="el_class">org.junit.internal.builders.JUnit4Builder</span></td><td><code>f2e00a3e1fc23005</code></td></tr><tr><td><span class="el_class">org.junit.internal.builders.SuiteMethodBuilder</span></td><td><code>1df136431e07e393</code></td></tr><tr><td><span class="el_class">org.junit.internal.requests.ClassRequest</span></td><td><code>47dbc61675e5a92e</code></td></tr><tr><td><span class="el_class">org.junit.internal.requests.ClassRequest.CustomAllDefaultPossibilitiesBuilder</span></td><td><code>ea1c269d9656f543</code></td></tr><tr><td><span class="el_class">org.junit.internal.requests.ClassRequest.CustomSuiteMethodBuilder</span></td><td><code>03d01020b1c503c7</code></td></tr><tr><td><span class="el_class">org.junit.internal.requests.MemoizingRequest</span></td><td><code>1e70801476dbab8f</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.model.EachTestNotifier</span></td><td><code>077481995383e000</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.model.ReflectiveCallable</span></td><td><code>d591724635588bcb</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.rules.RuleMemberValidator</span></td><td><code>95b5ee2068ec6875</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.rules.RuleMemberValidator.Builder</span></td><td><code>f24845fa6fd065af</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.rules.RuleMemberValidator.DeclaringClassMustBePublic</span></td><td><code>1de994463c748d89</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.rules.RuleMemberValidator.FieldMustBeARule</span></td><td><code>e24e9f59de6fe5b7</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.rules.RuleMemberValidator.FieldMustBeATestRule</span></td><td><code>690823bd2992f52e</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.rules.RuleMemberValidator.MemberMustBeNonStaticOrAlsoClassRule</span></td><td><code>1e703fb3e7f4e533</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.rules.RuleMemberValidator.MemberMustBePublic</span></td><td><code>806c174eb921b478</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.rules.RuleMemberValidator.MemberMustBeStatic</span></td><td><code>ac28a03dd36b2b5a</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.rules.RuleMemberValidator.MethodMustBeARule</span></td><td><code>88ea4a2237de2b8b</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.rules.RuleMemberValidator.MethodMustBeATestRule</span></td><td><code>9f4dd18a26005c18</code></td></tr><tr><td><span class="el_class">org.junit.internal.runners.statements.InvokeMethod</span></td><td><code>05a7aa636afa2c39</code></td></tr><tr><td><span class="el_class">org.junit.runner.Description</span></td><td><code>1d6f7ddbbf223f9a</code></td></tr><tr><td><span class="el_class">org.junit.runner.Request</span></td><td><code>214d9ade1c7dc38d</code></td></tr><tr><td><span class="el_class">org.junit.runner.Result</span></td><td><code>ecf6c1c04298ff7d</code></td></tr><tr><td><span class="el_class">org.junit.runner.Result.Listener</span></td><td><code>cf649a4ffbe55db9</code></td></tr><tr><td><span class="el_class">org.junit.runner.Runner</span></td><td><code>f5abacc70e2e08a4</code></td></tr><tr><td><span class="el_class">org.junit.runner.notification.RunListener</span></td><td><code>69d2c783b42f6720</code></td></tr><tr><td><span class="el_class">org.junit.runner.notification.RunNotifier</span></td><td><code>f6313076e2224ebb</code></td></tr><tr><td><span class="el_class">org.junit.runner.notification.RunNotifier.1</span></td><td><code>e31025c12b4dbdee</code></td></tr><tr><td><span class="el_class">org.junit.runner.notification.RunNotifier.2</span></td><td><code>4c7314c6d595dc3e</code></td></tr><tr><td><span class="el_class">org.junit.runner.notification.RunNotifier.3</span></td><td><code>df2bada5cb3794f3</code></td></tr><tr><td><span class="el_class">org.junit.runner.notification.RunNotifier.4</span></td><td><code>fbdd84204c215de7</code></td></tr><tr><td><span class="el_class">org.junit.runner.notification.RunNotifier.5</span></td><td><code>f62dc396b601f8bd</code></td></tr><tr><td><span class="el_class">org.junit.runner.notification.RunNotifier.9</span></td><td><code>c3c3d54b8ed47ee1</code></td></tr><tr><td><span class="el_class">org.junit.runner.notification.RunNotifier.SafeNotifier</span></td><td><code>0b43c10299733bfb</code></td></tr><tr><td><span class="el_class">org.junit.runner.notification.SynchronizedRunListener</span></td><td><code>2b59d5cb3b105225</code></td></tr><tr><td><span class="el_class">org.junit.runners.BlockJUnit4ClassRunner</span></td><td><code>95752fb34ff12f3f</code></td></tr><tr><td><span class="el_class">org.junit.runners.BlockJUnit4ClassRunner.1</span></td><td><code>d0f63145230a5f42</code></td></tr><tr><td><span class="el_class">org.junit.runners.BlockJUnit4ClassRunner.2</span></td><td><code>f93eace695ddd30e</code></td></tr><tr><td><span class="el_class">org.junit.runners.BlockJUnit4ClassRunner.RuleCollector</span></td><td><code>9c768e710e39c989</code></td></tr><tr><td><span class="el_class">org.junit.runners.JUnit4</span></td><td><code>6d26e2305347fe01</code></td></tr><tr><td><span class="el_class">org.junit.runners.ParentRunner</span></td><td><code>335ee90b10f96ea1</code></td></tr><tr><td><span class="el_class">org.junit.runners.ParentRunner.1</span></td><td><code>ecc6961e8bc209c4</code></td></tr><tr><td><span class="el_class">org.junit.runners.ParentRunner.2</span></td><td><code>c5cb913a629ec4c8</code></td></tr><tr><td><span class="el_class">org.junit.runners.ParentRunner.3</span></td><td><code>20bad8188aebc0f2</code></td></tr><tr><td><span class="el_class">org.junit.runners.ParentRunner.4</span></td><td><code>80476dbdcb8d52cc</code></td></tr><tr><td><span class="el_class">org.junit.runners.ParentRunner.ClassRuleCollector</span></td><td><code>26f7fb338afcd13b</code></td></tr><tr><td><span class="el_class">org.junit.runners.RuleContainer</span></td><td><code>d44c3ba6dc65af53</code></td></tr><tr><td><span class="el_class">org.junit.runners.RuleContainer.1</span></td><td><code>57bbc73f6f47763b</code></td></tr><tr><td><span class="el_class">org.junit.runners.model.FrameworkField</span></td><td><code>a2ae004776f29255</code></td></tr><tr><td><span class="el_class">org.junit.runners.model.FrameworkMember</span></td><td><code>bfd059486f267475</code></td></tr><tr><td><span class="el_class">org.junit.runners.model.FrameworkMethod</span></td><td><code>f293b82d5aa86323</code></td></tr><tr><td><span class="el_class">org.junit.runners.model.FrameworkMethod.1</span></td><td><code>8fd5e02769c0e0c2</code></td></tr><tr><td><span class="el_class">org.junit.runners.model.RunnerBuilder</span></td><td><code>585cad2d320dc86e</code></td></tr><tr><td><span class="el_class">org.junit.runners.model.Statement</span></td><td><code>9a75aa5de27bf4d5</code></td></tr><tr><td><span class="el_class">org.junit.runners.model.TestClass</span></td><td><code>7e71209792391ee8</code></td></tr><tr><td><span class="el_class">org.junit.runners.model.TestClass.FieldComparator</span></td><td><code>1b96cd3d5c4aeb07</code></td></tr><tr><td><span class="el_class">org.junit.runners.model.TestClass.MethodComparator</span></td><td><code>0369eb29eb04248a</code></td></tr><tr><td><span class="el_class">org.junit.validator.AnnotationValidatorFactory</span></td><td><code>e1e5570798173ab9</code></td></tr><tr><td><span class="el_class">org.junit.validator.AnnotationsValidator</span></td><td><code>6cbe8454c9a93bb8</code></td></tr><tr><td><span class="el_class">org.junit.validator.AnnotationsValidator.AnnotatableValidator</span></td><td><code>d211a963f22be103</code></td></tr><tr><td><span class="el_class">org.junit.validator.AnnotationsValidator.ClassValidator</span></td><td><code>1b463c4e6642e880</code></td></tr><tr><td><span class="el_class">org.junit.validator.AnnotationsValidator.FieldValidator</span></td><td><code>64068b954dc56a31</code></td></tr><tr><td><span class="el_class">org.junit.validator.AnnotationsValidator.MethodValidator</span></td><td><code>f16b57f17c787036</code></td></tr><tr><td><span class="el_class">org.junit.validator.PublicClassValidator</span></td><td><code>3bac248cf06b18e4</code></td></tr><tr><td><span class="el_class">sun.text.resources.cldr.ext.FormatData_en_001</span></td><td><code>0b9d9badf759ff3f</code></td></tr><tr><td><span class="el_class">sun.text.resources.cldr.ext.FormatData_en_GB</span></td><td><code>c14e38b962763eee</code></td></tr><tr><td><span class="el_class">sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo</span></td><td><code>cea799461486d92b</code></td></tr><tr><td><span class="el_class">sun.util.resources.provider.LocaleDataProvider</span></td><td><code>b4998bcaf6bc697c</code></td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html>
      \ No newline at end of file
      diff --git a/deliveries/Test results/jacoco.csv b/deliveries/Test results/jacoco.csv
      new file mode 100644
      index 00000000..f953d622
      --- /dev/null
      +++ b/deliveries/Test results/jacoco.csv	
      @@ -0,0 +1,126 @@
      +GROUP,PACKAGE,CLASS,INSTRUCTION_MISSED,INSTRUCTION_COVERED,BRANCH_MISSED,BRANCH_COVERED,LINE_MISSED,LINE_COVERED,COMPLEXITY_MISSED,COMPLEXITY_COVERED,METHOD_MISSED,METHOD_COVERED
      +AM08,it.polimi.ingsw.network.messages,Message,0,3,0,0,0,1,0,1,0,1
      +AM08,it.polimi.ingsw.client.network,NetworkHandlerTCP,173,0,0,0,44,0,18,0,18,0
      +AM08,it.polimi.ingsw.client.network,NetworkHandler,163,0,4,0,52,0,23,0,21,0
      +AM08,it.polimi.ingsw.client.network,NetworkHandlerRMI,190,0,2,0,76,0,15,0,14,0
      +AM08,it.polimi.ingsw.controllers,PlayerController,59,55,7,3,12,17,7,3,2,3
      +AM08,it.polimi.ingsw.controllers,PlayerControllerTCP,388,130,6,8,93,37,23,12,19,9
      +AM08,it.polimi.ingsw.controllers,PlayerControllerRMI,95,471,16,30,44,116,18,35,2,28
      +AM08,it.polimi.ingsw.network.messages.actions,SendPrivateTextMessage,0,16,0,0,0,6,0,3,0,3
      +AM08,it.polimi.ingsw.network.messages.actions,DrawInitialCardMessage,0,4,0,0,0,2,0,1,0,1
      +AM08,it.polimi.ingsw.network.messages.actions,CreateMatchMessage,0,16,0,0,0,6,0,3,0,3
      +AM08,it.polimi.ingsw.network.messages.actions,ActionMessage,3,17,0,0,1,5,1,2,1,2
      +AM08,it.polimi.ingsw.network.messages.actions,ChooseInitialCardSideMessage,10,0,0,0,4,0,2,0,2,0
      +AM08,it.polimi.ingsw.network.messages.actions,GetAvailableMatchesMessage,0,4,0,0,0,2,0,1,0,1
      +AM08,it.polimi.ingsw.network.messages.actions,ChooseSecretObjectiveMessage,10,0,0,0,4,0,2,0,2,0
      +AM08,it.polimi.ingsw.network.messages.actions,DrawSecretObjectivesMessage,4,0,0,0,2,0,1,0,1,0
      +AM08,it.polimi.ingsw.network.messages.actions,DrawCardMessage,0,10,0,0,0,4,0,2,0,2
      +AM08,it.polimi.ingsw.network.messages.actions,SendBroadcastTextMessage,0,10,0,0,0,4,0,2,0,2
      +AM08,it.polimi.ingsw.network.messages.actions,JoinMatchMessage,0,10,0,0,0,4,0,2,0,2
      +AM08,it.polimi.ingsw.network.messages.actions,PlayCardMessage,0,32,0,0,0,10,0,5,0,5
      +AM08,it.polimi.ingsw.exceptions,WrongChoiceException,0,4,0,0,0,2,0,1,0,1
      +AM08,it.polimi.ingsw.exceptions,AlreadyUsedUsernameException,0,4,0,0,0,2,0,1,0,1
      +AM08,it.polimi.ingsw.exceptions,WrongNameException,4,0,0,0,2,0,1,0,1,0
      +AM08,it.polimi.ingsw.exceptions,WrongInputFormatException,4,0,0,0,2,0,1,0,1,0
      +AM08,it.polimi.ingsw.exceptions,CardException,0,4,0,0,0,2,0,1,0,1
      +AM08,it.polimi.ingsw.exceptions,WrongTurnException,4,0,0,0,2,0,1,0,1,0
      +AM08,it.polimi.ingsw.exceptions,WrongStateException,0,4,0,0,0,2,0,1,0,1
      +AM08,it.polimi.ingsw.exceptions,InvalidPlayerException,4,0,0,0,2,0,1,0,1,0
      +AM08,it.polimi.ingsw.exceptions,ChosenMatchException,4,0,0,0,2,0,1,0,1,0
      +AM08,it.polimi.ingsw.exceptions,DeckException,0,4,0,0,0,2,0,1,0,1
      +AM08,it.polimi.ingsw.exceptions,InvalidResourceException,4,0,0,0,2,0,1,0,1,0
      +AM08,it.polimi.ingsw.exceptions,HandException,4,0,0,0,2,0,1,0,1,0
      +AM08,it.polimi.ingsw.client.frontend.gui.controllers,PlayerTabController,853,0,42,0,180,0,55,0,34,0
      +AM08,it.polimi.ingsw.client.frontend.gui.controllers,WaitingSceneController,115,0,2,0,32,0,11,0,10,0
      +AM08,it.polimi.ingsw.client.frontend.gui.controllers,LobbySceneController,393,0,22,0,83,0,22,0,11,0
      +AM08,it.polimi.ingsw.client.frontend.gui.controllers,ChatPaneController,287,0,14,0,72,0,22,0,15,0
      +AM08,it.polimi.ingsw.client.frontend.gui.controllers,ErrorSceneController,30,0,0,0,11,0,6,0,6,0
      +AM08,it.polimi.ingsw.client.frontend.gui.controllers,MatchSceneController,330,0,19,0,65,0,31,0,19,0
      +AM08,it.polimi.ingsw.client.frontend.gui.controllers,SceneController,51,0,0,0,18,0,7,0,7,0
      +AM08,it.polimi.ingsw.client.frontend.gui.controllers,ConnectionSceneController,425,0,14,0,102,0,13,0,6,0
      +AM08,it.polimi.ingsw.client.frontend.gui.controllers,RankingSceneController,158,0,6,0,36,0,11,0,8,0
      +AM08,it.polimi.ingsw.server,MatchStatusObserver,72,13,0,0,27,8,10,5,10,5
      +AM08,it.polimi.ingsw.server,Server,282,106,20,4,59,23,21,6,10,5
      +AM08,it.polimi.ingsw.utils,TUICardParser,1597,0,114,0,296,0,101,0,26,0
      +AM08,it.polimi.ingsw.utils,CardsSerializer,3711,0,0,0,735,0,2,0,2,0
      +AM08,it.polimi.ingsw.utils,MessageJsonParser.MessageTypeAdapter,24,68,3,5,4,13,3,6,1,4
      +AM08,it.polimi.ingsw.utils,Pair,0,9,0,0,0,1,0,1,0,1
      +AM08,it.polimi.ingsw.utils,CardsManager.new TypeToken() {...},0,3,0,0,0,1,0,1,0,1
      +AM08,it.polimi.ingsw.utils,CardsManager.new TypeToken() {...},0,3,0,0,0,1,0,1,0,1
      +AM08,it.polimi.ingsw.utils,CardsManager.new TypeToken() {...},0,3,0,0,0,1,0,1,0,1
      +AM08,it.polimi.ingsw.utils,CardsManager.new TypeToken() {...},0,3,0,0,0,1,0,1,0,1
      +AM08,it.polimi.ingsw.utils,CardJsonParser,0,19,0,0,0,3,0,2,0,2
      +AM08,it.polimi.ingsw.utils,LeaderboardEntry,0,12,0,0,0,1,0,1,0,1
      +AM08,it.polimi.ingsw.utils,GuiUtil,160,13,16,0,33,5,24,2,13,2
      +AM08,it.polimi.ingsw.utils,DeckCreator,0,99,0,8,0,25,0,9,0,5
      +AM08,it.polimi.ingsw.utils,CardsManager,26,99,0,0,8,20,1,8,1,8
      +AM08,it.polimi.ingsw.utils,RequestStatus,21,0,0,0,4,0,1,0,1,0
      +AM08,it.polimi.ingsw.utils,AvailableMatch,0,15,0,0,0,1,0,1,0,1
      +AM08,it.polimi.ingsw.utils,MessageJsonParser,3,33,0,0,1,7,1,3,1,3
      +AM08,it.polimi.ingsw.utils,CardJsonParser.CardTypeAdapter,18,109,2,6,4,19,2,7,0,5
      +AM08,it.polimi.ingsw.utils,PlacedCardRecord,15,0,0,0,1,0,1,0,1,0
      +AM08,it.polimi.ingsw.network.tcp,ClientReceiver,623,0,29,0,146,0,37,0,16,0
      +AM08,it.polimi.ingsw.network.tcp,IOHandler,17,67,2,2,6,18,4,5,2,5
      +AM08,it.polimi.ingsw.network.tcp,TCPServer,11,30,1,1,6,9,1,2,0,2
      +AM08,it.polimi.ingsw.network.tcp,ClientListener,109,264,14,15,37,76,15,14,1,9
      +AM08,it.polimi.ingsw.client.frontend.gui,GraphicalApplication,73,0,0,0,25,0,6,0,6,0
      +AM08,it.polimi.ingsw.client.frontend.gui,GraphicalViewGUI,1114,0,52,0,275,0,84,0,58,0
      +AM08,it.polimi.ingsw.network.messages.errors,ErrorMessage,15,0,0,0,6,0,3,0,3,0
      +AM08,it.polimi.ingsw.gamemodel,Objective,2,52,1,3,1,15,1,7,0,6
      +AM08,it.polimi.ingsw.gamemodel,ResourceCard,0,13,0,0,0,5,0,2,0,2
      +AM08,it.polimi.ingsw.gamemodel,Color,0,27,0,0,0,5,0,1,0,1
      +AM08,it.polimi.ingsw.gamemodel,Corner,0,27,0,0,0,5,0,1,0,1
      +AM08,it.polimi.ingsw.gamemodel,AfterDrawState,0,26,0,2,0,7,0,3,0,2
      +AM08,it.polimi.ingsw.gamemodel,WaitState,0,41,0,2,0,14,0,5,0,4
      +AM08,it.polimi.ingsw.gamemodel,PlacementOutcome,0,21,0,0,0,4,0,1,0,1
      +AM08,it.polimi.ingsw.gamemodel,Requirement,0,3,0,0,0,2,0,1,0,1
      +AM08,it.polimi.ingsw.gamemodel,Match,94,1108,16,81,24,252,15,85,0,49
      +AM08,it.polimi.ingsw.gamemodel,InitialCard,0,26,0,0,0,7,0,2,0,2
      +AM08,it.polimi.ingsw.gamemodel,GameDeck,0,55,0,6,0,18,0,11,0,8
      +AM08,it.polimi.ingsw.gamemodel,AfterMoveState,0,18,0,0,0,7,0,3,0,3
      +AM08,it.polimi.ingsw.gamemodel,GoldCard,13,195,2,14,2,37,3,11,1,5
      +AM08,it.polimi.ingsw.gamemodel,DrawSource,0,39,0,0,0,7,0,1,0,1
      +AM08,it.polimi.ingsw.gamemodel,Symbol,0,178,0,0,0,16,0,5,0,5
      +AM08,it.polimi.ingsw.gamemodel,PositionRequirement,13,159,1,19,2,28,2,11,1,2
      +AM08,it.polimi.ingsw.gamemodel,Board,34,558,9,50,9,88,9,33,0,12
      +AM08,it.polimi.ingsw.gamemodel,QuantityRequirement,18,63,4,6,2,15,4,4,1,2
      +AM08,it.polimi.ingsw.gamemodel,ChooseInitialSideState,0,31,0,2,0,9,0,4,0,3
      +AM08,it.polimi.ingsw.gamemodel,NextTurnState,10,63,3,9,2,17,3,8,0,5
      +AM08,it.polimi.ingsw.gamemodel,Player,44,286,8,12,10,64,9,22,1,20
      +AM08,it.polimi.ingsw.gamemodel,Side,25,28,4,0,4,7,3,3,1,3
      +AM08,it.polimi.ingsw.gamemodel,MatchState,18,35,0,0,5,9,4,6,4,6
      +AM08,it.polimi.ingsw.gamemodel,FinalState,5,6,0,0,3,3,2,1,2,1
      +AM08,it.polimi.ingsw.gamemodel,PlayableCard,13,45,1,1,4,11,2,3,1,3
      +AM08,it.polimi.ingsw.gamemodel,CardFace,0,38,0,4,0,13,0,6,0,3
      +AM08,it.polimi.ingsw.gamemodel,Card,6,35,1,5,1,9,2,6,1,4
      +AM08,it.polimi.ingsw.gamemodel,PlacedCard,3,24,0,0,1,8,1,4,1,4
      +AM08,it.polimi.ingsw.gamemodel,ChooseSecretObjectiveState,0,31,0,2,0,9,0,4,0,3
      +AM08,it.polimi.ingsw.network.messages.responses,ResponseMessage,6,14,0,0,2,4,2,1,2,1
      +AM08,it.polimi.ingsw.network.messages.responses,SomeoneSetInitialSideMessage,16,0,0,0,6,0,3,0,3,0
      +AM08,it.polimi.ingsw.network.messages.responses,MatchFinishedMessage,37,0,0,0,5,0,4,0,4,0
      +AM08,it.polimi.ingsw.network.messages.responses,SomeoneQuitMessage,6,10,0,0,2,4,2,1,2,1
      +AM08,it.polimi.ingsw.network.messages.responses,SomeonePlayedCardMessage,45,0,0,0,14,0,7,0,7,0
      +AM08,it.polimi.ingsw.network.messages.responses,SomeoneDrewCardMessage,40,0,4,0,12,0,7,0,5,0
      +AM08,it.polimi.ingsw.network.messages.responses,SomeoneSentPrivateTextMessage,6,10,0,0,2,4,2,1,2,1
      +AM08,it.polimi.ingsw.network.messages.responses,SomeoneJoinedMessage,6,14,0,0,2,4,2,1,2,1
      +AM08,it.polimi.ingsw.network.messages.responses,MatchStartedMessage,15,125,0,2,5,19,5,4,5,3
      +AM08,it.polimi.ingsw.network.messages.responses,AvailableMatchesMessage,3,36,0,0,1,5,1,3,1,3
      +AM08,it.polimi.ingsw.network.messages.responses,SomeoneDrewSecretObjectivesMessage,3,17,0,0,1,5,1,2,1,2
      +AM08,it.polimi.ingsw.network.messages.responses,MatchResumedMessage,70,0,0,0,24,0,12,0,12,0
      +AM08,it.polimi.ingsw.network.messages.responses,SomeoneChoseSecretObjectiveMessage,10,0,0,0,4,0,2,0,2,0
      +AM08,it.polimi.ingsw.network.messages.responses,SomeoneDrewInitialCardMessage,10,0,0,0,4,0,2,0,2,0
      +AM08,it.polimi.ingsw.network.messages.responses,SomeoneSentBroadcastTextMessage,3,7,0,0,1,3,1,1,1,1
      +AM08,it.polimi.ingsw.client.frontend,LastRequest,10,0,0,0,4,0,3,0,3,0
      +AM08,it.polimi.ingsw.client.frontend,GraphicalView,679,0,55,0,173,0,67,0,38,0
      +AM08,it.polimi.ingsw.client.frontend,ShownCard,0,12,0,0,0,1,0,1,0,1
      +AM08,it.polimi.ingsw.client.frontend,ClientBoard,155,0,0,0,34,0,15,0,15,0
      +AM08,it.polimi.ingsw.client.frontend,MatchStatus,27,0,0,0,5,0,1,0,1,0
      +AM08,it.polimi.ingsw.client.frontend.tui,BoardPosition,0,9,0,0,0,1,0,1,0,1
      +AM08,it.polimi.ingsw.client.frontend.tui,InputHandler,56,0,0,0,19,0,6,0,6,0
      +AM08,it.polimi.ingsw.client.frontend.tui,ValidPositions,49,152,5,5,10,19,4,7,1,5
      +AM08,it.polimi.ingsw.client.frontend.tui,TuiPrinter,3582,0,147,0,595,0,127,0,46,0
      +AM08,it.polimi.ingsw.client.frontend.tui,GraphicalViewTUI,1581,0,135,0,422,0,114,0,39,0
      +AM08,it.polimi.ingsw.client.frontend.tui,PlayerControls,19,0,0,0,9,0,4,0,4,0
      +AM08,it.polimi.ingsw.client.frontend.gui.nodes,PlateauPane,565,0,12,0,63,0,12,0,6,0
      +AM08,it.polimi.ingsw.client.frontend.gui.nodes,CardView,454,0,6,0,110,0,18,0,15,0
      +AM08,it.polimi.ingsw.client.frontend.gui.nodes,BoardPane,126,0,0,0,27,0,6,0,6,0
      diff --git a/deliveries/Test results/jacoco.xml b/deliveries/Test results/jacoco.xml
      new file mode 100644
      index 00000000..ca0af291
      --- /dev/null
      +++ b/deliveries/Test results/jacoco.xml	
      @@ -0,0 +1 @@
      +<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.1//EN" "report.dtd"><report name="AM08"><sessioninfo id="fedora-6702067" start="1719512417352" dump="1719512418409"/><package name="it/polimi/ingsw/network/messages"><class name="it/polimi/ingsw/network/messages/Message" sourcefilename="Message.java"><method name="&lt;init&gt;" desc="()V" line="6"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><sourcefile name="Message.java"><line nr="6" mi="0" ci="3" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></package><package name="it/polimi/ingsw/client/network"><class name="it/polimi/ingsw/client/network/NetworkHandlerTCP" sourcefilename="NetworkHandlerTCP.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/client/frontend/GraphicalView;Ljava/lang/String;Ljava/lang/Integer;)V" line="39"><counter type="INSTRUCTION" missed="37" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyError" desc="(Ljava/lang/Exception;)V" line="53"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getUsername" desc="()Ljava/lang/String;" line="62"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getIO" desc="()Lit/polimi/ingsw/network/tcp/IOHandler;" line="71"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getAvailableMatches" desc="()V" line="79"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="createMatch" desc="(Ljava/lang/String;Ljava/lang/Integer;)V" line="90"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="joinMatch" desc="(Ljava/lang/String;)V" line="100"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawInitialCard" desc="()V" line="108"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseInitialCardSide" desc="(Lit/polimi/ingsw/gamemodel/Side;)V" line="118"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawSecretObjectives" desc="()V" line="126"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Objective;)V" line="136"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="playCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="148"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawCard" desc="(Lit/polimi/ingsw/gamemodel/DrawSource;)V" line="158"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="sendBroadcastText" desc="(Ljava/lang/String;)V" line="168"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="sendPrivateText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="179"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="disconnect" desc="()V" line="187"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="ping" desc="()Z" line="198"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="sendMessage" desc="(Lit/polimi/ingsw/network/messages/Message;)V" line="214"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="173" covered="0"/><counter type="LINE" missed="44" covered="0"/><counter type="COMPLEXITY" missed="18" covered="0"/><counter type="METHOD" missed="18" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/network/NetworkHandler" sourcefilename="NetworkHandler.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/client/frontend/GraphicalView;Ljava/lang/String;I)V" line="27"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="startConnectionCheck" desc="()V" line="47"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setUsername" desc="(Ljava/lang/String;)V" line="73"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="isConnected" desc="()Z" line="149"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="receiveAvailableMatches" desc="(Ljava/util/List;)V" line="178"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="matchStarted" desc="(Ljava/util/Map;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;)V" line="197"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="matchResumed" desc="(Ljava/util/Map;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/Objective;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;Z)V" line="224"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="giveInitialCard" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="234"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="giveSecretObjectives" desc="(Lit/polimi/ingsw/utils/Pair;)V" line="244"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewInitialCard" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="255"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSetInitialSide" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Side;Ljava/util/Map;)V" line="267"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewSecretObjective" desc="(Ljava/lang/String;)V" line="280"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneChoseSecretObjective" desc="(Ljava/lang/String;)V" line="290"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someonePlayedCard" desc="(Ljava/lang/String;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;ILjava/util/Map;)V" line="306"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewCard" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/DrawSource;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/utils/Pair;)V" line="321"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneJoined" desc="(Ljava/lang/String;Ljava/util/List;)V" line="332"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneQuit" desc="(Ljava/lang/String;)V" line="342"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="matchFinished" desc="(Ljava/util/List;)V" line="352"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSentBroadcastText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="363"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSentPrivateText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="374"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$startConnectionCheck$0" desc="(Ljava/util/concurrent/ScheduledExecutorService;)V" line="50"><counter type="INSTRUCTION" missed="17" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="163" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="52" covered="0"/><counter type="COMPLEXITY" missed="23" covered="0"/><counter type="METHOD" missed="21" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/network/NetworkHandlerRMI" sourcefilename="NetworkHandlerRMI.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/client/frontend/GraphicalView;Ljava/lang/String;I)V" line="29"><counter type="INSTRUCTION" missed="31" covered="0"/><counter type="LINE" missed="10" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getAvailableMatches" desc="()V" line="61"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="joinMatch" desc="(Ljava/lang/String;)V" line="76"><counter type="INSTRUCTION" missed="29" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="createMatch" desc="(Ljava/lang/String;Ljava/lang/Integer;)V" line="98"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawInitialCard" desc="()V" line="111"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseInitialCardSide" desc="(Lit/polimi/ingsw/gamemodel/Side;)V" line="125"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawSecretObjectives" desc="()V" line="137"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Objective;)V" line="151"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="playCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="167"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawCard" desc="(Lit/polimi/ingsw/gamemodel/DrawSource;)V" line="181"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="sendBroadcastText" desc="(Ljava/lang/String;)V" line="195"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="sendPrivateText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="210"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="disconnect" desc="()V" line="221"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="ping" desc="()Z" line="232"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="190" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="76" covered="0"/><counter type="COMPLEXITY" missed="15" covered="0"/><counter type="METHOD" missed="14" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/network/RemoteViewInterface" sourcefilename="RemoteViewInterface.java"/><sourcefile name="RemoteViewInterface.java"/><sourcefile name="NetworkHandler.java"><line nr="27" mi="3" ci="0" mb="0" cb="0"/><line nr="36" mi="2" ci="0" mb="0" cb="0"/><line nr="37" mi="3" ci="0" mb="0" cb="0"/><line nr="38" mi="3" ci="0" mb="0" cb="0"/><line nr="39" mi="3" ci="0" mb="0" cb="0"/><line nr="40" mi="1" ci="0" mb="0" cb="0"/><line nr="47" mi="3" ci="0" mb="0" cb="0"/><line nr="49" mi="4" ci="0" mb="0" cb="0"/><line nr="50" mi="3" ci="0" mb="2" cb="0"/><line nr="52" mi="3" ci="0" mb="0" cb="0"/><line nr="54" mi="3" ci="0" mb="2" cb="0"/><line nr="56" mi="2" ci="0" mb="0" cb="0"/><line nr="57" mi="3" ci="0" mb="0" cb="0"/><line nr="58" mi="2" ci="0" mb="0" cb="0"/><line nr="61" mi="1" ci="0" mb="0" cb="0"/><line nr="64" mi="7" ci="0" mb="0" cb="0"/><line nr="65" mi="1" ci="0" mb="0" cb="0"/><line nr="73" mi="3" ci="0" mb="0" cb="0"/><line nr="74" mi="1" ci="0" mb="0" cb="0"/><line nr="149" mi="3" ci="0" mb="0" cb="0"/><line nr="178" mi="4" ci="0" mb="0" cb="0"/><line nr="179" mi="1" ci="0" mb="0" cb="0"/><line nr="197" mi="8" ci="0" mb="0" cb="0"/><line nr="198" mi="1" ci="0" mb="0" cb="0"/><line nr="224" mi="14" ci="0" mb="0" cb="0"/><line nr="225" mi="1" ci="0" mb="0" cb="0"/><line nr="234" mi="4" ci="0" mb="0" cb="0"/><line nr="235" mi="1" ci="0" mb="0" cb="0"/><line nr="244" mi="4" ci="0" mb="0" cb="0"/><line nr="245" mi="1" ci="0" mb="0" cb="0"/><line nr="255" mi="5" ci="0" mb="0" cb="0"/><line nr="256" mi="1" ci="0" mb="0" cb="0"/><line nr="267" mi="6" ci="0" mb="0" cb="0"/><line nr="268" mi="1" ci="0" mb="0" cb="0"/><line nr="280" mi="4" ci="0" mb="0" cb="0"/><line nr="281" mi="1" ci="0" mb="0" cb="0"/><line nr="290" mi="4" ci="0" mb="0" cb="0"/><line nr="291" mi="1" ci="0" mb="0" cb="0"/><line nr="306" mi="9" ci="0" mb="0" cb="0"/><line nr="307" mi="1" ci="0" mb="0" cb="0"/><line nr="321" mi="8" ci="0" mb="0" cb="0"/><line nr="322" mi="1" ci="0" mb="0" cb="0"/><line nr="332" mi="5" ci="0" mb="0" cb="0"/><line nr="333" mi="1" ci="0" mb="0" cb="0"/><line nr="342" mi="4" ci="0" mb="0" cb="0"/><line nr="343" mi="1" ci="0" mb="0" cb="0"/><line nr="352" mi="4" ci="0" mb="0" cb="0"/><line nr="353" mi="1" ci="0" mb="0" cb="0"/><line nr="363" mi="5" ci="0" mb="0" cb="0"/><line nr="364" mi="1" ci="0" mb="0" cb="0"/><line nr="374" mi="5" ci="0" mb="0" cb="0"/><line nr="375" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="163" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="52" covered="0"/><counter type="COMPLEXITY" missed="23" covered="0"/><counter type="METHOD" missed="21" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="NetworkHandlerTCP.java"><line nr="39" mi="6" ci="0" mb="0" cb="0"/><line nr="40" mi="8" ci="0" mb="0" cb="0"/><line nr="41" mi="7" ci="0" mb="0" cb="0"/><line nr="42" mi="10" ci="0" mb="0" cb="0"/><line nr="43" mi="3" ci="0" mb="0" cb="0"/><line nr="44" mi="2" ci="0" mb="0" cb="0"/><line nr="45" mi="1" ci="0" mb="0" cb="0"/><line nr="53" mi="4" ci="0" mb="0" cb="0"/><line nr="54" mi="1" ci="0" mb="0" cb="0"/><line nr="62" mi="3" ci="0" mb="0" cb="0"/><line nr="71" mi="3" ci="0" mb="0" cb="0"/><line nr="79" mi="7" ci="0" mb="0" cb="0"/><line nr="80" mi="1" ci="0" mb="0" cb="0"/><line nr="90" mi="10" ci="0" mb="0" cb="0"/><line nr="91" mi="1" ci="0" mb="0" cb="0"/><line nr="100" mi="8" ci="0" mb="0" cb="0"/><line nr="101" mi="1" ci="0" mb="0" cb="0"/><line nr="108" mi="7" ci="0" mb="0" cb="0"/><line nr="109" mi="1" ci="0" mb="0" cb="0"/><line nr="118" mi="8" ci="0" mb="0" cb="0"/><line nr="119" mi="1" ci="0" mb="0" cb="0"/><line nr="126" mi="7" ci="0" mb="0" cb="0"/><line nr="127" mi="1" ci="0" mb="0" cb="0"/><line nr="136" mi="9" ci="0" mb="0" cb="0"/><line nr="137" mi="1" ci="0" mb="0" cb="0"/><line nr="148" mi="11" ci="0" mb="0" cb="0"/><line nr="149" mi="1" ci="0" mb="0" cb="0"/><line nr="158" mi="8" ci="0" mb="0" cb="0"/><line nr="159" mi="1" ci="0" mb="0" cb="0"/><line nr="168" mi="8" ci="0" mb="0" cb="0"/><line nr="169" mi="1" ci="0" mb="0" cb="0"/><line nr="179" mi="9" ci="0" mb="0" cb="0"/><line nr="180" mi="1" ci="0" mb="0" cb="0"/><line nr="187" mi="3" ci="0" mb="0" cb="0"/><line nr="188" mi="1" ci="0" mb="0" cb="0"/><line nr="198" mi="4" ci="0" mb="0" cb="0"/><line nr="199" mi="2" ci="0" mb="0" cb="0"/><line nr="200" mi="1" ci="0" mb="0" cb="0"/><line nr="201" mi="2" ci="0" mb="0" cb="0"/><line nr="214" mi="4" ci="0" mb="0" cb="0"/><line nr="215" mi="1" ci="0" mb="0" cb="0"/><line nr="216" mi="2" ci="0" mb="0" cb="0"/><line nr="217" mi="1" ci="0" mb="0" cb="0"/><line nr="218" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="173" covered="0"/><counter type="LINE" missed="44" covered="0"/><counter type="COMPLEXITY" missed="18" covered="0"/><counter type="METHOD" missed="18" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="NetworkHandlerRMI.java"><line nr="29" mi="3" ci="0" mb="0" cb="0"/><line nr="40" mi="5" ci="0" mb="0" cb="0"/><line nr="43" mi="4" ci="0" mb="0" cb="0"/><line nr="45" mi="6" ci="0" mb="0" cb="0"/><line nr="46" mi="3" ci="0" mb="0" cb="0"/><line nr="47" mi="2" ci="0" mb="0" cb="0"/><line nr="48" mi="1" ci="0" mb="0" cb="0"/><line nr="51" mi="5" ci="0" mb="0" cb="0"/><line nr="52" mi="1" ci="0" mb="0" cb="0"/><line nr="53" mi="1" ci="0" mb="0" cb="0"/><line nr="61" mi="4" ci="0" mb="0" cb="0"/><line nr="62" mi="3" ci="0" mb="0" cb="0"/><line nr="63" mi="1" ci="0" mb="0" cb="0"/><line nr="64" mi="4" ci="0" mb="0" cb="0"/><line nr="65" mi="1" ci="0" mb="0" cb="0"/><line nr="66" mi="1" ci="0" mb="0" cb="0"/><line nr="76" mi="8" ci="0" mb="0" cb="0"/><line nr="79" mi="3" ci="0" mb="2" cb="0"/><line nr="80" mi="4" ci="0" mb="0" cb="0"/><line nr="81" mi="3" ci="0" mb="0" cb="0"/><line nr="83" mi="4" ci="0" mb="0" cb="0"/><line nr="84" mi="1" ci="0" mb="0" cb="0"/><line nr="85" mi="4" ci="0" mb="0" cb="0"/><line nr="86" mi="1" ci="0" mb="0" cb="0"/><line nr="87" mi="1" ci="0" mb="0" cb="0"/><line nr="98" mi="6" ci="0" mb="0" cb="0"/><line nr="99" mi="3" ci="0" mb="0" cb="0"/><line nr="100" mi="1" ci="0" mb="0" cb="0"/><line nr="101" mi="4" ci="0" mb="0" cb="0"/><line nr="102" mi="1" ci="0" mb="0" cb="0"/><line nr="103" mi="1" ci="0" mb="0" cb="0"/><line nr="111" mi="3" ci="0" mb="0" cb="0"/><line nr="112" mi="1" ci="0" mb="0" cb="0"/><line nr="113" mi="4" ci="0" mb="0" cb="0"/><line nr="114" mi="1" ci="0" mb="0" cb="0"/><line nr="115" mi="1" ci="0" mb="0" cb="0"/><line nr="125" mi="4" ci="0" mb="0" cb="0"/><line nr="126" mi="1" ci="0" mb="0" cb="0"/><line nr="127" mi="4" ci="0" mb="0" cb="0"/><line nr="128" mi="1" ci="0" mb="0" cb="0"/><line nr="129" mi="1" ci="0" mb="0" cb="0"/><line nr="137" mi="3" ci="0" mb="0" cb="0"/><line nr="138" mi="1" ci="0" mb="0" cb="0"/><line nr="139" mi="4" ci="0" mb="0" cb="0"/><line nr="140" mi="1" ci="0" mb="0" cb="0"/><line nr="141" mi="1" ci="0" mb="0" cb="0"/><line nr="151" mi="4" ci="0" mb="0" cb="0"/><line nr="152" mi="1" ci="0" mb="0" cb="0"/><line nr="153" mi="4" ci="0" mb="0" cb="0"/><line nr="154" mi="1" ci="0" mb="0" cb="0"/><line nr="155" mi="1" ci="0" mb="0" cb="0"/><line nr="167" mi="6" ci="0" mb="0" cb="0"/><line nr="168" mi="1" ci="0" mb="0" cb="0"/><line nr="169" mi="4" ci="0" mb="0" cb="0"/><line nr="170" mi="1" ci="0" mb="0" cb="0"/><line nr="171" mi="1" ci="0" mb="0" cb="0"/><line nr="181" mi="4" ci="0" mb="0" cb="0"/><line nr="182" mi="1" ci="0" mb="0" cb="0"/><line nr="183" mi="4" ci="0" mb="0" cb="0"/><line nr="184" mi="1" ci="0" mb="0" cb="0"/><line nr="185" mi="1" ci="0" mb="0" cb="0"/><line nr="195" mi="4" ci="0" mb="0" cb="0"/><line nr="196" mi="1" ci="0" mb="0" cb="0"/><line nr="197" mi="4" ci="0" mb="0" cb="0"/><line nr="198" mi="1" ci="0" mb="0" cb="0"/><line nr="199" mi="1" ci="0" mb="0" cb="0"/><line nr="210" mi="5" ci="0" mb="0" cb="0"/><line nr="211" mi="1" ci="0" mb="0" cb="0"/><line nr="212" mi="4" ci="0" mb="0" cb="0"/><line nr="213" mi="1" ci="0" mb="0" cb="0"/><line nr="214" mi="1" ci="0" mb="0" cb="0"/><line nr="221" mi="3" ci="0" mb="0" cb="0"/><line nr="222" mi="1" ci="0" mb="0" cb="0"/><line nr="232" mi="4" ci="0" mb="0" cb="0"/><line nr="233" mi="1" ci="0" mb="0" cb="0"/><line nr="234" mi="2" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="190" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="76" covered="0"/><counter type="COMPLEXITY" missed="15" covered="0"/><counter type="METHOD" missed="14" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><counter type="INSTRUCTION" missed="526" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="172" covered="0"/><counter type="COMPLEXITY" missed="56" covered="0"/><counter type="METHOD" missed="53" covered="0"/><counter type="CLASS" missed="3" covered="0"/></package><package name="it/polimi/ingsw/controllers"><class name="it/polimi/ingsw/controllers/PlayerController" sourcefilename="PlayerController.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Match;)V" line="36"><counter type="INSTRUCTION" missed="0" covered="13"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getPlayer" desc="()Lit/polimi/ingsw/gamemodel/Player;" line="47"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sendJoined" desc="()V" line="61"><counter type="INSTRUCTION" missed="45" covered="39"/><counter type="BRANCH" missed="5" covered="3"/><counter type="LINE" missed="12" covered="12"/><counter type="COMPLEXITY" missed="4" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$sendJoined$1" desc="(Lit/polimi/ingsw/gamemodel/Player;)Z" line="78"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$sendJoined$0" desc="(Lit/polimi/ingsw/gamemodel/Player;)Z" line="77"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="59" covered="55"/><counter type="BRANCH" missed="7" covered="3"/><counter type="LINE" missed="12" covered="17"/><counter type="COMPLEXITY" missed="7" covered="3"/><counter type="METHOD" missed="2" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/controllers/PlayerControllerTCP" sourcefilename="PlayerControllerTCP.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Match;Lit/polimi/ingsw/network/tcp/IOHandler;)V" line="36"><counter type="INSTRUCTION" missed="0" covered="8"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sendMessage" desc="(Lit/polimi/ingsw/network/messages/Message;)V" line="47"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="connectionError" desc="()V" line="57"><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="createErrorMessage" desc="(Ljava/lang/Exception;)Lit/polimi/ingsw/network/messages/errors/ErrorMessage;" line="68"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="matchStarted" desc="()V" line="76"><counter type="INSTRUCTION" missed="18" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneJoined" desc="(Lit/polimi/ingsw/gamemodel/Player;)V" line="91"><counter type="INSTRUCTION" missed="0" covered="14"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneQuit" desc="(Lit/polimi/ingsw/gamemodel/Player;)V" line="104"><counter type="INSTRUCTION" missed="0" covered="15"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneDrewInitialCard" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="120"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSetInitialSide" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Side;Ljava/util/Map;)V" line="134"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/utils/Pair;)V" line="151"><counter type="INSTRUCTION" missed="21" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneChoseSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Objective;)V" line="167"><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someonePlayedCard" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="187"><counter type="INSTRUCTION" missed="17" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewCard" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/DrawSource;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/PlayableCard;)V" line="207"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSentBroadcastText" desc="(Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/String;)V" line="223"><counter type="INSTRUCTION" missed="0" covered="11"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneSentPrivateText" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/String;)V" line="237"><counter type="INSTRUCTION" missed="0" covered="27"/><counter type="BRANCH" missed="0" covered="4"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><method name="matchFinished" desc="()V" line="250"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawInitialCard" desc="()V" line="261"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseInitialCardSide" desc="(Lit/polimi/ingsw/gamemodel/Side;)V" line="277"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawSecretObjectives" desc="()V" line="290"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Objective;)V" line="305"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="playCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="321"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawCard" desc="(Lit/polimi/ingsw/gamemodel/DrawSource;)V" line="335"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="sendBroadcastText" desc="(Ljava/lang/String;)V" line="348"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sendPrivateText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="358"><counter type="INSTRUCTION" missed="0" covered="31"/><counter type="BRANCH" missed="2" covered="4"/><counter type="LINE" missed="0" covered="9"/><counter type="COMPLEXITY" missed="2" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="matchResumed" desc="()V" line="377"><counter type="INSTRUCTION" missed="101" covered="0"/><counter type="LINE" missed="19" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$matchResumed$2" desc="(Ljava/util/Map$Entry;)Ljava/lang/Integer;" line="413"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$matchResumed$1" desc="(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Lit/polimi/ingsw/gamemodel/Player;)V" line="390"><counter type="INSTRUCTION" missed="52" covered="0"/><counter type="LINE" missed="12" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$matchResumed$0" desc="(Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlacedCard;)V" line="399"><counter type="INSTRUCTION" missed="21" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="388" covered="130"/><counter type="BRANCH" missed="6" covered="8"/><counter type="LINE" missed="93" covered="37"/><counter type="COMPLEXITY" missed="23" covered="12"/><counter type="METHOD" missed="19" covered="9"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/controllers/PlayerControllerRMIInterface" sourcefilename="PlayerControllerRMIInterface.java"/><class name="it/polimi/ingsw/controllers/PlayerControllerRMI" sourcefilename="PlayerControllerRMI.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Match;)V" line="35"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="matchResumed" desc="()V" line="43"><counter type="INSTRUCTION" missed="6" covered="113"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="3" covered="20"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="registerView" desc="(Lit/polimi/ingsw/client/network/RemoteViewInterface;)V" line="95"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="drawInitialCard" desc="()V" line="112"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="chooseInitialCardSide" desc="(Lit/polimi/ingsw/gamemodel/Side;)V" line="126"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="drawSecretObjectives" desc="()V" line="139"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="chooseSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Objective;)V" line="154"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="playCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="171"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="drawCard" desc="(Lit/polimi/ingsw/gamemodel/DrawSource;)V" line="187"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sendBroadcastText" desc="(Ljava/lang/String;)V" line="199"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sendPrivateText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="212"><counter type="INSTRUCTION" missed="0" covered="25"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="matchStarted" desc="()V" line="226"><counter type="INSTRUCTION" missed="6" covered="61"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="3" covered="13"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneJoined" desc="(Lit/polimi/ingsw/gamemodel/Player;)V" line="265"><counter type="INSTRUCTION" missed="6" covered="19"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="3" covered="5"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneQuit" desc="(Lit/polimi/ingsw/gamemodel/Player;)V" line="286"><counter type="INSTRUCTION" missed="6" covered="10"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="3" covered="4"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneDrewInitialCard" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="309"><counter type="INSTRUCTION" missed="6" covered="21"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="3" covered="6"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneSetInitialSide" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Side;Ljava/util/Map;)V" line="334"><counter type="INSTRUCTION" missed="6" covered="12"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="3" covered="4"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneDrewSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/utils/Pair;)V" line="357"><counter type="INSTRUCTION" missed="6" covered="20"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="3" covered="6"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneChoseSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Objective;)V" line="383"><counter type="INSTRUCTION" missed="6" covered="10"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="3" covered="4"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someonePlayedCard" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="406"><counter type="INSTRUCTION" missed="6" covered="18"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="3" covered="4"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneDrewCard" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/DrawSource;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/PlayableCard;)V" line="431"><counter type="INSTRUCTION" missed="6" covered="28"/><counter type="BRANCH" missed="1" covered="5"/><counter type="LINE" missed="3" covered="7"/><counter type="COMPLEXITY" missed="1" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneSentBroadcastText" desc="(Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/String;)V" line="454"><counter type="INSTRUCTION" missed="6" covered="11"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="3" covered="4"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneSentPrivateText" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/String;)V" line="476"><counter type="INSTRUCTION" missed="6" covered="21"/><counter type="BRANCH" missed="2" covered="4"/><counter type="LINE" missed="3" covered="5"/><counter type="COMPLEXITY" missed="2" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="createLeaderboardEntry" desc="(Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/Boolean;)Lit/polimi/ingsw/utils/LeaderboardEntry;" line="497"><counter type="INSTRUCTION" missed="0" covered="11"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="matchFinished" desc="()V" line="505"><counter type="INSTRUCTION" missed="6" covered="18"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="3" covered="6"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getView" desc="()Lit/polimi/ingsw/client/network/RemoteViewInterface;" line="524"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="onConnectionError" desc="()V" line="531"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="onUnregisteredView" desc="()V" line="539"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$matchFinished$2" desc="(Lit/polimi/ingsw/utils/Pair;)Lit/polimi/ingsw/utils/LeaderboardEntry;" line="510"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$sendPrivateText$1" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Player;)Z" line="214"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$sendPrivateText$0" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Player;)Z" line="212"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="95" covered="471"/><counter type="BRANCH" missed="16" covered="30"/><counter type="LINE" missed="44" covered="116"/><counter type="COMPLEXITY" missed="18" covered="35"/><counter type="METHOD" missed="2" covered="28"/><counter type="CLASS" missed="0" covered="1"/></class><sourcefile name="PlayerController.java"><line nr="36" mi="0" ci="2" mb="0" cb="0"/><line nr="37" mi="0" ci="7" mb="0" cb="0"/><line nr="38" mi="0" ci="3" mb="0" cb="0"/><line nr="39" mi="0" ci="1" mb="0" cb="0"/><line nr="47" mi="0" ci="3" mb="0" cb="0"/><line nr="61" mi="0" ci="5" mb="1" cb="1"/><line nr="62" mi="5" ci="0" mb="0" cb="0"/><line nr="64" mi="0" ci="3" mb="1" cb="1"/><line nr="65" mi="5" ci="0" mb="0" cb="0"/><line nr="69" mi="0" ci="5" mb="0" cb="0"/><line nr="70" mi="0" ci="4" mb="1" cb="1"/><line nr="71" mi="0" ci="4" mb="0" cb="0"/><line nr="72" mi="0" ci="6" mb="0" cb="0"/><line nr="76" mi="6" ci="0" mb="0" cb="0"/><line nr="77" mi="9" ci="0" mb="0" cb="0"/><line nr="78" mi="8" ci="0" mb="2" cb="0"/><line nr="79" mi="2" ci="0" mb="0" cb="0"/><line nr="80" mi="3" ci="0" mb="2" cb="0"/><line nr="81" mi="5" ci="0" mb="0" cb="0"/><line nr="82" mi="4" ci="0" mb="0" cb="0"/><line nr="83" mi="4" ci="0" mb="0" cb="0"/><line nr="84" mi="3" ci="0" mb="0" cb="0"/><line nr="86" mi="5" ci="0" mb="0" cb="0"/><line nr="89" mi="0" ci="3" mb="0" cb="0"/><line nr="90" mi="0" ci="1" mb="0" cb="0"/><line nr="91" mi="0" ci="4" mb="0" cb="0"/><line nr="92" mi="0" ci="2" mb="0" cb="0"/><line nr="93" mi="0" ci="1" mb="0" cb="0"/><line nr="94" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="59" covered="55"/><counter type="BRANCH" missed="7" covered="3"/><counter type="LINE" missed="12" covered="17"/><counter type="COMPLEXITY" missed="7" covered="3"/><counter type="METHOD" missed="2" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="PlayerControllerRMIInterface.java"/><sourcefile name="PlayerControllerRMI.java"><line nr="35" mi="0" ci="4" mb="0" cb="0"/><line nr="36" mi="0" ci="1" mb="0" cb="0"/><line nr="43" mi="0" ci="3" mb="1" cb="1"/><line nr="44" mi="3" ci="0" mb="0" cb="0"/><line nr="47" mi="0" ci="4" mb="0" cb="0"/><line nr="48" mi="0" ci="4" mb="0" cb="0"/><line nr="49" mi="0" ci="4" mb="0" cb="0"/><line nr="52" mi="0" ci="4" mb="0" cb="0"/><line nr="55" mi="0" ci="4" mb="0" cb="0"/><line nr="58" mi="0" ci="4" mb="0" cb="0"/><line nr="61" mi="0" ci="4" mb="0" cb="0"/><line nr="64" mi="0" ci="4" mb="0" cb="0"/><line nr="67" mi="0" ci="12" mb="0" cb="2"/><line nr="68" mi="0" ci="7" mb="0" cb="0"/><line nr="69" mi="0" ci="8" mb="0" cb="0"/><line nr="70" mi="0" ci="8" mb="0" cb="0"/><line nr="71" mi="0" ci="8" mb="0" cb="0"/><line nr="72" mi="0" ci="8" mb="0" cb="0"/><line nr="73" mi="0" ci="1" mb="0" cb="0"/><line nr="76" mi="0" ci="10" mb="0" cb="0"/><line nr="77" mi="0" ci="14" mb="0" cb="0"/><line nr="78" mi="1" ci="0" mb="0" cb="0"/><line nr="79" mi="2" ci="0" mb="0" cb="0"/><line nr="80" mi="0" ci="1" mb="0" cb="0"/><line nr="82" mi="0" ci="1" mb="0" cb="0"/><line nr="95" mi="0" ci="3" mb="1" cb="1"/><line nr="96" mi="0" ci="3" mb="0" cb="0"/><line nr="98" mi="0" ci="2" mb="0" cb="0"/><line nr="100" mi="0" ci="1" mb="0" cb="0"/><line nr="112" mi="0" ci="4" mb="0" cb="0"/><line nr="113" mi="0" ci="1" mb="0" cb="0"/><line nr="126" mi="0" ci="4" mb="0" cb="0"/><line nr="127" mi="0" ci="1" mb="0" cb="0"/><line nr="139" mi="0" ci="4" mb="0" cb="0"/><line nr="140" mi="0" ci="1" mb="0" cb="0"/><line nr="154" mi="0" ci="4" mb="0" cb="0"/><line nr="155" mi="0" ci="1" mb="0" cb="0"/><line nr="171" mi="0" ci="6" mb="0" cb="0"/><line nr="172" mi="0" ci="1" mb="0" cb="0"/><line nr="187" mi="0" ci="4" mb="0" cb="0"/><line nr="188" mi="0" ci="1" mb="0" cb="0"/><line nr="199" mi="0" ci="4" mb="0" cb="0"/><line nr="200" mi="0" ci="1" mb="0" cb="0"/><line nr="212" mi="0" ci="13" mb="1" cb="1"/><line nr="213" mi="0" ci="6" mb="0" cb="0"/><line nr="214" mi="0" ci="6" mb="0" cb="0"/><line nr="215" mi="0" ci="4" mb="0" cb="0"/><line nr="216" mi="0" ci="5" mb="0" cb="0"/><line nr="218" mi="0" ci="1" mb="0" cb="0"/><line nr="226" mi="0" ci="3" mb="1" cb="1"/><line nr="227" mi="3" ci="0" mb="0" cb="0"/><line nr="230" mi="0" ci="4" mb="0" cb="0"/><line nr="231" mi="0" ci="4" mb="0" cb="0"/><line nr="232" mi="0" ci="4" mb="0" cb="0"/><line nr="235" mi="0" ci="4" mb="0" cb="0"/><line nr="238" mi="0" ci="4" mb="0" cb="0"/><line nr="241" mi="0" ci="12" mb="0" cb="2"/><line nr="242" mi="0" ci="7" mb="0" cb="0"/><line nr="243" mi="0" ci="8" mb="0" cb="0"/><line nr="244" mi="0" ci="1" mb="0" cb="0"/><line nr="247" mi="0" ci="8" mb="0" cb="0"/><line nr="248" mi="1" ci="0" mb="0" cb="0"/><line nr="249" mi="2" ci="0" mb="0" cb="0"/><line nr="250" mi="0" ci="1" mb="0" cb="0"/><line nr="252" mi="0" ci="1" mb="0" cb="0"/><line nr="265" mi="0" ci="3" mb="1" cb="1"/><line nr="266" mi="3" ci="0" mb="0" cb="0"/><line nr="269" mi="0" ci="8" mb="0" cb="0"/><line nr="270" mi="0" ci="6" mb="0" cb="0"/><line nr="271" mi="1" ci="0" mb="0" cb="0"/><line nr="272" mi="2" ci="0" mb="0" cb="0"/><line nr="273" mi="0" ci="1" mb="0" cb="0"/><line nr="275" mi="0" ci="1" mb="0" cb="0"/><line nr="286" mi="0" ci="3" mb="1" cb="1"/><line nr="287" mi="3" ci="0" mb="0" cb="0"/><line nr="290" mi="0" ci="5" mb="0" cb="0"/><line nr="291" mi="1" ci="0" mb="0" cb="0"/><line nr="292" mi="2" ci="0" mb="0" cb="0"/><line nr="293" mi="0" ci="1" mb="0" cb="0"/><line nr="295" mi="0" ci="1" mb="0" cb="0"/><line nr="309" mi="0" ci="3" mb="1" cb="1"/><line nr="310" mi="3" ci="0" mb="0" cb="0"/><line nr="313" mi="0" ci="5" mb="0" cb="2"/><line nr="314" mi="0" ci="5" mb="0" cb="0"/><line nr="316" mi="0" ci="6" mb="0" cb="0"/><line nr="318" mi="1" ci="0" mb="0" cb="0"/><line nr="319" mi="2" ci="0" mb="0" cb="0"/><line nr="320" mi="0" ci="1" mb="0" cb="0"/><line nr="322" mi="0" ci="1" mb="0" cb="0"/><line nr="334" mi="0" ci="3" mb="1" cb="1"/><line nr="335" mi="3" ci="0" mb="0" cb="0"/><line nr="338" mi="0" ci="7" mb="0" cb="0"/><line nr="339" mi="1" ci="0" mb="0" cb="0"/><line nr="340" mi="2" ci="0" mb="0" cb="0"/><line nr="341" mi="0" ci="1" mb="0" cb="0"/><line nr="343" mi="0" ci="1" mb="0" cb="0"/><line nr="357" mi="0" ci="3" mb="1" cb="1"/><line nr="358" mi="3" ci="0" mb="0" cb="0"/><line nr="361" mi="0" ci="5" mb="0" cb="2"/><line nr="362" mi="0" ci="5" mb="0" cb="0"/><line nr="364" mi="0" ci="5" mb="0" cb="0"/><line nr="366" mi="1" ci="0" mb="0" cb="0"/><line nr="367" mi="2" ci="0" mb="0" cb="0"/><line nr="368" mi="0" ci="1" mb="0" cb="0"/><line nr="370" mi="0" ci="1" mb="0" cb="0"/><line nr="383" mi="0" ci="3" mb="1" cb="1"/><line nr="384" mi="3" ci="0" mb="0" cb="0"/><line nr="387" mi="0" ci="5" mb="0" cb="0"/><line nr="388" mi="1" ci="0" mb="0" cb="0"/><line nr="389" mi="2" ci="0" mb="0" cb="0"/><line nr="390" mi="0" ci="1" mb="0" cb="0"/><line nr="392" mi="0" ci="1" mb="0" cb="0"/><line nr="406" mi="0" ci="3" mb="1" cb="1"/><line nr="407" mi="3" ci="0" mb="0" cb="0"/><line nr="410" mi="0" ci="13" mb="0" cb="0"/><line nr="411" mi="1" ci="0" mb="0" cb="0"/><line nr="412" mi="2" ci="0" mb="0" cb="0"/><line nr="413" mi="0" ci="1" mb="0" cb="0"/><line nr="415" mi="0" ci="1" mb="0" cb="0"/><line nr="431" mi="0" ci="3" mb="1" cb="1"/><line nr="432" mi="3" ci="0" mb="0" cb="0"/><line nr="435" mi="0" ci="2" mb="0" cb="0"/><line nr="436" mi="0" ci="8" mb="0" cb="4"/><line nr="437" mi="0" ci="2" mb="0" cb="0"/><line nr="439" mi="0" ci="11" mb="0" cb="0"/><line nr="440" mi="1" ci="0" mb="0" cb="0"/><line nr="441" mi="2" ci="0" mb="0" cb="0"/><line nr="442" mi="0" ci="1" mb="0" cb="0"/><line nr="444" mi="0" ci="1" mb="0" cb="0"/><line nr="454" mi="0" ci="3" mb="1" cb="1"/><line nr="455" mi="3" ci="0" mb="0" cb="0"/><line nr="458" mi="0" ci="6" mb="0" cb="0"/><line nr="459" mi="1" ci="0" mb="0" cb="0"/><line nr="460" mi="2" ci="0" mb="0" cb="0"/><line nr="461" mi="0" ci="1" mb="0" cb="0"/><line nr="463" mi="0" ci="1" mb="0" cb="0"/><line nr="476" mi="0" ci="3" mb="1" cb="1"/><line nr="477" mi="3" ci="0" mb="0" cb="0"/><line nr="479" mi="0" ci="10" mb="1" cb="3"/><line nr="481" mi="0" ci="6" mb="0" cb="0"/><line nr="482" mi="1" ci="0" mb="0" cb="0"/><line nr="483" mi="2" ci="0" mb="0" cb="0"/><line nr="484" mi="0" ci="1" mb="0" cb="0"/><line nr="487" mi="0" ci="1" mb="0" cb="0"/><line nr="497" mi="0" ci="11" mb="0" cb="0"/><line nr="505" mi="0" ci="3" mb="1" cb="1"/><line nr="506" mi="3" ci="0" mb="0" cb="0"/><line nr="509" mi="0" ci="6" mb="0" cb="0"/><line nr="510" mi="0" ci="12" mb="0" cb="0"/><line nr="511" mi="0" ci="4" mb="0" cb="0"/><line nr="512" mi="1" ci="0" mb="0" cb="0"/><line nr="513" mi="2" ci="0" mb="0" cb="0"/><line nr="514" mi="0" ci="1" mb="0" cb="0"/><line nr="516" mi="0" ci="1" mb="0" cb="0"/><line nr="524" mi="0" ci="3" mb="0" cb="0"/><line nr="531" mi="4" ci="0" mb="0" cb="0"/><line nr="532" mi="5" ci="0" mb="0" cb="0"/><line nr="533" mi="1" ci="0" mb="0" cb="0"/><line nr="539" mi="6" ci="0" mb="0" cb="0"/><line nr="540" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="95" covered="471"/><counter type="BRANCH" missed="16" covered="30"/><counter type="LINE" missed="44" covered="116"/><counter type="COMPLEXITY" missed="18" covered="35"/><counter type="METHOD" missed="2" covered="28"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="PlayerControllerTCP.java"><line nr="36" mi="0" ci="4" mb="0" cb="0"/><line nr="37" mi="0" ci="3" mb="0" cb="0"/><line nr="38" mi="0" ci="1" mb="0" cb="0"/><line nr="47" mi="0" ci="4" mb="0" cb="0"/><line nr="48" mi="0" ci="1" mb="0" cb="0"/><line nr="49" mi="0" ci="2" mb="0" cb="0"/><line nr="50" mi="0" ci="1" mb="0" cb="0"/><line nr="51" mi="0" ci="1" mb="0" cb="0"/><line nr="57" mi="0" ci="5" mb="0" cb="0"/><line nr="58" mi="0" ci="4" mb="0" cb="0"/><line nr="59" mi="0" ci="1" mb="0" cb="0"/><line nr="68" mi="9" ci="0" mb="0" cb="0"/><line nr="76" mi="9" ci="0" mb="0" cb="0"/><line nr="77" mi="8" ci="0" mb="0" cb="0"/><line nr="78" mi="1" ci="0" mb="0" cb="0"/><line nr="91" mi="0" ci="11" mb="0" cb="0"/><line nr="92" mi="0" ci="2" mb="0" cb="0"/><line nr="93" mi="0" ci="1" mb="0" cb="0"/><line nr="104" mi="0" ci="12" mb="0" cb="0"/><line nr="105" mi="0" ci="2" mb="0" cb="0"/><line nr="106" mi="0" ci="1" mb="0" cb="0"/><line nr="120" mi="9" ci="0" mb="0" cb="0"/><line nr="121" mi="1" ci="0" mb="0" cb="0"/><line nr="134" mi="5" ci="0" mb="0" cb="0"/><line nr="135" mi="4" ci="0" mb="0" cb="0"/><line nr="136" mi="1" ci="0" mb="0" cb="0"/><line nr="151" mi="3" ci="0" mb="0" cb="0"/><line nr="152" mi="9" ci="0" mb="0" cb="0"/><line nr="153" mi="8" ci="0" mb="0" cb="0"/><line nr="154" mi="1" ci="0" mb="0" cb="0"/><line nr="167" mi="2" ci="0" mb="0" cb="0"/><line nr="168" mi="5" ci="0" mb="2" cb="0"/><line nr="169" mi="3" ci="0" mb="0" cb="0"/><line nr="170" mi="5" ci="0" mb="0" cb="0"/><line nr="171" mi="3" ci="0" mb="0" cb="0"/><line nr="172" mi="1" ci="0" mb="0" cb="0"/><line nr="187" mi="11" ci="0" mb="0" cb="0"/><line nr="188" mi="5" ci="0" mb="0" cb="0"/><line nr="189" mi="1" ci="0" mb="0" cb="0"/><line nr="207" mi="2" ci="0" mb="0" cb="0"/><line nr="208" mi="2" ci="0" mb="2" cb="0"/><line nr="209" mi="3" ci="0" mb="0" cb="0"/><line nr="211" mi="12" ci="0" mb="0" cb="0"/><line nr="212" mi="2" ci="0" mb="0" cb="0"/><line nr="213" mi="1" ci="0" mb="0" cb="0"/><line nr="223" mi="0" ci="7" mb="0" cb="0"/><line nr="224" mi="0" ci="3" mb="0" cb="0"/><line nr="225" mi="0" ci="1" mb="0" cb="0"/><line nr="237" mi="0" ci="8" mb="0" cb="2"/><line nr="238" mi="0" ci="6" mb="0" cb="2"/><line nr="239" mi="0" ci="5" mb="0" cb="0"/><line nr="240" mi="0" ci="4" mb="0" cb="0"/><line nr="241" mi="0" ci="3" mb="0" cb="0"/><line nr="243" mi="0" ci="1" mb="0" cb="0"/><line nr="250" mi="8" ci="0" mb="0" cb="0"/><line nr="251" mi="1" ci="0" mb="0" cb="0"/><line nr="261" mi="4" ci="0" mb="0" cb="0"/><line nr="262" mi="1" ci="0" mb="0" cb="0"/><line nr="263" mi="5" ci="0" mb="0" cb="0"/><line nr="264" mi="1" ci="0" mb="0" cb="0"/><line nr="265" mi="1" ci="0" mb="0" cb="0"/><line nr="277" mi="4" ci="0" mb="0" cb="0"/><line nr="278" mi="1" ci="0" mb="0" cb="0"/><line nr="279" mi="5" ci="0" mb="0" cb="0"/><line nr="280" mi="1" ci="0" mb="0" cb="0"/><line nr="281" mi="1" ci="0" mb="0" cb="0"/><line nr="290" mi="4" ci="0" mb="0" cb="0"/><line nr="291" mi="1" ci="0" mb="0" cb="0"/><line nr="292" mi="5" ci="0" mb="0" cb="0"/><line nr="293" mi="1" ci="0" mb="0" cb="0"/><line nr="294" mi="1" ci="0" mb="0" cb="0"/><line nr="305" mi="4" ci="0" mb="0" cb="0"/><line nr="306" mi="1" ci="0" mb="0" cb="0"/><line nr="307" mi="5" ci="0" mb="0" cb="0"/><line nr="308" mi="1" ci="0" mb="0" cb="0"/><line nr="309" mi="1" ci="0" mb="0" cb="0"/><line nr="321" mi="6" ci="0" mb="0" cb="0"/><line nr="322" mi="1" ci="0" mb="0" cb="0"/><line nr="323" mi="5" ci="0" mb="0" cb="0"/><line nr="324" mi="1" ci="0" mb="0" cb="0"/><line nr="325" mi="1" ci="0" mb="0" cb="0"/><line nr="335" mi="4" ci="0" mb="0" cb="0"/><line nr="336" mi="1" ci="0" mb="0" cb="0"/><line nr="338" mi="5" ci="0" mb="0" cb="0"/><line nr="339" mi="1" ci="0" mb="0" cb="0"/><line nr="340" mi="1" ci="0" mb="0" cb="0"/><line nr="348" mi="0" ci="4" mb="0" cb="0"/><line nr="349" mi="0" ci="1" mb="0" cb="0"/><line nr="358" mi="0" ci="2" mb="0" cb="0"/><line nr="359" mi="0" ci="12" mb="1" cb="1"/><line nr="360" mi="0" ci="5" mb="0" cb="2"/><line nr="361" mi="0" ci="2" mb="0" cb="0"/><line nr="362" mi="0" ci="1" mb="0" cb="0"/><line nr="364" mi="0" ci="1" mb="0" cb="0"/><line nr="367" mi="0" ci="2" mb="1" cb="1"/><line nr="368" mi="0" ci="5" mb="0" cb="0"/><line nr="370" mi="0" ci="1" mb="0" cb="0"/><line nr="377" mi="4" ci="0" mb="0" cb="0"/><line nr="378" mi="4" ci="0" mb="0" cb="0"/><line nr="380" mi="4" ci="0" mb="0" cb="0"/><line nr="383" mi="4" ci="0" mb="0" cb="0"/><line nr="384" mi="4" ci="0" mb="0" cb="0"/><line nr="385" mi="4" ci="0" mb="0" cb="0"/><line nr="389" mi="10" ci="0" mb="0" cb="0"/><line nr="390" mi="3" ci="0" mb="0" cb="0"/><line nr="391" mi="3" ci="0" mb="0" cb="0"/><line nr="392" mi="6" ci="0" mb="0" cb="0"/><line nr="393" mi="5" ci="0" mb="0" cb="0"/><line nr="394" mi="7" ci="0" mb="0" cb="0"/><line nr="395" mi="6" ci="0" mb="0" cb="0"/><line nr="397" mi="4" ci="0" mb="0" cb="0"/><line nr="398" mi="4" ci="0" mb="0" cb="0"/><line nr="399" mi="11" ci="0" mb="0" cb="0"/><line nr="400" mi="6" ci="0" mb="0" cb="0"/><line nr="401" mi="5" ci="0" mb="0" cb="0"/><line nr="403" mi="5" ci="0" mb="0" cb="0"/><line nr="404" mi="7" ci="0" mb="0" cb="0"/><line nr="405" mi="1" ci="0" mb="0" cb="0"/><line nr="407" mi="4" ci="0" mb="0" cb="0"/><line nr="410" mi="7" ci="0" mb="0" cb="0"/><line nr="411" mi="5" ci="0" mb="0" cb="0"/><line nr="412" mi="7" ci="0" mb="0" cb="0"/><line nr="413" mi="9" ci="0" mb="0" cb="0"/><line nr="414" mi="4" ci="0" mb="0" cb="0"/><line nr="415" mi="5" ci="0" mb="0" cb="0"/><line nr="416" mi="5" ci="0" mb="0" cb="0"/><line nr="417" mi="7" ci="0" mb="0" cb="0"/><line nr="420" mi="15" ci="0" mb="0" cb="0"/><line nr="424" mi="3" ci="0" mb="0" cb="0"/><line nr="425" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="388" covered="130"/><counter type="BRANCH" missed="6" covered="8"/><counter type="LINE" missed="93" covered="37"/><counter type="COMPLEXITY" missed="23" covered="12"/><counter type="METHOD" missed="19" covered="9"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><counter type="INSTRUCTION" missed="542" covered="656"/><counter type="BRANCH" missed="29" covered="41"/><counter type="LINE" missed="149" covered="170"/><counter type="COMPLEXITY" missed="48" covered="50"/><counter type="METHOD" missed="23" covered="40"/><counter type="CLASS" missed="0" covered="3"/></package><package name="it/polimi/ingsw/network/messages/actions"><class name="it/polimi/ingsw/network/messages/actions/SendPrivateTextMessage" sourcefilename="SendPrivateTextMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V" line="11"><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getRecipient" desc="()Ljava/lang/String;" line="17"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getText" desc="()Ljava/lang/String;" line="21"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="16"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/actions/DrawInitialCardMessage" sourcefilename="DrawInitialCardMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="9"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/actions/CreateMatchMessage" sourcefilename="CreateMatchMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/String;I)V" line="11"><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getMatchName" desc="()Ljava/lang/String;" line="21"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getMaxPlayers" desc="()I" line="29"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="16"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/actions/ActionMessage" sourcefilename="ActionMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="22"><counter type="INSTRUCTION" missed="0" covered="14"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getAction" desc="()Ljava/lang/String;" line="31"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getUsername" desc="()Ljava/lang/String;" line="38"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="3" covered="17"/><counter type="LINE" missed="1" covered="5"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="1" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/actions/ChooseInitialCardSideMessage" sourcefilename="ChooseInitialCardSideMessage.java"><method name="getSide" desc="()Lit/polimi/ingsw/gamemodel/Side;" line="16"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Side;)V" line="27"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/network/messages/actions/GetAvailableMatchesMessage" sourcefilename="GetAvailableMatchesMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="9"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/actions/ChooseSecretObjectiveMessage" sourcefilename="ChooseSecretObjectiveMessage.java"><method name="getObjectiveID" desc="()Ljava/lang/Integer;" line="14"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/Integer;)V" line="25"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/network/messages/actions/DrawSecretObjectivesMessage" sourcefilename="DrawSecretObjectivesMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="10"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/network/messages/actions/DrawCardMessage" sourcefilename="DrawCardMessage.java"><method name="getSource" desc="()Lit/polimi/ingsw/gamemodel/DrawSource;" line="16"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="&lt;init&gt;" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/DrawSource;)V" line="20"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/actions/SendBroadcastTextMessage" sourcefilename="SendBroadcastTextMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="10"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getText" desc="()Ljava/lang/String;" line="15"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/actions/JoinMatchMessage" sourcefilename="JoinMatchMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="10"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getMatchName" desc="()Ljava/lang/String;" line="18"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/actions/PlayCardMessage" sourcefilename="PlayCardMessage.java"><method name="getX" desc="()Ljava/lang/Integer;" line="19"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getY" desc="()Ljava/lang/Integer;" line="26"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getCardID" desc="()Ljava/lang/Integer;" line="33"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getSide" desc="()Lit/polimi/ingsw/gamemodel/Side;" line="40"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="&lt;init&gt;" desc="(Ljava/lang/String;Lit/polimi/ingsw/utils/Pair;Ljava/lang/Integer;Lit/polimi/ingsw/gamemodel/Side;)V" line="45"><counter type="INSTRUCTION" missed="0" covered="20"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="32"/><counter type="LINE" missed="0" covered="10"/><counter type="COMPLEXITY" missed="0" covered="5"/><counter type="METHOD" missed="0" covered="5"/><counter type="CLASS" missed="0" covered="1"/></class><sourcefile name="SendBroadcastTextMessage.java"><line nr="10" mi="0" ci="3" mb="0" cb="0"/><line nr="11" mi="0" ci="3" mb="0" cb="0"/><line nr="12" mi="0" ci="1" mb="0" cb="0"/><line nr="15" mi="0" ci="3" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="ActionMessage.java"><line nr="22" mi="0" ci="2" mb="0" cb="0"/><line nr="23" mi="0" ci="8" mb="0" cb="0"/><line nr="24" mi="0" ci="3" mb="0" cb="0"/><line nr="25" mi="0" ci="1" mb="0" cb="0"/><line nr="31" mi="3" ci="0" mb="0" cb="0"/><line nr="38" mi="0" ci="3" mb="0" cb="0"/><counter type="INSTRUCTION" missed="3" covered="17"/><counter type="LINE" missed="1" covered="5"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="1" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="PlayCardMessage.java"><line nr="19" mi="0" ci="3" mb="0" cb="0"/><line nr="26" mi="0" ci="3" mb="0" cb="0"/><line nr="33" mi="0" ci="3" mb="0" cb="0"/><line nr="40" mi="0" ci="3" mb="0" cb="0"/><line nr="45" mi="0" ci="3" mb="0" cb="0"/><line nr="46" mi="0" ci="5" mb="0" cb="0"/><line nr="47" mi="0" ci="5" mb="0" cb="0"/><line nr="48" mi="0" ci="3" mb="0" cb="0"/><line nr="49" mi="0" ci="3" mb="0" cb="0"/><line nr="50" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="32"/><counter type="LINE" missed="0" covered="10"/><counter type="COMPLEXITY" missed="0" covered="5"/><counter type="METHOD" missed="0" covered="5"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="DrawInitialCardMessage.java"><line nr="9" mi="0" ci="3" mb="0" cb="0"/><line nr="10" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="DrawCardMessage.java"><line nr="16" mi="0" ci="3" mb="0" cb="0"/><line nr="20" mi="0" ci="3" mb="0" cb="0"/><line nr="21" mi="0" ci="3" mb="0" cb="0"/><line nr="22" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="ChooseSecretObjectiveMessage.java"><line nr="14" mi="3" ci="0" mb="0" cb="0"/><line nr="25" mi="3" ci="0" mb="0" cb="0"/><line nr="26" mi="3" ci="0" mb="0" cb="0"/><line nr="27" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="SendPrivateTextMessage.java"><line nr="11" mi="0" ci="3" mb="0" cb="0"/><line nr="12" mi="0" ci="3" mb="0" cb="0"/><line nr="13" mi="0" ci="3" mb="0" cb="0"/><line nr="14" mi="0" ci="1" mb="0" cb="0"/><line nr="17" mi="0" ci="3" mb="0" cb="0"/><line nr="21" mi="0" ci="3" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="16"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="GetAvailableMatchesMessage.java"><line nr="9" mi="0" ci="3" mb="0" cb="0"/><line nr="10" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="CreateMatchMessage.java"><line nr="11" mi="0" ci="3" mb="0" cb="0"/><line nr="12" mi="0" ci="3" mb="0" cb="0"/><line nr="13" mi="0" ci="3" mb="0" cb="0"/><line nr="14" mi="0" ci="1" mb="0" cb="0"/><line nr="21" mi="0" ci="3" mb="0" cb="0"/><line nr="29" mi="0" ci="3" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="16"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="JoinMatchMessage.java"><line nr="10" mi="0" ci="3" mb="0" cb="0"/><line nr="11" mi="0" ci="3" mb="0" cb="0"/><line nr="12" mi="0" ci="1" mb="0" cb="0"/><line nr="18" mi="0" ci="3" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="DrawSecretObjectivesMessage.java"><line nr="10" mi="3" ci="0" mb="0" cb="0"/><line nr="11" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="ChooseInitialCardSideMessage.java"><line nr="16" mi="3" ci="0" mb="0" cb="0"/><line nr="27" mi="3" ci="0" mb="0" cb="0"/><line nr="28" mi="3" ci="0" mb="0" cb="0"/><line nr="29" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><counter type="INSTRUCTION" missed="27" covered="119"/><counter type="LINE" missed="11" covered="43"/><counter type="COMPLEXITY" missed="6" covered="21"/><counter type="METHOD" missed="6" covered="21"/><counter type="CLASS" missed="3" covered="9"/></package><package name="it/polimi/ingsw/exceptions"><class name="it/polimi/ingsw/exceptions/WrongChoiceException" sourcefilename="WrongChoiceException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="5"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/exceptions/AlreadyUsedUsernameException" sourcefilename="AlreadyUsedUsernameException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="5"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/exceptions/WrongNameException" sourcefilename="WrongNameException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="5"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/exceptions/WrongInputFormatException" sourcefilename="WrongInputFormatException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="9"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/exceptions/CardException" sourcefilename="CardException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="5"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/exceptions/WrongTurnException" sourcefilename="WrongTurnException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="5"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/exceptions/WrongStateException" sourcefilename="WrongStateException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="5"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/exceptions/InvalidPlayerException" sourcefilename="InvalidPlayerException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="6"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/exceptions/ChosenMatchException" sourcefilename="ChosenMatchException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="5"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/exceptions/DeckException" sourcefilename="DeckException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="5"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/exceptions/InvalidResourceException" sourcefilename="InvalidResourceException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="5"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/exceptions/HandException" sourcefilename="HandException.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="5"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><sourcefile name="WrongChoiceException.java"><line nr="5" mi="0" ci="3" mb="0" cb="0"/><line nr="6" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="WrongTurnException.java"><line nr="5" mi="3" ci="0" mb="0" cb="0"/><line nr="6" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="DeckException.java"><line nr="5" mi="0" ci="3" mb="0" cb="0"/><line nr="6" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="WrongStateException.java"><line nr="5" mi="0" ci="3" mb="0" cb="0"/><line nr="6" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="WrongInputFormatException.java"><line nr="9" mi="3" ci="0" mb="0" cb="0"/><line nr="10" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="AlreadyUsedUsernameException.java"><line nr="5" mi="0" ci="3" mb="0" cb="0"/><line nr="6" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="CardException.java"><line nr="5" mi="0" ci="3" mb="0" cb="0"/><line nr="6" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="ChosenMatchException.java"><line nr="5" mi="3" ci="0" mb="0" cb="0"/><line nr="6" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="InvalidResourceException.java"><line nr="5" mi="3" ci="0" mb="0" cb="0"/><line nr="6" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="InvalidPlayerException.java"><line nr="6" mi="3" ci="0" mb="0" cb="0"/><line nr="7" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="WrongNameException.java"><line nr="5" mi="3" ci="0" mb="0" cb="0"/><line nr="6" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="HandException.java"><line nr="5" mi="3" ci="0" mb="0" cb="0"/><line nr="6" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><counter type="INSTRUCTION" missed="28" covered="20"/><counter type="LINE" missed="14" covered="10"/><counter type="COMPLEXITY" missed="7" covered="5"/><counter type="METHOD" missed="7" covered="5"/><counter type="CLASS" missed="7" covered="5"/></package><package name="it/polimi/ingsw/client/frontend/gui/controllers"><class name="it/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController" sourcefilename="PlayerTabController.java"><method name="&lt;init&gt;" desc="()V" line="34"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initialize" desc="()V" line="55"><counter type="INSTRUCTION" missed="29" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setResources" desc="(Ljava/util/Map;)V" line="70"><counter type="INSTRUCTION" missed="94" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="placeCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="92"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setPoints" desc="(I)V" line="100"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initializeHandCard" desc="(Lit/polimi/ingsw/client/frontend/gui/nodes/CardView;)V" line="111"><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="createDragArea" desc="(Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="158"><counter type="INSTRUCTION" missed="80" covered="0"/><counter type="BRANCH" missed="14" covered="0"/><counter type="LINE" missed="12" covered="0"/><counter type="COMPLEXITY" missed="8" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="showDragArea" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="182"><counter type="INSTRUCTION" missed="70" covered="0"/><counter type="LINE" missed="15" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="removeDragAreas" desc="()V" line="234"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="giveSecretObjectives" desc="(Lit/polimi/ingsw/utils/Pair;)V" line="245"><counter type="INSTRUCTION" missed="41" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewSecretObjective" desc="()V" line="259"><counter type="INSTRUCTION" missed="33" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="giveInitialCard" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="270"><counter type="INSTRUCTION" missed="35" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewInitialCard" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="289"><counter type="INSTRUCTION" missed="23" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="removePlayerChoiceContainer" desc="()V" line="299"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="createCardChoiceContainer" desc="(Lit/polimi/ingsw/client/frontend/gui/nodes/CardView;Lit/polimi/ingsw/client/frontend/gui/nodes/CardView;)V" line="310"><counter type="INSTRUCTION" missed="45" covered="0"/><counter type="LINE" missed="10" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setUsername" desc="(Ljava/lang/String;)V" line="329"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getBoard" desc="()Lit/polimi/ingsw/client/frontend/gui/nodes/BoardPane;" line="338"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Objective;)V" line="347"><counter type="INSTRUCTION" missed="39" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setStateTitle" desc="(Ljava/lang/String;)V" line="363"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setHandCards" desc="(Ljava/util/List;)V" line="371"><counter type="INSTRUCTION" missed="31" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setCurrentPlayer" desc="(Z)V" line="384"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="enablePlaceCardInteractions" desc="(Z)V" line="397"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$giveInitialCard$11" desc="(Ljavafx/scene/input/MouseEvent;)V" line="280"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$giveInitialCard$10" desc="(Ljavafx/scene/input/MouseEvent;)V" line="276"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$giveSecretObjectives$9" desc="(Lit/polimi/ingsw/utils/Pair;Ljavafx/scene/input/MouseEvent;)V" line="252"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$giveSecretObjectives$8" desc="(Lit/polimi/ingsw/utils/Pair;Ljavafx/scene/input/MouseEvent;)V" line="251"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$showDragArea$7" desc="(Ljavafx/scene/layout/Pane;Ljavafx/scene/input/DragEvent;)V" line="223"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$showDragArea$6" desc="(Ljavafx/scene/layout/Pane;Ljavafx/scene/input/DragEvent;)V" line="218"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$showDragArea$5" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;Ljavafx/scene/input/MouseEvent;)V" line="208"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$showDragArea$4" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;Ljavafx/scene/input/DragEvent;)V" line="201"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$showDragArea$3" desc="(Ljavafx/scene/input/DragEvent;)V" line="194"><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializeHandCard$2" desc="(Lit/polimi/ingsw/client/frontend/gui/nodes/CardView;Ljavafx/scene/input/MouseEvent;)V" line="136"><counter type="INSTRUCTION" missed="51" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializeHandCard$1" desc="(Lit/polimi/ingsw/client/frontend/gui/nodes/CardView;Ljavafx/scene/input/DragEvent;)V" line="129"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializeHandCard$0" desc="(Lit/polimi/ingsw/client/frontend/gui/nodes/CardView;Ljavafx/scene/input/MouseEvent;)V" line="114"><counter type="INSTRUCTION" missed="61" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="853" covered="0"/><counter type="BRANCH" missed="42" covered="0"/><counter type="LINE" missed="180" covered="0"/><counter type="COMPLEXITY" missed="55" covered="0"/><counter type="METHOD" missed="34" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/gui/controllers/WaitingSceneController" sourcefilename="WaitingSceneController.java"><method name="&lt;init&gt;" desc="()V" line="17"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initialize" desc="()V" line="29"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addPlayer" desc="(Ljava/lang/String;)V" line="36"><counter type="INSTRUCTION" missed="28" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setMatchName" desc="(Ljava/lang/String;)V" line="49"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setMaxPlayers" desc="(I)V" line="58"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setCurrentPlayers" desc="(I)V" line="68"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getCurrentPlayers" desc="()I" line="77"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="updateLabel" desc="()V" line="84"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="removePlayer" desc="(Ljava/lang/String;)V" line="92"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="showMatch" desc="()Lit/polimi/ingsw/client/frontend/gui/controllers/MatchSceneController;" line="103"><counter type="INSTRUCTION" missed="25" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="115" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="32" covered="0"/><counter type="COMPLEXITY" missed="11" covered="0"/><counter type="METHOD" missed="10" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/gui/controllers/LobbySceneController" sourcefilename="LobbySceneController.java"><method name="&lt;init&gt;" desc="()V" line="18"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initialize" desc="()V" line="40"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initializePostController" desc="()V" line="47"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="showWaitScene" desc="()Lit/polimi/ingsw/client/frontend/gui/controllers/WaitingSceneController;" line="76"><counter type="INSTRUCTION" missed="27" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="refreshMatches" desc="()V" line="85"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="updateMatches" desc="(Ljava/util/List;)V" line="95"><counter type="INSTRUCTION" missed="47" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addMatchCard" desc="(Ljava/lang/String;IIZ)V" line="115"><counter type="INSTRUCTION" missed="176" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="40" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializePostController$3" desc="(Ljavafx/scene/Node;)V" line="67"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializePostController$2" desc="(Ljavafx/scene/input/MouseEvent;)V" line="59"><counter type="INSTRUCTION" missed="35" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializePostController$1" desc="(Ljavafx/scene/input/MouseEvent;)V" line="49"><counter type="INSTRUCTION" missed="43" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializePostController$0" desc="(Ljavafx/scene/input/MouseEvent;)V" line="47"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="393" covered="0"/><counter type="BRANCH" missed="22" covered="0"/><counter type="LINE" missed="83" covered="0"/><counter type="COMPLEXITY" missed="22" covered="0"/><counter type="METHOD" missed="11" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/gui/controllers/ChatPaneController" sourcefilename="ChatPaneController.java"><method name="&lt;init&gt;" desc="()V" line="23"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initialize" desc="()V" line="45"><counter type="INSTRUCTION" missed="57" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="submitMessage" desc="()V" line="88"><counter type="INSTRUCTION" missed="36" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addPlayer" desc="(Ljava/lang/String;)V" line="108"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="receiveBroadcastMessage" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="120"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="receivePrivateMessage" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="131"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="confirmSubmitBroadcastMessage" desc="(Ljava/lang/String;)V" line="141"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="confirmSubmitPrivateMessage" desc="(Ljava/lang/String;)V" line="151"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addMessage" desc="(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V" line="163"><counter type="INSTRUCTION" missed="40" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="changeVisibility" desc="()V" line="181"><counter type="INSTRUCTION" missed="27" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setIconStatus" desc="(Z)V" line="199"><counter type="INSTRUCTION" missed="26" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initialize$3" desc="(Ljavafx/event/ActionEvent;)V" line="75"><counter type="INSTRUCTION" missed="26" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initialize$2" desc="(Ljavafx/scene/input/KeyEvent;)V" line="68"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initialize$1" desc="(Ljavafx/scene/input/MouseEvent;)V" line="65"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initialize$0" desc="(Ljavafx/scene/input/MouseEvent;)V" line="59"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="287" covered="0"/><counter type="BRANCH" missed="14" covered="0"/><counter type="LINE" missed="72" covered="0"/><counter type="COMPLEXITY" missed="22" covered="0"/><counter type="METHOD" missed="15" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/gui/controllers/ErrorSceneController" sourcefilename="ErrorSceneController.java"><method name="&lt;init&gt;" desc="()V" line="13"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initialize" desc="()V" line="25"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setText" desc="(Ljava/lang/String;)V" line="32"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setTitle" desc="(Ljava/lang/String;)V" line="40"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setErrror" desc="(Ljava/lang/Exception;)V" line="48"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;clinit&gt;" desc="()V" line="15"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="30" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/gui/controllers/MatchSceneController" sourcefilename="MatchSceneController.java"><method name="&lt;init&gt;" desc="()V" line="30"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initialize" desc="()V" line="51"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initializePostController" desc="()V" line="55"><counter type="INSTRUCTION" missed="68" covered="0"/><counter type="LINE" missed="15" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addPlayerTab" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Color;)Lit/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController;" line="82"><counter type="INSTRUCTION" missed="60" covered="0"/><counter type="LINE" missed="15" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setDrawSource" desc="(Lit/polimi/ingsw/gamemodel/DrawSource;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Symbol;)V" line="109"><counter type="INSTRUCTION" missed="39" covered="0"/><counter type="BRANCH" missed="7" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setObjectives" desc="(Lit/polimi/ingsw/utils/Pair;)V" line="124"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setPlateauPoints" desc="(Ljava/lang/String;I)V" line="134"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="showRankingScene" desc="()Lit/polimi/ingsw/client/frontend/gui/controllers/RankingSceneController;" line="143"><counter type="INSTRUCTION" missed="25" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getChatPane" desc="()Lit/polimi/ingsw/client/frontend/gui/controllers/ChatPaneController;" line="155"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setFocus" desc="(Ljava/lang/String;)V" line="163"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setFocusToTable" desc="()V" line="170"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="enableDrawSourcesInteractions" desc="(Z)V" line="179"><counter type="INSTRUCTION" missed="49" covered="0"/><counter type="BRANCH" missed="12" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setStateTitle" desc="(Ljava/lang/String;)V" line="192"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializePostController$5" desc="(Ljavafx/scene/input/MouseEvent;)V" line="65"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializePostController$4" desc="(Ljavafx/scene/input/MouseEvent;)V" line="63"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializePostController$3" desc="(Ljavafx/scene/input/MouseEvent;)V" line="61"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializePostController$2" desc="(Ljavafx/scene/input/MouseEvent;)V" line="59"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializePostController$1" desc="(Ljavafx/scene/input/MouseEvent;)V" line="57"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializePostController$0" desc="(Ljavafx/scene/input/MouseEvent;)V" line="55"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="330" covered="0"/><counter type="BRANCH" missed="19" covered="0"/><counter type="LINE" missed="65" covered="0"/><counter type="COMPLEXITY" missed="31" covered="0"/><counter type="METHOD" missed="19" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/gui/controllers/SceneController" sourcefilename="SceneController.java"><method name="&lt;init&gt;" desc="()V" line="14"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initializePostController" desc="()V" line="23"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setGraphicalView" desc="(Lit/polimi/ingsw/client/frontend/gui/GraphicalViewGUI;)V" line="36"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setStage" desc="(Ljavafx/stage/Stage;)V" line="44"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="loadScene" desc="(Ljava/lang/String;)Ljavafx/scene/Node;" line="56"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setControllerAttributes" desc="(Ljavafx/fxml/FXMLLoader;)V" line="68"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setControllerAttributes" desc="(Ljavafx/fxml/FXMLLoader;Ljavafx/scene/Node;)V" line="80"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="51" covered="0"/><counter type="LINE" missed="18" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="7" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/gui/controllers/ConnectionSceneController" sourcefilename="ConnectionSceneController.java"><method name="&lt;init&gt;" desc="()V" line="28"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initialize" desc="()V" line="41"><counter type="INSTRUCTION" missed="25" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="connect" desc="()V" line="56"><counter type="INSTRUCTION" missed="65" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="17" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="showLobby" desc="()V" line="80"><counter type="INSTRUCTION" missed="30" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="debuggingKeys" desc="()Z" line="89"><counter type="INSTRUCTION" missed="299" covered="0"/><counter type="BRANCH" missed="10" covered="0"/><counter type="LINE" missed="69" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initialize$0" desc="(Ljavafx/event/ActionEvent;)V" line="47"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="425" covered="0"/><counter type="BRANCH" missed="14" covered="0"/><counter type="LINE" missed="102" covered="0"/><counter type="COMPLEXITY" missed="13" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/gui/controllers/RankingSceneController" sourcefilename="RankingSceneController.java"><method name="&lt;init&gt;" desc="()V" line="19"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initialize" desc="()V" line="29"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="initializePostController" desc="()V" line="33"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addRanking" desc="(Lit/polimi/ingsw/utils/LeaderboardEntry;)V" line="45"><counter type="INSTRUCTION" missed="98" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="17" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setVictory" desc="(Z)V" line="76"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="showConnectionScene" desc="()V" line="88"><counter type="INSTRUCTION" missed="30" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$initializePostController$0" desc="(Ljavafx/event/ActionEvent;)V" line="35"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;clinit&gt;" desc="()V" line="22"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="158" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="36" covered="0"/><counter type="COMPLEXITY" missed="11" covered="0"/><counter type="METHOD" missed="8" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><sourcefile name="ChatPaneController.java"><line nr="23" mi="2" ci="0" mb="0" cb="0"/><line nr="39" mi="6" ci="0" mb="0" cb="0"/><line nr="45" mi="4" ci="0" mb="0" cb="0"/><line nr="46" mi="3" ci="0" mb="0" cb="0"/><line nr="47" mi="4" ci="0" mb="0" cb="0"/><line nr="48" mi="3" ci="0" mb="0" cb="0"/><line nr="50" mi="5" ci="0" mb="0" cb="0"/><line nr="53" mi="6" ci="0" mb="0" cb="0"/><line nr="54" mi="6" ci="0" mb="0" cb="0"/><line nr="55" mi="5" ci="0" mb="0" cb="0"/><line nr="58" mi="5" ci="0" mb="0" cb="0"/><line nr="59" mi="8" ci="0" mb="2" cb="0"/><line nr="60" mi="2" ci="0" mb="0" cb="0"/><line nr="61" mi="1" ci="0" mb="0" cb="0"/><line nr="64" mi="5" ci="0" mb="0" cb="0"/><line nr="65" mi="2" ci="0" mb="0" cb="0"/><line nr="66" mi="1" ci="0" mb="0" cb="0"/><line nr="67" mi="5" ci="0" mb="0" cb="0"/><line nr="68" mi="4" ci="0" mb="2" cb="0"/><line nr="69" mi="2" ci="0" mb="0" cb="0"/><line nr="71" mi="1" ci="0" mb="0" cb="0"/><line nr="74" mi="5" ci="0" mb="0" cb="0"/><line nr="75" mi="6" ci="0" mb="0" cb="0"/><line nr="76" mi="6" ci="0" mb="0" cb="0"/><line nr="78" mi="4" ci="0" mb="0" cb="0"/><line nr="79" mi="9" ci="0" mb="0" cb="0"/><line nr="80" mi="1" ci="0" mb="0" cb="0"/><line nr="81" mi="1" ci="0" mb="0" cb="0"/><line nr="88" mi="4" ci="0" mb="0" cb="0"/><line nr="89" mi="6" ci="0" mb="0" cb="0"/><line nr="91" mi="3" ci="0" mb="2" cb="0"/><line nr="92" mi="4" ci="0" mb="2" cb="0"/><line nr="93" mi="5" ci="0" mb="0" cb="0"/><line nr="95" mi="5" ci="0" mb="0" cb="0"/><line nr="96" mi="5" ci="0" mb="0" cb="0"/><line nr="100" mi="3" ci="0" mb="0" cb="0"/><line nr="101" mi="1" ci="0" mb="0" cb="0"/><line nr="108" mi="6" ci="0" mb="0" cb="0"/><line nr="109" mi="6" ci="0" mb="0" cb="0"/><line nr="110" mi="1" ci="0" mb="0" cb="0"/><line nr="120" mi="5" ci="0" mb="0" cb="0"/><line nr="121" mi="1" ci="0" mb="0" cb="0"/><line nr="131" mi="5" ci="0" mb="0" cb="0"/><line nr="132" mi="1" ci="0" mb="0" cb="0"/><line nr="141" mi="7" ci="0" mb="0" cb="0"/><line nr="142" mi="1" ci="0" mb="0" cb="0"/><line nr="151" mi="5" ci="0" mb="0" cb="0"/><line nr="152" mi="7" ci="0" mb="0" cb="0"/><line nr="153" mi="1" ci="0" mb="0" cb="0"/><line nr="163" mi="4" ci="0" mb="0" cb="0"/><line nr="166" mi="8" ci="0" mb="0" cb="0"/><line nr="167" mi="6" ci="0" mb="0" cb="0"/><line nr="170" mi="8" ci="0" mb="2" cb="0"/><line nr="172" mi="4" ci="0" mb="0" cb="0"/><line nr="173" mi="9" ci="0" mb="0" cb="0"/><line nr="175" mi="1" ci="0" mb="0" cb="0"/><line nr="181" mi="8" ci="0" mb="0" cb="0"/><line nr="182" mi="3" ci="0" mb="2" cb="0"/><line nr="183" mi="3" ci="0" mb="0" cb="0"/><line nr="184" mi="4" ci="0" mb="0" cb="0"/><line nr="186" mi="3" ci="0" mb="0" cb="0"/><line nr="187" mi="3" ci="0" mb="0" cb="0"/><line nr="189" mi="2" ci="0" mb="0" cb="0"/><line nr="190" mi="1" ci="0" mb="0" cb="0"/><line nr="199" mi="2" ci="0" mb="2" cb="0"/><line nr="200" mi="3" ci="0" mb="0" cb="0"/><line nr="202" mi="2" ci="0" mb="0" cb="0"/><line nr="204" mi="8" ci="0" mb="0" cb="0"/><line nr="205" mi="3" ci="0" mb="0" cb="0"/><line nr="206" mi="3" ci="0" mb="0" cb="0"/><line nr="207" mi="4" ci="0" mb="0" cb="0"/><line nr="208" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="287" covered="0"/><counter type="BRANCH" missed="14" covered="0"/><counter type="LINE" missed="72" covered="0"/><counter type="COMPLEXITY" missed="22" covered="0"/><counter type="METHOD" missed="15" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="LobbySceneController.java"><line nr="18" mi="3" ci="0" mb="0" cb="0"/><line nr="40" mi="5" ci="0" mb="0" cb="0"/><line nr="41" mi="5" ci="0" mb="0" cb="0"/><line nr="42" mi="4" ci="0" mb="0" cb="0"/><line nr="43" mi="1" ci="0" mb="0" cb="0"/><line nr="47" mi="8" ci="0" mb="0" cb="0"/><line nr="48" mi="5" ci="0" mb="0" cb="0"/><line nr="49" mi="5" ci="0" mb="0" cb="0"/><line nr="50" mi="14" ci="0" mb="6" cb="0"/><line nr="51" mi="7" ci="0" mb="0" cb="0"/><line nr="52" mi="1" ci="0" mb="0" cb="0"/><line nr="54" mi="6" ci="0" mb="0" cb="0"/><line nr="55" mi="9" ci="0" mb="0" cb="0"/><line nr="57" mi="1" ci="0" mb="0" cb="0"/><line nr="58" mi="5" ci="0" mb="0" cb="0"/><line nr="59" mi="6" ci="0" mb="0" cb="0"/><line nr="60" mi="5" ci="0" mb="0" cb="0"/><line nr="61" mi="7" ci="0" mb="4" cb="0"/><line nr="62" mi="7" ci="0" mb="0" cb="0"/><line nr="63" mi="1" ci="0" mb="0" cb="0"/><line nr="65" mi="8" ci="0" mb="0" cb="0"/><line nr="66" mi="1" ci="0" mb="0" cb="0"/><line nr="67" mi="12" ci="0" mb="0" cb="0"/><line nr="68" mi="1" ci="0" mb="0" cb="0"/><line nr="76" mi="5" ci="0" mb="0" cb="0"/><line nr="77" mi="3" ci="0" mb="0" cb="0"/><line nr="78" mi="6" ci="0" mb="0" cb="0"/><line nr="79" mi="7" ci="0" mb="0" cb="0"/><line nr="80" mi="4" ci="0" mb="0" cb="0"/><line nr="81" mi="2" ci="0" mb="0" cb="0"/><line nr="85" mi="4" ci="0" mb="0" cb="0"/><line nr="86" mi="8" ci="0" mb="0" cb="0"/><line nr="87" mi="3" ci="0" mb="0" cb="0"/><line nr="88" mi="1" ci="0" mb="0" cb="0"/><line nr="95" mi="4" ci="0" mb="0" cb="0"/><line nr="96" mi="3" ci="0" mb="2" cb="0"/><line nr="97" mi="5" ci="0" mb="0" cb="0"/><line nr="98" mi="5" ci="0" mb="0" cb="0"/><line nr="99" mi="6" ci="0" mb="0" cb="0"/><line nr="101" mi="10" ci="0" mb="2" cb="0"/><line nr="102" mi="12" ci="0" mb="0" cb="0"/><line nr="103" mi="1" ci="0" mb="0" cb="0"/><line nr="104" mi="1" ci="0" mb="0" cb="0"/><line nr="115" mi="2" ci="0" mb="2" cb="0"/><line nr="116" mi="3" ci="0" mb="0" cb="0"/><line nr="117" mi="3" ci="0" mb="2" cb="0"/><line nr="118" mi="3" ci="0" mb="0" cb="0"/><line nr="120" mi="2" ci="0" mb="0" cb="0"/><line nr="124" mi="4" ci="0" mb="0" cb="0"/><line nr="125" mi="5" ci="0" mb="0" cb="0"/><line nr="126" mi="11" ci="0" mb="0" cb="0"/><line nr="127" mi="3" ci="0" mb="0" cb="0"/><line nr="129" mi="4" ci="0" mb="0" cb="0"/><line nr="130" mi="10" ci="0" mb="4" cb="0"/><line nr="131" mi="3" ci="0" mb="0" cb="0"/><line nr="132" mi="5" ci="0" mb="0" cb="0"/><line nr="133" mi="5" ci="0" mb="0" cb="0"/><line nr="134" mi="4" ci="0" mb="0" cb="0"/><line nr="135" mi="6" ci="0" mb="0" cb="0"/><line nr="137" mi="5" ci="0" mb="0" cb="0"/><line nr="139" mi="5" ci="0" mb="0" cb="0"/><line nr="140" mi="3" ci="0" mb="0" cb="0"/><line nr="141" mi="5" ci="0" mb="0" cb="0"/><line nr="142" mi="5" ci="0" mb="0" cb="0"/><line nr="144" mi="4" ci="0" mb="0" cb="0"/><line nr="145" mi="3" ci="0" mb="0" cb="0"/><line nr="146" mi="5" ci="0" mb="0" cb="0"/><line nr="150" mi="4" ci="0" mb="0" cb="0"/><line nr="151" mi="4" ci="0" mb="0" cb="0"/><line nr="152" mi="3" ci="0" mb="0" cb="0"/><line nr="153" mi="5" ci="0" mb="0" cb="0"/><line nr="154" mi="3" ci="0" mb="0" cb="0"/><line nr="156" mi="7" ci="0" mb="0" cb="0"/><line nr="157" mi="3" ci="0" mb="0" cb="0"/><line nr="158" mi="5" ci="0" mb="0" cb="0"/><line nr="159" mi="5" ci="0" mb="0" cb="0"/><line nr="160" mi="5" ci="0" mb="0" cb="0"/><line nr="161" mi="5" ci="0" mb="0" cb="0"/><line nr="163" mi="4" ci="0" mb="0" cb="0"/><line nr="164" mi="3" ci="0" mb="0" cb="0"/><line nr="165" mi="5" ci="0" mb="0" cb="0"/><line nr="167" mi="6" ci="0" mb="0" cb="0"/><line nr="168" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="393" covered="0"/><counter type="BRANCH" missed="22" covered="0"/><counter type="LINE" missed="83" covered="0"/><counter type="COMPLEXITY" missed="22" covered="0"/><counter type="METHOD" missed="11" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="PlayerTabController.java"><line nr="34" mi="2" ci="0" mb="0" cb="0"/><line nr="52" mi="6" ci="0" mb="0" cb="0"/><line nr="55" mi="4" ci="0" mb="0" cb="0"/><line nr="57" mi="4" ci="0" mb="0" cb="0"/><line nr="58" mi="10" ci="0" mb="2" cb="0"/><line nr="59" mi="6" ci="0" mb="0" cb="0"/><line nr="60" mi="1" ci="0" mb="0" cb="0"/><line nr="61" mi="3" ci="0" mb="0" cb="0"/><line nr="62" mi="1" ci="0" mb="0" cb="0"/><line nr="70" mi="4" ci="0" mb="0" cb="0"/><line nr="71" mi="31" ci="0" mb="0" cb="0"/><line nr="73" mi="16" ci="0" mb="2" cb="0"/><line nr="74" mi="11" ci="0" mb="0" cb="0"/><line nr="75" mi="3" ci="0" mb="0" cb="0"/><line nr="76" mi="3" ci="0" mb="0" cb="0"/><line nr="77" mi="8" ci="0" mb="0" cb="0"/><line nr="78" mi="5" ci="0" mb="0" cb="0"/><line nr="79" mi="6" ci="0" mb="0" cb="0"/><line nr="80" mi="6" ci="0" mb="0" cb="0"/><line nr="82" mi="1" ci="0" mb="0" cb="0"/><line nr="92" mi="6" ci="0" mb="0" cb="0"/><line nr="93" mi="1" ci="0" mb="0" cb="0"/><line nr="100" mi="5" ci="0" mb="0" cb="0"/><line nr="101" mi="1" ci="0" mb="0" cb="0"/><line nr="111" mi="3" ci="0" mb="0" cb="0"/><line nr="112" mi="5" ci="0" mb="0" cb="0"/><line nr="114" mi="9" ci="0" mb="0" cb="0"/><line nr="115" mi="4" ci="0" mb="0" cb="0"/><line nr="116" mi="4" ci="0" mb="0" cb="0"/><line nr="117" mi="4" ci="0" mb="0" cb="0"/><line nr="119" mi="3" ci="0" mb="0" cb="0"/><line nr="120" mi="6" ci="0" mb="0" cb="0"/><line nr="121" mi="5" ci="0" mb="0" cb="0"/><line nr="122" mi="5" ci="0" mb="0" cb="0"/><line nr="123" mi="12" ci="0" mb="0" cb="0"/><line nr="124" mi="3" ci="0" mb="0" cb="0"/><line nr="125" mi="3" ci="0" mb="0" cb="0"/><line nr="126" mi="2" ci="0" mb="0" cb="0"/><line nr="127" mi="1" ci="0" mb="0" cb="0"/><line nr="128" mi="5" ci="0" mb="0" cb="0"/><line nr="129" mi="2" ci="0" mb="0" cb="0"/><line nr="130" mi="3" ci="0" mb="0" cb="0"/><line nr="131" mi="3" ci="0" mb="0" cb="0"/><line nr="132" mi="3" ci="0" mb="0" cb="0"/><line nr="133" mi="2" ci="0" mb="0" cb="0"/><line nr="134" mi="1" ci="0" mb="0" cb="0"/><line nr="135" mi="5" ci="0" mb="0" cb="0"/><line nr="136" mi="4" ci="0" mb="2" cb="0"/><line nr="137" mi="6" ci="0" mb="0" cb="0"/><line nr="138" mi="8" ci="0" mb="2" cb="0"/><line nr="139" mi="8" ci="0" mb="0" cb="0"/><line nr="140" mi="5" ci="0" mb="2" cb="0"/><line nr="142" mi="4" ci="0" mb="2" cb="0"/><line nr="143" mi="3" ci="0" mb="0" cb="0"/><line nr="145" mi="12" ci="0" mb="0" cb="0"/><line nr="148" mi="1" ci="0" mb="0" cb="0"/><line nr="149" mi="1" ci="0" mb="0" cb="0"/><line nr="158" mi="4" ci="0" mb="0" cb="0"/><line nr="159" mi="12" ci="0" mb="2" cb="0"/><line nr="160" mi="7" ci="0" mb="2" cb="0"/><line nr="161" mi="7" ci="0" mb="2" cb="0"/><line nr="162" mi="4" ci="0" mb="4" cb="0"/><line nr="163" mi="18" ci="0" mb="0" cb="0"/><line nr="164" mi="10" ci="0" mb="2" cb="0"/><line nr="168" mi="1" ci="0" mb="0" cb="0"/><line nr="169" mi="10" ci="0" mb="2" cb="0"/><line nr="170" mi="5" ci="0" mb="0" cb="0"/><line nr="171" mi="1" ci="0" mb="0" cb="0"/><line nr="172" mi="1" ci="0" mb="0" cb="0"/><line nr="182" mi="4" ci="0" mb="0" cb="0"/><line nr="183" mi="5" ci="0" mb="0" cb="0"/><line nr="185" mi="5" ci="0" mb="0" cb="0"/><line nr="186" mi="6" ci="0" mb="0" cb="0"/><line nr="187" mi="6" ci="0" mb="0" cb="0"/><line nr="189" mi="3" ci="0" mb="0" cb="0"/><line nr="190" mi="3" ci="0" mb="0" cb="0"/><line nr="193" mi="4" ci="0" mb="0" cb="0"/><line nr="194" mi="8" ci="0" mb="4" cb="0"/><line nr="195" mi="8" ci="0" mb="0" cb="0"/><line nr="197" mi="2" ci="0" mb="0" cb="0"/><line nr="198" mi="1" ci="0" mb="0" cb="0"/><line nr="200" mi="7" ci="0" mb="0" cb="0"/><line nr="201" mi="3" ci="0" mb="0" cb="0"/><line nr="202" mi="2" ci="0" mb="0" cb="0"/><line nr="204" mi="6" ci="0" mb="0" cb="0"/><line nr="205" mi="2" ci="0" mb="0" cb="0"/><line nr="206" mi="1" ci="0" mb="0" cb="0"/><line nr="207" mi="7" ci="0" mb="0" cb="0"/><line nr="208" mi="5" ci="0" mb="2" cb="0"/><line nr="209" mi="2" ci="0" mb="0" cb="0"/><line nr="211" mi="6" ci="0" mb="0" cb="0"/><line nr="212" mi="2" ci="0" mb="0" cb="0"/><line nr="214" mi="1" ci="0" mb="0" cb="0"/><line nr="217" mi="4" ci="0" mb="0" cb="0"/><line nr="218" mi="5" ci="0" mb="0" cb="0"/><line nr="219" mi="2" ci="0" mb="0" cb="0"/><line nr="220" mi="1" ci="0" mb="0" cb="0"/><line nr="222" mi="4" ci="0" mb="0" cb="0"/><line nr="223" mi="5" ci="0" mb="0" cb="0"/><line nr="224" mi="2" ci="0" mb="0" cb="0"/><line nr="225" mi="1" ci="0" mb="0" cb="0"/><line nr="226" mi="6" ci="0" mb="0" cb="0"/><line nr="227" mi="5" ci="0" mb="0" cb="0"/><line nr="228" mi="1" ci="0" mb="0" cb="0"/><line nr="234" mi="11" ci="0" mb="2" cb="0"/><line nr="235" mi="6" ci="0" mb="0" cb="0"/><line nr="236" mi="1" ci="0" mb="0" cb="0"/><line nr="237" mi="3" ci="0" mb="0" cb="0"/><line nr="238" mi="1" ci="0" mb="0" cb="0"/><line nr="245" mi="4" ci="0" mb="0" cb="0"/><line nr="246" mi="8" ci="0" mb="0" cb="0"/><line nr="247" mi="8" ci="0" mb="0" cb="0"/><line nr="248" mi="4" ci="0" mb="0" cb="0"/><line nr="249" mi="3" ci="0" mb="0" cb="0"/><line nr="250" mi="3" ci="0" mb="0" cb="0"/><line nr="251" mi="12" ci="0" mb="0" cb="0"/><line nr="252" mi="12" ci="0" mb="0" cb="0"/><line nr="253" mi="1" ci="0" mb="0" cb="0"/><line nr="259" mi="6" ci="0" mb="0" cb="0"/><line nr="260" mi="11" ci="0" mb="0" cb="0"/><line nr="261" mi="11" ci="0" mb="0" cb="0"/><line nr="262" mi="4" ci="0" mb="0" cb="0"/><line nr="263" mi="1" ci="0" mb="0" cb="0"/><line nr="270" mi="4" ci="0" mb="0" cb="0"/><line nr="271" mi="6" ci="0" mb="0" cb="0"/><line nr="272" mi="6" ci="0" mb="0" cb="0"/><line nr="273" mi="4" ci="0" mb="0" cb="0"/><line nr="274" mi="3" ci="0" mb="0" cb="0"/><line nr="275" mi="4" ci="0" mb="0" cb="0"/><line nr="276" mi="4" ci="0" mb="0" cb="0"/><line nr="277" mi="1" ci="0" mb="0" cb="0"/><line nr="278" mi="3" ci="0" mb="0" cb="0"/><line nr="279" mi="4" ci="0" mb="0" cb="0"/><line nr="280" mi="4" ci="0" mb="0" cb="0"/><line nr="281" mi="1" ci="0" mb="0" cb="0"/><line nr="282" mi="1" ci="0" mb="0" cb="0"/><line nr="289" mi="6" ci="0" mb="0" cb="0"/><line nr="290" mi="6" ci="0" mb="0" cb="0"/><line nr="291" mi="6" ci="0" mb="0" cb="0"/><line nr="292" mi="4" ci="0" mb="0" cb="0"/><line nr="293" mi="1" ci="0" mb="0" cb="0"/><line nr="299" mi="7" ci="0" mb="0" cb="0"/><line nr="300" mi="4" ci="0" mb="0" cb="0"/><line nr="301" mi="1" ci="0" mb="0" cb="0"/><line nr="310" mi="5" ci="0" mb="0" cb="0"/><line nr="312" mi="6" ci="0" mb="0" cb="0"/><line nr="313" mi="6" ci="0" mb="0" cb="0"/><line nr="315" mi="4" ci="0" mb="0" cb="0"/><line nr="316" mi="4" ci="0" mb="0" cb="0"/><line nr="317" mi="4" ci="0" mb="0" cb="0"/><line nr="319" mi="4" ci="0" mb="0" cb="0"/><line nr="320" mi="7" ci="0" mb="0" cb="0"/><line nr="321" mi="4" ci="0" mb="0" cb="0"/><line nr="322" mi="1" ci="0" mb="0" cb="0"/><line nr="329" mi="3" ci="0" mb="0" cb="0"/><line nr="330" mi="7" ci="0" mb="0" cb="0"/><line nr="331" mi="1" ci="0" mb="0" cb="0"/><line nr="338" mi="3" ci="0" mb="0" cb="0"/><line nr="347" mi="2" ci="0" mb="2" cb="0"/><line nr="348" mi="7" ci="0" mb="0" cb="0"/><line nr="350" mi="11" ci="0" mb="0" cb="0"/><line nr="352" mi="3" ci="0" mb="0" cb="0"/><line nr="353" mi="9" ci="0" mb="0" cb="0"/><line nr="355" mi="6" ci="0" mb="0" cb="0"/><line nr="356" mi="1" ci="0" mb="0" cb="0"/><line nr="363" mi="4" ci="0" mb="0" cb="0"/><line nr="364" mi="1" ci="0" mb="0" cb="0"/><line nr="371" mi="4" ci="0" mb="0" cb="0"/><line nr="372" mi="10" ci="0" mb="2" cb="0"/><line nr="373" mi="6" ci="0" mb="0" cb="0"/><line nr="374" mi="3" ci="0" mb="0" cb="0"/><line nr="375" mi="6" ci="0" mb="0" cb="0"/><line nr="376" mi="1" ci="0" mb="0" cb="0"/><line nr="377" mi="1" ci="0" mb="0" cb="0"/><line nr="384" mi="2" ci="0" mb="2" cb="0"/><line nr="385" mi="7" ci="0" mb="0" cb="0"/><line nr="387" mi="6" ci="0" mb="0" cb="0"/><line nr="389" mi="1" ci="0" mb="0" cb="0"/><line nr="397" mi="8" ci="0" mb="2" cb="0"/><line nr="398" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="853" covered="0"/><counter type="BRANCH" missed="42" covered="0"/><counter type="LINE" missed="180" covered="0"/><counter type="COMPLEXITY" missed="55" covered="0"/><counter type="METHOD" missed="34" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="ErrorSceneController.java"><line nr="13" mi="3" ci="0" mb="0" cb="0"/><line nr="15" mi="2" ci="0" mb="0" cb="0"/><line nr="16" mi="3" ci="0" mb="0" cb="0"/><line nr="25" mi="1" ci="0" mb="0" cb="0"/><line nr="32" mi="4" ci="0" mb="0" cb="0"/><line nr="33" mi="1" ci="0" mb="0" cb="0"/><line nr="40" mi="4" ci="0" mb="0" cb="0"/><line nr="41" mi="1" ci="0" mb="0" cb="0"/><line nr="48" mi="5" ci="0" mb="0" cb="0"/><line nr="49" mi="5" ci="0" mb="0" cb="0"/><line nr="50" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="30" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="ConnectionSceneController.java"><line nr="28" mi="3" ci="0" mb="0" cb="0"/><line nr="41" mi="5" ci="0" mb="0" cb="0"/><line nr="42" mi="5" ci="0" mb="0" cb="0"/><line nr="43" mi="5" ci="0" mb="0" cb="0"/><line nr="44" mi="4" ci="0" mb="0" cb="0"/><line nr="46" mi="5" ci="0" mb="0" cb="0"/><line nr="47" mi="2" ci="0" mb="0" cb="0"/><line nr="48" mi="1" ci="0" mb="0" cb="0"/><line nr="50" mi="1" ci="0" mb="0" cb="0"/><line nr="56" mi="3" ci="0" mb="2" cb="0"/><line nr="57" mi="1" ci="0" mb="0" cb="0"/><line nr="59" mi="2" ci="0" mb="0" cb="0"/><line nr="60" mi="4" ci="0" mb="2" cb="0"/><line nr="62" mi="13" ci="0" mb="0" cb="0"/><line nr="63" mi="4" ci="0" mb="0" cb="0"/><line nr="64" mi="2" ci="0" mb="0" cb="0"/><line nr="65" mi="1" ci="0" mb="0" cb="0"/><line nr="66" mi="7" ci="0" mb="0" cb="0"/><line nr="67" mi="2" ci="0" mb="0" cb="0"/><line nr="70" mi="13" ci="0" mb="0" cb="0"/><line nr="71" mi="4" ci="0" mb="0" cb="0"/><line nr="72" mi="2" ci="0" mb="0" cb="0"/><line nr="73" mi="1" ci="0" mb="0" cb="0"/><line nr="74" mi="4" ci="0" mb="0" cb="0"/><line nr="75" mi="1" ci="0" mb="0" cb="0"/><line nr="77" mi="1" ci="0" mb="0" cb="0"/><line nr="80" mi="5" ci="0" mb="0" cb="0"/><line nr="81" mi="3" ci="0" mb="0" cb="0"/><line nr="82" mi="7" ci="0" mb="0" cb="0"/><line nr="83" mi="6" ci="0" mb="0" cb="0"/><line nr="84" mi="4" ci="0" mb="0" cb="0"/><line nr="85" mi="4" ci="0" mb="0" cb="0"/><line nr="86" mi="1" ci="0" mb="0" cb="0"/><line nr="89" mi="2" ci="0" mb="0" cb="0"/><line nr="90" mi="4" ci="0" mb="0" cb="0"/><line nr="91" mi="4" ci="0" mb="2" cb="0"/><line nr="93" mi="5" ci="0" mb="0" cb="0"/><line nr="94" mi="3" ci="0" mb="0" cb="0"/><line nr="95" mi="6" ci="0" mb="0" cb="0"/><line nr="96" mi="7" ci="0" mb="0" cb="0"/><line nr="97" mi="4" ci="0" mb="0" cb="0"/><line nr="98" mi="3" ci="0" mb="0" cb="0"/><line nr="99" mi="9" ci="0" mb="0" cb="0"/><line nr="100" mi="9" ci="0" mb="0" cb="0"/><line nr="101" mi="9" ci="0" mb="0" cb="0"/><line nr="102" mi="1" ci="0" mb="0" cb="0"/><line nr="103" mi="5" ci="0" mb="0" cb="0"/><line nr="104" mi="1" ci="0" mb="0" cb="0"/><line nr="105" mi="2" ci="0" mb="0" cb="0"/><line nr="106" mi="4" ci="0" mb="2" cb="0"/><line nr="108" mi="5" ci="0" mb="0" cb="0"/><line nr="109" mi="3" ci="0" mb="0" cb="0"/><line nr="110" mi="6" ci="0" mb="0" cb="0"/><line nr="111" mi="7" ci="0" mb="0" cb="0"/><line nr="112" mi="4" ci="0" mb="0" cb="0"/><line nr="113" mi="3" ci="0" mb="0" cb="0"/><line nr="114" mi="3" ci="0" mb="0" cb="0"/><line nr="115" mi="3" ci="0" mb="0" cb="0"/><line nr="116" mi="3" ci="0" mb="0" cb="0"/><line nr="117" mi="3" ci="0" mb="0" cb="0"/><line nr="118" mi="3" ci="0" mb="0" cb="0"/><line nr="119" mi="1" ci="0" mb="0" cb="0"/><line nr="120" mi="5" ci="0" mb="0" cb="0"/><line nr="121" mi="1" ci="0" mb="0" cb="0"/><line nr="122" mi="2" ci="0" mb="0" cb="0"/><line nr="123" mi="4" ci="0" mb="2" cb="0"/><line nr="125" mi="5" ci="0" mb="0" cb="0"/><line nr="126" mi="3" ci="0" mb="0" cb="0"/><line nr="127" mi="6" ci="0" mb="0" cb="0"/><line nr="128" mi="7" ci="0" mb="0" cb="0"/><line nr="129" mi="4" ci="0" mb="0" cb="0"/><line nr="130" mi="5" ci="0" mb="0" cb="0"/><line nr="131" mi="5" ci="0" mb="0" cb="0"/><line nr="132" mi="3" ci="0" mb="0" cb="0"/><line nr="133" mi="4" ci="0" mb="0" cb="0"/><line nr="134" mi="3" ci="0" mb="0" cb="0"/><line nr="135" mi="3" ci="0" mb="0" cb="0"/><line nr="136" mi="4" ci="0" mb="0" cb="0"/><line nr="137" mi="4" ci="0" mb="0" cb="0"/><line nr="139" mi="1" ci="0" mb="0" cb="0"/><line nr="140" mi="5" ci="0" mb="0" cb="0"/><line nr="141" mi="1" ci="0" mb="0" cb="0"/><line nr="142" mi="2" ci="0" mb="0" cb="0"/><line nr="143" mi="4" ci="0" mb="2" cb="0"/><line nr="144" mi="5" ci="0" mb="0" cb="0"/><line nr="145" mi="7" ci="0" mb="0" cb="0"/><line nr="146" mi="5" ci="0" mb="2" cb="0"/><line nr="148" mi="5" ci="0" mb="0" cb="0"/><line nr="149" mi="3" ci="0" mb="0" cb="0"/><line nr="150" mi="6" ci="0" mb="0" cb="0"/><line nr="151" mi="4" ci="0" mb="0" cb="0"/><line nr="152" mi="12" ci="0" mb="0" cb="0"/><line nr="153" mi="12" ci="0" mb="0" cb="0"/><line nr="154" mi="12" ci="0" mb="0" cb="0"/><line nr="155" mi="3" ci="0" mb="0" cb="0"/><line nr="156" mi="7" ci="0" mb="0" cb="0"/><line nr="157" mi="4" ci="0" mb="0" cb="0"/><line nr="159" mi="1" ci="0" mb="0" cb="0"/><line nr="160" mi="5" ci="0" mb="0" cb="0"/><line nr="161" mi="1" ci="0" mb="0" cb="0"/><line nr="162" mi="2" ci="0" mb="0" cb="0"/><line nr="164" mi="2" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="425" covered="0"/><counter type="BRANCH" missed="14" covered="0"/><counter type="LINE" missed="102" covered="0"/><counter type="COMPLEXITY" missed="13" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="SceneController.java"><line nr="14" mi="3" ci="0" mb="0" cb="0"/><line nr="23" mi="1" ci="0" mb="0" cb="0"/><line nr="36" mi="3" ci="0" mb="0" cb="0"/><line nr="37" mi="1" ci="0" mb="0" cb="0"/><line nr="44" mi="3" ci="0" mb="0" cb="0"/><line nr="45" mi="1" ci="0" mb="0" cb="0"/><line nr="56" mi="3" ci="0" mb="0" cb="0"/><line nr="57" mi="4" ci="0" mb="0" cb="0"/><line nr="58" mi="4" ci="0" mb="0" cb="0"/><line nr="59" mi="2" ci="0" mb="0" cb="0"/><line nr="68" mi="4" ci="0" mb="0" cb="0"/><line nr="69" mi="4" ci="0" mb="0" cb="0"/><line nr="70" mi="4" ci="0" mb="0" cb="0"/><line nr="71" mi="2" ci="0" mb="0" cb="0"/><line nr="72" mi="1" ci="0" mb="0" cb="0"/><line nr="80" mi="3" ci="0" mb="0" cb="0"/><line nr="81" mi="7" ci="0" mb="0" cb="0"/><line nr="82" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="51" covered="0"/><counter type="LINE" missed="18" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="7" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="MatchSceneController.java"><line nr="30" mi="2" ci="0" mb="0" cb="0"/><line nr="48" mi="6" ci="0" mb="0" cb="0"/><line nr="51" mi="1" ci="0" mb="0" cb="0"/><line nr="55" mi="10" ci="0" mb="0" cb="0"/><line nr="56" mi="4" ci="0" mb="0" cb="0"/><line nr="57" mi="10" ci="0" mb="0" cb="0"/><line nr="58" mi="4" ci="0" mb="0" cb="0"/><line nr="59" mi="10" ci="0" mb="0" cb="0"/><line nr="60" mi="4" ci="0" mb="0" cb="0"/><line nr="61" mi="10" ci="0" mb="0" cb="0"/><line nr="62" mi="4" ci="0" mb="0" cb="0"/><line nr="63" mi="10" ci="0" mb="0" cb="0"/><line nr="64" mi="4" ci="0" mb="0" cb="0"/><line nr="65" mi="10" ci="0" mb="0" cb="0"/><line nr="66" mi="4" ci="0" mb="0" cb="0"/><line nr="69" mi="6" ci="0" mb="0" cb="0"/><line nr="70" mi="7" ci="0" mb="0" cb="0"/><line nr="71" mi="1" ci="0" mb="0" cb="0"/><line nr="82" mi="3" ci="0" mb="0" cb="0"/><line nr="83" mi="4" ci="0" mb="0" cb="0"/><line nr="84" mi="3" ci="0" mb="0" cb="0"/><line nr="86" mi="3" ci="0" mb="0" cb="0"/><line nr="87" mi="4" ci="0" mb="0" cb="0"/><line nr="88" mi="3" ci="0" mb="0" cb="0"/><line nr="89" mi="5" ci="0" mb="0" cb="0"/><line nr="90" mi="3" ci="0" mb="0" cb="0"/><line nr="91" mi="6" ci="0" mb="0" cb="0"/><line nr="93" mi="4" ci="0" mb="0" cb="0"/><line nr="94" mi="3" ci="0" mb="0" cb="0"/><line nr="95" mi="6" ci="0" mb="0" cb="0"/><line nr="97" mi="5" ci="0" mb="0" cb="0"/><line nr="98" mi="6" ci="0" mb="0" cb="0"/><line nr="99" mi="2" ci="0" mb="0" cb="0"/><line nr="109" mi="5" ci="0" mb="7" cb="0"/><line nr="110" mi="5" ci="0" mb="0" cb="0"/><line nr="111" mi="5" ci="0" mb="0" cb="0"/><line nr="112" mi="6" ci="0" mb="0" cb="0"/><line nr="113" mi="6" ci="0" mb="0" cb="0"/><line nr="114" mi="6" ci="0" mb="0" cb="0"/><line nr="115" mi="5" ci="0" mb="0" cb="0"/><line nr="117" mi="1" ci="0" mb="0" cb="0"/><line nr="124" mi="7" ci="0" mb="0" cb="0"/><line nr="125" mi="7" ci="0" mb="0" cb="0"/><line nr="126" mi="1" ci="0" mb="0" cb="0"/><line nr="134" mi="5" ci="0" mb="0" cb="0"/><line nr="135" mi="1" ci="0" mb="0" cb="0"/><line nr="143" mi="5" ci="0" mb="0" cb="0"/><line nr="144" mi="7" ci="0" mb="0" cb="0"/><line nr="145" mi="3" ci="0" mb="0" cb="0"/><line nr="146" mi="4" ci="0" mb="0" cb="0"/><line nr="147" mi="6" ci="0" mb="0" cb="0"/><line nr="155" mi="7" ci="0" mb="0" cb="0"/><line nr="163" mi="9" ci="0" mb="0" cb="0"/><line nr="164" mi="1" ci="0" mb="0" cb="0"/><line nr="170" mi="6" ci="0" mb="0" cb="0"/><line nr="171" mi="1" ci="0" mb="0" cb="0"/><line nr="179" mi="8" ci="0" mb="2" cb="0"/><line nr="180" mi="8" ci="0" mb="2" cb="0"/><line nr="181" mi="8" ci="0" mb="2" cb="0"/><line nr="182" mi="8" ci="0" mb="2" cb="0"/><line nr="183" mi="8" ci="0" mb="2" cb="0"/><line nr="184" mi="8" ci="0" mb="2" cb="0"/><line nr="185" mi="1" ci="0" mb="0" cb="0"/><line nr="192" mi="4" ci="0" mb="0" cb="0"/><line nr="193" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="330" covered="0"/><counter type="BRANCH" missed="19" covered="0"/><counter type="LINE" missed="65" covered="0"/><counter type="COMPLEXITY" missed="31" covered="0"/><counter type="METHOD" missed="19" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="WaitingSceneController.java"><line nr="17" mi="2" ci="0" mb="0" cb="0"/><line nr="22" mi="3" ci="0" mb="0" cb="0"/><line nr="23" mi="3" ci="0" mb="0" cb="0"/><line nr="24" mi="6" ci="0" mb="0" cb="0"/><line nr="29" mi="1" ci="0" mb="0" cb="0"/><line nr="36" mi="4" ci="0" mb="0" cb="0"/><line nr="37" mi="3" ci="0" mb="0" cb="0"/><line nr="38" mi="3" ci="0" mb="0" cb="0"/><line nr="39" mi="5" ci="0" mb="0" cb="0"/><line nr="40" mi="6" ci="0" mb="0" cb="0"/><line nr="41" mi="6" ci="0" mb="0" cb="0"/><line nr="42" mi="1" ci="0" mb="0" cb="0"/><line nr="49" mi="3" ci="0" mb="0" cb="0"/><line nr="50" mi="2" ci="0" mb="0" cb="0"/><line nr="51" mi="1" ci="0" mb="0" cb="0"/><line nr="58" mi="3" ci="0" mb="0" cb="0"/><line nr="59" mi="2" ci="0" mb="0" cb="0"/><line nr="61" mi="1" ci="0" mb="0" cb="0"/><line nr="68" mi="3" ci="0" mb="0" cb="0"/><line nr="69" mi="2" ci="0" mb="0" cb="0"/><line nr="70" mi="1" ci="0" mb="0" cb="0"/><line nr="77" mi="3" ci="0" mb="0" cb="0"/><line nr="84" mi="10" ci="0" mb="0" cb="0"/><line nr="85" mi="1" ci="0" mb="0" cb="0"/><line nr="92" mi="5" ci="0" mb="2" cb="0"/><line nr="93" mi="9" ci="0" mb="0" cb="0"/><line nr="95" mi="1" ci="0" mb="0" cb="0"/><line nr="103" mi="5" ci="0" mb="0" cb="0"/><line nr="104" mi="3" ci="0" mb="0" cb="0"/><line nr="105" mi="7" ci="0" mb="0" cb="0"/><line nr="106" mi="4" ci="0" mb="0" cb="0"/><line nr="107" mi="6" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="115" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="32" covered="0"/><counter type="COMPLEXITY" missed="11" covered="0"/><counter type="METHOD" missed="10" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="RankingSceneController.java"><line nr="19" mi="3" ci="0" mb="0" cb="0"/><line nr="22" mi="3" ci="0" mb="0" cb="0"/><line nr="29" mi="1" ci="0" mb="0" cb="0"/><line nr="33" mi="5" ci="0" mb="0" cb="0"/><line nr="35" mi="2" ci="0" mb="0" cb="0"/><line nr="36" mi="2" ci="0" mb="0" cb="0"/><line nr="37" mi="1" ci="0" mb="0" cb="0"/><line nr="38" mi="1" ci="0" mb="0" cb="0"/><line nr="45" mi="4" ci="0" mb="0" cb="0"/><line nr="46" mi="3" ci="0" mb="0" cb="0"/><line nr="47" mi="3" ci="0" mb="0" cb="0"/><line nr="50" mi="6" ci="0" mb="0" cb="0"/><line nr="51" mi="5" ci="0" mb="0" cb="0"/><line nr="52" mi="3" ci="0" mb="0" cb="0"/><line nr="53" mi="5" ci="0" mb="0" cb="0"/><line nr="56" mi="8" ci="0" mb="0" cb="0"/><line nr="57" mi="3" ci="0" mb="0" cb="0"/><line nr="58" mi="5" ci="0" mb="0" cb="0"/><line nr="61" mi="10" ci="0" mb="2" cb="0"/><line nr="62" mi="3" ci="0" mb="0" cb="0"/><line nr="63" mi="5" ci="0" mb="0" cb="0"/><line nr="64" mi="10" ci="0" mb="2" cb="0"/><line nr="67" mi="18" ci="0" mb="0" cb="0"/><line nr="68" mi="6" ci="0" mb="0" cb="0"/><line nr="69" mi="1" ci="0" mb="0" cb="0"/><line nr="76" mi="2" ci="0" mb="2" cb="0"/><line nr="77" mi="5" ci="0" mb="0" cb="0"/><line nr="79" mi="4" ci="0" mb="0" cb="0"/><line nr="81" mi="1" ci="0" mb="0" cb="0"/><line nr="88" mi="3" ci="0" mb="0" cb="0"/><line nr="89" mi="7" ci="0" mb="0" cb="0"/><line nr="90" mi="5" ci="0" mb="0" cb="0"/><line nr="92" mi="3" ci="0" mb="0" cb="0"/><line nr="94" mi="7" ci="0" mb="0" cb="0"/><line nr="95" mi="4" ci="0" mb="0" cb="0"/><line nr="96" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="158" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="36" covered="0"/><counter type="COMPLEXITY" missed="11" covered="0"/><counter type="METHOD" missed="8" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><counter type="INSTRUCTION" missed="2642" covered="0"/><counter type="BRANCH" missed="119" covered="0"/><counter type="LINE" missed="599" covered="0"/><counter type="COMPLEXITY" missed="178" covered="0"/><counter type="METHOD" missed="116" covered="0"/><counter type="CLASS" missed="9" covered="0"/></package><package name="it/polimi/ingsw/server"><class name="it/polimi/ingsw/server/ServerRMIInterface" sourcefilename="ServerRMIInterface.java"/><class name="it/polimi/ingsw/server/MatchStatusObserver" sourcefilename="MatchStatusObserver.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/util/Map;)V" line="24"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="matchStarted" desc="()V" line="34"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneJoined" desc="(Lit/polimi/ingsw/gamemodel/Player;)V" line="41"><counter type="INSTRUCTION" missed="0" covered="1"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneQuit" desc="(Lit/polimi/ingsw/gamemodel/Player;)V" line="48"><counter type="INSTRUCTION" missed="0" covered="1"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneDrewInitialCard" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="55"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSetInitialSide" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Side;Ljava/util/Map;)V" line="62"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/utils/Pair;)V" line="69"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneChoseSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Objective;)V" line="76"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someonePlayedCard" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="88"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewCard" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/DrawSource;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/PlayableCard;)V" line="99"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSentBroadcastText" desc="(Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/String;)V" line="107"><counter type="INSTRUCTION" missed="0" covered="1"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="someoneSentPrivateText" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/String;)V" line="114"><counter type="INSTRUCTION" missed="0" covered="1"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="matchFinished" desc="()V" line="122"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="serializeMatch" desc="()V" line="131"><counter type="INSTRUCTION" missed="41" covered="0"/><counter type="LINE" missed="12" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="removeSerializedMatch" desc="()V" line="146"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="72" covered="13"/><counter type="LINE" missed="27" covered="8"/><counter type="COMPLEXITY" missed="10" covered="5"/><counter type="METHOD" missed="10" covered="5"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/server/Server" sourcefilename="Server.java"><method name="&lt;init&gt;" desc="(II)V" line="53"><counter type="INSTRUCTION" missed="0" covered="14"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getJoinableMatches" desc="()Ljava/util/List;" line="70"><counter type="INSTRUCTION" missed="54" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="joinMatch" desc="(Ljava/lang/String;Ljava/lang/String;)Lit/polimi/ingsw/controllers/PlayerControllerRMIInterface;" line="102"><counter type="INSTRUCTION" missed="56" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="10" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="createMatch" desc="(Ljava/lang/String;I)V" line="127"><counter type="INSTRUCTION" missed="10" covered="34"/><counter type="BRANCH" missed="2" covered="2"/><counter type="LINE" missed="2" covered="8"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="ping" desc="()Z" line="149"><counter type="INSTRUCTION" missed="2" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getJoinableMatchesMap" desc="()Ljava/util/Map;" line="156"><counter type="INSTRUCTION" missed="0" covered="35"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getMatch" desc="(Ljava/lang/String;)Lit/polimi/ingsw/gamemodel/Match;" line="172"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="startRMIServer" desc="()V" line="181"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="startTCPServer" desc="()V" line="189"><counter type="INSTRUCTION" missed="18" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="main" desc="([Ljava/lang/String;)V" line="198"><counter type="INSTRUCTION" missed="38" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="12" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="loadCrashedMatches" desc="()V" line="220"><counter type="INSTRUCTION" missed="75" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="17" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getNewMatch" desc="(I)Lit/polimi/ingsw/gamemodel/Match;" line="252"><counter type="INSTRUCTION" missed="0" covered="17"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$loadCrashedMatches$2" desc="(Lit/polimi/ingsw/gamemodel/Player;)V" line="234"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$loadCrashedMatches$1" desc="(Ljava/io/File;Ljava/lang/String;)Z" line="221"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$getJoinableMatches$0" desc="(Ljava/lang/String;)Z" line="71"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="282" covered="106"/><counter type="BRANCH" missed="20" covered="4"/><counter type="LINE" missed="59" covered="23"/><counter type="COMPLEXITY" missed="21" covered="6"/><counter type="METHOD" missed="10" covered="5"/><counter type="CLASS" missed="0" covered="1"/></class><sourcefile name="Server.java"><line nr="53" mi="0" ci="2" mb="0" cb="0"/><line nr="55" mi="0" ci="3" mb="0" cb="0"/><line nr="56" mi="0" ci="3" mb="0" cb="0"/><line nr="58" mi="0" ci="5" mb="0" cb="0"/><line nr="59" mi="0" ci="1" mb="0" cb="0"/><line nr="70" mi="6" ci="0" mb="0" cb="0"/><line nr="71" mi="12" ci="0" mb="2" cb="0"/><line nr="72" mi="2" ci="0" mb="0" cb="0"/><line nr="73" mi="4" ci="0" mb="0" cb="0"/><line nr="75" mi="12" ci="0" mb="2" cb="0"/><line nr="76" mi="6" ci="0" mb="0" cb="0"/><line nr="77" mi="3" ci="0" mb="0" cb="0"/><line nr="78" mi="4" ci="0" mb="0" cb="0"/><line nr="80" mi="13" ci="0" mb="0" cb="0"/><line nr="81" mi="1" ci="0" mb="0" cb="0"/><line nr="83" mi="2" ci="0" mb="0" cb="0"/><line nr="102" mi="3" ci="0" mb="2" cb="0"/><line nr="103" mi="5" ci="0" mb="0" cb="0"/><line nr="104" mi="5" ci="0" mb="2" cb="0"/><line nr="105" mi="5" ci="0" mb="0" cb="0"/><line nr="106" mi="14" ci="0" mb="4" cb="0"/><line nr="107" mi="5" ci="0" mb="0" cb="0"/><line nr="109" mi="6" ci="0" mb="0" cb="0"/><line nr="110" mi="6" ci="0" mb="0" cb="0"/><line nr="112" mi="5" ci="0" mb="0" cb="0"/><line nr="114" mi="2" ci="0" mb="0" cb="0"/><line nr="127" mi="0" ci="3" mb="1" cb="1"/><line nr="128" mi="5" ci="0" mb="0" cb="0"/><line nr="130" mi="0" ci="5" mb="0" cb="0"/><line nr="131" mi="0" ci="5" mb="1" cb="1"/><line nr="132" mi="5" ci="0" mb="0" cb="0"/><line nr="134" mi="0" ci="3" mb="0" cb="0"/><line nr="135" mi="0" ci="8" mb="0" cb="0"/><line nr="136" mi="0" ci="6" mb="0" cb="0"/><line nr="137" mi="0" ci="3" mb="0" cb="0"/><line nr="138" mi="0" ci="1" mb="0" cb="0"/><line nr="149" mi="2" ci="0" mb="0" cb="0"/><line nr="156" mi="0" ci="5" mb="0" cb="0"/><line nr="157" mi="0" ci="4" mb="0" cb="0"/><line nr="158" mi="0" ci="12" mb="0" cb="2"/><line nr="159" mi="0" ci="9" mb="0" cb="0"/><line nr="160" mi="0" ci="1" mb="0" cb="0"/><line nr="161" mi="0" ci="4" mb="0" cb="0"/><line nr="172" mi="0" ci="6" mb="0" cb="0"/><line nr="181" mi="4" ci="0" mb="0" cb="0"/><line nr="182" mi="4" ci="0" mb="0" cb="0"/><line nr="183" mi="1" ci="0" mb="0" cb="0"/><line nr="189" mi="8" ci="0" mb="0" cb="0"/><line nr="190" mi="9" ci="0" mb="0" cb="0"/><line nr="191" mi="1" ci="0" mb="0" cb="0"/><line nr="198" mi="4" ci="0" mb="2" cb="0"/><line nr="199" mi="3" ci="0" mb="0" cb="0"/><line nr="200" mi="3" ci="0" mb="0" cb="0"/><line nr="201" mi="2" ci="0" mb="0" cb="0"/><line nr="202" mi="3" ci="0" mb="0" cb="0"/><line nr="204" mi="5" ci="0" mb="0" cb="0"/><line nr="205" mi="5" ci="0" mb="0" cb="0"/><line nr="208" mi="6" ci="0" mb="0" cb="0"/><line nr="210" mi="2" ci="0" mb="0" cb="0"/><line nr="211" mi="2" ci="0" mb="0" cb="0"/><line nr="212" mi="2" ci="0" mb="0" cb="0"/><line nr="213" mi="1" ci="0" mb="0" cb="0"/><line nr="220" mi="5" ci="0" mb="0" cb="0"/><line nr="221" mi="9" ci="0" mb="0" cb="0"/><line nr="223" mi="2" ci="0" mb="2" cb="0"/><line nr="224" mi="16" ci="0" mb="2" cb="0"/><line nr="227" mi="5" ci="0" mb="0" cb="0"/><line nr="228" mi="5" ci="0" mb="0" cb="0"/><line nr="231" mi="6" ci="0" mb="0" cb="0"/><line nr="232" mi="4" ci="0" mb="0" cb="0"/><line nr="233" mi="6" ci="0" mb="0" cb="0"/><line nr="234" mi="8" ci="0" mb="0" cb="0"/><line nr="235" mi="8" ci="0" mb="0" cb="0"/><line nr="236" mi="2" ci="0" mb="0" cb="0"/><line nr="237" mi="2" ci="0" mb="0" cb="0"/><line nr="238" mi="1" ci="0" mb="0" cb="0"/><line nr="239" mi="3" ci="0" mb="0" cb="0"/><line nr="240" mi="1" ci="0" mb="0" cb="0"/><line nr="243" mi="1" ci="0" mb="0" cb="0"/><line nr="252" mi="0" ci="4" mb="0" cb="0"/><line nr="253" mi="0" ci="11" mb="0" cb="0"/><line nr="254" mi="0" ci="2" mb="0" cb="0"/><counter type="INSTRUCTION" missed="282" covered="106"/><counter type="BRANCH" missed="20" covered="4"/><counter type="LINE" missed="59" covered="23"/><counter type="COMPLEXITY" missed="21" covered="6"/><counter type="METHOD" missed="10" covered="5"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="MatchStatusObserver.java"><line nr="24" mi="0" ci="2" mb="0" cb="0"/><line nr="25" mi="0" ci="3" mb="0" cb="0"/><line nr="26" mi="0" ci="3" mb="0" cb="0"/><line nr="27" mi="0" ci="1" mb="0" cb="0"/><line nr="34" mi="1" ci="0" mb="0" cb="0"/><line nr="41" mi="0" ci="1" mb="0" cb="0"/><line nr="48" mi="0" ci="1" mb="0" cb="0"/><line nr="55" mi="1" ci="0" mb="0" cb="0"/><line nr="62" mi="1" ci="0" mb="0" cb="0"/><line nr="69" mi="1" ci="0" mb="0" cb="0"/><line nr="76" mi="1" ci="0" mb="0" cb="0"/><line nr="88" mi="2" ci="0" mb="0" cb="0"/><line nr="89" mi="1" ci="0" mb="0" cb="0"/><line nr="99" mi="2" ci="0" mb="0" cb="0"/><line nr="100" mi="1" ci="0" mb="0" cb="0"/><line nr="107" mi="0" ci="1" mb="0" cb="0"/><line nr="114" mi="0" ci="1" mb="0" cb="0"/><line nr="122" mi="6" ci="0" mb="0" cb="0"/><line nr="123" mi="2" ci="0" mb="0" cb="0"/><line nr="124" mi="1" ci="0" mb="0" cb="0"/><line nr="131" mi="7" ci="0" mb="0" cb="0"/><line nr="132" mi="5" ci="0" mb="0" cb="0"/><line nr="133" mi="7" ci="0" mb="0" cb="0"/><line nr="134" mi="4" ci="0" mb="0" cb="0"/><line nr="135" mi="3" ci="0" mb="0" cb="0"/><line nr="136" mi="2" ci="0" mb="0" cb="0"/><line nr="137" mi="2" ci="0" mb="0" cb="0"/><line nr="138" mi="3" ci="0" mb="0" cb="0"/><line nr="139" mi="1" ci="0" mb="0" cb="0"/><line nr="140" mi="5" ci="0" mb="0" cb="0"/><line nr="141" mi="1" ci="0" mb="0" cb="0"/><line nr="142" mi="1" ci="0" mb="0" cb="0"/><line nr="146" mi="7" ci="0" mb="0" cb="0"/><line nr="147" mi="3" ci="0" mb="0" cb="0"/><line nr="148" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="72" covered="13"/><counter type="LINE" missed="27" covered="8"/><counter type="COMPLEXITY" missed="10" covered="5"/><counter type="METHOD" missed="10" covered="5"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="ServerRMIInterface.java"/><counter type="INSTRUCTION" missed="354" covered="119"/><counter type="BRANCH" missed="20" covered="4"/><counter type="LINE" missed="86" covered="31"/><counter type="COMPLEXITY" missed="31" covered="11"/><counter type="METHOD" missed="20" covered="10"/><counter type="CLASS" missed="0" covered="2"/></package><package name="it/polimi/ingsw/utils"><class name="it/polimi/ingsw/utils/TUICardParser" sourcefilename="TUICardParser.java"><method name="&lt;init&gt;" desc="()V" line="9"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getGenericBack" desc="(Lit/polimi/ingsw/gamemodel/Symbol;Lit/polimi/ingsw/utils/Pair;)Ljava/lang/String;" line="13"><counter type="INSTRUCTION" missed="18" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="parseCard" desc="(Lit/polimi/ingsw/gamemodel/Card;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/utils/Pair;Ljava/lang/Boolean;)Ljava/lang/String;" line="41"><counter type="INSTRUCTION" missed="144" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="22" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="parseObjective" desc="(Lit/polimi/ingsw/gamemodel/Objective;Lit/polimi/ingsw/utils/Pair;)Ljava/lang/String;" line="81"><counter type="INSTRUCTION" missed="39" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="assembleCard" desc="(Ljava/lang/StringBuilder;Ljava/util/Map;Ljava/util/Map;)V" line="102"><counter type="INSTRUCTION" missed="75" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="12" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="acquireCornerSymbols" desc="(Ljava/util/Map;Lit/polimi/ingsw/gamemodel/Card;Ljava/lang/Boolean;)V" line="125"><counter type="INSTRUCTION" missed="59" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="acquireCenterSymbols" desc="(Ljava/util/Set;Lit/polimi/ingsw/gamemodel/Card;Ljava/lang/Boolean;)V" line="141"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="processCorners" desc="(Ljava/util/Map;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Ljava/lang/String;)V" line="154"><counter type="INSTRUCTION" missed="87" covered="0"/><counter type="BRANCH" missed="7" covered="0"/><counter type="LINE" missed="18" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlayableCoord" desc="(Ljava/lang/Integer;Ljava/lang/Integer;)Ljava/lang/String;" line="187"><counter type="INSTRUCTION" missed="34" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="processCenter" desc="(Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Ljava/util/Set;Lit/polimi/ingsw/gamemodel/GoldCard;)V" line="198"><counter type="INSTRUCTION" missed="132" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="25" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="processCenter" desc="(Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Ljava/util/Set;Lit/polimi/ingsw/gamemodel/ResourceCard;)V" line="241"><counter type="INSTRUCTION" missed="90" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="15" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="processCenter" desc="(Ljava/util/Map;Ljava/util/Set;Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="266"><counter type="INSTRUCTION" missed="128" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="20" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="processObjectiveCorners" desc="(Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;)V" line="299"><counter type="INSTRUCTION" missed="47" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="processObjectiveCenter" desc="(Ljava/util/Map;Lit/polimi/ingsw/gamemodel/Objective;)V" line="312"><counter type="INSTRUCTION" missed="183" covered="0"/><counter type="BRANCH" missed="11" covered="0"/><counter type="LINE" missed="35" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getQuantityString" desc="(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/String;" line="361"><counter type="INSTRUCTION" missed="36" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPrefixCoord" desc="(Lit/polimi/ingsw/utils/Pair;I)Ljava/lang/String;" line="372"><counter type="INSTRUCTION" missed="60" covered="0"/><counter type="BRANCH" missed="7" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getColorAndIcon" desc="(Lit/polimi/ingsw/gamemodel/Symbol;)Ljava/lang/String;" line="387"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getRightColor" desc="(Lit/polimi/ingsw/gamemodel/Symbol;)Ljava/lang/String;" line="397"><counter type="INSTRUCTION" missed="21" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="8" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getRightIcon" desc="(Lit/polimi/ingsw/gamemodel/Symbol;)Ljava/lang/String;" line="417"><counter type="INSTRUCTION" missed="25" covered="0"/><counter type="BRANCH" missed="10" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="10" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getTopLeftCorner" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/Symbol;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;" line="432"><counter type="INSTRUCTION" missed="70" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="10" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getTopRightCorner" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/Symbol;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;" line="453"><counter type="INSTRUCTION" missed="46" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="10" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getBottomLeftCorner" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/Symbol;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;" line="474"><counter type="INSTRUCTION" missed="70" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="10" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getBottomRightCorner" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/Symbol;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;" line="495"><counter type="INSTRUCTION" missed="46" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="10" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPosixIcon" desc="(Lit/polimi/ingsw/gamemodel/Symbol;)Ljava/lang/String;" line="516"><counter type="INSTRUCTION" missed="29" covered="0"/><counter type="BRANCH" missed="5" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="positioningClassifier" desc="(Ljava/util/Map;Ljava/util/Map;)V" line="532"><counter type="INSTRUCTION" missed="121" covered="0"/><counter type="BRANCH" missed="16" covered="0"/><counter type="LINE" missed="20" covered="0"/><counter type="COMPLEXITY" missed="9" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getObjectiveSpace" desc="(Ljava/lang/Integer;)Ljava/lang/String;" line="565"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="1597" covered="0"/><counter type="BRANCH" missed="114" covered="0"/><counter type="LINE" missed="296" covered="0"/><counter type="COMPLEXITY" missed="101" covered="0"/><counter type="METHOD" missed="26" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/utils/CardsSerializer" sourcefilename="CardsSerializer.java"><method name="&lt;init&gt;" desc="()V" line="14"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="main" desc="([Ljava/lang/String;)V" line="33"><counter type="INSTRUCTION" missed="3708" covered="0"/><counter type="LINE" missed="734" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="3711" covered="0"/><counter type="LINE" missed="735" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/utils/MessageJsonParser$MessageTypeAdapter" sourcefilename="MessageJsonParser.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/utils/MessageJsonParser;)V" line="38"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="deserialize" desc="(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Lit/polimi/ingsw/network/messages/Message;" line="42"><counter type="INSTRUCTION" missed="18" covered="31"/><counter type="BRANCH" missed="3" covered="3"/><counter type="LINE" missed="3" covered="5"/><counter type="COMPLEXITY" missed="2" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="convertError" desc="(Ljava/lang/String;Lcom/google/gson/JsonObject;Lcom/google/gson/JsonDeserializationContext;)Lit/polimi/ingsw/network/messages/Message;" line="56"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="convertClass" desc="(Ljava/lang/Class;Ljava/lang/String;Lcom/google/gson/JsonObject;Lcom/google/gson/JsonDeserializationContext;)Lit/polimi/ingsw/network/messages/Message;" line="60"><counter type="INSTRUCTION" missed="0" covered="26"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$convertClass$0" desc="(Ljava/lang/String;Ljava/lang/Class;)Z" line="62"><counter type="INSTRUCTION" missed="0" covered="8"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="24" covered="68"/><counter type="BRANCH" missed="3" covered="5"/><counter type="LINE" missed="4" covered="13"/><counter type="COMPLEXITY" missed="3" covered="6"/><counter type="METHOD" missed="1" covered="4"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/Pair" sourcefilename="Pair.java"><method name="&lt;init&gt;" desc="(Ljava/lang/Object;Ljava/lang/Object;)V" line="14"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/CardsManager$4" sourcefilename="CardsManager.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/utils/CardsManager;)V" line="39"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/CardsManager$1" sourcefilename="CardsManager.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/utils/CardsManager;)V" line="36"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/CardsManager$2" sourcefilename="CardsManager.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/utils/CardsManager;)V" line="37"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/CardsManager$3" sourcefilename="CardsManager.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/utils/CardsManager;)V" line="38"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/CardJsonParser" sourcefilename="CardJsonParser.java"><method name="&lt;init&gt;" desc="()V" line="18"><counter type="INSTRUCTION" missed="0" covered="16"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getCardBuilder" desc="()Lcom/google/gson/Gson;" line="27"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="19"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/LeaderboardEntry" sourcefilename="LeaderboardEntry.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/Integer;Z)V" line="12"><counter type="INSTRUCTION" missed="0" covered="12"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="12"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/GuiUtil" sourcefilename="GuiUtil.java"><method name="&lt;init&gt;" desc="()V" line="15"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getFromFXML" desc="(Ljava/lang/String;)Ljava/lang/Object;" line="29"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="isValidName" desc="(Ljava/lang/String;)Z" line="40"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getLoader" desc="(Ljava/lang/String;)Ljavafx/fxml/FXMLLoader;" line="49"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="applyCSS" desc="(Ljavafx/scene/Parent;Ljava/lang/String;)V" line="58"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getImagePath" desc="(Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)Ljava/lang/String;" line="68"><counter type="INSTRUCTION" missed="34" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getResourcesBack" desc="(Lit/polimi/ingsw/gamemodel/Symbol;)Ljava/lang/String;" line="84"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getGoldsBack" desc="(Lit/polimi/ingsw/gamemodel/Symbol;)Ljava/lang/String;" line="94"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getImagePath" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;Lit/polimi/ingsw/gamemodel/Side;)Ljava/lang/String;" line="105"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getImagePath" desc="(Lit/polimi/ingsw/gamemodel/Objective;Lit/polimi/ingsw/gamemodel/Side;)Ljava/lang/String;" line="115"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPawnImagePath" desc="(Lit/polimi/ingsw/gamemodel/Color;)Ljava/lang/String;" line="127"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getBlackPawnImagePath" desc="()Ljava/lang/String;" line="135"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getHexFromColor" desc="(Lit/polimi/ingsw/gamemodel/Color;)Ljava/lang/String;" line="144"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getExceptionTitle" desc="(Ljava/lang/Exception;)Ljava/lang/String;" line="158"><counter type="INSTRUCTION" missed="38" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;clinit&gt;" desc="()V" line="16"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="160" covered="13"/><counter type="BRANCH" missed="16" covered="0"/><counter type="LINE" missed="33" covered="5"/><counter type="COMPLEXITY" missed="24" covered="2"/><counter type="METHOD" missed="13" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/DeckCreator" sourcefilename="DeckCreator.java"><method name="&lt;init&gt;" desc="()V" line="11"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="createInitialDeck" desc="()Lit/polimi/ingsw/gamemodel/GameDeck;" line="18"><counter type="INSTRUCTION" missed="0" covered="24"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="createResourceDeck" desc="()Lit/polimi/ingsw/gamemodel/GameDeck;" line="33"><counter type="INSTRUCTION" missed="0" covered="24"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="createGoldDeck" desc="()Lit/polimi/ingsw/gamemodel/GameDeck;" line="48"><counter type="INSTRUCTION" missed="0" covered="24"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="createObjectiveDeck" desc="()Lit/polimi/ingsw/gamemodel/GameDeck;" line="63"><counter type="INSTRUCTION" missed="0" covered="24"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="99"/><counter type="BRANCH" missed="0" covered="8"/><counter type="LINE" missed="0" covered="25"/><counter type="COMPLEXITY" missed="0" covered="9"/><counter type="METHOD" missed="0" covered="5"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/CardsManager" sourcefilename="CardsManager.java"><method name="&lt;init&gt;" desc="()V" line="32"><counter type="INSTRUCTION" missed="6" covered="71"/><counter type="LINE" missed="2" covered="13"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getResource" desc="(Ljava/lang/String;)Ljava/lang/String;" line="53"><counter type="INSTRUCTION" missed="6" covered="9"/><counter type="LINE" missed="2" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getInstance" desc="()Lit/polimi/ingsw/utils/CardsManager;" line="65"><counter type="INSTRUCTION" missed="0" covered="2"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getInitialCards" desc="()Ljava/util/Map;" line="74"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getGoldCards" desc="()Ljava/util/Map;" line="83"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getResourceCards" desc="()Ljava/util/Map;" line="92"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getObjectives" desc="()Ljava/util/Map;" line="101"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getPlayableCards" desc="()Ljava/util/Map;" line="110"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;clinit&gt;" desc="()V" line="20"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="26" covered="99"/><counter type="LINE" missed="8" covered="20"/><counter type="COMPLEXITY" missed="1" covered="8"/><counter type="METHOD" missed="1" covered="8"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/RequestStatus" sourcefilename="RequestStatus.java"><method name="&lt;clinit&gt;" desc="()V" line="9"><counter type="INSTRUCTION" missed="21" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="21" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/utils/AvailableMatch" sourcefilename="AvailableMatch.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Z)V" line="14"><counter type="INSTRUCTION" missed="0" covered="15"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="15"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/MessageJsonParser" sourcefilename="MessageJsonParser.java"><method name="&lt;init&gt;" desc="()V" line="17"><counter type="INSTRUCTION" missed="0" covered="15"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getMessageBuilder" desc="()Lcom/google/gson/Gson;" line="22"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="toMessage" desc="(Ljava/lang/String;)Lit/polimi/ingsw/network/messages/Message;" line="28"><counter type="INSTRUCTION" missed="0" covered="13"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="toJson" desc="(Lit/polimi/ingsw/network/messages/Message;)Ljava/lang/String;" line="35"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="3" covered="33"/><counter type="LINE" missed="1" covered="7"/><counter type="COMPLEXITY" missed="1" covered="3"/><counter type="METHOD" missed="1" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/CardJsonParser$CardTypeAdapter" sourcefilename="CardJsonParser.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/utils/CardJsonParser;)V" line="30"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="deserialize" desc="(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Lit/polimi/ingsw/gamemodel/Requirement;" line="33"><counter type="INSTRUCTION" missed="18" covered="39"/><counter type="BRANCH" missed="2" covered="4"/><counter type="LINE" missed="4" covered="9"/><counter type="COMPLEXITY" missed="2" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="decodePair" desc="(Ljava/lang/String;)Lit/polimi/ingsw/utils/Pair;" line="65"><counter type="INSTRUCTION" missed="0" covered="29"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="decodeMap" desc="(Lcom/google/gson/JsonObject;)Ljava/util/Map;" line="77"><counter type="INSTRUCTION" missed="0" covered="33"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$deserialize$0" desc="(Lcom/google/gson/JsonObject;Lit/polimi/ingsw/gamemodel/Symbol;)Z" line="48"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="18" covered="109"/><counter type="BRANCH" missed="2" covered="6"/><counter type="LINE" missed="4" covered="19"/><counter type="COMPLEXITY" missed="2" covered="7"/><counter type="METHOD" missed="0" covered="5"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/utils/PlacedCardRecord" sourcefilename="PlacedCardRecord.java"><method name="&lt;init&gt;" desc="(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Lit/polimi/ingsw/gamemodel/Side;)V" line="13"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><sourcefile name="GuiUtil.java"><line nr="15" mi="3" ci="0" mb="0" cb="0"/><line nr="16" mi="0" ci="2" mb="0" cb="0"/><line nr="17" mi="0" ci="2" mb="0" cb="0"/><line nr="18" mi="0" ci="2" mb="0" cb="0"/><line nr="19" mi="0" ci="3" mb="0" cb="0"/><line nr="29" mi="3" ci="0" mb="0" cb="0"/><line nr="30" mi="3" ci="0" mb="0" cb="0"/><line nr="40" mi="0" ci="4" mb="0" cb="0"/><line nr="49" mi="7" ci="0" mb="0" cb="0"/><line nr="58" mi="13" ci="0" mb="0" cb="0"/><line nr="59" mi="1" ci="0" mb="0" cb="0"/><line nr="68" mi="4" ci="0" mb="2" cb="0"/><line nr="69" mi="5" ci="0" mb="0" cb="0"/><line nr="71" mi="12" ci="0" mb="2" cb="0"/><line nr="72" mi="7" ci="0" mb="0" cb="0"/><line nr="73" mi="6" ci="0" mb="0" cb="0"/><line nr="84" mi="4" ci="0" mb="0" cb="0"/><line nr="85" mi="4" ci="0" mb="0" cb="0"/><line nr="94" mi="4" ci="0" mb="0" cb="0"/><line nr="95" mi="4" ci="0" mb="0" cb="0"/><line nr="105" mi="7" ci="0" mb="0" cb="0"/><line nr="115" mi="4" ci="0" mb="2" cb="0"/><line nr="116" mi="5" ci="0" mb="0" cb="0"/><line nr="118" mi="3" ci="0" mb="0" cb="0"/><line nr="127" mi="7" ci="0" mb="0" cb="0"/><line nr="135" mi="3" ci="0" mb="0" cb="0"/><line nr="144" mi="6" ci="0" mb="4" cb="0"/><line nr="145" mi="2" ci="0" mb="0" cb="0"/><line nr="146" mi="2" ci="0" mb="0" cb="0"/><line nr="147" mi="2" ci="0" mb="0" cb="0"/><line nr="148" mi="1" ci="0" mb="0" cb="0"/><line nr="158" mi="12" ci="0" mb="6" cb="0"/><line nr="159" mi="5" ci="0" mb="0" cb="0"/><line nr="160" mi="5" ci="0" mb="0" cb="0"/><line nr="161" mi="5" ci="0" mb="0" cb="0"/><line nr="162" mi="5" ci="0" mb="0" cb="0"/><line nr="163" mi="5" ci="0" mb="0" cb="0"/><line nr="164" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="160" covered="13"/><counter type="BRANCH" missed="16" covered="0"/><counter type="LINE" missed="33" covered="5"/><counter type="COMPLEXITY" missed="24" covered="2"/><counter type="METHOD" missed="13" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="PlacedCardRecord.java"><line nr="13" mi="15" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="RequestStatus.java"><line nr="9" mi="3" ci="0" mb="0" cb="0"/><line nr="10" mi="6" ci="0" mb="0" cb="0"/><line nr="11" mi="6" ci="0" mb="0" cb="0"/><line nr="12" mi="6" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="21" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="DeckCreator.java"><line nr="11" mi="0" ci="3" mb="0" cb="0"/><line nr="18" mi="0" ci="4" mb="0" cb="0"/><line nr="19" mi="0" ci="3" mb="0" cb="0"/><line nr="21" mi="0" ci="11" mb="0" cb="2"/><line nr="22" mi="0" ci="3" mb="0" cb="0"/><line nr="23" mi="0" ci="1" mb="0" cb="0"/><line nr="25" mi="0" ci="2" mb="0" cb="0"/><line nr="33" mi="0" ci="4" mb="0" cb="0"/><line nr="34" mi="0" ci="3" mb="0" cb="0"/><line nr="36" mi="0" ci="11" mb="0" cb="2"/><line nr="37" mi="0" ci="3" mb="0" cb="0"/><line nr="38" mi="0" ci="1" mb="0" cb="0"/><line nr="40" mi="0" ci="2" mb="0" cb="0"/><line nr="48" mi="0" ci="4" mb="0" cb="0"/><line nr="49" mi="0" ci="3" mb="0" cb="0"/><line nr="51" mi="0" ci="11" mb="0" cb="2"/><line nr="52" mi="0" ci="3" mb="0" cb="0"/><line nr="53" mi="0" ci="1" mb="0" cb="0"/><line nr="55" mi="0" ci="2" mb="0" cb="0"/><line nr="63" mi="0" ci="4" mb="0" cb="0"/><line nr="64" mi="0" ci="3" mb="0" cb="0"/><line nr="66" mi="0" ci="11" mb="0" cb="2"/><line nr="67" mi="0" ci="3" mb="0" cb="0"/><line nr="68" mi="0" ci="1" mb="0" cb="0"/><line nr="70" mi="0" ci="2" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="99"/><counter type="BRANCH" missed="0" covered="8"/><counter type="LINE" missed="0" covered="25"/><counter type="COMPLEXITY" missed="0" covered="9"/><counter type="METHOD" missed="0" covered="5"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="CardsManager.java"><line nr="20" mi="0" ci="5" mb="0" cb="0"/><line nr="32" mi="0" ci="2" mb="0" cb="0"/><line nr="33" mi="0" ci="4" mb="0" cb="0"/><line nr="34" mi="0" ci="3" mb="0" cb="0"/><line nr="36" mi="0" ci="9" mb="0" cb="0"/><line nr="37" mi="0" ci="9" mb="0" cb="0"/><line nr="38" mi="0" ci="9" mb="0" cb="0"/><line nr="39" mi="0" ci="9" mb="0" cb="0"/><line nr="42" mi="0" ci="9" mb="0" cb="0"/><line nr="43" mi="0" ci="9" mb="0" cb="0"/><line nr="44" mi="0" ci="9" mb="0" cb="0"/><line nr="45" mi="0" ci="9" mb="0" cb="0"/><line nr="46" mi="1" ci="0" mb="0" cb="0"/><line nr="47" mi="5" ci="0" mb="0" cb="0"/><line nr="48" mi="0" ci="1" mb="0" cb="0"/><line nr="49" mi="0" ci="1" mb="0" cb="0"/><line nr="53" mi="0" ci="9" mb="0" cb="0"/><line nr="54" mi="1" ci="0" mb="0" cb="0"/><line nr="55" mi="5" ci="0" mb="0" cb="0"/><line nr="65" mi="0" ci="2" mb="0" cb="0"/><line nr="74" mi="0" ci="3" mb="0" cb="0"/><line nr="83" mi="0" ci="3" mb="0" cb="0"/><line nr="92" mi="0" ci="3" mb="0" cb="0"/><line nr="101" mi="0" ci="3" mb="0" cb="0"/><line nr="110" mi="4" ci="0" mb="0" cb="0"/><line nr="111" mi="4" ci="0" mb="0" cb="0"/><line nr="112" mi="4" ci="0" mb="0" cb="0"/><line nr="114" mi="2" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="26" covered="111"/><counter type="LINE" missed="8" covered="20"/><counter type="COMPLEXITY" missed="1" covered="12"/><counter type="METHOD" missed="1" covered="12"/><counter type="CLASS" missed="0" covered="5"/></sourcefile><sourcefile name="Pair.java"><line nr="14" mi="0" ci="9" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="AvailableMatch.java"><line nr="14" mi="0" ci="15" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="15"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="TUICardParser.java"><line nr="9" mi="3" ci="0" mb="0" cb="0"/><line nr="13" mi="7" ci="0" mb="0" cb="0"/><line nr="14" mi="8" ci="0" mb="0" cb="0"/><line nr="15" mi="1" ci="0" mb="0" cb="0"/><line nr="16" mi="2" ci="0" mb="0" cb="0"/><line nr="41" mi="4" ci="0" mb="0" cb="0"/><line nr="42" mi="5" ci="0" mb="0" cb="0"/><line nr="44" mi="4" ci="0" mb="0" cb="0"/><line nr="45" mi="5" ci="0" mb="0" cb="0"/><line nr="48" mi="11" ci="0" mb="4" cb="0"/><line nr="49" mi="6" ci="0" mb="0" cb="0"/><line nr="50" mi="9" ci="0" mb="0" cb="0"/><line nr="51" mi="9" ci="0" mb="0" cb="0"/><line nr="52" mi="8" ci="0" mb="0" cb="0"/><line nr="57" mi="4" ci="0" mb="0" cb="0"/><line nr="58" mi="6" ci="0" mb="0" cb="0"/><line nr="60" mi="4" ci="0" mb="0" cb="0"/><line nr="61" mi="11" ci="0" mb="4" cb="0"/><line nr="62" mi="9" ci="0" mb="0" cb="0"/><line nr="63" mi="10" ci="0" mb="0" cb="0"/><line nr="64" mi="10" ci="0" mb="0" cb="0"/><line nr="65" mi="8" ci="0" mb="0" cb="0"/><line nr="69" mi="2" ci="0" mb="0" cb="0"/><line nr="70" mi="7" ci="0" mb="0" cb="0"/><line nr="71" mi="5" ci="0" mb="0" cb="0"/><line nr="72" mi="4" ci="0" mb="0" cb="0"/><line nr="75" mi="3" ci="0" mb="0" cb="0"/><line nr="81" mi="4" ci="0" mb="0" cb="0"/><line nr="82" mi="4" ci="0" mb="0" cb="0"/><line nr="84" mi="4" ci="0" mb="0" cb="0"/><line nr="85" mi="4" ci="0" mb="0" cb="0"/><line nr="88" mi="4" ci="0" mb="0" cb="0"/><line nr="89" mi="7" ci="0" mb="0" cb="0"/><line nr="90" mi="5" ci="0" mb="0" cb="0"/><line nr="91" mi="4" ci="0" mb="0" cb="0"/><line nr="94" mi="3" ci="0" mb="0" cb="0"/><line nr="102" mi="8" ci="0" mb="0" cb="0"/><line nr="103" mi="4" ci="0" mb="0" cb="0"/><line nr="104" mi="4" ci="0" mb="0" cb="0"/><line nr="105" mi="4" ci="0" mb="0" cb="0"/><line nr="106" mi="4" ci="0" mb="0" cb="0"/><line nr="109" mi="7" ci="0" mb="2" cb="0"/><line nr="110" mi="7" ci="0" mb="2" cb="0"/><line nr="111" mi="4" ci="0" mb="0" cb="0"/><line nr="113" mi="12" ci="0" mb="0" cb="0"/><line nr="114" mi="8" ci="0" mb="0" cb="0"/><line nr="115" mi="12" ci="0" mb="0" cb="0"/><line nr="118" mi="1" ci="0" mb="0" cb="0"/><line nr="125" mi="7" ci="0" mb="2" cb="0"/><line nr="126" mi="6" ci="0" mb="0" cb="0"/><line nr="127" mi="6" ci="0" mb="0" cb="0"/><line nr="128" mi="6" ci="0" mb="0" cb="0"/><line nr="129" mi="6" ci="0" mb="0" cb="0"/><line nr="131" mi="5" ci="0" mb="0" cb="0"/><line nr="132" mi="5" ci="0" mb="0" cb="0"/><line nr="133" mi="5" ci="0" mb="0" cb="0"/><line nr="134" mi="5" ci="0" mb="0" cb="0"/><line nr="135" mi="1" ci="0" mb="0" cb="0"/><line nr="136" mi="5" ci="0" mb="0" cb="0"/><line nr="137" mi="1" ci="0" mb="0" cb="0"/><line nr="138" mi="1" ci="0" mb="0" cb="0"/><line nr="141" mi="7" ci="0" mb="2" cb="0"/><line nr="142" mi="7" ci="0" mb="0" cb="0"/><line nr="143" mi="1" ci="0" mb="0" cb="0"/><line nr="154" mi="11" ci="0" mb="2" cb="0"/><line nr="155" mi="4" ci="0" mb="0" cb="0"/><line nr="157" mi="5" ci="0" mb="5" cb="0"/><line nr="159" mi="2" ci="0" mb="0" cb="0"/><line nr="160" mi="12" ci="0" mb="0" cb="0"/><line nr="161" mi="1" ci="0" mb="0" cb="0"/><line nr="164" mi="2" ci="0" mb="0" cb="0"/><line nr="165" mi="12" ci="0" mb="0" cb="0"/><line nr="166" mi="1" ci="0" mb="0" cb="0"/><line nr="169" mi="2" ci="0" mb="0" cb="0"/><line nr="170" mi="12" ci="0" mb="0" cb="0"/><line nr="171" mi="1" ci="0" mb="0" cb="0"/><line nr="174" mi="2" ci="0" mb="0" cb="0"/><line nr="175" mi="12" ci="0" mb="0" cb="0"/><line nr="176" mi="1" ci="0" mb="0" cb="0"/><line nr="182" mi="5" ci="0" mb="0" cb="0"/><line nr="183" mi="1" ci="0" mb="0" cb="0"/><line nr="184" mi="1" ci="0" mb="0" cb="0"/><line nr="187" mi="6" ci="0" mb="0" cb="0"/><line nr="188" mi="8" ci="0" mb="0" cb="0"/><line nr="189" mi="5" ci="0" mb="0" cb="0"/><line nr="190" mi="10" ci="0" mb="0" cb="0"/><line nr="192" mi="5" ci="0" mb="0" cb="0"/><line nr="198" mi="6" ci="0" mb="0" cb="0"/><line nr="199" mi="2" ci="0" mb="2" cb="0"/><line nr="200" mi="14" ci="0" mb="0" cb="0"/><line nr="202" mi="6" ci="0" mb="0" cb="0"/><line nr="204" mi="6" ci="0" mb="0" cb="0"/><line nr="206" mi="5" ci="0" mb="0" cb="0"/><line nr="208" mi="3" ci="0" mb="2" cb="0"/><line nr="209" mi="6" ci="0" mb="0" cb="0"/><line nr="210" mi="14" ci="0" mb="0" cb="0"/><line nr="211" mi="4" ci="0" mb="0" cb="0"/><line nr="214" mi="5" ci="0" mb="4" cb="0"/><line nr="216" mi="2" ci="0" mb="0" cb="0"/><line nr="217" mi="2" ci="0" mb="0" cb="0"/><line nr="218" mi="1" ci="0" mb="0" cb="0"/><line nr="220" mi="4" ci="0" mb="0" cb="0"/><line nr="221" mi="1" ci="0" mb="0" cb="0"/><line nr="223" mi="4" ci="0" mb="0" cb="0"/><line nr="224" mi="1" ci="0" mb="0" cb="0"/><line nr="226" mi="4" ci="0" mb="0" cb="0"/><line nr="229" mi="14" ci="0" mb="0" cb="0"/><line nr="231" mi="1" ci="0" mb="0" cb="0"/><line nr="234" mi="6" ci="0" mb="0" cb="0"/><line nr="235" mi="14" ci="0" mb="0" cb="0"/><line nr="236" mi="6" ci="0" mb="0" cb="0"/><line nr="237" mi="1" ci="0" mb="0" cb="0"/><line nr="241" mi="6" ci="0" mb="0" cb="0"/><line nr="242" mi="2" ci="0" mb="2" cb="0"/><line nr="243" mi="14" ci="0" mb="0" cb="0"/><line nr="245" mi="6" ci="0" mb="0" cb="0"/><line nr="247" mi="6" ci="0" mb="0" cb="0"/><line nr="248" mi="6" ci="0" mb="0" cb="0"/><line nr="250" mi="3" ci="0" mb="2" cb="0"/><line nr="251" mi="3" ci="0" mb="2" cb="0"/><line nr="252" mi="7" ci="0" mb="0" cb="0"/><line nr="254" mi="9" ci="0" mb="0" cb="0"/><line nr="257" mi="6" ci="0" mb="0" cb="0"/><line nr="258" mi="1" ci="0" mb="0" cb="0"/><line nr="261" mi="6" ci="0" mb="0" cb="0"/><line nr="262" mi="14" ci="0" mb="0" cb="0"/><line nr="263" mi="1" ci="0" mb="0" cb="0"/><line nr="266" mi="2" ci="0" mb="0" cb="0"/><line nr="268" mi="7" ci="0" mb="0" cb="0"/><line nr="269" mi="7" ci="0" mb="0" cb="0"/><line nr="270" mi="7" ci="0" mb="0" cb="0"/><line nr="271" mi="7" ci="0" mb="0" cb="0"/><line nr="273" mi="3" ci="0" mb="2" cb="0"/><line nr="274" mi="7" ci="0" mb="0" cb="0"/><line nr="275" mi="7" ci="0" mb="0" cb="0"/><line nr="276" mi="1" ci="0" mb="0" cb="0"/><line nr="279" mi="6" ci="0" mb="0" cb="0"/><line nr="281" mi="17" ci="0" mb="0" cb="0"/><line nr="282" mi="3" ci="0" mb="4" cb="0"/><line nr="284" mi="6" ci="0" mb="0" cb="0"/><line nr="285" mi="1" ci="0" mb="0" cb="0"/><line nr="287" mi="17" ci="0" mb="0" cb="0"/><line nr="288" mi="1" ci="0" mb="0" cb="0"/><line nr="290" mi="24" ci="0" mb="0" cb="0"/><line nr="291" mi="3" ci="0" mb="0" cb="0"/><line nr="292" mi="1" ci="0" mb="0" cb="0"/><line nr="296" mi="1" ci="0" mb="0" cb="0"/><line nr="299" mi="4" ci="0" mb="0" cb="0"/><line nr="300" mi="2" ci="0" mb="0" cb="0"/><line nr="302" mi="10" ci="0" mb="0" cb="0"/><line nr="303" mi="10" ci="0" mb="0" cb="0"/><line nr="304" mi="10" ci="0" mb="0" cb="0"/><line nr="305" mi="10" ci="0" mb="0" cb="0"/><line nr="306" mi="1" ci="0" mb="0" cb="0"/><line nr="312" mi="6" ci="0" mb="0" cb="0"/><line nr="313" mi="9" ci="0" mb="0" cb="0"/><line nr="314" mi="6" ci="0" mb="0" cb="0"/><line nr="316" mi="12" ci="0" mb="3" cb="0"/><line nr="317" mi="3" ci="0" mb="0" cb="0"/><line nr="318" mi="5" ci="0" mb="0" cb="0"/><line nr="319" mi="1" ci="0" mb="0" cb="0"/><line nr="320" mi="3" ci="0" mb="0" cb="0"/><line nr="321" mi="3" ci="0" mb="0" cb="0"/><line nr="322" mi="3" ci="0" mb="0" cb="0"/><line nr="323" mi="6" ci="0" mb="0" cb="0"/><line nr="324" mi="6" ci="0" mb="0" cb="0"/><line nr="325" mi="3" ci="0" mb="0" cb="0"/><line nr="326" mi="3" ci="0" mb="2" cb="0"/><line nr="327" mi="5" ci="0" mb="0" cb="0"/><line nr="328" mi="2" ci="0" mb="2" cb="0"/><line nr="329" mi="12" ci="0" mb="0" cb="0"/><line nr="330" mi="1" ci="0" mb="0" cb="0"/><line nr="332" mi="1" ci="0" mb="0" cb="0"/><line nr="333" mi="4" ci="0" mb="0" cb="0"/><line nr="334" mi="5" ci="0" mb="0" cb="0"/><line nr="335" mi="8" ci="0" mb="0" cb="0"/><line nr="336" mi="2" ci="0" mb="0" cb="0"/><line nr="337" mi="11" ci="0" mb="2" cb="0"/><line nr="338" mi="3" ci="0" mb="2" cb="0"/><line nr="339" mi="9" ci="0" mb="0" cb="0"/><line nr="341" mi="8" ci="0" mb="0" cb="0"/><line nr="342" mi="1" ci="0" mb="0" cb="0"/><line nr="343" mi="1" ci="0" mb="0" cb="0"/><line nr="345" mi="12" ci="0" mb="0" cb="0"/><line nr="346" mi="7" ci="0" mb="0" cb="0"/><line nr="347" mi="12" ci="0" mb="0" cb="0"/><line nr="349" mi="1" ci="0" mb="0" cb="0"/><line nr="351" mi="8" ci="0" mb="0" cb="0"/><line nr="355" mi="1" ci="0" mb="0" cb="0"/><line nr="361" mi="4" ci="0" mb="0" cb="0"/><line nr="363" mi="11" ci="0" mb="2" cb="0"/><line nr="364" mi="16" ci="0" mb="0" cb="0"/><line nr="365" mi="2" ci="0" mb="0" cb="0"/><line nr="367" mi="3" ci="0" mb="0" cb="0"/><line nr="372" mi="10" ci="0" mb="0" cb="0"/><line nr="374" mi="3" ci="0" mb="7" cb="0"/><line nr="375" mi="6" ci="0" mb="0" cb="0"/><line nr="376" mi="8" ci="0" mb="0" cb="0"/><line nr="377" mi="8" ci="0" mb="0" cb="0"/><line nr="378" mi="8" ci="0" mb="0" cb="0"/><line nr="379" mi="8" ci="0" mb="0" cb="0"/><line nr="380" mi="8" ci="0" mb="0" cb="0"/><line nr="381" mi="1" ci="0" mb="0" cb="0"/><line nr="387" mi="8" ci="0" mb="0" cb="0"/><line nr="397" mi="6" ci="0" mb="8" cb="0"/><line nr="398" mi="2" ci="0" mb="0" cb="0"/><line nr="399" mi="2" ci="0" mb="0" cb="0"/><line nr="400" mi="2" ci="0" mb="0" cb="0"/><line nr="401" mi="2" ci="0" mb="0" cb="0"/><line nr="403" mi="2" ci="0" mb="0" cb="0"/><line nr="404" mi="2" ci="0" mb="0" cb="0"/><line nr="405" mi="2" ci="0" mb="0" cb="0"/><line nr="406" mi="1" ci="0" mb="0" cb="0"/><line nr="417" mi="6" ci="0" mb="10" cb="0"/><line nr="418" mi="2" ci="0" mb="0" cb="0"/><line nr="419" mi="2" ci="0" mb="0" cb="0"/><line nr="420" mi="2" ci="0" mb="0" cb="0"/><line nr="421" mi="2" ci="0" mb="0" cb="0"/><line nr="422" mi="2" ci="0" mb="0" cb="0"/><line nr="423" mi="2" ci="0" mb="0" cb="0"/><line nr="424" mi="2" ci="0" mb="0" cb="0"/><line nr="425" mi="2" ci="0" mb="0" cb="0"/><line nr="426" mi="2" ci="0" mb="0" cb="0"/><line nr="427" mi="1" ci="0" mb="0" cb="0"/><line nr="432" mi="4" ci="0" mb="0" cb="0"/><line nr="434" mi="5" ci="0" mb="2" cb="0"/><line nr="436" mi="9" ci="0" mb="0" cb="0"/><line nr="437" mi="9" ci="0" mb="0" cb="0"/><line nr="438" mi="9" ci="0" mb="0" cb="0"/><line nr="439" mi="1" ci="0" mb="0" cb="0"/><line nr="442" mi="9" ci="0" mb="0" cb="0"/><line nr="443" mi="13" ci="0" mb="0" cb="0"/><line nr="444" mi="9" ci="0" mb="0" cb="0"/><line nr="448" mi="2" ci="0" mb="0" cb="0"/><line nr="453" mi="4" ci="0" mb="0" cb="0"/><line nr="455" mi="5" ci="0" mb="2" cb="0"/><line nr="457" mi="5" ci="0" mb="0" cb="0"/><line nr="458" mi="5" ci="0" mb="0" cb="0"/><line nr="459" mi="5" ci="0" mb="0" cb="0"/><line nr="460" mi="1" ci="0" mb="0" cb="0"/><line nr="463" mi="5" ci="0" mb="0" cb="0"/><line nr="464" mi="9" ci="0" mb="0" cb="0"/><line nr="465" mi="5" ci="0" mb="0" cb="0"/><line nr="469" mi="2" ci="0" mb="0" cb="0"/><line nr="474" mi="4" ci="0" mb="0" cb="0"/><line nr="476" mi="5" ci="0" mb="2" cb="0"/><line nr="478" mi="9" ci="0" mb="0" cb="0"/><line nr="479" mi="9" ci="0" mb="0" cb="0"/><line nr="480" mi="9" ci="0" mb="0" cb="0"/><line nr="481" mi="1" ci="0" mb="0" cb="0"/><line nr="484" mi="9" ci="0" mb="0" cb="0"/><line nr="485" mi="13" ci="0" mb="0" cb="0"/><line nr="486" mi="9" ci="0" mb="0" cb="0"/><line nr="490" mi="2" ci="0" mb="0" cb="0"/><line nr="495" mi="4" ci="0" mb="0" cb="0"/><line nr="497" mi="5" ci="0" mb="2" cb="0"/><line nr="499" mi="5" ci="0" mb="0" cb="0"/><line nr="500" mi="5" ci="0" mb="0" cb="0"/><line nr="501" mi="5" ci="0" mb="0" cb="0"/><line nr="502" mi="1" ci="0" mb="0" cb="0"/><line nr="505" mi="5" ci="0" mb="0" cb="0"/><line nr="506" mi="9" ci="0" mb="0" cb="0"/><line nr="507" mi="5" ci="0" mb="0" cb="0"/><line nr="511" mi="2" ci="0" mb="0" cb="0"/><line nr="516" mi="4" ci="0" mb="0" cb="0"/><line nr="518" mi="6" ci="0" mb="5" cb="0"/><line nr="519" mi="4" ci="0" mb="0" cb="0"/><line nr="520" mi="4" ci="0" mb="0" cb="0"/><line nr="521" mi="4" ci="0" mb="0" cb="0"/><line nr="522" mi="4" ci="0" mb="0" cb="0"/><line nr="523" mi="3" ci="0" mb="0" cb="0"/><line nr="532" mi="2" ci="0" mb="0" cb="0"/><line nr="533" mi="2" ci="0" mb="0" cb="0"/><line nr="536" mi="11" ci="0" mb="2" cb="0"/><line nr="537" mi="11" ci="0" mb="4" cb="0"/><line nr="538" mi="2" ci="0" mb="0" cb="0"/><line nr="540" mi="11" ci="0" mb="4" cb="0"/><line nr="541" mi="2" ci="0" mb="0" cb="0"/><line nr="543" mi="1" ci="0" mb="0" cb="0"/><line nr="546" mi="11" ci="0" mb="2" cb="0"/><line nr="547" mi="13" ci="0" mb="0" cb="0"/><line nr="548" mi="11" ci="0" mb="0" cb="0"/><line nr="551" mi="2" ci="0" mb="0" cb="0"/><line nr="552" mi="8" ci="0" mb="2" cb="0"/><line nr="553" mi="3" ci="0" mb="0" cb="0"/><line nr="555" mi="9" ci="0" mb="0" cb="0"/><line nr="556" mi="8" ci="0" mb="2" cb="0"/><line nr="557" mi="3" ci="0" mb="0" cb="0"/><line nr="560" mi="9" ci="0" mb="0" cb="0"/><line nr="561" mi="1" ci="0" mb="0" cb="0"/><line nr="562" mi="1" ci="0" mb="0" cb="0"/><line nr="565" mi="4" ci="0" mb="4" cb="0"/><line nr="566" mi="2" ci="0" mb="0" cb="0"/><line nr="567" mi="2" ci="0" mb="0" cb="0"/><line nr="568" mi="2" ci="0" mb="0" cb="0"/><line nr="569" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="1597" covered="0"/><counter type="BRANCH" missed="114" covered="0"/><counter type="LINE" missed="296" covered="0"/><counter type="COMPLEXITY" missed="101" covered="0"/><counter type="METHOD" missed="26" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="LeaderboardEntry.java"><line nr="12" mi="0" ci="12" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="12"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="MessageJsonParser.java"><line nr="17" mi="0" ci="2" mb="0" cb="0"/><line nr="18" mi="0" ci="12" mb="0" cb="0"/><line nr="19" mi="0" ci="1" mb="0" cb="0"/><line nr="22" mi="3" ci="0" mb="0" cb="0"/><line nr="28" mi="0" ci="7" mb="0" cb="0"/><line nr="29" mi="0" ci="1" mb="0" cb="0"/><line nr="30" mi="0" ci="5" mb="0" cb="0"/><line nr="35" mi="0" ci="5" mb="0" cb="0"/><line nr="38" mi="0" ci="3" mb="0" cb="0"/><line nr="42" mi="0" ci="3" mb="0" cb="0"/><line nr="44" mi="0" ci="4" mb="0" cb="2"/><line nr="45" mi="0" ci="10" mb="0" cb="0"/><line nr="46" mi="0" ci="4" mb="1" cb="1"/><line nr="47" mi="0" ci="10" mb="0" cb="0"/><line nr="48" mi="4" ci="0" mb="2" cb="0"/><line nr="49" mi="9" ci="0" mb="0" cb="0"/><line nr="51" mi="5" ci="0" mb="0" cb="0"/><line nr="56" mi="6" ci="0" mb="0" cb="0"/><line nr="60" mi="0" ci="3" mb="0" cb="0"/><line nr="61" mi="0" ci="4" mb="0" cb="0"/><line nr="62" mi="0" ci="9" mb="0" cb="0"/><line nr="63" mi="0" ci="2" mb="0" cb="0"/><line nr="64" mi="0" ci="3" mb="0" cb="2"/><line nr="65" mi="0" ci="5" mb="0" cb="0"/><line nr="67" mi="0" ci="8" mb="0" cb="0"/><counter type="INSTRUCTION" missed="27" covered="101"/><counter type="BRANCH" missed="3" covered="5"/><counter type="LINE" missed="5" covered="20"/><counter type="COMPLEXITY" missed="4" covered="9"/><counter type="METHOD" missed="2" covered="7"/><counter type="CLASS" missed="0" covered="2"/></sourcefile><sourcefile name="CardJsonParser.java"><line nr="18" mi="0" ci="2" mb="0" cb="0"/><line nr="19" mi="0" ci="14" mb="0" cb="0"/><line nr="27" mi="0" ci="3" mb="0" cb="0"/><line nr="30" mi="0" ci="3" mb="0" cb="0"/><line nr="33" mi="0" ci="3" mb="0" cb="0"/><line nr="34" mi="0" ci="2" mb="0" cb="0"/><line nr="36" mi="0" ci="4" mb="1" cb="1"/><line nr="37" mi="0" ci="5" mb="0" cb="0"/><line nr="39" mi="0" ci="4" mb="0" cb="2"/><line nr="42" mi="0" ci="4" mb="0" cb="0"/><line nr="43" mi="0" ci="5" mb="0" cb="0"/><line nr="44" mi="1" ci="0" mb="0" cb="0"/><line nr="45" mi="5" ci="0" mb="0" cb="0"/><line nr="48" mi="0" ci="11" mb="1" cb="1"/><line nr="49" mi="0" ci="6" mb="0" cb="0"/><line nr="51" mi="6" ci="0" mb="0" cb="0"/><line nr="54" mi="6" ci="0" mb="0" cb="0"/><line nr="65" mi="0" ci="11" mb="0" cb="0"/><line nr="66" mi="0" ci="4" mb="0" cb="0"/><line nr="67" mi="0" ci="14" mb="0" cb="0"/><line nr="77" mi="0" ci="4" mb="0" cb="0"/><line nr="78" mi="0" ci="3" mb="0" cb="0"/><line nr="79" mi="0" ci="11" mb="0" cb="2"/><line nr="80" mi="0" ci="12" mb="0" cb="0"/><line nr="81" mi="0" ci="1" mb="0" cb="0"/><line nr="82" mi="0" ci="2" mb="0" cb="0"/><counter type="INSTRUCTION" missed="18" covered="128"/><counter type="BRANCH" missed="2" covered="6"/><counter type="LINE" missed="4" covered="22"/><counter type="COMPLEXITY" missed="2" covered="9"/><counter type="METHOD" missed="0" covered="7"/><counter type="CLASS" missed="0" covered="2"/></sourcefile><sourcefile name="CardsSerializer.java"><line nr="14" mi="3" ci="0" mb="0" cb="0"/><line nr="33" mi="4" ci="0" mb="0" cb="0"/><line nr="34" mi="4" ci="0" mb="0" cb="0"/><line nr="35" mi="4" ci="0" mb="0" cb="0"/><line nr="36" mi="4" ci="0" mb="0" cb="0"/><line nr="39" mi="8" ci="0" mb="0" cb="0"/><line nr="40" mi="13" ci="0" mb="0" cb="0"/><line nr="42" mi="5" ci="0" mb="0" cb="0"/><line nr="44" mi="6" ci="0" mb="0" cb="0"/><line nr="46" mi="8" ci="0" mb="0" cb="0"/><line nr="47" mi="11" ci="0" mb="0" cb="0"/><line nr="49" mi="5" ci="0" mb="0" cb="0"/><line nr="51" mi="6" ci="0" mb="0" cb="0"/><line nr="53" mi="8" ci="0" mb="0" cb="0"/><line nr="54" mi="12" ci="0" mb="0" cb="0"/><line nr="56" mi="5" ci="0" mb="0" cb="0"/><line nr="58" mi="6" ci="0" mb="0" cb="0"/><line nr="60" mi="8" ci="0" mb="0" cb="0"/><line nr="61" mi="11" ci="0" mb="0" cb="0"/><line nr="63" mi="5" ci="0" mb="0" cb="0"/><line nr="65" mi="6" ci="0" mb="0" cb="0"/><line nr="67" mi="8" ci="0" mb="0" cb="0"/><line nr="68" mi="12" ci="0" mb="0" cb="0"/><line nr="70" mi="5" ci="0" mb="0" cb="0"/><line nr="72" mi="6" ci="0" mb="0" cb="0"/><line nr="74" mi="8" ci="0" mb="0" cb="0"/><line nr="75" mi="13" ci="0" mb="0" cb="0"/><line nr="77" mi="5" ci="0" mb="0" cb="0"/><line nr="79" mi="6" ci="0" mb="0" cb="0"/><line nr="85" mi="12" ci="0" mb="0" cb="0"/><line nr="86" mi="6" ci="0" mb="0" cb="0"/><line nr="88" mi="12" ci="0" mb="0" cb="0"/><line nr="89" mi="6" ci="0" mb="0" cb="0"/><line nr="91" mi="12" ci="0" mb="0" cb="0"/><line nr="92" mi="6" ci="0" mb="0" cb="0"/><line nr="94" mi="12" ci="0" mb="0" cb="0"/><line nr="95" mi="6" ci="0" mb="0" cb="0"/><line nr="97" mi="7" ci="0" mb="0" cb="0"/><line nr="98" mi="11" ci="0" mb="0" cb="0"/><line nr="99" mi="6" ci="0" mb="0" cb="0"/><line nr="101" mi="12" ci="0" mb="0" cb="0"/><line nr="102" mi="6" ci="0" mb="0" cb="0"/><line nr="104" mi="12" ci="0" mb="0" cb="0"/><line nr="105" mi="6" ci="0" mb="0" cb="0"/><line nr="107" mi="12" ci="0" mb="0" cb="0"/><line nr="108" mi="6" ci="0" mb="0" cb="0"/><line nr="109" mi="1" ci="0" mb="0" cb="0"/><line nr="110" mi="5" ci="0" mb="0" cb="0"/><line nr="111" mi="1" ci="0" mb="0" cb="0"/><line nr="115" mi="12" ci="0" mb="0" cb="0"/><line nr="116" mi="21" ci="0" mb="0" cb="0"/><line nr="117" mi="6" ci="0" mb="0" cb="0"/><line nr="119" mi="12" ci="0" mb="0" cb="0"/><line nr="120" mi="21" ci="0" mb="0" cb="0"/><line nr="121" mi="6" ci="0" mb="0" cb="0"/><line nr="123" mi="12" ci="0" mb="0" cb="0"/><line nr="124" mi="21" ci="0" mb="0" cb="0"/><line nr="125" mi="6" ci="0" mb="0" cb="0"/><line nr="127" mi="12" ci="0" mb="0" cb="0"/><line nr="128" mi="21" ci="0" mb="0" cb="0"/><line nr="129" mi="6" ci="0" mb="0" cb="0"/><line nr="131" mi="12" ci="0" mb="0" cb="0"/><line nr="132" mi="21" ci="0" mb="0" cb="0"/><line nr="133" mi="6" ci="0" mb="0" cb="0"/><line nr="135" mi="12" ci="0" mb="0" cb="0"/><line nr="136" mi="21" ci="0" mb="0" cb="0"/><line nr="137" mi="6" ci="0" mb="0" cb="0"/><line nr="139" mi="12" ci="0" mb="0" cb="0"/><line nr="140" mi="21" ci="0" mb="0" cb="0"/><line nr="141" mi="6" ci="0" mb="0" cb="0"/><line nr="143" mi="12" ci="0" mb="0" cb="0"/><line nr="144" mi="21" ci="0" mb="0" cb="0"/><line nr="145" mi="6" ci="0" mb="0" cb="0"/><line nr="146" mi="1" ci="0" mb="0" cb="0"/><line nr="147" mi="5" ci="0" mb="0" cb="0"/><line nr="148" mi="1" ci="0" mb="0" cb="0"/><line nr="152" mi="2" ci="0" mb="0" cb="0"/><line nr="155" mi="2" ci="0" mb="0" cb="0"/><line nr="156" mi="2" ci="0" mb="0" cb="0"/><line nr="157" mi="2" ci="0" mb="0" cb="0"/><line nr="158" mi="2" ci="0" mb="0" cb="0"/><line nr="159" mi="2" ci="0" mb="0" cb="0"/><line nr="160" mi="14" ci="0" mb="0" cb="0"/><line nr="161" mi="6" ci="0" mb="0" cb="0"/><line nr="163" mi="2" ci="0" mb="0" cb="0"/><line nr="164" mi="2" ci="0" mb="0" cb="0"/><line nr="165" mi="2" ci="0" mb="0" cb="0"/><line nr="166" mi="2" ci="0" mb="0" cb="0"/><line nr="167" mi="2" ci="0" mb="0" cb="0"/><line nr="168" mi="14" ci="0" mb="0" cb="0"/><line nr="169" mi="6" ci="0" mb="0" cb="0"/><line nr="171" mi="2" ci="0" mb="0" cb="0"/><line nr="172" mi="2" ci="0" mb="0" cb="0"/><line nr="173" mi="2" ci="0" mb="0" cb="0"/><line nr="174" mi="2" ci="0" mb="0" cb="0"/><line nr="175" mi="2" ci="0" mb="0" cb="0"/><line nr="176" mi="14" ci="0" mb="0" cb="0"/><line nr="177" mi="6" ci="0" mb="0" cb="0"/><line nr="179" mi="2" ci="0" mb="0" cb="0"/><line nr="180" mi="2" ci="0" mb="0" cb="0"/><line nr="181" mi="2" ci="0" mb="0" cb="0"/><line nr="182" mi="2" ci="0" mb="0" cb="0"/><line nr="183" mi="2" ci="0" mb="0" cb="0"/><line nr="184" mi="14" ci="0" mb="0" cb="0"/><line nr="185" mi="6" ci="0" mb="0" cb="0"/><line nr="187" mi="2" ci="0" mb="0" cb="0"/><line nr="188" mi="2" ci="0" mb="0" cb="0"/><line nr="189" mi="2" ci="0" mb="0" cb="0"/><line nr="190" mi="2" ci="0" mb="0" cb="0"/><line nr="191" mi="2" ci="0" mb="0" cb="0"/><line nr="192" mi="14" ci="0" mb="0" cb="0"/><line nr="193" mi="6" ci="0" mb="0" cb="0"/><line nr="195" mi="2" ci="0" mb="0" cb="0"/><line nr="196" mi="2" ci="0" mb="0" cb="0"/><line nr="197" mi="2" ci="0" mb="0" cb="0"/><line nr="198" mi="2" ci="0" mb="0" cb="0"/><line nr="199" mi="2" ci="0" mb="0" cb="0"/><line nr="200" mi="14" ci="0" mb="0" cb="0"/><line nr="201" mi="6" ci="0" mb="0" cb="0"/><line nr="203" mi="2" ci="0" mb="0" cb="0"/><line nr="204" mi="2" ci="0" mb="0" cb="0"/><line nr="205" mi="2" ci="0" mb="0" cb="0"/><line nr="206" mi="2" ci="0" mb="0" cb="0"/><line nr="207" mi="2" ci="0" mb="0" cb="0"/><line nr="208" mi="14" ci="0" mb="0" cb="0"/><line nr="209" mi="6" ci="0" mb="0" cb="0"/><line nr="211" mi="2" ci="0" mb="0" cb="0"/><line nr="212" mi="2" ci="0" mb="0" cb="0"/><line nr="213" mi="2" ci="0" mb="0" cb="0"/><line nr="214" mi="2" ci="0" mb="0" cb="0"/><line nr="215" mi="2" ci="0" mb="0" cb="0"/><line nr="216" mi="14" ci="0" mb="0" cb="0"/><line nr="217" mi="6" ci="0" mb="0" cb="0"/><line nr="219" mi="2" ci="0" mb="0" cb="0"/><line nr="220" mi="2" ci="0" mb="0" cb="0"/><line nr="221" mi="2" ci="0" mb="0" cb="0"/><line nr="222" mi="2" ci="0" mb="0" cb="0"/><line nr="223" mi="2" ci="0" mb="0" cb="0"/><line nr="224" mi="14" ci="0" mb="0" cb="0"/><line nr="225" mi="6" ci="0" mb="0" cb="0"/><line nr="227" mi="2" ci="0" mb="0" cb="0"/><line nr="228" mi="2" ci="0" mb="0" cb="0"/><line nr="229" mi="2" ci="0" mb="0" cb="0"/><line nr="230" mi="2" ci="0" mb="0" cb="0"/><line nr="231" mi="2" ci="0" mb="0" cb="0"/><line nr="232" mi="14" ci="0" mb="0" cb="0"/><line nr="233" mi="6" ci="0" mb="0" cb="0"/><line nr="235" mi="2" ci="0" mb="0" cb="0"/><line nr="236" mi="2" ci="0" mb="0" cb="0"/><line nr="237" mi="2" ci="0" mb="0" cb="0"/><line nr="238" mi="2" ci="0" mb="0" cb="0"/><line nr="239" mi="2" ci="0" mb="0" cb="0"/><line nr="240" mi="14" ci="0" mb="0" cb="0"/><line nr="241" mi="6" ci="0" mb="0" cb="0"/><line nr="243" mi="2" ci="0" mb="0" cb="0"/><line nr="244" mi="2" ci="0" mb="0" cb="0"/><line nr="245" mi="2" ci="0" mb="0" cb="0"/><line nr="246" mi="2" ci="0" mb="0" cb="0"/><line nr="247" mi="2" ci="0" mb="0" cb="0"/><line nr="248" mi="14" ci="0" mb="0" cb="0"/><line nr="249" mi="6" ci="0" mb="0" cb="0"/><line nr="251" mi="2" ci="0" mb="0" cb="0"/><line nr="252" mi="2" ci="0" mb="0" cb="0"/><line nr="253" mi="2" ci="0" mb="0" cb="0"/><line nr="254" mi="2" ci="0" mb="0" cb="0"/><line nr="255" mi="2" ci="0" mb="0" cb="0"/><line nr="256" mi="14" ci="0" mb="0" cb="0"/><line nr="257" mi="6" ci="0" mb="0" cb="0"/><line nr="259" mi="2" ci="0" mb="0" cb="0"/><line nr="260" mi="2" ci="0" mb="0" cb="0"/><line nr="261" mi="2" ci="0" mb="0" cb="0"/><line nr="262" mi="2" ci="0" mb="0" cb="0"/><line nr="263" mi="2" ci="0" mb="0" cb="0"/><line nr="264" mi="14" ci="0" mb="0" cb="0"/><line nr="265" mi="6" ci="0" mb="0" cb="0"/><line nr="267" mi="2" ci="0" mb="0" cb="0"/><line nr="268" mi="2" ci="0" mb="0" cb="0"/><line nr="269" mi="2" ci="0" mb="0" cb="0"/><line nr="270" mi="2" ci="0" mb="0" cb="0"/><line nr="271" mi="2" ci="0" mb="0" cb="0"/><line nr="272" mi="14" ci="0" mb="0" cb="0"/><line nr="273" mi="6" ci="0" mb="0" cb="0"/><line nr="275" mi="2" ci="0" mb="0" cb="0"/><line nr="276" mi="2" ci="0" mb="0" cb="0"/><line nr="277" mi="2" ci="0" mb="0" cb="0"/><line nr="278" mi="2" ci="0" mb="0" cb="0"/><line nr="279" mi="2" ci="0" mb="0" cb="0"/><line nr="280" mi="14" ci="0" mb="0" cb="0"/><line nr="281" mi="6" ci="0" mb="0" cb="0"/><line nr="283" mi="2" ci="0" mb="0" cb="0"/><line nr="284" mi="2" ci="0" mb="0" cb="0"/><line nr="285" mi="2" ci="0" mb="0" cb="0"/><line nr="286" mi="2" ci="0" mb="0" cb="0"/><line nr="287" mi="2" ci="0" mb="0" cb="0"/><line nr="288" mi="14" ci="0" mb="0" cb="0"/><line nr="289" mi="6" ci="0" mb="0" cb="0"/><line nr="291" mi="2" ci="0" mb="0" cb="0"/><line nr="292" mi="2" ci="0" mb="0" cb="0"/><line nr="293" mi="2" ci="0" mb="0" cb="0"/><line nr="294" mi="2" ci="0" mb="0" cb="0"/><line nr="295" mi="2" ci="0" mb="0" cb="0"/><line nr="296" mi="14" ci="0" mb="0" cb="0"/><line nr="297" mi="6" ci="0" mb="0" cb="0"/><line nr="299" mi="2" ci="0" mb="0" cb="0"/><line nr="300" mi="2" ci="0" mb="0" cb="0"/><line nr="301" mi="2" ci="0" mb="0" cb="0"/><line nr="302" mi="2" ci="0" mb="0" cb="0"/><line nr="303" mi="2" ci="0" mb="0" cb="0"/><line nr="304" mi="14" ci="0" mb="0" cb="0"/><line nr="305" mi="6" ci="0" mb="0" cb="0"/><line nr="307" mi="2" ci="0" mb="0" cb="0"/><line nr="308" mi="2" ci="0" mb="0" cb="0"/><line nr="309" mi="2" ci="0" mb="0" cb="0"/><line nr="310" mi="2" ci="0" mb="0" cb="0"/><line nr="311" mi="2" ci="0" mb="0" cb="0"/><line nr="312" mi="14" ci="0" mb="0" cb="0"/><line nr="313" mi="6" ci="0" mb="0" cb="0"/><line nr="315" mi="2" ci="0" mb="0" cb="0"/><line nr="316" mi="2" ci="0" mb="0" cb="0"/><line nr="317" mi="2" ci="0" mb="0" cb="0"/><line nr="318" mi="2" ci="0" mb="0" cb="0"/><line nr="319" mi="2" ci="0" mb="0" cb="0"/><line nr="320" mi="14" ci="0" mb="0" cb="0"/><line nr="321" mi="6" ci="0" mb="0" cb="0"/><line nr="323" mi="2" ci="0" mb="0" cb="0"/><line nr="324" mi="2" ci="0" mb="0" cb="0"/><line nr="325" mi="2" ci="0" mb="0" cb="0"/><line nr="326" mi="2" ci="0" mb="0" cb="0"/><line nr="327" mi="2" ci="0" mb="0" cb="0"/><line nr="328" mi="14" ci="0" mb="0" cb="0"/><line nr="329" mi="6" ci="0" mb="0" cb="0"/><line nr="331" mi="2" ci="0" mb="0" cb="0"/><line nr="332" mi="2" ci="0" mb="0" cb="0"/><line nr="333" mi="2" ci="0" mb="0" cb="0"/><line nr="334" mi="2" ci="0" mb="0" cb="0"/><line nr="335" mi="2" ci="0" mb="0" cb="0"/><line nr="336" mi="14" ci="0" mb="0" cb="0"/><line nr="337" mi="6" ci="0" mb="0" cb="0"/><line nr="339" mi="2" ci="0" mb="0" cb="0"/><line nr="340" mi="2" ci="0" mb="0" cb="0"/><line nr="341" mi="2" ci="0" mb="0" cb="0"/><line nr="342" mi="2" ci="0" mb="0" cb="0"/><line nr="343" mi="2" ci="0" mb="0" cb="0"/><line nr="344" mi="14" ci="0" mb="0" cb="0"/><line nr="345" mi="6" ci="0" mb="0" cb="0"/><line nr="347" mi="2" ci="0" mb="0" cb="0"/><line nr="348" mi="2" ci="0" mb="0" cb="0"/><line nr="349" mi="2" ci="0" mb="0" cb="0"/><line nr="350" mi="2" ci="0" mb="0" cb="0"/><line nr="351" mi="2" ci="0" mb="0" cb="0"/><line nr="352" mi="14" ci="0" mb="0" cb="0"/><line nr="353" mi="6" ci="0" mb="0" cb="0"/><line nr="355" mi="2" ci="0" mb="0" cb="0"/><line nr="356" mi="2" ci="0" mb="0" cb="0"/><line nr="357" mi="2" ci="0" mb="0" cb="0"/><line nr="358" mi="2" ci="0" mb="0" cb="0"/><line nr="359" mi="2" ci="0" mb="0" cb="0"/><line nr="360" mi="14" ci="0" mb="0" cb="0"/><line nr="361" mi="6" ci="0" mb="0" cb="0"/><line nr="363" mi="2" ci="0" mb="0" cb="0"/><line nr="364" mi="2" ci="0" mb="0" cb="0"/><line nr="365" mi="2" ci="0" mb="0" cb="0"/><line nr="366" mi="2" ci="0" mb="0" cb="0"/><line nr="367" mi="2" ci="0" mb="0" cb="0"/><line nr="368" mi="14" ci="0" mb="0" cb="0"/><line nr="369" mi="6" ci="0" mb="0" cb="0"/><line nr="370" mi="1" ci="0" mb="0" cb="0"/><line nr="371" mi="5" ci="0" mb="0" cb="0"/><line nr="372" mi="1" ci="0" mb="0" cb="0"/><line nr="375" mi="2" ci="0" mb="0" cb="0"/><line nr="378" mi="2" ci="0" mb="0" cb="0"/><line nr="379" mi="2" ci="0" mb="0" cb="0"/><line nr="380" mi="2" ci="0" mb="0" cb="0"/><line nr="381" mi="2" ci="0" mb="0" cb="0"/><line nr="382" mi="2" ci="0" mb="0" cb="0"/><line nr="383" mi="14" ci="0" mb="0" cb="0"/><line nr="384" mi="6" ci="0" mb="0" cb="0"/><line nr="386" mi="2" ci="0" mb="0" cb="0"/><line nr="387" mi="2" ci="0" mb="0" cb="0"/><line nr="388" mi="2" ci="0" mb="0" cb="0"/><line nr="389" mi="2" ci="0" mb="0" cb="0"/><line nr="390" mi="2" ci="0" mb="0" cb="0"/><line nr="391" mi="14" ci="0" mb="0" cb="0"/><line nr="392" mi="6" ci="0" mb="0" cb="0"/><line nr="394" mi="2" ci="0" mb="0" cb="0"/><line nr="395" mi="2" ci="0" mb="0" cb="0"/><line nr="396" mi="2" ci="0" mb="0" cb="0"/><line nr="397" mi="2" ci="0" mb="0" cb="0"/><line nr="398" mi="2" ci="0" mb="0" cb="0"/><line nr="399" mi="14" ci="0" mb="0" cb="0"/><line nr="400" mi="6" ci="0" mb="0" cb="0"/><line nr="402" mi="2" ci="0" mb="0" cb="0"/><line nr="403" mi="2" ci="0" mb="0" cb="0"/><line nr="404" mi="2" ci="0" mb="0" cb="0"/><line nr="405" mi="2" ci="0" mb="0" cb="0"/><line nr="406" mi="2" ci="0" mb="0" cb="0"/><line nr="407" mi="14" ci="0" mb="0" cb="0"/><line nr="408" mi="6" ci="0" mb="0" cb="0"/><line nr="410" mi="2" ci="0" mb="0" cb="0"/><line nr="411" mi="2" ci="0" mb="0" cb="0"/><line nr="412" mi="2" ci="0" mb="0" cb="0"/><line nr="413" mi="2" ci="0" mb="0" cb="0"/><line nr="414" mi="2" ci="0" mb="0" cb="0"/><line nr="415" mi="14" ci="0" mb="0" cb="0"/><line nr="416" mi="6" ci="0" mb="0" cb="0"/><line nr="418" mi="2" ci="0" mb="0" cb="0"/><line nr="419" mi="2" ci="0" mb="0" cb="0"/><line nr="420" mi="2" ci="0" mb="0" cb="0"/><line nr="421" mi="2" ci="0" mb="0" cb="0"/><line nr="422" mi="2" ci="0" mb="0" cb="0"/><line nr="423" mi="14" ci="0" mb="0" cb="0"/><line nr="424" mi="6" ci="0" mb="0" cb="0"/><line nr="426" mi="2" ci="0" mb="0" cb="0"/><line nr="427" mi="2" ci="0" mb="0" cb="0"/><line nr="428" mi="2" ci="0" mb="0" cb="0"/><line nr="429" mi="2" ci="0" mb="0" cb="0"/><line nr="430" mi="2" ci="0" mb="0" cb="0"/><line nr="431" mi="14" ci="0" mb="0" cb="0"/><line nr="432" mi="6" ci="0" mb="0" cb="0"/><line nr="434" mi="2" ci="0" mb="0" cb="0"/><line nr="435" mi="2" ci="0" mb="0" cb="0"/><line nr="436" mi="2" ci="0" mb="0" cb="0"/><line nr="437" mi="2" ci="0" mb="0" cb="0"/><line nr="438" mi="2" ci="0" mb="0" cb="0"/><line nr="439" mi="14" ci="0" mb="0" cb="0"/><line nr="440" mi="6" ci="0" mb="0" cb="0"/><line nr="442" mi="2" ci="0" mb="0" cb="0"/><line nr="443" mi="2" ci="0" mb="0" cb="0"/><line nr="444" mi="2" ci="0" mb="0" cb="0"/><line nr="445" mi="2" ci="0" mb="0" cb="0"/><line nr="446" mi="2" ci="0" mb="0" cb="0"/><line nr="447" mi="14" ci="0" mb="0" cb="0"/><line nr="448" mi="6" ci="0" mb="0" cb="0"/><line nr="450" mi="2" ci="0" mb="0" cb="0"/><line nr="451" mi="2" ci="0" mb="0" cb="0"/><line nr="452" mi="2" ci="0" mb="0" cb="0"/><line nr="453" mi="2" ci="0" mb="0" cb="0"/><line nr="454" mi="2" ci="0" mb="0" cb="0"/><line nr="455" mi="14" ci="0" mb="0" cb="0"/><line nr="456" mi="6" ci="0" mb="0" cb="0"/><line nr="458" mi="2" ci="0" mb="0" cb="0"/><line nr="459" mi="2" ci="0" mb="0" cb="0"/><line nr="460" mi="2" ci="0" mb="0" cb="0"/><line nr="461" mi="2" ci="0" mb="0" cb="0"/><line nr="462" mi="2" ci="0" mb="0" cb="0"/><line nr="463" mi="14" ci="0" mb="0" cb="0"/><line nr="464" mi="6" ci="0" mb="0" cb="0"/><line nr="466" mi="2" ci="0" mb="0" cb="0"/><line nr="467" mi="2" ci="0" mb="0" cb="0"/><line nr="468" mi="2" ci="0" mb="0" cb="0"/><line nr="469" mi="2" ci="0" mb="0" cb="0"/><line nr="470" mi="2" ci="0" mb="0" cb="0"/><line nr="471" mi="14" ci="0" mb="0" cb="0"/><line nr="472" mi="6" ci="0" mb="0" cb="0"/><line nr="474" mi="2" ci="0" mb="0" cb="0"/><line nr="475" mi="2" ci="0" mb="0" cb="0"/><line nr="476" mi="2" ci="0" mb="0" cb="0"/><line nr="477" mi="2" ci="0" mb="0" cb="0"/><line nr="478" mi="2" ci="0" mb="0" cb="0"/><line nr="479" mi="14" ci="0" mb="0" cb="0"/><line nr="480" mi="6" ci="0" mb="0" cb="0"/><line nr="481" mi="1" ci="0" mb="0" cb="0"/><line nr="482" mi="5" ci="0" mb="0" cb="0"/><line nr="483" mi="1" ci="0" mb="0" cb="0"/><line nr="487" mi="2" ci="0" mb="0" cb="0"/><line nr="490" mi="2" ci="0" mb="0" cb="0"/><line nr="491" mi="2" ci="0" mb="0" cb="0"/><line nr="492" mi="2" ci="0" mb="0" cb="0"/><line nr="493" mi="2" ci="0" mb="0" cb="0"/><line nr="494" mi="2" ci="0" mb="0" cb="0"/><line nr="495" mi="2" ci="0" mb="0" cb="0"/><line nr="496" mi="11" ci="0" mb="0" cb="0"/><line nr="497" mi="16" ci="0" mb="0" cb="0"/><line nr="498" mi="6" ci="0" mb="0" cb="0"/><line nr="500" mi="2" ci="0" mb="0" cb="0"/><line nr="501" mi="2" ci="0" mb="0" cb="0"/><line nr="502" mi="2" ci="0" mb="0" cb="0"/><line nr="503" mi="2" ci="0" mb="0" cb="0"/><line nr="504" mi="2" ci="0" mb="0" cb="0"/><line nr="505" mi="2" ci="0" mb="0" cb="0"/><line nr="506" mi="11" ci="0" mb="0" cb="0"/><line nr="507" mi="16" ci="0" mb="0" cb="0"/><line nr="508" mi="6" ci="0" mb="0" cb="0"/><line nr="510" mi="2" ci="0" mb="0" cb="0"/><line nr="511" mi="2" ci="0" mb="0" cb="0"/><line nr="512" mi="2" ci="0" mb="0" cb="0"/><line nr="513" mi="2" ci="0" mb="0" cb="0"/><line nr="514" mi="2" ci="0" mb="0" cb="0"/><line nr="515" mi="2" ci="0" mb="0" cb="0"/><line nr="516" mi="11" ci="0" mb="0" cb="0"/><line nr="517" mi="16" ci="0" mb="0" cb="0"/><line nr="518" mi="6" ci="0" mb="0" cb="0"/><line nr="520" mi="2" ci="0" mb="0" cb="0"/><line nr="521" mi="2" ci="0" mb="0" cb="0"/><line nr="522" mi="2" ci="0" mb="0" cb="0"/><line nr="523" mi="2" ci="0" mb="0" cb="0"/><line nr="524" mi="2" ci="0" mb="0" cb="0"/><line nr="525" mi="2" ci="0" mb="0" cb="0"/><line nr="526" mi="11" ci="0" mb="0" cb="0"/><line nr="527" mi="16" ci="0" mb="0" cb="0"/><line nr="528" mi="6" ci="0" mb="0" cb="0"/><line nr="530" mi="2" ci="0" mb="0" cb="0"/><line nr="531" mi="2" ci="0" mb="0" cb="0"/><line nr="532" mi="2" ci="0" mb="0" cb="0"/><line nr="533" mi="2" ci="0" mb="0" cb="0"/><line nr="534" mi="2" ci="0" mb="0" cb="0"/><line nr="535" mi="2" ci="0" mb="0" cb="0"/><line nr="536" mi="11" ci="0" mb="0" cb="0"/><line nr="537" mi="16" ci="0" mb="0" cb="0"/><line nr="538" mi="6" ci="0" mb="0" cb="0"/><line nr="540" mi="2" ci="0" mb="0" cb="0"/><line nr="541" mi="2" ci="0" mb="0" cb="0"/><line nr="542" mi="2" ci="0" mb="0" cb="0"/><line nr="543" mi="2" ci="0" mb="0" cb="0"/><line nr="544" mi="2" ci="0" mb="0" cb="0"/><line nr="545" mi="2" ci="0" mb="0" cb="0"/><line nr="546" mi="11" ci="0" mb="0" cb="0"/><line nr="547" mi="16" ci="0" mb="0" cb="0"/><line nr="548" mi="6" ci="0" mb="0" cb="0"/><line nr="550" mi="2" ci="0" mb="0" cb="0"/><line nr="551" mi="2" ci="0" mb="0" cb="0"/><line nr="552" mi="2" ci="0" mb="0" cb="0"/><line nr="553" mi="2" ci="0" mb="0" cb="0"/><line nr="554" mi="2" ci="0" mb="0" cb="0"/><line nr="555" mi="2" ci="0" mb="0" cb="0"/><line nr="556" mi="11" ci="0" mb="0" cb="0"/><line nr="557" mi="16" ci="0" mb="0" cb="0"/><line nr="558" mi="6" ci="0" mb="0" cb="0"/><line nr="560" mi="2" ci="0" mb="0" cb="0"/><line nr="561" mi="2" ci="0" mb="0" cb="0"/><line nr="562" mi="2" ci="0" mb="0" cb="0"/><line nr="563" mi="2" ci="0" mb="0" cb="0"/><line nr="564" mi="2" ci="0" mb="0" cb="0"/><line nr="565" mi="2" ci="0" mb="0" cb="0"/><line nr="566" mi="11" ci="0" mb="0" cb="0"/><line nr="567" mi="16" ci="0" mb="0" cb="0"/><line nr="568" mi="6" ci="0" mb="0" cb="0"/><line nr="570" mi="2" ci="0" mb="0" cb="0"/><line nr="571" mi="2" ci="0" mb="0" cb="0"/><line nr="572" mi="2" ci="0" mb="0" cb="0"/><line nr="573" mi="2" ci="0" mb="0" cb="0"/><line nr="574" mi="2" ci="0" mb="0" cb="0"/><line nr="575" mi="2" ci="0" mb="0" cb="0"/><line nr="576" mi="11" ci="0" mb="0" cb="0"/><line nr="577" mi="16" ci="0" mb="0" cb="0"/><line nr="578" mi="6" ci="0" mb="0" cb="0"/><line nr="580" mi="2" ci="0" mb="0" cb="0"/><line nr="581" mi="2" ci="0" mb="0" cb="0"/><line nr="582" mi="2" ci="0" mb="0" cb="0"/><line nr="583" mi="2" ci="0" mb="0" cb="0"/><line nr="584" mi="2" ci="0" mb="0" cb="0"/><line nr="585" mi="2" ci="0" mb="0" cb="0"/><line nr="586" mi="11" ci="0" mb="0" cb="0"/><line nr="587" mi="16" ci="0" mb="0" cb="0"/><line nr="588" mi="6" ci="0" mb="0" cb="0"/><line nr="590" mi="2" ci="0" mb="0" cb="0"/><line nr="591" mi="2" ci="0" mb="0" cb="0"/><line nr="592" mi="2" ci="0" mb="0" cb="0"/><line nr="593" mi="2" ci="0" mb="0" cb="0"/><line nr="594" mi="2" ci="0" mb="0" cb="0"/><line nr="595" mi="2" ci="0" mb="0" cb="0"/><line nr="596" mi="11" ci="0" mb="0" cb="0"/><line nr="597" mi="16" ci="0" mb="0" cb="0"/><line nr="598" mi="6" ci="0" mb="0" cb="0"/><line nr="600" mi="2" ci="0" mb="0" cb="0"/><line nr="601" mi="2" ci="0" mb="0" cb="0"/><line nr="602" mi="2" ci="0" mb="0" cb="0"/><line nr="603" mi="2" ci="0" mb="0" cb="0"/><line nr="604" mi="2" ci="0" mb="0" cb="0"/><line nr="605" mi="2" ci="0" mb="0" cb="0"/><line nr="606" mi="11" ci="0" mb="0" cb="0"/><line nr="607" mi="16" ci="0" mb="0" cb="0"/><line nr="608" mi="6" ci="0" mb="0" cb="0"/><line nr="609" mi="1" ci="0" mb="0" cb="0"/><line nr="610" mi="5" ci="0" mb="0" cb="0"/><line nr="611" mi="1" ci="0" mb="0" cb="0"/><line nr="614" mi="2" ci="0" mb="0" cb="0"/><line nr="615" mi="2" ci="0" mb="0" cb="0"/><line nr="618" mi="2" ci="0" mb="0" cb="0"/><line nr="619" mi="2" ci="0" mb="0" cb="0"/><line nr="620" mi="2" ci="0" mb="0" cb="0"/><line nr="621" mi="2" ci="0" mb="0" cb="0"/><line nr="622" mi="2" ci="0" mb="0" cb="0"/><line nr="623" mi="11" ci="0" mb="0" cb="0"/><line nr="624" mi="16" ci="0" mb="0" cb="0"/><line nr="625" mi="6" ci="0" mb="0" cb="0"/><line nr="627" mi="2" ci="0" mb="0" cb="0"/><line nr="628" mi="2" ci="0" mb="0" cb="0"/><line nr="629" mi="2" ci="0" mb="0" cb="0"/><line nr="630" mi="2" ci="0" mb="0" cb="0"/><line nr="631" mi="2" ci="0" mb="0" cb="0"/><line nr="632" mi="11" ci="0" mb="0" cb="0"/><line nr="633" mi="16" ci="0" mb="0" cb="0"/><line nr="634" mi="6" ci="0" mb="0" cb="0"/><line nr="636" mi="2" ci="0" mb="0" cb="0"/><line nr="637" mi="2" ci="0" mb="0" cb="0"/><line nr="638" mi="2" ci="0" mb="0" cb="0"/><line nr="639" mi="2" ci="0" mb="0" cb="0"/><line nr="640" mi="2" ci="0" mb="0" cb="0"/><line nr="641" mi="11" ci="0" mb="0" cb="0"/><line nr="642" mi="16" ci="0" mb="0" cb="0"/><line nr="643" mi="6" ci="0" mb="0" cb="0"/><line nr="645" mi="2" ci="0" mb="0" cb="0"/><line nr="646" mi="2" ci="0" mb="0" cb="0"/><line nr="647" mi="2" ci="0" mb="0" cb="0"/><line nr="648" mi="2" ci="0" mb="0" cb="0"/><line nr="649" mi="2" ci="0" mb="0" cb="0"/><line nr="650" mi="11" ci="0" mb="0" cb="0"/><line nr="651" mi="16" ci="0" mb="0" cb="0"/><line nr="652" mi="6" ci="0" mb="0" cb="0"/><line nr="654" mi="2" ci="0" mb="0" cb="0"/><line nr="655" mi="2" ci="0" mb="0" cb="0"/><line nr="656" mi="2" ci="0" mb="0" cb="0"/><line nr="657" mi="2" ci="0" mb="0" cb="0"/><line nr="658" mi="2" ci="0" mb="0" cb="0"/><line nr="659" mi="11" ci="0" mb="0" cb="0"/><line nr="660" mi="16" ci="0" mb="0" cb="0"/><line nr="661" mi="6" ci="0" mb="0" cb="0"/><line nr="663" mi="2" ci="0" mb="0" cb="0"/><line nr="664" mi="2" ci="0" mb="0" cb="0"/><line nr="665" mi="2" ci="0" mb="0" cb="0"/><line nr="666" mi="2" ci="0" mb="0" cb="0"/><line nr="667" mi="2" ci="0" mb="0" cb="0"/><line nr="668" mi="11" ci="0" mb="0" cb="0"/><line nr="669" mi="16" ci="0" mb="0" cb="0"/><line nr="670" mi="6" ci="0" mb="0" cb="0"/><line nr="672" mi="2" ci="0" mb="0" cb="0"/><line nr="673" mi="2" ci="0" mb="0" cb="0"/><line nr="674" mi="2" ci="0" mb="0" cb="0"/><line nr="675" mi="2" ci="0" mb="0" cb="0"/><line nr="676" mi="2" ci="0" mb="0" cb="0"/><line nr="677" mi="11" ci="0" mb="0" cb="0"/><line nr="678" mi="16" ci="0" mb="0" cb="0"/><line nr="679" mi="6" ci="0" mb="0" cb="0"/><line nr="681" mi="2" ci="0" mb="0" cb="0"/><line nr="682" mi="2" ci="0" mb="0" cb="0"/><line nr="683" mi="2" ci="0" mb="0" cb="0"/><line nr="684" mi="2" ci="0" mb="0" cb="0"/><line nr="685" mi="2" ci="0" mb="0" cb="0"/><line nr="686" mi="11" ci="0" mb="0" cb="0"/><line nr="687" mi="16" ci="0" mb="0" cb="0"/><line nr="688" mi="6" ci="0" mb="0" cb="0"/><line nr="690" mi="2" ci="0" mb="0" cb="0"/><line nr="691" mi="2" ci="0" mb="0" cb="0"/><line nr="692" mi="2" ci="0" mb="0" cb="0"/><line nr="693" mi="2" ci="0" mb="0" cb="0"/><line nr="694" mi="2" ci="0" mb="0" cb="0"/><line nr="695" mi="11" ci="0" mb="0" cb="0"/><line nr="696" mi="16" ci="0" mb="0" cb="0"/><line nr="697" mi="6" ci="0" mb="0" cb="0"/><line nr="699" mi="2" ci="0" mb="0" cb="0"/><line nr="700" mi="2" ci="0" mb="0" cb="0"/><line nr="701" mi="2" ci="0" mb="0" cb="0"/><line nr="702" mi="2" ci="0" mb="0" cb="0"/><line nr="703" mi="2" ci="0" mb="0" cb="0"/><line nr="704" mi="11" ci="0" mb="0" cb="0"/><line nr="705" mi="16" ci="0" mb="0" cb="0"/><line nr="706" mi="6" ci="0" mb="0" cb="0"/><line nr="708" mi="2" ci="0" mb="0" cb="0"/><line nr="709" mi="2" ci="0" mb="0" cb="0"/><line nr="710" mi="2" ci="0" mb="0" cb="0"/><line nr="711" mi="2" ci="0" mb="0" cb="0"/><line nr="712" mi="2" ci="0" mb="0" cb="0"/><line nr="713" mi="11" ci="0" mb="0" cb="0"/><line nr="714" mi="16" ci="0" mb="0" cb="0"/><line nr="715" mi="6" ci="0" mb="0" cb="0"/><line nr="717" mi="2" ci="0" mb="0" cb="0"/><line nr="718" mi="2" ci="0" mb="0" cb="0"/><line nr="719" mi="2" ci="0" mb="0" cb="0"/><line nr="720" mi="2" ci="0" mb="0" cb="0"/><line nr="721" mi="2" ci="0" mb="0" cb="0"/><line nr="722" mi="11" ci="0" mb="0" cb="0"/><line nr="723" mi="16" ci="0" mb="0" cb="0"/><line nr="724" mi="6" ci="0" mb="0" cb="0"/><line nr="725" mi="1" ci="0" mb="0" cb="0"/><line nr="726" mi="5" ci="0" mb="0" cb="0"/><line nr="727" mi="1" ci="0" mb="0" cb="0"/><line nr="730" mi="2" ci="0" mb="0" cb="0"/><line nr="731" mi="2" ci="0" mb="0" cb="0"/><line nr="734" mi="2" ci="0" mb="0" cb="0"/><line nr="735" mi="2" ci="0" mb="0" cb="0"/><line nr="736" mi="2" ci="0" mb="0" cb="0"/><line nr="737" mi="2" ci="0" mb="0" cb="0"/><line nr="738" mi="2" ci="0" mb="0" cb="0"/><line nr="739" mi="8" ci="0" mb="0" cb="0"/><line nr="740" mi="16" ci="0" mb="0" cb="0"/><line nr="741" mi="6" ci="0" mb="0" cb="0"/><line nr="743" mi="2" ci="0" mb="0" cb="0"/><line nr="744" mi="2" ci="0" mb="0" cb="0"/><line nr="745" mi="2" ci="0" mb="0" cb="0"/><line nr="746" mi="2" ci="0" mb="0" cb="0"/><line nr="747" mi="2" ci="0" mb="0" cb="0"/><line nr="748" mi="8" ci="0" mb="0" cb="0"/><line nr="749" mi="16" ci="0" mb="0" cb="0"/><line nr="750" mi="6" ci="0" mb="0" cb="0"/><line nr="752" mi="2" ci="0" mb="0" cb="0"/><line nr="753" mi="2" ci="0" mb="0" cb="0"/><line nr="754" mi="2" ci="0" mb="0" cb="0"/><line nr="755" mi="2" ci="0" mb="0" cb="0"/><line nr="756" mi="2" ci="0" mb="0" cb="0"/><line nr="757" mi="8" ci="0" mb="0" cb="0"/><line nr="758" mi="16" ci="0" mb="0" cb="0"/><line nr="759" mi="6" ci="0" mb="0" cb="0"/><line nr="761" mi="2" ci="0" mb="0" cb="0"/><line nr="762" mi="2" ci="0" mb="0" cb="0"/><line nr="763" mi="2" ci="0" mb="0" cb="0"/><line nr="764" mi="2" ci="0" mb="0" cb="0"/><line nr="765" mi="2" ci="0" mb="0" cb="0"/><line nr="766" mi="8" ci="0" mb="0" cb="0"/><line nr="767" mi="16" ci="0" mb="0" cb="0"/><line nr="768" mi="6" ci="0" mb="0" cb="0"/><line nr="770" mi="2" ci="0" mb="0" cb="0"/><line nr="771" mi="2" ci="0" mb="0" cb="0"/><line nr="772" mi="2" ci="0" mb="0" cb="0"/><line nr="773" mi="2" ci="0" mb="0" cb="0"/><line nr="774" mi="2" ci="0" mb="0" cb="0"/><line nr="775" mi="8" ci="0" mb="0" cb="0"/><line nr="776" mi="16" ci="0" mb="0" cb="0"/><line nr="777" mi="6" ci="0" mb="0" cb="0"/><line nr="779" mi="2" ci="0" mb="0" cb="0"/><line nr="780" mi="2" ci="0" mb="0" cb="0"/><line nr="781" mi="2" ci="0" mb="0" cb="0"/><line nr="782" mi="2" ci="0" mb="0" cb="0"/><line nr="783" mi="2" ci="0" mb="0" cb="0"/><line nr="784" mi="8" ci="0" mb="0" cb="0"/><line nr="785" mi="16" ci="0" mb="0" cb="0"/><line nr="786" mi="6" ci="0" mb="0" cb="0"/><line nr="788" mi="2" ci="0" mb="0" cb="0"/><line nr="789" mi="2" ci="0" mb="0" cb="0"/><line nr="790" mi="2" ci="0" mb="0" cb="0"/><line nr="791" mi="2" ci="0" mb="0" cb="0"/><line nr="792" mi="2" ci="0" mb="0" cb="0"/><line nr="793" mi="8" ci="0" mb="0" cb="0"/><line nr="794" mi="16" ci="0" mb="0" cb="0"/><line nr="795" mi="6" ci="0" mb="0" cb="0"/><line nr="797" mi="2" ci="0" mb="0" cb="0"/><line nr="798" mi="2" ci="0" mb="0" cb="0"/><line nr="799" mi="2" ci="0" mb="0" cb="0"/><line nr="800" mi="2" ci="0" mb="0" cb="0"/><line nr="801" mi="2" ci="0" mb="0" cb="0"/><line nr="802" mi="8" ci="0" mb="0" cb="0"/><line nr="803" mi="16" ci="0" mb="0" cb="0"/><line nr="804" mi="6" ci="0" mb="0" cb="0"/><line nr="806" mi="2" ci="0" mb="0" cb="0"/><line nr="807" mi="2" ci="0" mb="0" cb="0"/><line nr="808" mi="2" ci="0" mb="0" cb="0"/><line nr="809" mi="2" ci="0" mb="0" cb="0"/><line nr="810" mi="2" ci="0" mb="0" cb="0"/><line nr="811" mi="8" ci="0" mb="0" cb="0"/><line nr="812" mi="16" ci="0" mb="0" cb="0"/><line nr="813" mi="6" ci="0" mb="0" cb="0"/><line nr="815" mi="2" ci="0" mb="0" cb="0"/><line nr="816" mi="2" ci="0" mb="0" cb="0"/><line nr="817" mi="2" ci="0" mb="0" cb="0"/><line nr="818" mi="2" ci="0" mb="0" cb="0"/><line nr="819" mi="2" ci="0" mb="0" cb="0"/><line nr="820" mi="8" ci="0" mb="0" cb="0"/><line nr="821" mi="16" ci="0" mb="0" cb="0"/><line nr="822" mi="6" ci="0" mb="0" cb="0"/><line nr="824" mi="2" ci="0" mb="0" cb="0"/><line nr="825" mi="2" ci="0" mb="0" cb="0"/><line nr="826" mi="2" ci="0" mb="0" cb="0"/><line nr="827" mi="2" ci="0" mb="0" cb="0"/><line nr="828" mi="2" ci="0" mb="0" cb="0"/><line nr="829" mi="8" ci="0" mb="0" cb="0"/><line nr="830" mi="16" ci="0" mb="0" cb="0"/><line nr="831" mi="6" ci="0" mb="0" cb="0"/><line nr="833" mi="2" ci="0" mb="0" cb="0"/><line nr="834" mi="2" ci="0" mb="0" cb="0"/><line nr="835" mi="2" ci="0" mb="0" cb="0"/><line nr="836" mi="2" ci="0" mb="0" cb="0"/><line nr="837" mi="2" ci="0" mb="0" cb="0"/><line nr="838" mi="8" ci="0" mb="0" cb="0"/><line nr="839" mi="16" ci="0" mb="0" cb="0"/><line nr="840" mi="6" ci="0" mb="0" cb="0"/><line nr="841" mi="1" ci="0" mb="0" cb="0"/><line nr="842" mi="5" ci="0" mb="0" cb="0"/><line nr="843" mi="1" ci="0" mb="0" cb="0"/><line nr="845" mi="2" ci="0" mb="0" cb="0"/><line nr="846" mi="2" ci="0" mb="0" cb="0"/><line nr="849" mi="2" ci="0" mb="0" cb="0"/><line nr="850" mi="2" ci="0" mb="0" cb="0"/><line nr="851" mi="2" ci="0" mb="0" cb="0"/><line nr="852" mi="2" ci="0" mb="0" cb="0"/><line nr="853" mi="2" ci="0" mb="0" cb="0"/><line nr="854" mi="8" ci="0" mb="0" cb="0"/><line nr="855" mi="16" ci="0" mb="0" cb="0"/><line nr="856" mi="6" ci="0" mb="0" cb="0"/><line nr="858" mi="2" ci="0" mb="0" cb="0"/><line nr="859" mi="2" ci="0" mb="0" cb="0"/><line nr="860" mi="2" ci="0" mb="0" cb="0"/><line nr="861" mi="2" ci="0" mb="0" cb="0"/><line nr="862" mi="2" ci="0" mb="0" cb="0"/><line nr="863" mi="8" ci="0" mb="0" cb="0"/><line nr="864" mi="16" ci="0" mb="0" cb="0"/><line nr="865" mi="6" ci="0" mb="0" cb="0"/><line nr="867" mi="2" ci="0" mb="0" cb="0"/><line nr="868" mi="2" ci="0" mb="0" cb="0"/><line nr="869" mi="2" ci="0" mb="0" cb="0"/><line nr="870" mi="2" ci="0" mb="0" cb="0"/><line nr="871" mi="2" ci="0" mb="0" cb="0"/><line nr="872" mi="8" ci="0" mb="0" cb="0"/><line nr="873" mi="16" ci="0" mb="0" cb="0"/><line nr="874" mi="6" ci="0" mb="0" cb="0"/><line nr="876" mi="2" ci="0" mb="0" cb="0"/><line nr="877" mi="2" ci="0" mb="0" cb="0"/><line nr="878" mi="2" ci="0" mb="0" cb="0"/><line nr="879" mi="2" ci="0" mb="0" cb="0"/><line nr="880" mi="2" ci="0" mb="0" cb="0"/><line nr="881" mi="8" ci="0" mb="0" cb="0"/><line nr="882" mi="16" ci="0" mb="0" cb="0"/><line nr="883" mi="6" ci="0" mb="0" cb="0"/><line nr="884" mi="1" ci="0" mb="0" cb="0"/><line nr="885" mi="5" ci="0" mb="0" cb="0"/><line nr="886" mi="1" ci="0" mb="0" cb="0"/><line nr="889" mi="4" ci="0" mb="0" cb="0"/><line nr="890" mi="3" ci="0" mb="0" cb="0"/><line nr="892" mi="2" ci="0" mb="0" cb="0"/><line nr="893" mi="5" ci="0" mb="0" cb="0"/><line nr="895" mi="6" ci="0" mb="0" cb="0"/><line nr="896" mi="5" ci="0" mb="0" cb="0"/><line nr="897" mi="2" ci="0" mb="0" cb="0"/><line nr="899" mi="6" ci="0" mb="0" cb="0"/><line nr="900" mi="5" ci="0" mb="0" cb="0"/><line nr="901" mi="2" ci="0" mb="0" cb="0"/><line nr="903" mi="6" ci="0" mb="0" cb="0"/><line nr="904" mi="5" ci="0" mb="0" cb="0"/><line nr="905" mi="2" ci="0" mb="0" cb="0"/><line nr="907" mi="6" ci="0" mb="0" cb="0"/><line nr="908" mi="5" ci="0" mb="0" cb="0"/><line nr="909" mi="2" ci="0" mb="0" cb="0"/><line nr="910" mi="1" ci="0" mb="0" cb="0"/><line nr="911" mi="5" ci="0" mb="0" cb="0"/><line nr="912" mi="1" ci="0" mb="0" cb="0"/><line nr="914" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="3711" covered="0"/><counter type="LINE" missed="735" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><counter type="INSTRUCTION" missed="5575" covered="488"/><counter type="BRANCH" missed="135" covered="19"/><counter type="LINE" missed="1086" covered="95"/><counter type="COMPLEXITY" missed="136" covered="44"/><counter type="METHOD" missed="46" covered="36"/><counter type="CLASS" missed="4" covered="14"/></package><package name="it/polimi/ingsw/network/tcp"><class name="it/polimi/ingsw/network/tcp/ClientReceiver" sourcefilename="ClientReceiver.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/client/network/NetworkHandlerTCP;Ljava/net/Socket;)V" line="39"><counter type="INSTRUCTION" missed="37" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlayable" desc="(Ljava/lang/Integer;)Lit/polimi/ingsw/gamemodel/PlayableCard;" line="61"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlacedMap" desc="(Ljava/util/Map;)Ljava/util/Map;" line="78"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="resumeMatch" desc="(Lit/polimi/ingsw/network/messages/responses/MatchResumedMessage;)V" line="104"><counter type="INSTRUCTION" missed="111" covered="0"/><counter type="LINE" missed="25" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="parseMessage" desc="(Ljava/lang/String;)V" line="148"><counter type="INSTRUCTION" missed="287" covered="0"/><counter type="BRANCH" missed="19" covered="0"/><counter type="LINE" missed="76" covered="0"/><counter type="COMPLEXITY" missed="17" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="sendError" desc="(Ljava/lang/String;)V" line="248"><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="run" desc="()V" line="263"><counter type="INSTRUCTION" missed="25" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$run$8" desc="(Ljava/lang/String;)V" line="268"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$parseMessage$7" desc="(Ljava/util/Map;Lit/polimi/ingsw/gamemodel/DrawSource;Ljava/lang/Integer;)V" line="170"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$parseMessage$6" desc="(Ljava/util/Map;Ljava/lang/String;[Ljava/lang/Integer;)V" line="160"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$parseMessage$5" desc="(Ljava/lang/Integer;)Lit/polimi/ingsw/gamemodel/PlayableCard;" line="161"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$resumeMatch$4" desc="(Ljava/util/Map;Ljava/lang/String;Ljava/util/Map;)V" line="130"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$resumeMatch$3" desc="(Ljava/util/Map$Entry;)Lit/polimi/ingsw/gamemodel/PlayableCard;" line="125"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$resumeMatch$2" desc="(Ljava/util/Map$Entry;)Ljava/util/List;" line="118"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$resumeMatch$1" desc="(Ljava/lang/Integer;)Lit/polimi/ingsw/gamemodel/PlayableCard;" line="119"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$getPlacedMap$0" desc="(Ljava/util/Map;Ljava/lang/Integer;Lit/polimi/ingsw/utils/PlacedCardRecord;)V" line="81"><counter type="INSTRUCTION" missed="58" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="623" covered="0"/><counter type="BRANCH" missed="29" covered="0"/><counter type="LINE" missed="146" covered="0"/><counter type="COMPLEXITY" missed="37" covered="0"/><counter type="METHOD" missed="16" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/network/tcp/IOHandler" sourcefilename="IOHandler.java"><method name="&lt;init&gt;" desc="(Ljava/net/Socket;)V" line="28"><counter type="INSTRUCTION" missed="0" covered="31"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="readMsg" desc="()Ljava/lang/String;" line="45"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="writeMsg" desc="(Ljava/lang/String;)V" line="55"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="writeMsg" desc="(Lit/polimi/ingsw/network/messages/Message;)V" line="67"><counter type="INSTRUCTION" missed="0" covered="13"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="msgToString" desc="(Lit/polimi/ingsw/network/messages/Message;)Ljava/lang/String;" line="79"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="stringToMsg" desc="(Ljava/lang/String;)Lit/polimi/ingsw/network/messages/Message;" line="89"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="close" desc="()V" line="99"><counter type="INSTRUCTION" missed="1" covered="14"/><counter type="BRANCH" missed="2" covered="2"/><counter type="LINE" missed="1" covered="6"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="17" covered="67"/><counter type="BRANCH" missed="2" covered="2"/><counter type="LINE" missed="6" covered="18"/><counter type="COMPLEXITY" missed="4" covered="5"/><counter type="METHOD" missed="2" covered="5"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/tcp/TCPServer" sourcefilename="TCPServer.java"><method name="&lt;init&gt;" desc="(Ljava/lang/Integer;Lit/polimi/ingsw/server/Server;)V" line="24"><counter type="INSTRUCTION" missed="3" covered="14"/><counter type="LINE" missed="2" covered="5"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="listen" desc="()V" line="39"><counter type="INSTRUCTION" missed="8" covered="16"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="4" covered="4"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="11" covered="30"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="6" covered="9"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/tcp/ClientListener" sourcefilename="ClientListener.java"><method name="&lt;init&gt;" desc="(Ljava/net/Socket;Lit/polimi/ingsw/server/Server;)V" line="60"><counter type="INSTRUCTION" missed="5" covered="45"/><counter type="LINE" missed="2" covered="13"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sendError" desc="(Ljava/lang/String;Ljava/lang/Exception;)V" line="89"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setPlayerController" desc="()V" line="102"><counter type="INSTRUCTION" missed="17" covered="97"/><counter type="BRANCH" missed="2" covered="6"/><counter type="LINE" missed="6" covered="30"/><counter type="COMPLEXITY" missed="2" covered="4"/><counter type="METHOD" missed="0" covered="1"/></method><method name="createPlayerController" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Match;)V" line="168"><counter type="INSTRUCTION" missed="0" covered="13"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="executeRequest" desc="(Ljava/lang/String;)V" line="183"><counter type="INSTRUCTION" missed="72" covered="41"/><counter type="BRANCH" missed="8" covered="3"/><counter type="LINE" missed="23" covered="12"/><counter type="COMPLEXITY" missed="8" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="listen" desc="()V" line="231"><counter type="INSTRUCTION" missed="1" covered="29"/><counter type="BRANCH" missed="2" covered="4"/><counter type="LINE" missed="1" covered="9"/><counter type="COMPLEXITY" missed="2" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="close" desc="(Lit/polimi/ingsw/gamemodel/Match;)V" line="249"><counter type="INSTRUCTION" missed="1" covered="20"/><counter type="BRANCH" missed="2" covered="2"/><counter type="LINE" missed="1" covered="6"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="run" desc="()V" line="264"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$new$1" desc="(Ljava/lang/Integer;Lit/polimi/ingsw/gamemodel/GoldCard;)V" line="73"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$new$0" desc="(Ljava/lang/Integer;Lit/polimi/ingsw/gamemodel/ResourceCard;)V" line="72"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="109" covered="264"/><counter type="BRANCH" missed="14" covered="15"/><counter type="LINE" missed="37" covered="76"/><counter type="COMPLEXITY" missed="15" covered="14"/><counter type="METHOD" missed="1" covered="9"/><counter type="CLASS" missed="0" covered="1"/></class><sourcefile name="ClientReceiver.java"><line nr="39" mi="2" ci="0" mb="0" cb="0"/><line nr="40" mi="3" ci="0" mb="0" cb="0"/><line nr="41" mi="3" ci="0" mb="0" cb="0"/><line nr="42" mi="6" ci="0" mb="0" cb="0"/><line nr="43" mi="4" ci="0" mb="0" cb="0"/><line nr="45" mi="2" ci="0" mb="0" cb="0"/><line nr="46" mi="4" ci="0" mb="0" cb="0"/><line nr="47" mi="4" ci="0" mb="0" cb="0"/><line nr="48" mi="4" ci="0" mb="0" cb="0"/><line nr="49" mi="4" ci="0" mb="0" cb="0"/><line nr="50" mi="1" ci="0" mb="0" cb="0"/><line nr="61" mi="6" ci="0" mb="0" cb="0"/><line nr="62" mi="2" ci="0" mb="2" cb="0"/><line nr="63" mi="6" ci="0" mb="0" cb="0"/><line nr="65" mi="2" ci="0" mb="0" cb="0"/><line nr="78" mi="4" ci="0" mb="0" cb="0"/><line nr="80" mi="5" ci="0" mb="0" cb="0"/><line nr="81" mi="12" ci="0" mb="4" cb="0"/><line nr="82" mi="16" ci="0" mb="0" cb="0"/><line nr="83" mi="4" ci="0" mb="0" cb="0"/><line nr="84" mi="4" ci="0" mb="0" cb="0"/><line nr="86" mi="14" ci="0" mb="0" cb="0"/><line nr="87" mi="3" ci="0" mb="0" cb="0"/><line nr="88" mi="4" ci="0" mb="0" cb="0"/><line nr="90" mi="1" ci="0" mb="0" cb="0"/><line nr="92" mi="2" ci="0" mb="0" cb="0"/><line nr="104" mi="4" ci="0" mb="0" cb="0"/><line nr="105" mi="4" ci="0" mb="0" cb="0"/><line nr="107" mi="4" ci="0" mb="0" cb="0"/><line nr="110" mi="4" ci="0" mb="0" cb="0"/><line nr="111" mi="4" ci="0" mb="0" cb="0"/><line nr="112" mi="4" ci="0" mb="0" cb="0"/><line nr="116" mi="3" ci="0" mb="0" cb="0"/><line nr="117" mi="7" ci="0" mb="0" cb="0"/><line nr="118" mi="9" ci="0" mb="0" cb="0"/><line nr="119" mi="10" ci="0" mb="0" cb="0"/><line nr="120" mi="3" ci="0" mb="0" cb="0"/><line nr="121" mi="5" ci="0" mb="0" cb="0"/><line nr="122" mi="6" ci="0" mb="0" cb="0"/><line nr="123" mi="5" ci="0" mb="0" cb="0"/><line nr="124" mi="10" ci="0" mb="0" cb="0"/><line nr="125" mi="7" ci="0" mb="0" cb="0"/><line nr="126" mi="3" ci="0" mb="0" cb="0"/><line nr="127" mi="7" ci="0" mb="0" cb="0"/><line nr="128" mi="3" ci="0" mb="0" cb="0"/><line nr="129" mi="5" ci="0" mb="0" cb="0"/><line nr="130" mi="9" ci="0" mb="0" cb="0"/><line nr="131" mi="3" ci="0" mb="0" cb="0"/><line nr="132" mi="3" ci="0" mb="0" cb="0"/><line nr="133" mi="3" ci="0" mb="0" cb="0"/><line nr="135" mi="14" ci="0" mb="0" cb="0"/><line nr="138" mi="1" ci="0" mb="0" cb="0"/><line nr="148" mi="6" ci="0" mb="0" cb="0"/><line nr="149" mi="3" ci="0" mb="0" cb="0"/><line nr="150" mi="11" ci="0" mb="15" cb="0"/><line nr="151" mi="3" ci="0" mb="0" cb="0"/><line nr="152" mi="5" ci="0" mb="0" cb="0"/><line nr="153" mi="1" ci="0" mb="0" cb="0"/><line nr="154" mi="3" ci="0" mb="0" cb="0"/><line nr="155" mi="3" ci="0" mb="0" cb="0"/><line nr="156" mi="1" ci="0" mb="0" cb="0"/><line nr="157" mi="3" ci="0" mb="0" cb="0"/><line nr="158" mi="4" ci="0" mb="0" cb="0"/><line nr="159" mi="5" ci="0" mb="0" cb="0"/><line nr="160" mi="7" ci="0" mb="0" cb="0"/><line nr="161" mi="9" ci="0" mb="0" cb="0"/><line nr="162" mi="3" ci="0" mb="0" cb="0"/><line nr="164" mi="5" ci="0" mb="0" cb="0"/><line nr="165" mi="8" ci="0" mb="0" cb="0"/><line nr="166" mi="7" ci="0" mb="0" cb="0"/><line nr="168" mi="4" ci="0" mb="0" cb="0"/><line nr="169" mi="6" ci="0" mb="0" cb="0"/><line nr="170" mi="8" ci="0" mb="0" cb="0"/><line nr="172" mi="3" ci="0" mb="0" cb="0"/><line nr="173" mi="9" ci="0" mb="0" cb="0"/><line nr="175" mi="9" ci="0" mb="0" cb="0"/><line nr="177" mi="1" ci="0" mb="0" cb="0"/><line nr="178" mi="3" ci="0" mb="0" cb="0"/><line nr="179" mi="6" ci="0" mb="2" cb="0"/><line nr="180" mi="5" ci="0" mb="0" cb="0"/><line nr="181" mi="5" ci="0" mb="0" cb="0"/><line nr="183" mi="7" ci="0" mb="0" cb="0"/><line nr="184" mi="3" ci="0" mb="0" cb="0"/><line nr="186" mi="1" ci="0" mb="0" cb="0"/><line nr="187" mi="3" ci="0" mb="0" cb="0"/><line nr="188" mi="6" ci="0" mb="2" cb="0"/><line nr="189" mi="5" ci="0" mb="0" cb="0"/><line nr="190" mi="6" ci="0" mb="0" cb="0"/><line nr="191" mi="5" ci="0" mb="0" cb="0"/><line nr="192" mi="4" ci="0" mb="0" cb="0"/><line nr="193" mi="1" ci="0" mb="0" cb="0"/><line nr="194" mi="4" ci="0" mb="0" cb="0"/><line nr="196" mi="1" ci="0" mb="0" cb="0"/><line nr="197" mi="3" ci="0" mb="0" cb="0"/><line nr="198" mi="7" ci="0" mb="0" cb="0"/><line nr="199" mi="1" ci="0" mb="0" cb="0"/><line nr="200" mi="1" ci="0" mb="0" cb="0"/><line nr="201" mi="3" ci="0" mb="0" cb="0"/><line nr="202" mi="4" ci="0" mb="0" cb="0"/><line nr="203" mi="1" ci="0" mb="0" cb="0"/><line nr="204" mi="3" ci="0" mb="0" cb="0"/><line nr="205" mi="3" ci="0" mb="0" cb="0"/><line nr="206" mi="5" ci="0" mb="0" cb="0"/><line nr="207" mi="7" ci="0" mb="0" cb="0"/><line nr="208" mi="8" ci="0" mb="0" cb="0"/><line nr="209" mi="1" ci="0" mb="0" cb="0"/><line nr="210" mi="1" ci="0" mb="0" cb="0"/><line nr="211" mi="3" ci="0" mb="0" cb="0"/><line nr="212" mi="8" ci="0" mb="0" cb="0"/><line nr="213" mi="4" ci="0" mb="0" cb="0"/><line nr="214" mi="4" ci="0" mb="0" cb="0"/><line nr="215" mi="1" ci="0" mb="0" cb="0"/><line nr="216" mi="3" ci="0" mb="0" cb="0"/><line nr="217" mi="6" ci="0" mb="0" cb="0"/><line nr="218" mi="1" ci="0" mb="0" cb="0"/><line nr="219" mi="3" ci="0" mb="0" cb="0"/><line nr="220" mi="4" ci="0" mb="0" cb="0"/><line nr="221" mi="1" ci="0" mb="0" cb="0"/><line nr="222" mi="3" ci="0" mb="0" cb="0"/><line nr="223" mi="5" ci="0" mb="0" cb="0"/><line nr="224" mi="1" ci="0" mb="0" cb="0"/><line nr="225" mi="3" ci="0" mb="0" cb="0"/><line nr="226" mi="6" ci="0" mb="0" cb="0"/><line nr="227" mi="1" ci="0" mb="0" cb="0"/><line nr="228" mi="3" ci="0" mb="0" cb="0"/><line nr="229" mi="6" ci="0" mb="0" cb="0"/><line nr="230" mi="1" ci="0" mb="0" cb="0"/><line nr="234" mi="1" ci="0" mb="0" cb="0"/><line nr="235" mi="3" ci="0" mb="0" cb="0"/><line nr="236" mi="1" ci="0" mb="0" cb="0"/><line nr="238" mi="1" ci="0" mb="0" cb="0"/><line nr="248" mi="6" ci="0" mb="0" cb="0"/><line nr="249" mi="6" ci="0" mb="0" cb="0"/><line nr="250" mi="4" ci="0" mb="0" cb="0"/><line nr="251" mi="1" ci="0" mb="0" cb="0"/><line nr="253" mi="1" ci="0" mb="0" cb="0"/><line nr="254" mi="1" ci="0" mb="0" cb="0"/><line nr="263" mi="8" ci="0" mb="4" cb="0"/><line nr="265" mi="4" ci="0" mb="0" cb="0"/><line nr="266" mi="2" ci="0" mb="0" cb="0"/><line nr="267" mi="6" ci="0" mb="0" cb="0"/><line nr="268" mi="3" ci="0" mb="0" cb="0"/><line nr="269" mi="2" ci="0" mb="0" cb="0"/><line nr="270" mi="1" ci="0" mb="0" cb="0"/><line nr="271" mi="2" ci="0" mb="0" cb="0"/><line nr="273" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="623" covered="0"/><counter type="BRANCH" missed="29" covered="0"/><counter type="LINE" missed="146" covered="0"/><counter type="COMPLEXITY" missed="37" covered="0"/><counter type="METHOD" missed="16" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="TCPServer.java"><line nr="24" mi="0" ci="2" mb="0" cb="0"/><line nr="26" mi="0" ci="7" mb="0" cb="0"/><line nr="27" mi="0" ci="3" mb="0" cb="0"/><line nr="28" mi="1" ci="0" mb="0" cb="0"/><line nr="29" mi="2" ci="0" mb="0" cb="0"/><line nr="30" mi="0" ci="1" mb="0" cb="0"/><line nr="31" mi="0" ci="1" mb="0" cb="0"/><line nr="39" mi="0" ci="4" mb="1" cb="1"/><line nr="41" mi="0" ci="4" mb="0" cb="0"/><line nr="42" mi="0" ci="7" mb="0" cb="0"/><line nr="43" mi="1" ci="0" mb="0" cb="0"/><line nr="44" mi="3" ci="0" mb="0" cb="0"/><line nr="45" mi="2" ci="0" mb="0" cb="0"/><line nr="46" mi="1" ci="1" mb="0" cb="0"/><line nr="48" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="11" covered="30"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="6" covered="9"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="IOHandler.java"><line nr="28" mi="0" ci="2" mb="0" cb="0"/><line nr="30" mi="0" ci="3" mb="0" cb="0"/><line nr="31" mi="0" ci="10" mb="0" cb="0"/><line nr="32" mi="0" ci="10" mb="0" cb="0"/><line nr="34" mi="0" ci="5" mb="0" cb="0"/><line nr="35" mi="0" ci="1" mb="0" cb="0"/><line nr="45" mi="0" ci="4" mb="0" cb="0"/><line nr="55" mi="4" ci="0" mb="0" cb="0"/><line nr="56" mi="3" ci="0" mb="0" cb="0"/><line nr="57" mi="3" ci="0" mb="0" cb="0"/><line nr="58" mi="1" ci="0" mb="0" cb="0"/><line nr="67" mi="0" ci="6" mb="0" cb="0"/><line nr="68" mi="0" ci="3" mb="0" cb="0"/><line nr="69" mi="0" ci="3" mb="0" cb="0"/><line nr="70" mi="0" ci="1" mb="0" cb="0"/><line nr="79" mi="0" ci="5" mb="0" cb="0"/><line nr="89" mi="5" ci="0" mb="0" cb="0"/><line nr="99" mi="0" ci="3" mb="1" cb="1"/><line nr="100" mi="0" ci="3" mb="0" cb="0"/><line nr="102" mi="0" ci="3" mb="1" cb="1"/><line nr="103" mi="0" ci="3" mb="0" cb="0"/><line nr="105" mi="1" ci="0" mb="0" cb="0"/><line nr="107" mi="0" ci="1" mb="0" cb="0"/><line nr="108" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="17" covered="67"/><counter type="BRANCH" missed="2" covered="2"/><counter type="LINE" missed="6" covered="18"/><counter type="COMPLEXITY" missed="4" covered="5"/><counter type="METHOD" missed="2" covered="5"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="ClientListener.java"><line nr="60" mi="0" ci="2" mb="0" cb="0"/><line nr="62" mi="0" ci="3" mb="0" cb="0"/><line nr="63" mi="0" ci="7" mb="0" cb="0"/><line nr="64" mi="0" ci="3" mb="0" cb="0"/><line nr="65" mi="0" ci="5" mb="0" cb="0"/><line nr="67" mi="0" ci="4" mb="0" cb="0"/><line nr="68" mi="0" ci="3" mb="0" cb="0"/><line nr="69" mi="0" ci="3" mb="0" cb="0"/><line nr="71" mi="0" ci="5" mb="0" cb="0"/><line nr="72" mi="0" ci="11" mb="0" cb="0"/><line nr="73" mi="0" ci="11" mb="0" cb="0"/><line nr="75" mi="1" ci="0" mb="0" cb="0"/><line nr="76" mi="4" ci="0" mb="0" cb="0"/><line nr="77" mi="0" ci="1" mb="0" cb="0"/><line nr="78" mi="0" ci="1" mb="0" cb="0"/><line nr="89" mi="10" ci="0" mb="0" cb="0"/><line nr="90" mi="1" ci="0" mb="0" cb="0"/><line nr="91" mi="1" ci="0" mb="0" cb="0"/><line nr="92" mi="1" ci="0" mb="0" cb="0"/><line nr="102" mi="0" ci="2" mb="0" cb="0"/><line nr="103" mi="0" ci="2" mb="0" cb="0"/><line nr="105" mi="0" ci="2" mb="0" cb="0"/><line nr="107" mi="0" ci="2" mb="0" cb="2"/><line nr="109" mi="0" ci="8" mb="0" cb="0"/><line nr="110" mi="0" ci="2" mb="1" cb="1"/><line nr="111" mi="3" ci="0" mb="0" cb="0"/><line nr="113" mi="0" ci="11" mb="1" cb="3"/><line nr="114" mi="0" ci="3" mb="0" cb="0"/><line nr="115" mi="0" ci="3" mb="0" cb="0"/><line nr="116" mi="0" ci="4" mb="0" cb="0"/><line nr="117" mi="0" ci="3" mb="0" cb="0"/><line nr="118" mi="0" ci="4" mb="0" cb="0"/><line nr="119" mi="0" ci="1" mb="0" cb="0"/><line nr="121" mi="0" ci="3" mb="0" cb="0"/><line nr="122" mi="0" ci="3" mb="0" cb="0"/><line nr="123" mi="0" ci="6" mb="0" cb="0"/><line nr="124" mi="0" ci="1" mb="0" cb="0"/><line nr="125" mi="0" ci="6" mb="0" cb="0"/><line nr="127" mi="0" ci="4" mb="0" cb="0"/><line nr="128" mi="0" ci="2" mb="0" cb="0"/><line nr="129" mi="0" ci="1" mb="0" cb="0"/><line nr="131" mi="0" ci="3" mb="0" cb="0"/><line nr="132" mi="0" ci="3" mb="0" cb="0"/><line nr="133" mi="0" ci="6" mb="0" cb="0"/><line nr="135" mi="0" ci="4" mb="0" cb="0"/><line nr="136" mi="0" ci="2" mb="0" cb="0"/><line nr="137" mi="0" ci="1" mb="0" cb="0"/><line nr="143" mi="1" ci="0" mb="0" cb="0"/><line nr="145" mi="1" ci="0" mb="0" cb="0"/><line nr="147" mi="5" ci="0" mb="0" cb="0"/><line nr="148" mi="1" ci="0" mb="0" cb="0"/><line nr="149" mi="3" ci="0" mb="0" cb="0"/><line nr="150" mi="3" ci="1" mb="0" cb="0"/><line nr="152" mi="0" ci="3" mb="0" cb="0"/><line nr="153" mi="0" ci="1" mb="0" cb="0"/><line nr="168" mi="0" ci="9" mb="0" cb="0"/><line nr="169" mi="0" ci="3" mb="0" cb="0"/><line nr="170" mi="0" ci="1" mb="0" cb="0"/><line nr="183" mi="0" ci="6" mb="0" cb="0"/><line nr="184" mi="0" ci="2" mb="1" cb="1"/><line nr="185" mi="0" ci="11" mb="7" cb="2"/><line nr="186" mi="3" ci="0" mb="0" cb="0"/><line nr="187" mi="6" ci="0" mb="0" cb="0"/><line nr="188" mi="3" ci="0" mb="0" cb="0"/><line nr="189" mi="1" ci="0" mb="0" cb="0"/><line nr="190" mi="3" ci="0" mb="0" cb="0"/><line nr="191" mi="5" ci="0" mb="0" cb="0"/><line nr="192" mi="1" ci="0" mb="0" cb="0"/><line nr="193" mi="3" ci="0" mb="0" cb="0"/><line nr="194" mi="5" ci="0" mb="0" cb="0"/><line nr="195" mi="1" ci="0" mb="0" cb="0"/><line nr="196" mi="3" ci="0" mb="0" cb="0"/><line nr="197" mi="3" ci="0" mb="0" cb="0"/><line nr="198" mi="1" ci="0" mb="0" cb="0"/><line nr="199" mi="3" ci="0" mb="0" cb="0"/><line nr="200" mi="3" ci="0" mb="0" cb="0"/><line nr="201" mi="1" ci="0" mb="0" cb="0"/><line nr="202" mi="0" ci="3" mb="0" cb="0"/><line nr="203" mi="0" ci="5" mb="0" cb="0"/><line nr="204" mi="0" ci="1" mb="0" cb="0"/><line nr="205" mi="0" ci="3" mb="0" cb="0"/><line nr="206" mi="0" ci="6" mb="0" cb="0"/><line nr="207" mi="0" ci="1" mb="0" cb="0"/><line nr="208" mi="0" ci="1" mb="0" cb="0"/><line nr="209" mi="3" ci="0" mb="0" cb="0"/><line nr="210" mi="3" ci="0" mb="0" cb="0"/><line nr="211" mi="5" ci="0" mb="0" cb="0"/><line nr="212" mi="7" ci="0" mb="0" cb="0"/><line nr="213" mi="7" ci="0" mb="0" cb="0"/><line nr="214" mi="1" ci="0" mb="0" cb="0"/><line nr="219" mi="1" ci="0" mb="0" cb="0"/><line nr="221" mi="0" ci="1" mb="0" cb="0"/><line nr="223" mi="0" ci="1" mb="0" cb="0"/><line nr="231" mi="0" ci="8" mb="2" cb="2"/><line nr="232" mi="0" ci="4" mb="0" cb="0"/><line nr="234" mi="0" ci="2" mb="0" cb="2"/><line nr="235" mi="0" ci="5" mb="0" cb="0"/><line nr="237" mi="0" ci="3" mb="0" cb="0"/><line nr="238" mi="0" ci="1" mb="0" cb="0"/><line nr="239" mi="0" ci="1" mb="0" cb="0"/><line nr="240" mi="0" ci="4" mb="0" cb="0"/><line nr="241" mi="1" ci="0" mb="0" cb="0"/><line nr="242" mi="0" ci="1" mb="0" cb="0"/><line nr="249" mi="0" ci="5" mb="0" cb="0"/><line nr="250" mi="0" ci="7" mb="2" cb="2"/><line nr="251" mi="0" ci="3" mb="0" cb="0"/><line nr="252" mi="0" ci="3" mb="0" cb="0"/><line nr="254" mi="1" ci="0" mb="0" cb="0"/><line nr="255" mi="0" ci="1" mb="0" cb="0"/><line nr="256" mi="0" ci="1" mb="0" cb="0"/><line nr="264" mi="0" ci="2" mb="0" cb="0"/><line nr="265" mi="0" ci="2" mb="0" cb="0"/><line nr="266" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="109" covered="264"/><counter type="BRANCH" missed="14" covered="15"/><counter type="LINE" missed="37" covered="76"/><counter type="COMPLEXITY" missed="15" covered="14"/><counter type="METHOD" missed="1" covered="9"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><counter type="INSTRUCTION" missed="760" covered="361"/><counter type="BRANCH" missed="46" covered="18"/><counter type="LINE" missed="195" covered="103"/><counter type="COMPLEXITY" missed="57" covered="21"/><counter type="METHOD" missed="19" covered="16"/><counter type="CLASS" missed="1" covered="3"/></package><package name="it/polimi/ingsw/client/frontend/gui"><class name="it/polimi/ingsw/client/frontend/gui/GraphicalApplication" sourcefilename="GraphicalApplication.java"><method name="&lt;init&gt;" desc="()V" line="17"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="main" desc="([Ljava/lang/String;)V" line="29"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="start" desc="(Ljavafx/stage/Stage;)V" line="40"><counter type="INSTRUCTION" missed="38" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="loadScene" desc="(Ljava/lang/String;)Ljava/lang/Object;" line="79"><counter type="INSTRUCTION" missed="20" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$start$0" desc="(Ljavafx/stage/WindowEvent;)V" line="65"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;clinit&gt;" desc="()V" line="21"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="73" covered="0"/><counter type="LINE" missed="25" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/gui/GraphicalViewGUI" sourcefilename="GraphicalViewGUI.java"><method name="&lt;init&gt;" desc="(Ljavafx/stage/Stage;)V" line="38"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="changePlayer" desc="()V" line="55"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="makeMove" desc="()V" line="73"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="createMatch" desc="(Ljava/lang/String;Ljava/lang/Integer;)V" line="85"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="joinMatch" desc="(Ljava/lang/String;)V" line="92"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyMatchStarted" desc="()V" line="98"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyMatchResumed" desc="(Z)V" line="103"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setupMatch" desc="(ZZ)V" line="111"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setupResumedMatch" desc="(Z)V" line="165"><counter type="INSTRUCTION" missed="38" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="10" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="giveInitialCard" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="205"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="giveSecretObjectives" desc="(Lit/polimi/ingsw/utils/Pair;)V" line="215"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewInitialCard" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="225"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSetInitialSide" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Side;Ljava/util/Map;)V" line="231"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewSecretObjective" desc="(Ljava/lang/String;)V" line="243"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneChoseSecretObjective" desc="(Ljava/lang/String;)V" line="250"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyLastTurn" desc="()V" line="264"><counter type="INSTRUCTION" missed="17" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneJoined" desc="(Ljava/lang/String;Ljava/util/List;)V" line="271"><counter type="INSTRUCTION" missed="51" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneQuit" desc="(Ljava/lang/String;)V" line="306"><counter type="INSTRUCTION" missed="25" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="matchFinished" desc="(Ljava/util/List;)V" line="318"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSentBroadcastText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="336"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSentPrivateText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="346"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someonePlayedCard" desc="(Ljava/lang/String;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;ILjava/util/Map;)V" line="356"><counter type="INSTRUCTION" missed="18" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewCard" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/DrawSource;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/utils/Pair;)V" line="382"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyError" desc="(Ljava/lang/Exception;)V" line="404"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyError" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="413"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setUsername" desc="(Ljava/lang/String;)V" line="445"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getUsername" desc="()Ljava/lang/String;" line="454"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getAvailableMatches" desc="()V" line="461"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="receiveAvailableMatches" desc="(Ljava/util/List;)V" line="467"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setLobbySceneController" desc="(Lit/polimi/ingsw/client/frontend/gui/controllers/LobbySceneController;)V" line="477"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="main" desc="([Ljava/lang/String;)V" line="486"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyConnectionLost" desc="()V" line="491"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="disconnect" desc="()V" line="508"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$notifyConnectionLost$24" desc="(Lit/polimi/ingsw/client/frontend/gui/controllers/RankingSceneController;)V" line="495"><counter type="INSTRUCTION" missed="17" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$receiveAvailableMatches$23" desc="(Ljava/util/List;)V" line="469"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$notifyError$22" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="417"><counter type="INSTRUCTION" missed="59" covered="0"/><counter type="LINE" missed="19" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someoneDrewCard$21" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/DrawSource;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/utils/Pair;)V" line="384"><counter type="INSTRUCTION" missed="64" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someonePlayedCard$20" desc="(Ljava/lang/String;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;ILjava/util/Map;)V" line="358"><counter type="INSTRUCTION" missed="60" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someoneSentPrivateText$19" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="347"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someoneSentBroadcastText$18" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="337"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$matchFinished$17" desc="(Ljava/util/List;)V" line="320"><counter type="INSTRUCTION" missed="20" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$matchFinished$16" desc="(Lit/polimi/ingsw/utils/LeaderboardEntry;)V" line="323"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someoneQuit$15" desc="(Ljava/lang/String;)V" line="308"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someoneJoined$14" desc="(Ljava/lang/String;Ljava/util/List;)V" line="298"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someoneJoined$13" desc="(Ljava/util/List;)V" line="285"><counter type="INSTRUCTION" missed="44" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someoneJoined$12" desc="(Lit/polimi/ingsw/utils/AvailableMatch;)Z" line="277"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$notifyLastTurn$11" desc="(Lit/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController;)V" line="265"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someoneChoseSecretObjective$10" desc="(Ljava/lang/String;)V" line="252"><counter type="INSTRUCTION" missed="27" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someoneSetInitialSide$9" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Side;)V" line="233"><counter type="INSTRUCTION" missed="37" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someoneDrewInitialCard$8" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="226"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$giveSecretObjectives$7" desc="(Lit/polimi/ingsw/utils/Pair;)V" line="218"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$giveInitialCard$6" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="208"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$setupResumedMatch$5" desc="(Ljava/lang/String;Lit/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController;)V" line="166"><counter type="INSTRUCTION" missed="91" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="12" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$setupMatch$4" desc="(ZZ)V" line="114"><counter type="INSTRUCTION" missed="129" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="29" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$setupMatch$3" desc="(Ljava/lang/String;Lit/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController;)V" line="151"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$setupMatch$2" desc="(Lit/polimi/ingsw/gamemodel/DrawSource;Lit/polimi/ingsw/gamemodel/PlayableCard;)V" line="127"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$makeMove$1" desc="()V" line="75"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$changePlayer$0" desc="()V" line="58"><counter type="INSTRUCTION" missed="31" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="1114" covered="0"/><counter type="BRANCH" missed="52" covered="0"/><counter type="LINE" missed="275" covered="0"/><counter type="COMPLEXITY" missed="84" covered="0"/><counter type="METHOD" missed="58" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><sourcefile name="GraphicalApplication.java"><line nr="17" mi="3" ci="0" mb="0" cb="0"/><line nr="21" mi="2" ci="0" mb="0" cb="0"/><line nr="22" mi="3" ci="0" mb="0" cb="0"/><line nr="29" mi="2" ci="0" mb="0" cb="0"/><line nr="30" mi="1" ci="0" mb="0" cb="0"/><line nr="40" mi="3" ci="0" mb="0" cb="0"/><line nr="41" mi="6" ci="0" mb="0" cb="0"/><line nr="44" mi="3" ci="0" mb="0" cb="0"/><line nr="46" mi="5" ci="0" mb="0" cb="0"/><line nr="48" mi="3" ci="0" mb="0" cb="0"/><line nr="50" mi="7" ci="0" mb="0" cb="0"/><line nr="61" mi="3" ci="0" mb="0" cb="0"/><line nr="62" mi="2" ci="0" mb="0" cb="0"/><line nr="63" mi="2" ci="0" mb="0" cb="0"/><line nr="64" mi="3" ci="0" mb="0" cb="0"/><line nr="65" mi="1" ci="0" mb="0" cb="0"/><line nr="66" mi="2" ci="0" mb="0" cb="0"/><line nr="67" mi="1" ci="0" mb="0" cb="0"/><line nr="68" mi="1" ci="0" mb="0" cb="0"/><line nr="79" mi="3" ci="0" mb="0" cb="0"/><line nr="80" mi="3" ci="0" mb="0" cb="0"/><line nr="81" mi="4" ci="0" mb="0" cb="0"/><line nr="82" mi="4" ci="0" mb="0" cb="0"/><line nr="83" mi="4" ci="0" mb="0" cb="0"/><line nr="84" mi="2" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="73" covered="0"/><counter type="LINE" missed="25" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="GraphicalViewGUI.java"><line nr="38" mi="3" ci="0" mb="0" cb="0"/><line nr="49" mi="2" ci="0" mb="0" cb="0"/><line nr="50" mi="3" ci="0" mb="0" cb="0"/><line nr="51" mi="1" ci="0" mb="0" cb="0"/><line nr="55" mi="3" ci="0" mb="0" cb="0"/><line nr="58" mi="12" ci="0" mb="2" cb="0"/><line nr="59" mi="6" ci="0" mb="0" cb="0"/><line nr="60" mi="5" ci="0" mb="0" cb="0"/><line nr="62" mi="3" ci="0" mb="0" cb="0"/><line nr="63" mi="3" ci="0" mb="0" cb="0"/><line nr="64" mi="1" ci="0" mb="0" cb="0"/><line nr="65" mi="1" ci="0" mb="0" cb="0"/><line nr="66" mi="1" ci="0" mb="0" cb="0"/><line nr="73" mi="2" ci="0" mb="0" cb="0"/><line nr="74" mi="3" ci="0" mb="0" cb="0"/><line nr="75" mi="5" ci="0" mb="0" cb="0"/><line nr="78" mi="8" ci="0" mb="0" cb="0"/><line nr="79" mi="8" ci="0" mb="0" cb="0"/><line nr="80" mi="1" ci="0" mb="0" cb="0"/><line nr="81" mi="1" ci="0" mb="0" cb="0"/><line nr="85" mi="4" ci="0" mb="0" cb="0"/><line nr="86" mi="3" ci="0" mb="0" cb="0"/><line nr="87" mi="3" ci="0" mb="0" cb="0"/><line nr="88" mi="1" ci="0" mb="0" cb="0"/><line nr="92" mi="3" ci="0" mb="0" cb="0"/><line nr="93" mi="3" ci="0" mb="0" cb="0"/><line nr="94" mi="1" ci="0" mb="0" cb="0"/><line nr="98" mi="4" ci="0" mb="0" cb="0"/><line nr="99" mi="1" ci="0" mb="0" cb="0"/><line nr="103" mi="4" ci="0" mb="0" cb="0"/><line nr="104" mi="1" ci="0" mb="0" cb="0"/><line nr="111" mi="3" ci="0" mb="0" cb="0"/><line nr="112" mi="5" ci="0" mb="0" cb="0"/><line nr="114" mi="3" ci="0" mb="2" cb="0"/><line nr="115" mi="5" ci="0" mb="0" cb="0"/><line nr="116" mi="4" ci="0" mb="0" cb="0"/><line nr="117" mi="5" ci="0" mb="0" cb="0"/><line nr="119" mi="5" ci="0" mb="0" cb="0"/><line nr="120" mi="1" ci="0" mb="0" cb="0"/><line nr="121" mi="5" ci="0" mb="0" cb="0"/><line nr="122" mi="1" ci="0" mb="0" cb="0"/><line nr="124" mi="5" ci="0" mb="0" cb="0"/><line nr="126" mi="5" ci="0" mb="0" cb="0"/><line nr="127" mi="7" ci="0" mb="0" cb="0"/><line nr="128" mi="1" ci="0" mb="0" cb="0"/><line nr="129" mi="9" ci="0" mb="0" cb="0"/><line nr="130" mi="9" ci="0" mb="0" cb="0"/><line nr="133" mi="2" ci="0" mb="0" cb="0"/><line nr="134" mi="5" ci="0" mb="0" cb="0"/><line nr="135" mi="11" ci="0" mb="2" cb="0"/><line nr="137" mi="8" ci="0" mb="0" cb="0"/><line nr="138" mi="6" ci="0" mb="0" cb="0"/><line nr="139" mi="8" ci="0" mb="0" cb="0"/><line nr="141" mi="3" ci="0" mb="0" cb="0"/><line nr="142" mi="1" ci="0" mb="0" cb="0"/><line nr="143" mi="5" ci="0" mb="0" cb="0"/><line nr="144" mi="1" ci="0" mb="0" cb="0"/><line nr="145" mi="1" ci="0" mb="0" cb="0"/><line nr="146" mi="1" ci="0" mb="0" cb="0"/><line nr="149" mi="5" ci="0" mb="0" cb="0"/><line nr="150" mi="5" ci="0" mb="0" cb="0"/><line nr="151" mi="5" ci="0" mb="2" cb="0"/><line nr="152" mi="4" ci="0" mb="0" cb="0"/><line nr="153" mi="1" ci="0" mb="0" cb="0"/><line nr="156" mi="4" ci="0" mb="0" cb="0"/><line nr="157" mi="5" ci="0" mb="2" cb="0"/><line nr="158" mi="1" ci="0" mb="0" cb="0"/><line nr="159" mi="1" ci="0" mb="0" cb="0"/><line nr="165" mi="5" ci="0" mb="0" cb="0"/><line nr="166" mi="6" ci="0" mb="0" cb="0"/><line nr="167" mi="4" ci="0" mb="0" cb="0"/><line nr="170" mi="26" ci="0" mb="0" cb="0"/><line nr="173" mi="3" ci="0" mb="0" cb="0"/><line nr="174" mi="11" ci="0" mb="2" cb="0"/><line nr="175" mi="3" ci="0" mb="2" cb="0"/><line nr="176" mi="19" ci="0" mb="0" cb="0"/><line nr="178" mi="1" ci="0" mb="0" cb="0"/><line nr="181" mi="5" ci="0" mb="0" cb="0"/><line nr="182" mi="8" ci="0" mb="0" cb="0"/><line nr="183" mi="4" ci="0" mb="0" cb="0"/><line nr="184" mi="1" ci="0" mb="0" cb="0"/><line nr="187" mi="2" ci="0" mb="0" cb="0"/><line nr="188" mi="6" ci="0" mb="2" cb="0"/><line nr="189" mi="2" ci="0" mb="2" cb="0"/><line nr="190" mi="2" ci="0" mb="0" cb="0"/><line nr="191" mi="9" ci="0" mb="0" cb="0"/><line nr="195" mi="3" ci="0" mb="0" cb="0"/><line nr="196" mi="4" ci="0" mb="0" cb="0"/><line nr="198" mi="4" ci="0" mb="0" cb="0"/><line nr="201" mi="1" ci="0" mb="0" cb="0"/><line nr="205" mi="3" ci="0" mb="0" cb="0"/><line nr="206" mi="2" ci="0" mb="0" cb="0"/><line nr="207" mi="4" ci="0" mb="0" cb="0"/><line nr="208" mi="8" ci="0" mb="0" cb="0"/><line nr="209" mi="5" ci="0" mb="0" cb="0"/><line nr="210" mi="1" ci="0" mb="0" cb="0"/><line nr="211" mi="1" ci="0" mb="0" cb="0"/><line nr="215" mi="3" ci="0" mb="0" cb="0"/><line nr="216" mi="2" ci="0" mb="0" cb="0"/><line nr="217" mi="4" ci="0" mb="0" cb="0"/><line nr="218" mi="8" ci="0" mb="0" cb="0"/><line nr="219" mi="5" ci="0" mb="0" cb="0"/><line nr="220" mi="1" ci="0" mb="0" cb="0"/><line nr="221" mi="1" ci="0" mb="0" cb="0"/><line nr="225" mi="4" ci="0" mb="0" cb="0"/><line nr="226" mi="13" ci="0" mb="0" cb="0"/><line nr="227" mi="1" ci="0" mb="0" cb="0"/><line nr="231" mi="5" ci="0" mb="0" cb="0"/><line nr="232" mi="5" ci="0" mb="0" cb="0"/><line nr="233" mi="6" ci="0" mb="0" cb="0"/><line nr="234" mi="2" ci="0" mb="0" cb="0"/><line nr="235" mi="7" ci="0" mb="0" cb="0"/><line nr="236" mi="13" ci="0" mb="0" cb="0"/><line nr="237" mi="8" ci="0" mb="0" cb="0"/><line nr="238" mi="1" ci="0" mb="0" cb="0"/><line nr="239" mi="1" ci="0" mb="0" cb="0"/><line nr="243" mi="3" ci="0" mb="0" cb="0"/><line nr="244" mi="6" ci="0" mb="0" cb="0"/><line nr="245" mi="6" ci="0" mb="0" cb="0"/><line nr="246" mi="1" ci="0" mb="0" cb="0"/><line nr="250" mi="3" ci="0" mb="0" cb="0"/><line nr="251" mi="4" ci="0" mb="0" cb="0"/><line nr="252" mi="6" ci="0" mb="0" cb="0"/><line nr="253" mi="2" ci="0" mb="0" cb="0"/><line nr="254" mi="5" ci="0" mb="2" cb="0"/><line nr="255" mi="10" ci="0" mb="0" cb="0"/><line nr="257" mi="3" ci="0" mb="0" cb="0"/><line nr="259" mi="1" ci="0" mb="0" cb="0"/><line nr="260" mi="1" ci="0" mb="0" cb="0"/><line nr="264" mi="12" ci="0" mb="2" cb="0"/><line nr="265" mi="7" ci="0" mb="0" cb="0"/><line nr="266" mi="1" ci="0" mb="0" cb="0"/><line nr="267" mi="1" ci="0" mb="0" cb="0"/><line nr="271" mi="10" ci="0" mb="4" cb="0"/><line nr="272" mi="1" ci="0" mb="0" cb="0"/><line nr="274" mi="4" ci="0" mb="0" cb="0"/><line nr="275" mi="3" ci="0" mb="2" cb="0"/><line nr="276" mi="8" ci="0" mb="0" cb="0"/><line nr="277" mi="8" ci="0" mb="0" cb="0"/><line nr="278" mi="1" ci="0" mb="0" cb="0"/><line nr="279" mi="3" ci="0" mb="0" cb="0"/><line nr="281" mi="5" ci="0" mb="2" cb="0"/><line nr="282" mi="3" ci="0" mb="0" cb="0"/><line nr="283" mi="5" ci="0" mb="0" cb="0"/><line nr="285" mi="5" ci="0" mb="0" cb="0"/><line nr="286" mi="1" ci="0" mb="0" cb="0"/><line nr="287" mi="5" ci="0" mb="0" cb="0"/><line nr="288" mi="1" ci="0" mb="0" cb="0"/><line nr="289" mi="5" ci="0" mb="0" cb="0"/><line nr="290" mi="5" ci="0" mb="0" cb="0"/><line nr="291" mi="6" ci="0" mb="0" cb="0"/><line nr="292" mi="10" ci="0" mb="2" cb="0"/><line nr="293" mi="4" ci="0" mb="0" cb="0"/><line nr="294" mi="1" ci="0" mb="0" cb="0"/><line nr="295" mi="1" ci="0" mb="0" cb="0"/><line nr="297" mi="5" ci="0" mb="0" cb="0"/><line nr="298" mi="4" ci="0" mb="0" cb="0"/><line nr="299" mi="5" ci="0" mb="0" cb="0"/><line nr="300" mi="1" ci="0" mb="0" cb="0"/><line nr="302" mi="1" ci="0" mb="0" cb="0"/><line nr="306" mi="5" ci="0" mb="2" cb="0"/><line nr="307" mi="5" ci="0" mb="0" cb="0"/><line nr="308" mi="4" ci="0" mb="0" cb="0"/><line nr="309" mi="8" ci="0" mb="0" cb="0"/><line nr="310" mi="1" ci="0" mb="0" cb="0"/><line nr="311" mi="9" ci="0" mb="4" cb="0"/><line nr="312" mi="5" ci="0" mb="0" cb="0"/><line nr="314" mi="1" ci="0" mb="0" cb="0"/><line nr="318" mi="4" ci="0" mb="0" cb="0"/><line nr="320" mi="3" ci="0" mb="0" cb="0"/><line nr="321" mi="5" ci="0" mb="0" cb="0"/><line nr="322" mi="4" ci="0" mb="0" cb="0"/><line nr="323" mi="6" ci="0" mb="2" cb="0"/><line nr="324" mi="5" ci="0" mb="0" cb="0"/><line nr="326" mi="4" ci="0" mb="0" cb="0"/><line nr="327" mi="1" ci="0" mb="0" cb="0"/><line nr="328" mi="1" ci="0" mb="0" cb="0"/><line nr="329" mi="5" ci="0" mb="0" cb="0"/><line nr="330" mi="1" ci="0" mb="0" cb="0"/><line nr="331" mi="1" ci="0" mb="0" cb="0"/><line nr="332" mi="1" ci="0" mb="0" cb="0"/><line nr="336" mi="5" ci="0" mb="0" cb="0"/><line nr="337" mi="5" ci="0" mb="2" cb="0"/><line nr="338" mi="5" ci="0" mb="0" cb="0"/><line nr="340" mi="5" ci="0" mb="0" cb="0"/><line nr="341" mi="1" ci="0" mb="0" cb="0"/><line nr="342" mi="1" ci="0" mb="0" cb="0"/><line nr="346" mi="5" ci="0" mb="0" cb="0"/><line nr="347" mi="5" ci="0" mb="2" cb="0"/><line nr="348" mi="5" ci="0" mb="0" cb="0"/><line nr="350" mi="5" ci="0" mb="0" cb="0"/><line nr="351" mi="1" ci="0" mb="0" cb="0"/><line nr="352" mi="1" ci="0" mb="0" cb="0"/><line nr="356" mi="8" ci="0" mb="0" cb="0"/><line nr="357" mi="9" ci="0" mb="0" cb="0"/><line nr="358" mi="6" ci="0" mb="0" cb="0"/><line nr="359" mi="5" ci="0" mb="0" cb="0"/><line nr="360" mi="3" ci="0" mb="0" cb="0"/><line nr="361" mi="5" ci="0" mb="0" cb="0"/><line nr="362" mi="8" ci="0" mb="0" cb="0"/><line nr="363" mi="3" ci="0" mb="0" cb="0"/><line nr="366" mi="5" ci="0" mb="2" cb="0"/><line nr="368" mi="3" ci="0" mb="0" cb="0"/><line nr="369" mi="4" ci="0" mb="0" cb="0"/><line nr="371" mi="5" ci="0" mb="0" cb="0"/><line nr="373" mi="5" ci="0" mb="0" cb="0"/><line nr="375" mi="7" ci="0" mb="0" cb="0"/><line nr="376" mi="1" ci="0" mb="0" cb="0"/><line nr="377" mi="1" ci="0" mb="0" cb="0"/><line nr="382" mi="7" ci="0" mb="0" cb="0"/><line nr="383" mi="7" ci="0" mb="0" cb="0"/><line nr="384" mi="6" ci="0" mb="0" cb="0"/><line nr="385" mi="8" ci="0" mb="0" cb="0"/><line nr="386" mi="8" ci="0" mb="4" cb="0"/><line nr="387" mi="7" ci="0" mb="0" cb="0"/><line nr="389" mi="8" ci="0" mb="0" cb="0"/><line nr="390" mi="8" ci="0" mb="0" cb="0"/><line nr="393" mi="5" ci="0" mb="2" cb="0"/><line nr="394" mi="4" ci="0" mb="0" cb="0"/><line nr="395" mi="5" ci="0" mb="0" cb="0"/><line nr="398" mi="4" ci="0" mb="0" cb="0"/><line nr="399" mi="1" ci="0" mb="0" cb="0"/><line nr="400" mi="1" ci="0" mb="0" cb="0"/><line nr="404" mi="6" ci="0" mb="0" cb="0"/><line nr="405" mi="1" ci="0" mb="0" cb="0"/><line nr="413" mi="5" ci="0" mb="0" cb="0"/><line nr="417" mi="3" ci="0" mb="0" cb="0"/><line nr="418" mi="4" ci="0" mb="0" cb="0"/><line nr="419" mi="4" ci="0" mb="0" cb="0"/><line nr="421" mi="4" ci="0" mb="0" cb="0"/><line nr="422" mi="7" ci="0" mb="0" cb="0"/><line nr="425" mi="3" ci="0" mb="0" cb="0"/><line nr="426" mi="3" ci="0" mb="0" cb="0"/><line nr="427" mi="3" ci="0" mb="0" cb="0"/><line nr="429" mi="3" ci="0" mb="0" cb="0"/><line nr="430" mi="3" ci="0" mb="0" cb="0"/><line nr="431" mi="4" ci="0" mb="0" cb="0"/><line nr="432" mi="3" ci="0" mb="0" cb="0"/><line nr="433" mi="3" ci="0" mb="0" cb="0"/><line nr="434" mi="2" ci="0" mb="0" cb="0"/><line nr="437" mi="2" ci="0" mb="0" cb="0"/><line nr="438" mi="1" ci="0" mb="0" cb="0"/><line nr="439" mi="5" ci="0" mb="0" cb="0"/><line nr="440" mi="1" ci="0" mb="0" cb="0"/><line nr="441" mi="1" ci="0" mb="0" cb="0"/><line nr="442" mi="1" ci="0" mb="0" cb="0"/><line nr="445" mi="3" ci="0" mb="0" cb="0"/><line nr="446" mi="4" ci="0" mb="0" cb="0"/><line nr="447" mi="1" ci="0" mb="0" cb="0"/><line nr="454" mi="3" ci="0" mb="0" cb="0"/><line nr="461" mi="3" ci="0" mb="0" cb="0"/><line nr="462" mi="3" ci="0" mb="0" cb="0"/><line nr="463" mi="1" ci="0" mb="0" cb="0"/><line nr="467" mi="3" ci="0" mb="0" cb="0"/><line nr="468" mi="3" ci="0" mb="0" cb="0"/><line nr="469" mi="9" ci="0" mb="0" cb="0"/><line nr="470" mi="1" ci="0" mb="0" cb="0"/><line nr="477" mi="3" ci="0" mb="0" cb="0"/><line nr="478" mi="2" ci="0" mb="0" cb="0"/><line nr="479" mi="1" ci="0" mb="0" cb="0"/><line nr="486" mi="3" ci="0" mb="0" cb="0"/><line nr="487" mi="1" ci="0" mb="0" cb="0"/><line nr="491" mi="6" ci="0" mb="0" cb="0"/><line nr="492" mi="4" ci="0" mb="0" cb="0"/><line nr="493" mi="4" ci="0" mb="0" cb="0"/><line nr="495" mi="4" ci="0" mb="0" cb="0"/><line nr="496" mi="3" ci="0" mb="0" cb="0"/><line nr="497" mi="2" ci="0" mb="0" cb="0"/><line nr="498" mi="1" ci="0" mb="0" cb="0"/><line nr="499" mi="5" ci="0" mb="0" cb="0"/><line nr="500" mi="1" ci="0" mb="0" cb="0"/><line nr="501" mi="1" ci="0" mb="0" cb="0"/><line nr="502" mi="1" ci="0" mb="0" cb="0"/><line nr="508" mi="3" ci="0" mb="0" cb="0"/><line nr="509" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="1114" covered="0"/><counter type="BRANCH" missed="52" covered="0"/><counter type="LINE" missed="275" covered="0"/><counter type="COMPLEXITY" missed="84" covered="0"/><counter type="METHOD" missed="58" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><counter type="INSTRUCTION" missed="1187" covered="0"/><counter type="BRANCH" missed="52" covered="0"/><counter type="LINE" missed="300" covered="0"/><counter type="COMPLEXITY" missed="90" covered="0"/><counter type="METHOD" missed="64" covered="0"/><counter type="CLASS" missed="2" covered="0"/></package><package name="it/polimi/ingsw/network/messages/errors"><class name="it/polimi/ingsw/network/messages/errors/ErrorMessage" sourcefilename="ErrorMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="12"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getError" desc="()Ljava/lang/String;" line="22"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getMessage" desc="()Ljava/lang/String;" line="30"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="3" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><sourcefile name="ErrorMessage.java"><line nr="12" mi="2" ci="0" mb="0" cb="0"/><line nr="13" mi="3" ci="0" mb="0" cb="0"/><line nr="14" mi="3" ci="0" mb="0" cb="0"/><line nr="15" mi="1" ci="0" mb="0" cb="0"/><line nr="22" mi="3" ci="0" mb="0" cb="0"/><line nr="30" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="3" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="3" covered="0"/><counter type="CLASS" missed="1" covered="0"/></package><package name="it/polimi/ingsw/gamemodel"><class name="it/polimi/ingsw/gamemodel/Objective" sourcefilename="Objective.java"><method name="&lt;init&gt;" desc="(ILit/polimi/ingsw/gamemodel/Requirement;)V" line="26"><counter type="INSTRUCTION" missed="0" covered="22"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getPoints" desc="()I" line="39"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getReq" desc="()Lit/polimi/ingsw/gamemodel/Requirement;" line="48"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getID" desc="()Ljava/lang/Integer;" line="55"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="equals" desc="(Ljava/lang/Object;)Z" line="60"><counter type="INSTRUCTION" missed="2" covered="17"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="1" covered="5"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="&lt;clinit&gt;" desc="()V" line="17"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="2" covered="52"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="1" covered="15"/><counter type="COMPLEXITY" missed="1" covered="7"/><counter type="METHOD" missed="0" covered="6"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/ResourceCard" sourcefilename="ResourceCard.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/CardFace;Lit/polimi/ingsw/gamemodel/Symbol;I)V" line="24"><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getPoints" desc="()I" line="35"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="13"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/Color" sourcefilename="Color.java"><method name="&lt;clinit&gt;" desc="()V" line="6"><counter type="INSTRUCTION" missed="0" covered="27"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="27"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/Corner" sourcefilename="Corner.java"><method name="&lt;clinit&gt;" desc="()V" line="6"><counter type="INSTRUCTION" missed="0" covered="27"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="27"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/AfterDrawState" sourcefilename="AfterDrawState.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Match;)V" line="19"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="transition" desc="()V" line="29"><counter type="INSTRUCTION" missed="0" covered="22"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="26"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/WaitState" sourcefilename="WaitState.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Match;)V" line="20"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="transition" desc="()V" line="28"><counter type="INSTRUCTION" missed="0" covered="35"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="10"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="removePlayer" desc="()V" line="48"><counter type="INSTRUCTION" missed="0" covered="1"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="addPlayer" desc="()V" line="55"><counter type="INSTRUCTION" missed="0" covered="1"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="41"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="14"/><counter type="COMPLEXITY" missed="0" covered="5"/><counter type="METHOD" missed="0" covered="4"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/PlacementOutcome" sourcefilename="PlacementOutcome.java"><method name="&lt;clinit&gt;" desc="()V" line="8"><counter type="INSTRUCTION" missed="0" covered="21"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="21"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/Requirement" sourcefilename="Requirement.java"><method name="&lt;init&gt;" desc="()V" line="19"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/Match" sourcefilename="Match.java"><method name="&lt;init&gt;" desc="(ILit/polimi/ingsw/gamemodel/GameDeck;Lit/polimi/ingsw/gamemodel/GameDeck;Lit/polimi/ingsw/gamemodel/GameDeck;Lit/polimi/ingsw/gamemodel/GameDeck;)V" line="44"><counter type="INSTRUCTION" missed="5" covered="94"/><counter type="BRANCH" missed="2" covered="10"/><counter type="LINE" missed="1" covered="23"/><counter type="COMPLEXITY" missed="2" covered="5"/><counter type="METHOD" missed="0" covered="1"/></method><method name="addPlayer" desc="(Lit/polimi/ingsw/gamemodel/Player;)V" line="103"><counter type="INSTRUCTION" missed="0" covered="40"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="10"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="removePlayer" desc="(Lit/polimi/ingsw/gamemodel/Player;)V" line="123"><counter type="INSTRUCTION" missed="0" covered="25"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="isFull" desc="()Z" line="140"><counter type="INSTRUCTION" missed="0" covered="13"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="nextPlayer" desc="()V" line="150"><counter type="INSTRUCTION" missed="5" covered="44"/><counter type="BRANCH" missed="1" covered="5"/><counter type="LINE" missed="1" covered="8"/><counter type="COMPLEXITY" missed="1" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><method name="isFinished" desc="()Z" line="174"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="doInitialTurnFinish" desc="()V" line="182"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="isInitialTurnFinished" desc="()Z" line="192"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="doStart" desc="()V" line="200"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="isStarted" desc="()Z" line="210"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getCurrentPlayer" desc="()Lit/polimi/ingsw/gamemodel/Player;" line="220"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getPlayers" desc="()Ljava/util/List;" line="229"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="setState" desc="(Lit/polimi/ingsw/gamemodel/MatchState;)V" line="239"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="drawInitialCard" desc="()Lit/polimi/ingsw/gamemodel/InitialCard;" line="249"><counter type="INSTRUCTION" missed="6" covered="27"/><counter type="LINE" missed="2" covered="7"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="proposeSecretObjectives" desc="()Lit/polimi/ingsw/utils/Pair;" line="272"><counter type="INSTRUCTION" missed="6" covered="37"/><counter type="LINE" missed="2" covered="8"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="setSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Objective;)V" line="298"><counter type="INSTRUCTION" missed="5" covered="46"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="1" covered="11"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="setupPlayers" desc="()V" line="325"><counter type="INSTRUCTION" missed="0" covered="21"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="setupDecks" desc="()V" line="339"><counter type="INSTRUCTION" missed="6" covered="75"/><counter type="LINE" missed="2" covered="17"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="setupBoards" desc="()V" line="376"><counter type="INSTRUCTION" missed="6" covered="41"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="2" covered="10"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="makeMove" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="407"><counter type="INSTRUCTION" missed="15" covered="76"/><counter type="BRANCH" missed="2" covered="4"/><counter type="LINE" missed="5" covered="20"/><counter type="COMPLEXITY" missed="2" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><method name="drawCard" desc="(Lit/polimi/ingsw/gamemodel/DrawSource;)Lit/polimi/ingsw/gamemodel/PlayableCard;" line="474"><counter type="INSTRUCTION" missed="27" covered="148"/><counter type="BRANCH" missed="4" covered="17"/><counter type="LINE" missed="6" covered="35"/><counter type="COMPLEXITY" missed="4" covered="9"/><counter type="METHOD" missed="0" covered="1"/></method><method name="setInitialSide" desc="(Lit/polimi/ingsw/gamemodel/Side;Ljava/util/Map;)V" line="572"><counter type="INSTRUCTION" missed="6" covered="30"/><counter type="LINE" missed="2" covered="8"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="checkObjectivesAchievement" desc="()Ljava/util/Map;" line="591"><counter type="INSTRUCTION" missed="0" covered="94"/><counter type="BRANCH" missed="0" covered="12"/><counter type="LINE" missed="0" covered="20"/><counter type="COMPLEXITY" missed="0" covered="7"/><counter type="METHOD" missed="0" covered="1"/></method><method name="decideWinner" desc="()V" line="626"><counter type="INSTRUCTION" missed="0" covered="79"/><counter type="BRANCH" missed="0" covered="6"/><counter type="LINE" missed="0" covered="18"/><counter type="COMPLEXITY" missed="0" covered="4"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getPlayersFinalRanking" desc="()Ljava/util/List;" line="668"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getVisibleObjectives" desc="()Lit/polimi/ingsw/utils/Pair;" line="677"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getVisiblePlayableCards" desc="()Ljava/util/Map;" line="688"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getCurrentState" desc="()Lit/polimi/ingsw/gamemodel/MatchState;" line="697"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getDecksTopReigns" desc="()Lit/polimi/ingsw/utils/Pair;" line="708"><counter type="INSTRUCTION" missed="0" covered="32"/><counter type="BRANCH" missed="0" covered="4"/><counter type="LINE" missed="0" covered="9"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getMaxPlayers" desc="()I" line="735"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="subscribeObserver" desc="(Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="744"><counter type="INSTRUCTION" missed="0" covered="14"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="unsubscribeObserver" desc="(Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="756"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="notifyMatchStart" desc="()V" line="764"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sendBroadcastText" desc="(Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/String;)V" line="775"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sendPrivateText" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/String;)V" line="787"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="notifyObservers" desc="(Lit/polimi/ingsw/gamemodel/MatchObserverCallable;)V" line="798"><counter type="INSTRUCTION" missed="0" covered="34"/><counter type="BRANCH" missed="1" covered="5"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="1" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><method name="isRejoinable" desc="()Z" line="814"><counter type="INSTRUCTION" missed="5" covered="8"/><counter type="BRANCH" missed="3" covered="1"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$isRejoinable$11" desc="(Lit/polimi/ingsw/gamemodel/Player;)Z" line="814"><counter type="INSTRUCTION" missed="2" covered="5"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$notifyObservers$10" desc="(Lit/polimi/ingsw/gamemodel/MatchObserverCallable;Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="804"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$sendPrivateText$9" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/String;Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="787"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$sendBroadcastText$8" desc="(Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/String;Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="775"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$setInitialSide$7" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Side;Ljava/util/Map;Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="584"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$drawCard$6" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/DrawSource;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="559"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$makeMove$5" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="448"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$setSecretObjective$4" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/Objective;Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="315"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$proposeSecretObjectives$3" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="281"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$drawInitialCard$2" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="259"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$removePlayer$1" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="128"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$addPlayer$0" desc="(Lit/polimi/ingsw/gamemodel/Player;Lit/polimi/ingsw/gamemodel/MatchObserver;)V" line="111"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="94" covered="1108"/><counter type="BRANCH" missed="16" covered="81"/><counter type="LINE" missed="24" covered="252"/><counter type="COMPLEXITY" missed="15" covered="85"/><counter type="METHOD" missed="0" covered="49"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/MatchObserverCallable" sourcefilename="MatchObserverCallable.java"/><class name="it/polimi/ingsw/gamemodel/InitialCard" sourcefilename="InitialCard.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/CardFace;Lit/polimi/ingsw/gamemodel/CardFace;)V" line="23"><counter type="INSTRUCTION" missed="0" covered="22"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="&lt;clinit&gt;" desc="()V" line="14"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="26"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/GameDeck" sourcefilename="GameDeck.java"><method name="&lt;init&gt;" desc="()V" line="24"><counter type="INSTRUCTION" missed="0" covered="8"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="add" desc="(Ljava/lang/Object;)V" line="34"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getSize" desc="()I" line="43"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="pop" desc="()Ljava/lang/Object;" line="53"><counter type="INSTRUCTION" missed="0" covered="12"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="peek" desc="()Ljava/lang/Object;" line="64"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="poll" desc="()Ljava/lang/Object;" line="75"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="shuffle" desc="()V" line="84"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="isEmpty" desc="()Z" line="93"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="55"/><counter type="BRANCH" missed="0" covered="6"/><counter type="LINE" missed="0" covered="18"/><counter type="COMPLEXITY" missed="0" covered="11"/><counter type="METHOD" missed="0" covered="8"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/AfterMoveState" sourcefilename="AfterMoveState.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Match;)V" line="19"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="drawCard" desc="()V" line="28"><counter type="INSTRUCTION" missed="0" covered="1"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="transition" desc="()V" line="35"><counter type="INSTRUCTION" missed="0" covered="13"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="18"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/GoldCard" sourcefilename="GoldCard.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/CardFace;Lit/polimi/ingsw/gamemodel/Symbol;Lit/polimi/ingsw/gamemodel/Symbol;ILit/polimi/ingsw/gamemodel/QuantityRequirement;)V" line="31"><counter type="INSTRUCTION" missed="10" covered="22"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="8"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getMultiplier" desc="()Lit/polimi/ingsw/gamemodel/Symbol;" line="51"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getRequirement" desc="()Lit/polimi/ingsw/gamemodel/QuantityRequirement;" line="60"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getPoints" desc="()I" line="69"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="calculatePoints" desc="(Lit/polimi/ingsw/gamemodel/Board;Lit/polimi/ingsw/utils/Pair;)I" line="81"><counter type="INSTRUCTION" missed="0" covered="73"/><counter type="BRANCH" missed="1" covered="13"/><counter type="LINE" missed="0" covered="17"/><counter type="COMPLEXITY" missed="1" covered="7"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getEdges" desc="(Lit/polimi/ingsw/utils/Pair;)Ljava/util/Set;" line="115"><counter type="INSTRUCTION" missed="0" covered="94"/><counter type="LINE" missed="0" covered="10"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="13" covered="195"/><counter type="BRANCH" missed="2" covered="14"/><counter type="LINE" missed="2" covered="37"/><counter type="COMPLEXITY" missed="3" covered="11"/><counter type="METHOD" missed="1" covered="5"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/DrawSource" sourcefilename="DrawSource.java"><method name="&lt;clinit&gt;" desc="()V" line="6"><counter type="INSTRUCTION" missed="0" covered="39"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="39"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/Symbol" sourcefilename="Symbol.java"><method name="getReigns" desc="()Ljava/util/EnumSet;" line="30"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getBasicResources" desc="()Ljava/util/EnumSet;" line="44"><counter type="INSTRUCTION" missed="0" covered="29"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getValidCorner" desc="()Ljava/util/EnumSet;" line="61"><counter type="INSTRUCTION" missed="0" covered="37"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getValidMultiplier" desc="()Ljava/util/EnumSet;" line="80"><counter type="INSTRUCTION" missed="0" covered="37"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="&lt;clinit&gt;" desc="()V" line="11"><counter type="INSTRUCTION" missed="0" covered="69"/><counter type="LINE" missed="0" covered="12"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="178"/><counter type="LINE" missed="0" covered="16"/><counter type="COMPLEXITY" missed="0" covered="5"/><counter type="METHOD" missed="0" covered="5"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/PositionRequirement" sourcefilename="PositionRequirement.java"><method name="&lt;init&gt;" desc="(Ljava/util/Map;)V" line="27"><counter type="INSTRUCTION" missed="10" covered="24"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="1" covered="7"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="timesMet" desc="(Lit/polimi/ingsw/gamemodel/Board;)I" line="46"><counter type="INSTRUCTION" missed="0" covered="135"/><counter type="BRANCH" missed="0" covered="16"/><counter type="LINE" missed="0" covered="21"/><counter type="COMPLEXITY" missed="0" covered="9"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getReqs" desc="()Ljava/util/Map;" line="89"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="13" covered="159"/><counter type="BRANCH" missed="1" covered="19"/><counter type="LINE" missed="2" covered="28"/><counter type="COMPLEXITY" missed="2" covered="11"/><counter type="METHOD" missed="1" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/Board" sourcefilename="Board.java"><method name="&lt;init&gt;" desc="()V" line="35"><counter type="INSTRUCTION" missed="0" covered="36"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="8"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getAvailableResources" desc="()Ljava/util/Map;" line="50"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getPlacedCards" desc="()Ljava/util/Map;" line="59"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getCurrentHand" desc="()Ljava/util/List;" line="69"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="removeHandCard" desc="(Lit/polimi/ingsw/gamemodel/PlayableCard;)V" line="79"><counter type="INSTRUCTION" missed="5" covered="11"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="3"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="addHandCard" desc="(Lit/polimi/ingsw/gamemodel/PlayableCard;)V" line="92"><counter type="INSTRUCTION" missed="5" covered="10"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="3"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="setInitialCard" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="106"><counter type="INSTRUCTION" missed="5" covered="65"/><counter type="BRANCH" missed="2" covered="4"/><counter type="LINE" missed="1" covered="8"/><counter type="COMPLEXITY" missed="2" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="placeCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;I)I" line="131"><counter type="INSTRUCTION" missed="13" covered="151"/><counter type="BRANCH" missed="2" covered="13"/><counter type="LINE" missed="3" covered="22"/><counter type="COMPLEXITY" missed="2" covered="7"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getSymbolIfPresent" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/Corner;)Lit/polimi/ingsw/gamemodel/Symbol;" line="171"><counter type="INSTRUCTION" missed="0" covered="18"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="verifyCardPlacement" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/Card;Lit/polimi/ingsw/gamemodel/Side;)Lit/polimi/ingsw/gamemodel/PlacementOutcome;" line="189"><counter type="INSTRUCTION" missed="6" covered="182"/><counter type="BRANCH" missed="3" covered="23"/><counter type="LINE" missed="3" covered="27"/><counter type="COMPLEXITY" missed="3" covered="11"/><counter type="METHOD" missed="0" covered="1"/></method><method name="increaseResources" desc="(Lit/polimi/ingsw/gamemodel/Card;Lit/polimi/ingsw/gamemodel/Side;)V" line="246"><counter type="INSTRUCTION" missed="0" covered="41"/><counter type="BRANCH" missed="0" covered="4"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><method name="&lt;clinit&gt;" desc="()V" line="25"><counter type="INSTRUCTION" missed="0" covered="35"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="34" covered="558"/><counter type="BRANCH" missed="9" covered="50"/><counter type="LINE" missed="9" covered="88"/><counter type="COMPLEXITY" missed="9" covered="33"/><counter type="METHOD" missed="0" covered="12"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/MatchObserver" sourcefilename="MatchObserver.java"/><class name="it/polimi/ingsw/gamemodel/QuantityRequirement" sourcefilename="QuantityRequirement.java"><method name="&lt;init&gt;" desc="(Ljava/util/Map;)V" line="24"><counter type="INSTRUCTION" missed="10" covered="24"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="1" covered="7"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="timesMet" desc="(Lit/polimi/ingsw/gamemodel/Board;)I" line="42"><counter type="INSTRUCTION" missed="5" covered="39"/><counter type="BRANCH" missed="3" covered="3"/><counter type="LINE" missed="0" covered="8"/><counter type="COMPLEXITY" missed="2" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getReqs" desc="()Ljava/util/Map;" line="62"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="18" covered="63"/><counter type="BRANCH" missed="4" covered="6"/><counter type="LINE" missed="2" covered="15"/><counter type="COMPLEXITY" missed="4" covered="4"/><counter type="METHOD" missed="1" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/ChooseInitialSideState" sourcefilename="ChooseInitialSideState.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Match;)V" line="20"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="chooseInitialSide" desc="()V" line="29"><counter type="INSTRUCTION" missed="0" covered="1"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="transition" desc="()V" line="36"><counter type="INSTRUCTION" missed="0" covered="26"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="31"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="9"/><counter type="COMPLEXITY" missed="0" covered="4"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/NextTurnState" sourcefilename="NextTurnState.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Match;)V" line="22"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="proposeSecretObjectives" desc="()V" line="35"><counter type="INSTRUCTION" missed="0" covered="14"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="makeMove" desc="()V" line="45"><counter type="INSTRUCTION" missed="5" covered="5"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="2"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="drawInitialCard" desc="()V" line="56"><counter type="INSTRUCTION" missed="5" covered="5"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="2"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="transition" desc="()V" line="71"><counter type="INSTRUCTION" missed="0" covered="33"/><counter type="BRANCH" missed="0" covered="4"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="10" covered="63"/><counter type="BRANCH" missed="3" covered="9"/><counter type="LINE" missed="2" covered="17"/><counter type="COMPLEXITY" missed="3" covered="8"/><counter type="METHOD" missed="0" covered="5"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/Player" sourcefilename="Player.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Match;)V" line="38"><counter type="INSTRUCTION" missed="0" covered="20"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Player;)V" line="53"><counter type="INSTRUCTION" missed="0" covered="27"/><counter type="LINE" missed="0" covered="8"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="equals" desc="(Ljava/lang/Object;)Z" line="64"><counter type="INSTRUCTION" missed="2" covered="28"/><counter type="BRANCH" missed="2" covered="6"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="2" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><method name="hashCode" desc="()I" line="73"><counter type="INSTRUCTION" missed="0" covered="35"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="playCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="88"><counter type="INSTRUCTION" missed="5" covered="22"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="5"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="drawSecretObjectives" desc="()Lit/polimi/ingsw/utils/Pair;" line="104"><counter type="INSTRUCTION" missed="5" covered="17"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="3"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="drawInitialCard" desc="()Lit/polimi/ingsw/gamemodel/InitialCard;" line="121"><counter type="INSTRUCTION" missed="5" covered="17"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="3"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="chooseInitialCardSide" desc="(Lit/polimi/ingsw/gamemodel/Side;)V" line="137"><counter type="INSTRUCTION" missed="5" covered="23"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="5"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="drawCard" desc="(Lit/polimi/ingsw/gamemodel/DrawSource;)V" line="155"><counter type="INSTRUCTION" missed="5" covered="25"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="7"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="chooseSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Objective;)V" line="174"><counter type="INSTRUCTION" missed="5" covered="23"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="6"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sendBroadcastText" desc="(Ljava/lang/String;)V" line="190"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sendPrivateText" desc="(Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/String;)V" line="200"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getBoard" desc="()Lit/polimi/ingsw/gamemodel/Board;" line="207"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getPoints" desc="()I" line="214"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getPawnColor" desc="()Lit/polimi/ingsw/gamemodel/Color;" line="221"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="setColor" desc="(Lit/polimi/ingsw/gamemodel/Color;)V" line="228"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getSecretObjective" desc="()Lit/polimi/ingsw/gamemodel/Objective;" line="237"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="addPoints" desc="(I)V" line="246"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getUsername" desc="()Ljava/lang/String;" line="253"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="isConnected" desc="()Z" line="257"><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="setConnected" desc="(Z)V" line="263"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="44" covered="286"/><counter type="BRANCH" missed="8" covered="12"/><counter type="LINE" missed="10" covered="64"/><counter type="COMPLEXITY" missed="9" covered="22"/><counter type="METHOD" missed="1" covered="20"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/Side" sourcefilename="Side.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;ILjava/lang/String;)V" line="12"><counter type="INSTRUCTION" missed="0" covered="8"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="toString" desc="()Ljava/lang/String;" line="18"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="fromString" desc="(Ljava/lang/String;)Lit/polimi/ingsw/gamemodel/Side;" line="28"><counter type="INSTRUCTION" missed="25" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;clinit&gt;" desc="()V" line="6"><counter type="INSTRUCTION" missed="0" covered="17"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="25" covered="28"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="4" covered="7"/><counter type="COMPLEXITY" missed="3" covered="3"/><counter type="METHOD" missed="1" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/MatchState" sourcefilename="MatchState.java"><method name="&lt;init&gt;" desc="()V" line="26"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Match;)V" line="30"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="addPlayer" desc="()V" line="49"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="removePlayer" desc="()V" line="61"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="drawInitialCard" desc="()V" line="72"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="chooseInitialSide" desc="()V" line="83"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="makeMove" desc="()V" line="94"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawCard" desc="()V" line="105"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="proposeSecretObjectives" desc="()V" line="117"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseSecretObjective" desc="()V" line="128"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="18" covered="35"/><counter type="LINE" missed="5" covered="9"/><counter type="COMPLEXITY" missed="4" covered="6"/><counter type="METHOD" missed="4" covered="6"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/FinalState" sourcefilename="FinalState.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Match;)V" line="20"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="removePlayer" desc="()V" line="31"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="transition" desc="()V" line="38"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="5" covered="6"/><counter type="LINE" missed="3" covered="3"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/PlayableCard" sourcefilename="PlayableCard.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Symbol;)V" line="34"><counter type="INSTRUCTION" missed="10" covered="38"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="2" covered="9"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="&lt;init&gt;" desc="()V" line="48"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getReign" desc="()Lit/polimi/ingsw/gamemodel/Symbol;" line="59"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="&lt;clinit&gt;" desc="()V" line="22"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="13" covered="45"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="4" covered="11"/><counter type="COMPLEXITY" missed="2" covered="3"/><counter type="METHOD" missed="1" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/CardFace" sourcefilename="CardFace.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Symbol;Lit/polimi/ingsw/gamemodel/Symbol;Lit/polimi/ingsw/gamemodel/Symbol;Lit/polimi/ingsw/gamemodel/Symbol;Ljava/util/Set;)V" line="31"><counter type="INSTRUCTION" missed="0" covered="18"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getCorner" desc="(Lit/polimi/ingsw/gamemodel/Corner;)Lit/polimi/ingsw/gamemodel/Symbol;" line="47"><counter type="INSTRUCTION" missed="0" covered="17"/><counter type="BRANCH" missed="0" covered="4"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="4"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getCenter" desc="()Ljava/util/Set;" line="61"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="38"/><counter type="BRANCH" missed="0" covered="4"/><counter type="LINE" missed="0" covered="13"/><counter type="COMPLEXITY" missed="0" covered="6"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/Card" sourcefilename="Card.java"><method name="&lt;init&gt;" desc="()V" line="22"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getSide" desc="(Lit/polimi/ingsw/gamemodel/Side;)Lit/polimi/ingsw/gamemodel/CardFace;" line="34"><counter type="INSTRUCTION" missed="0" covered="11"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getId" desc="()Ljava/lang/Integer;" line="45"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="equals" desc="(Ljava/lang/Object;)Z" line="50"><counter type="INSTRUCTION" missed="2" covered="18"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="hashCode" desc="()I" line="58"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="6" covered="35"/><counter type="BRANCH" missed="1" covered="5"/><counter type="LINE" missed="1" covered="9"/><counter type="COMPLEXITY" missed="2" covered="6"/><counter type="METHOD" missed="1" covered="4"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/PlacedCard" sourcefilename="PlacedCard.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Card;Lit/polimi/ingsw/gamemodel/Side;I)V" line="25"><counter type="INSTRUCTION" missed="0" covered="12"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getCard" desc="()Lit/polimi/ingsw/gamemodel/Card;" line="37"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getTurn" desc="()I" line="46"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlayedSide" desc="()Lit/polimi/ingsw/gamemodel/Side;" line="55"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getPlayedCardFace" desc="()Lit/polimi/ingsw/gamemodel/CardFace;" line="65"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="3" covered="24"/><counter type="LINE" missed="1" covered="8"/><counter type="COMPLEXITY" missed="1" covered="4"/><counter type="METHOD" missed="1" covered="4"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/gamemodel/ChooseSecretObjectiveState" sourcefilename="ChooseSecretObjectiveState.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Match;)V" line="20"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="chooseSecretObjective" desc="()V" line="29"><counter type="INSTRUCTION" missed="0" covered="1"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="transition" desc="()V" line="36"><counter type="INSTRUCTION" missed="0" covered="26"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="31"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="9"/><counter type="COMPLEXITY" missed="0" covered="4"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><sourcefile name="PlayableCard.java"><line nr="22" mi="0" ci="4" mb="0" cb="0"/><line nr="34" mi="0" ci="2" mb="0" cb="0"/><line nr="35" mi="0" ci="10" mb="0" cb="0"/><line nr="36" mi="0" ci="3" mb="0" cb="0"/><line nr="37" mi="0" ci="4" mb="1" cb="1"/><line nr="38" mi="0" ci="3" mb="0" cb="0"/><line nr="39" mi="0" ci="3" mb="0" cb="0"/><line nr="40" mi="0" ci="8" mb="0" cb="0"/><line nr="41" mi="0" ci="4" mb="0" cb="0"/><line nr="43" mi="3" ci="0" mb="0" cb="0"/><line nr="44" mi="7" ci="0" mb="0" cb="0"/><line nr="46" mi="0" ci="1" mb="0" cb="0"/><line nr="48" mi="2" ci="0" mb="0" cb="0"/><line nr="50" mi="1" ci="0" mb="0" cb="0"/><line nr="59" mi="0" ci="3" mb="0" cb="0"/><counter type="INSTRUCTION" missed="13" covered="45"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="4" covered="11"/><counter type="COMPLEXITY" missed="2" covered="3"/><counter type="METHOD" missed="1" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="InitialCard.java"><line nr="14" mi="0" ci="4" mb="0" cb="0"/><line nr="23" mi="0" ci="2" mb="0" cb="0"/><line nr="24" mi="0" ci="10" mb="0" cb="0"/><line nr="25" mi="0" ci="3" mb="0" cb="0"/><line nr="26" mi="0" ci="3" mb="0" cb="0"/><line nr="27" mi="0" ci="3" mb="0" cb="0"/><line nr="28" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="26"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="GameDeck.java"><line nr="24" mi="0" ci="2" mb="0" cb="0"/><line nr="25" mi="0" ci="5" mb="0" cb="0"/><line nr="26" mi="0" ci="1" mb="0" cb="0"/><line nr="34" mi="0" ci="4" mb="0" cb="0"/><line nr="35" mi="0" ci="1" mb="0" cb="0"/><line nr="43" mi="0" ci="4" mb="0" cb="0"/><line nr="53" mi="0" ci="3" mb="0" cb="2"/><line nr="54" mi="0" ci="5" mb="0" cb="0"/><line nr="55" mi="0" ci="4" mb="0" cb="0"/><line nr="64" mi="0" ci="3" mb="0" cb="2"/><line nr="65" mi="0" ci="2" mb="0" cb="0"/><line nr="66" mi="0" ci="4" mb="0" cb="0"/><line nr="75" mi="0" ci="3" mb="0" cb="2"/><line nr="76" mi="0" ci="2" mb="0" cb="0"/><line nr="77" mi="0" ci="4" mb="0" cb="0"/><line nr="84" mi="0" ci="3" mb="0" cb="0"/><line nr="85" mi="0" ci="1" mb="0" cb="0"/><line nr="93" mi="0" ci="4" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="55"/><counter type="BRANCH" missed="0" covered="6"/><counter type="LINE" missed="0" covered="18"/><counter type="COMPLEXITY" missed="0" covered="11"/><counter type="METHOD" missed="0" covered="8"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="AfterDrawState.java"><line nr="19" mi="0" ci="3" mb="0" cb="0"/><line nr="20" mi="0" ci="1" mb="0" cb="0"/><line nr="29" mi="0" ci="4" mb="0" cb="2"/><line nr="30" mi="0" ci="7" mb="0" cb="0"/><line nr="32" mi="0" ci="6" mb="0" cb="0"/><line nr="34" mi="0" ci="4" mb="0" cb="0"/><line nr="35" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="26"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="FinalState.java"><line nr="20" mi="0" ci="3" mb="0" cb="0"/><line nr="22" mi="0" ci="2" mb="0" cb="0"/><line nr="23" mi="0" ci="1" mb="0" cb="0"/><line nr="31" mi="1" ci="0" mb="0" cb="0"/><line nr="38" mi="3" ci="0" mb="0" cb="0"/><line nr="39" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="5" covered="6"/><counter type="LINE" missed="3" covered="3"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="QuantityRequirement.java"><line nr="24" mi="0" ci="2" mb="0" cb="0"/><line nr="25" mi="0" ci="2" mb="0" cb="0"/><line nr="26" mi="0" ci="11" mb="0" cb="2"/><line nr="27" mi="0" ci="4" mb="1" cb="1"/><line nr="28" mi="10" ci="0" mb="0" cb="0"/><line nr="30" mi="0" ci="1" mb="0" cb="0"/><line nr="31" mi="0" ci="3" mb="0" cb="0"/><line nr="32" mi="0" ci="1" mb="0" cb="0"/><line nr="42" mi="0" ci="3" mb="0" cb="0"/><line nr="43" mi="0" ci="2" mb="0" cb="0"/><line nr="46" mi="0" ci="12" mb="0" cb="2"/><line nr="47" mi="0" ci="14" mb="0" cb="0"/><line nr="48" mi="5" ci="2" mb="3" cb="1"/><line nr="49" mi="0" ci="2" mb="0" cb="0"/><line nr="51" mi="0" ci="1" mb="0" cb="0"/><line nr="53" mi="0" ci="3" mb="0" cb="0"/><line nr="62" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="18" covered="63"/><counter type="BRANCH" missed="4" covered="6"/><counter type="LINE" missed="2" covered="15"/><counter type="COMPLEXITY" missed="4" covered="4"/><counter type="METHOD" missed="1" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="GoldCard.java"><line nr="31" mi="0" ci="3" mb="0" cb="0"/><line nr="32" mi="0" ci="3" mb="0" cb="0"/><line nr="33" mi="0" ci="3" mb="0" cb="0"/><line nr="34" mi="0" ci="3" mb="0" cb="0"/><line nr="37" mi="0" ci="2" mb="0" cb="0"/><line nr="38" mi="0" ci="4" mb="1" cb="1"/><line nr="39" mi="10" ci="0" mb="0" cb="0"/><line nr="41" mi="0" ci="3" mb="0" cb="0"/><line nr="42" mi="0" ci="1" mb="0" cb="0"/><line nr="51" mi="0" ci="3" mb="0" cb="0"/><line nr="60" mi="0" ci="3" mb="0" cb="0"/><line nr="69" mi="3" ci="0" mb="0" cb="0"/><line nr="81" mi="0" ci="4" mb="0" cb="2"/><line nr="82" mi="0" ci="3" mb="0" cb="0"/><line nr="84" mi="0" ci="3" mb="0" cb="0"/><line nr="86" mi="0" ci="2" mb="0" cb="0"/><line nr="89" mi="0" ci="5" mb="0" cb="2"/><line nr="91" mi="0" ci="11" mb="0" cb="2"/><line nr="92" mi="0" ci="5" mb="0" cb="2"/><line nr="93" mi="0" ci="6" mb="0" cb="0"/><line nr="95" mi="0" ci="2" mb="0" cb="0"/><line nr="96" mi="0" ci="5" mb="1" cb="1"/><line nr="99" mi="0" ci="3" mb="0" cb="0"/><line nr="101" mi="0" ci="3" mb="0" cb="0"/><line nr="102" mi="0" ci="10" mb="0" cb="2"/><line nr="105" mi="0" ci="4" mb="0" cb="2"/><line nr="106" mi="0" ci="1" mb="0" cb="0"/><line nr="108" mi="0" ci="1" mb="0" cb="0"/><line nr="111" mi="0" ci="5" mb="0" cb="0"/><line nr="115" mi="0" ci="18" mb="0" cb="0"/><line nr="116" mi="0" ci="18" mb="0" cb="0"/><line nr="117" mi="0" ci="18" mb="0" cb="0"/><line nr="118" mi="0" ci="18" mb="0" cb="0"/><line nr="120" mi="0" ci="4" mb="0" cb="0"/><line nr="121" mi="0" ci="4" mb="0" cb="0"/><line nr="122" mi="0" ci="4" mb="0" cb="0"/><line nr="123" mi="0" ci="4" mb="0" cb="0"/><line nr="124" mi="0" ci="4" mb="0" cb="0"/><line nr="125" mi="0" ci="2" mb="0" cb="0"/><counter type="INSTRUCTION" missed="13" covered="195"/><counter type="BRANCH" missed="2" covered="14"/><counter type="LINE" missed="2" covered="37"/><counter type="COMPLEXITY" missed="3" covered="11"/><counter type="METHOD" missed="1" covered="5"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="ResourceCard.java"><line nr="24" mi="0" ci="3" mb="0" cb="0"/><line nr="25" mi="0" ci="3" mb="0" cb="0"/><line nr="26" mi="0" ci="3" mb="0" cb="0"/><line nr="27" mi="0" ci="1" mb="0" cb="0"/><line nr="35" mi="0" ci="3" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="13"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="Color.java"><line nr="6" mi="0" ci="3" mb="0" cb="0"/><line nr="7" mi="0" ci="6" mb="0" cb="0"/><line nr="8" mi="0" ci="6" mb="0" cb="0"/><line nr="9" mi="0" ci="6" mb="0" cb="0"/><line nr="10" mi="0" ci="6" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="27"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="PlacedCard.java"><line nr="25" mi="0" ci="2" mb="0" cb="0"/><line nr="26" mi="0" ci="3" mb="0" cb="0"/><line nr="27" mi="0" ci="3" mb="0" cb="0"/><line nr="28" mi="0" ci="3" mb="0" cb="0"/><line nr="29" mi="0" ci="1" mb="0" cb="0"/><line nr="37" mi="0" ci="3" mb="0" cb="0"/><line nr="46" mi="3" ci="0" mb="0" cb="0"/><line nr="55" mi="0" ci="3" mb="0" cb="0"/><line nr="65" mi="0" ci="6" mb="0" cb="0"/><counter type="INSTRUCTION" missed="3" covered="24"/><counter type="LINE" missed="1" covered="8"/><counter type="COMPLEXITY" missed="1" covered="4"/><counter type="METHOD" missed="1" covered="4"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="WaitState.java"><line nr="20" mi="0" ci="3" mb="0" cb="0"/><line nr="21" mi="0" ci="1" mb="0" cb="0"/><line nr="28" mi="0" ci="5" mb="0" cb="0"/><line nr="29" mi="0" ci="4" mb="0" cb="2"/><line nr="30" mi="0" ci="3" mb="0" cb="0"/><line nr="31" mi="0" ci="3" mb="0" cb="0"/><line nr="32" mi="0" ci="3" mb="0" cb="0"/><line nr="34" mi="0" ci="6" mb="0" cb="0"/><line nr="35" mi="0" ci="4" mb="0" cb="0"/><line nr="38" mi="0" ci="3" mb="0" cb="0"/><line nr="40" mi="0" ci="3" mb="0" cb="0"/><line nr="41" mi="0" ci="1" mb="0" cb="0"/><line nr="48" mi="0" ci="1" mb="0" cb="0"/><line nr="55" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="41"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="14"/><counter type="COMPLEXITY" missed="0" covered="5"/><counter type="METHOD" missed="0" covered="4"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="Corner.java"><line nr="6" mi="0" ci="3" mb="0" cb="0"/><line nr="7" mi="0" ci="6" mb="0" cb="0"/><line nr="8" mi="0" ci="6" mb="0" cb="0"/><line nr="9" mi="0" ci="6" mb="0" cb="0"/><line nr="10" mi="0" ci="6" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="27"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="Side.java"><line nr="6" mi="0" ci="3" mb="0" cb="0"/><line nr="7" mi="0" ci="7" mb="0" cb="0"/><line nr="8" mi="0" ci="7" mb="0" cb="0"/><line nr="12" mi="0" ci="4" mb="0" cb="0"/><line nr="13" mi="0" ci="3" mb="0" cb="0"/><line nr="14" mi="0" ci="1" mb="0" cb="0"/><line nr="18" mi="0" ci="3" mb="0" cb="0"/><line nr="28" mi="16" ci="0" mb="2" cb="0"/><line nr="29" mi="5" ci="0" mb="2" cb="0"/><line nr="30" mi="2" ci="0" mb="0" cb="0"/><line nr="33" mi="2" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="25" covered="28"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="4" covered="7"/><counter type="COMPLEXITY" missed="3" covered="3"/><counter type="METHOD" missed="1" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="Card.java"><line nr="22" mi="0" ci="2" mb="0" cb="0"/><line nr="24" mi="0" ci="1" mb="0" cb="0"/><line nr="34" mi="0" ci="6" mb="0" cb="2"/><line nr="35" mi="0" ci="3" mb="0" cb="0"/><line nr="36" mi="0" ci="2" mb="0" cb="0"/><line nr="45" mi="0" ci="3" mb="0" cb="0"/><line nr="50" mi="0" ci="5" mb="0" cb="2"/><line nr="51" mi="2" ci="7" mb="1" cb="1"/><line nr="53" mi="0" ci="6" mb="0" cb="0"/><line nr="58" mi="4" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="6" covered="35"/><counter type="BRANCH" missed="1" covered="5"/><counter type="LINE" missed="1" covered="9"/><counter type="COMPLEXITY" missed="2" covered="6"/><counter type="METHOD" missed="1" covered="4"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="Objective.java"><line nr="17" mi="0" ci="4" mb="0" cb="0"/><line nr="26" mi="0" ci="2" mb="0" cb="0"/><line nr="27" mi="0" ci="10" mb="0" cb="0"/><line nr="28" mi="0" ci="3" mb="0" cb="0"/><line nr="29" mi="0" ci="3" mb="0" cb="0"/><line nr="30" mi="0" ci="3" mb="0" cb="0"/><line nr="31" mi="0" ci="1" mb="0" cb="0"/><line nr="39" mi="0" ci="3" mb="0" cb="0"/><line nr="48" mi="0" ci="3" mb="0" cb="0"/><line nr="55" mi="0" ci="3" mb="0" cb="0"/><line nr="60" mi="0" ci="3" mb="0" cb="2"/><line nr="61" mi="0" ci="2" mb="0" cb="0"/><line nr="62" mi="0" ci="3" mb="1" cb="1"/><line nr="63" mi="2" ci="0" mb="0" cb="0"/><line nr="65" mi="0" ci="3" mb="0" cb="0"/><line nr="66" mi="0" ci="6" mb="0" cb="0"/><counter type="INSTRUCTION" missed="2" covered="52"/><counter type="BRANCH" missed="1" covered="3"/><counter type="LINE" missed="1" covered="15"/><counter type="COMPLEXITY" missed="1" covered="7"/><counter type="METHOD" missed="0" covered="6"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="MatchState.java"><line nr="26" mi="2" ci="0" mb="0" cb="0"/><line nr="28" mi="1" ci="0" mb="0" cb="0"/><line nr="30" mi="0" ci="2" mb="0" cb="0"/><line nr="31" mi="0" ci="3" mb="0" cb="0"/><line nr="32" mi="0" ci="1" mb="0" cb="0"/><line nr="49" mi="0" ci="5" mb="0" cb="0"/><line nr="61" mi="0" ci="8" mb="0" cb="0"/><line nr="62" mi="0" ci="1" mb="0" cb="0"/><line nr="72" mi="0" ci="5" mb="0" cb="0"/><line nr="83" mi="5" ci="0" mb="0" cb="0"/><line nr="94" mi="5" ci="0" mb="0" cb="0"/><line nr="105" mi="0" ci="5" mb="0" cb="0"/><line nr="117" mi="5" ci="0" mb="0" cb="0"/><line nr="128" mi="0" ci="5" mb="0" cb="0"/><counter type="INSTRUCTION" missed="18" covered="35"/><counter type="LINE" missed="5" covered="9"/><counter type="COMPLEXITY" missed="4" covered="6"/><counter type="METHOD" missed="4" covered="6"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="PositionRequirement.java"><line nr="27" mi="0" ci="2" mb="0" cb="0"/><line nr="28" mi="0" ci="2" mb="0" cb="0"/><line nr="29" mi="0" ci="11" mb="0" cb="2"/><line nr="30" mi="0" ci="4" mb="1" cb="1"/><line nr="31" mi="10" ci="0" mb="0" cb="0"/><line nr="33" mi="0" ci="1" mb="0" cb="0"/><line nr="35" mi="0" ci="3" mb="0" cb="0"/><line nr="36" mi="0" ci="1" mb="0" cb="0"/><line nr="46" mi="0" ci="3" mb="0" cb="0"/><line nr="47" mi="0" ci="4" mb="0" cb="0"/><line nr="53" mi="0" ci="2" mb="0" cb="0"/><line nr="57" mi="0" ci="11" mb="0" cb="2"/><line nr="58" mi="0" ci="2" mb="0" cb="0"/><line nr="60" mi="0" ci="12" mb="0" cb="2"/><line nr="61" mi="0" ci="24" mb="0" cb="0"/><line nr="62" mi="0" ci="5" mb="0" cb="0"/><line nr="63" mi="0" ci="2" mb="0" cb="2"/><line nr="64" mi="0" ci="3" mb="0" cb="0"/><line nr="66" mi="0" ci="16" mb="0" cb="6"/><line nr="67" mi="0" ci="3" mb="0" cb="0"/><line nr="70" mi="0" ci="2" mb="0" cb="0"/><line nr="72" mi="0" ci="1" mb="0" cb="0"/><line nr="73" mi="0" ci="2" mb="0" cb="2"/><line nr="74" mi="0" ci="12" mb="0" cb="2"/><line nr="75" mi="0" ci="26" mb="0" cb="0"/><line nr="76" mi="0" ci="1" mb="0" cb="0"/><line nr="77" mi="0" ci="1" mb="0" cb="0"/><line nr="79" mi="0" ci="1" mb="0" cb="0"/><line nr="80" mi="0" ci="2" mb="0" cb="0"/><line nr="89" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="13" covered="159"/><counter type="BRANCH" missed="1" covered="19"/><counter type="LINE" missed="2" covered="28"/><counter type="COMPLEXITY" missed="2" covered="11"/><counter type="METHOD" missed="1" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="AfterMoveState.java"><line nr="19" mi="0" ci="3" mb="0" cb="0"/><line nr="20" mi="0" ci="1" mb="0" cb="0"/><line nr="28" mi="0" ci="1" mb="0" cb="0"/><line nr="35" mi="0" ci="6" mb="0" cb="0"/><line nr="36" mi="0" ci="4" mb="0" cb="0"/><line nr="38" mi="0" ci="2" mb="0" cb="0"/><line nr="39" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="18"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="CardFace.java"><line nr="31" mi="0" ci="2" mb="0" cb="0"/><line nr="32" mi="0" ci="3" mb="0" cb="0"/><line nr="33" mi="0" ci="3" mb="0" cb="0"/><line nr="34" mi="0" ci="3" mb="0" cb="0"/><line nr="35" mi="0" ci="3" mb="0" cb="0"/><line nr="36" mi="0" ci="3" mb="0" cb="0"/><line nr="37" mi="0" ci="1" mb="0" cb="0"/><line nr="47" mi="0" ci="6" mb="0" cb="4"/><line nr="48" mi="0" ci="3" mb="0" cb="0"/><line nr="49" mi="0" ci="3" mb="0" cb="0"/><line nr="50" mi="0" ci="3" mb="0" cb="0"/><line nr="51" mi="0" ci="2" mb="0" cb="0"/><line nr="61" mi="0" ci="3" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="38"/><counter type="BRANCH" missed="0" covered="4"/><counter type="LINE" missed="0" covered="13"/><counter type="COMPLEXITY" missed="0" covered="6"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="Board.java"><line nr="25" mi="0" ci="6" mb="0" cb="0"/><line nr="26" mi="0" ci="8" mb="0" cb="0"/><line nr="27" mi="0" ci="8" mb="0" cb="0"/><line nr="28" mi="0" ci="8" mb="0" cb="0"/><line nr="29" mi="0" ci="5" mb="0" cb="0"/><line nr="35" mi="0" ci="2" mb="0" cb="0"/><line nr="36" mi="0" ci="5" mb="0" cb="0"/><line nr="37" mi="0" ci="5" mb="0" cb="0"/><line nr="38" mi="0" ci="5" mb="0" cb="0"/><line nr="39" mi="0" ci="10" mb="0" cb="2"/><line nr="40" mi="0" ci="7" mb="0" cb="0"/><line nr="41" mi="0" ci="1" mb="0" cb="0"/><line nr="42" mi="0" ci="1" mb="0" cb="0"/><line nr="50" mi="0" ci="3" mb="0" cb="0"/><line nr="59" mi="0" ci="3" mb="0" cb="0"/><line nr="69" mi="0" ci="3" mb="0" cb="0"/><line nr="79" mi="0" ci="5" mb="1" cb="1"/><line nr="80" mi="5" ci="0" mb="0" cb="0"/><line nr="82" mi="0" ci="5" mb="0" cb="0"/><line nr="83" mi="0" ci="1" mb="0" cb="0"/><line nr="92" mi="0" ci="5" mb="1" cb="1"/><line nr="93" mi="5" ci="0" mb="0" cb="0"/><line nr="95" mi="0" ci="4" mb="0" cb="0"/><line nr="96" mi="0" ci="1" mb="0" cb="0"/><line nr="106" mi="0" ci="11" mb="1" cb="1"/><line nr="107" mi="5" ci="0" mb="0" cb="0"/><line nr="109" mi="0" ci="17" mb="0" cb="0"/><line nr="111" mi="0" ci="4" mb="0" cb="0"/><line nr="113" mi="0" ci="13" mb="0" cb="2"/><line nr="114" mi="0" ci="4" mb="1" cb="1"/><line nr="115" mi="0" ci="14" mb="0" cb="0"/><line nr="117" mi="0" ci="1" mb="0" cb="0"/><line nr="118" mi="0" ci="1" mb="0" cb="0"/><line nr="131" mi="0" ci="7" mb="0" cb="0"/><line nr="132" mi="0" ci="6" mb="0" cb="0"/><line nr="133" mi="0" ci="2" mb="0" cb="0"/><line nr="136" mi="0" ci="4" mb="0" cb="0"/><line nr="137" mi="0" ci="4" mb="0" cb="0"/><line nr="139" mi="0" ci="11" mb="0" cb="2"/><line nr="141" mi="0" ci="26" mb="0" cb="0"/><line nr="142" mi="0" ci="2" mb="0" cb="2"/><line nr="143" mi="0" ci="4" mb="0" cb="2"/><line nr="144" mi="0" ci="14" mb="0" cb="0"/><line nr="147" mi="1" ci="0" mb="0" cb="0"/><line nr="148" mi="4" ci="0" mb="0" cb="0"/><line nr="149" mi="0" ci="1" mb="0" cb="0"/><line nr="150" mi="0" ci="1" mb="0" cb="0"/><line nr="152" mi="0" ci="4" mb="0" cb="0"/><line nr="154" mi="0" ci="13" mb="0" cb="2"/><line nr="155" mi="0" ci="4" mb="1" cb="1"/><line nr="156" mi="0" ci="14" mb="0" cb="0"/><line nr="158" mi="0" ci="1" mb="0" cb="0"/><line nr="159" mi="0" ci="4" mb="0" cb="2"/><line nr="160" mi="0" ci="11" mb="1" cb="2"/><line nr="161" mi="0" ci="9" mb="0" cb="0"/><line nr="162" mi="0" ci="7" mb="0" cb="0"/><line nr="163" mi="8" ci="0" mb="0" cb="0"/><line nr="167" mi="0" ci="2" mb="0" cb="0"/><line nr="171" mi="0" ci="6" mb="0" cb="0"/><line nr="172" mi="0" ci="2" mb="0" cb="2"/><line nr="173" mi="0" ci="2" mb="0" cb="0"/><line nr="175" mi="0" ci="8" mb="0" cb="0"/><line nr="189" mi="0" ci="10" mb="0" cb="2"/><line nr="190" mi="0" ci="2" mb="0" cb="0"/><line nr="192" mi="0" ci="5" mb="0" cb="2"/><line nr="193" mi="0" ci="5" mb="0" cb="0"/><line nr="195" mi="0" ci="5" mb="1" cb="1"/><line nr="196" mi="2" ci="0" mb="0" cb="0"/><line nr="198" mi="0" ci="9" mb="0" cb="4"/><line nr="199" mi="0" ci="5" mb="0" cb="2"/><line nr="200" mi="0" ci="2" mb="0" cb="0"/><line nr="204" mi="0" ci="13" mb="0" cb="0"/><line nr="209" mi="0" ci="16" mb="0" cb="2"/><line nr="210" mi="0" ci="15" mb="0" cb="0"/><line nr="211" mi="0" ci="5" mb="1" cb="1"/><line nr="212" mi="2" ci="0" mb="0" cb="0"/><line nr="215" mi="0" ci="15" mb="0" cb="0"/><line nr="216" mi="0" ci="5" mb="1" cb="1"/><line nr="217" mi="2" ci="0" mb="0" cb="0"/><line nr="221" mi="0" ci="2" mb="0" cb="0"/><line nr="223" mi="0" ci="4" mb="0" cb="0"/><line nr="224" mi="0" ci="4" mb="0" cb="0"/><line nr="226" mi="0" ci="11" mb="0" cb="2"/><line nr="227" mi="0" ci="20" mb="0" cb="0"/><line nr="229" mi="0" ci="5" mb="0" cb="2"/><line nr="230" mi="0" ci="2" mb="0" cb="0"/><line nr="231" mi="0" ci="13" mb="0" cb="2"/><line nr="232" mi="0" ci="2" mb="0" cb="0"/><line nr="235" mi="0" ci="1" mb="0" cb="0"/><line nr="237" mi="0" ci="2" mb="0" cb="2"/><line nr="238" mi="0" ci="2" mb="0" cb="0"/><line nr="241" mi="0" ci="2" mb="0" cb="0"/><line nr="246" mi="0" ci="16" mb="0" cb="2"/><line nr="247" mi="0" ci="6" mb="0" cb="0"/><line nr="248" mi="0" ci="4" mb="0" cb="2"/><line nr="249" mi="0" ci="14" mb="0" cb="0"/><line nr="252" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="34" covered="558"/><counter type="BRANCH" missed="9" covered="50"/><counter type="LINE" missed="9" covered="88"/><counter type="COMPLEXITY" missed="9" covered="33"/><counter type="METHOD" missed="0" covered="12"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="MatchObserverCallable.java"/><sourcefile name="ChooseInitialSideState.java"><line nr="20" mi="0" ci="3" mb="0" cb="0"/><line nr="21" mi="0" ci="1" mb="0" cb="0"/><line nr="29" mi="0" ci="1" mb="0" cb="0"/><line nr="36" mi="0" ci="6" mb="0" cb="0"/><line nr="38" mi="0" ci="6" mb="0" cb="2"/><line nr="39" mi="0" ci="3" mb="0" cb="0"/><line nr="40" mi="0" ci="6" mb="0" cb="0"/><line nr="41" mi="0" ci="4" mb="0" cb="0"/><line nr="42" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="31"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="9"/><counter type="COMPLEXITY" missed="0" covered="4"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="Match.java"><line nr="44" mi="0" ci="3" mb="0" cb="0"/><line nr="45" mi="0" ci="3" mb="0" cb="0"/><line nr="46" mi="0" ci="3" mb="0" cb="0"/><line nr="47" mi="0" ci="3" mb="0" cb="0"/><line nr="71" mi="0" ci="2" mb="0" cb="0"/><line nr="72" mi="0" ci="3" mb="0" cb="0"/><line nr="73" mi="0" ci="3" mb="0" cb="0"/><line nr="74" mi="0" ci="3" mb="0" cb="0"/><line nr="75" mi="0" ci="3" mb="0" cb="0"/><line nr="76" mi="0" ci="3" mb="0" cb="0"/><line nr="77" mi="0" ci="6" mb="0" cb="0"/><line nr="79" mi="0" ci="6" mb="0" cb="2"/><line nr="80" mi="0" ci="5" mb="0" cb="0"/><line nr="81" mi="0" ci="8" mb="0" cb="2"/><line nr="82" mi="0" ci="5" mb="0" cb="0"/><line nr="83" mi="0" ci="4" mb="0" cb="2"/><line nr="84" mi="0" ci="5" mb="0" cb="0"/><line nr="85" mi="0" ci="4" mb="0" cb="2"/><line nr="86" mi="0" ci="5" mb="0" cb="0"/><line nr="87" mi="0" ci="6" mb="2" cb="2"/><line nr="88" mi="5" ci="0" mb="0" cb="0"/><line nr="90" mi="0" ci="5" mb="0" cb="0"/><line nr="91" mi="0" ci="5" mb="0" cb="0"/><line nr="92" mi="0" ci="1" mb="0" cb="0"/><line nr="103" mi="0" ci="4" mb="0" cb="0"/><line nr="104" mi="0" ci="7" mb="0" cb="0"/><line nr="106" mi="0" ci="5" mb="0" cb="2"/><line nr="107" mi="0" ci="5" mb="0" cb="0"/><line nr="109" mi="0" ci="3" mb="0" cb="0"/><line nr="110" mi="0" ci="5" mb="0" cb="0"/><line nr="111" mi="0" ci="8" mb="0" cb="0"/><line nr="112" mi="0" ci="3" mb="0" cb="0"/><line nr="113" mi="0" ci="3" mb="0" cb="0"/><line nr="114" mi="0" ci="1" mb="0" cb="0"/><line nr="123" mi="0" ci="4" mb="0" cb="0"/><line nr="124" mi="0" ci="5" mb="0" cb="2"/><line nr="125" mi="0" ci="5" mb="0" cb="0"/><line nr="127" mi="0" ci="3" mb="0" cb="0"/><line nr="128" mi="0" ci="8" mb="0" cb="0"/><line nr="130" mi="0" ci="3" mb="0" cb="0"/><line nr="131" mi="0" ci="1" mb="0" cb="0"/><line nr="140" mi="0" ci="13" mb="1" cb="3"/><line nr="150" mi="0" ci="4" mb="1" cb="1"/><line nr="152" mi="0" ci="10" mb="0" cb="4"/><line nr="154" mi="0" ci="6" mb="0" cb="0"/><line nr="156" mi="0" ci="7" mb="0" cb="0"/><line nr="159" mi="0" ci="6" mb="0" cb="0"/><line nr="160" mi="0" ci="9" mb="0" cb="0"/><line nr="161" mi="0" ci="1" mb="0" cb="0"/><line nr="163" mi="5" ci="0" mb="0" cb="0"/><line nr="165" mi="0" ci="1" mb="0" cb="0"/><line nr="174" mi="0" ci="3" mb="0" cb="0"/><line nr="182" mi="0" ci="3" mb="0" cb="0"/><line nr="183" mi="0" ci="1" mb="0" cb="0"/><line nr="192" mi="0" ci="3" mb="0" cb="0"/><line nr="200" mi="0" ci="3" mb="0" cb="0"/><line nr="201" mi="0" ci="1" mb="0" cb="0"/><line nr="210" mi="0" ci="3" mb="0" cb="0"/><line nr="220" mi="0" ci="3" mb="0" cb="0"/><line nr="229" mi="0" ci="3" mb="0" cb="0"/><line nr="239" mi="0" ci="3" mb="0" cb="0"/><line nr="240" mi="0" ci="1" mb="0" cb="0"/><line nr="249" mi="0" ci="3" mb="0" cb="0"/><line nr="252" mi="0" ci="6" mb="0" cb="0"/><line nr="253" mi="1" ci="0" mb="0" cb="0"/><line nr="254" mi="5" ci="0" mb="0" cb="0"/><line nr="255" mi="0" ci="1" mb="0" cb="0"/><line nr="258" mi="0" ci="6" mb="0" cb="0"/><line nr="259" mi="0" ci="11" mb="0" cb="0"/><line nr="260" mi="0" ci="3" mb="0" cb="0"/><line nr="262" mi="0" ci="3" mb="0" cb="0"/><line nr="272" mi="0" ci="3" mb="0" cb="0"/><line nr="274" mi="0" ci="5" mb="0" cb="0"/><line nr="275" mi="0" ci="5" mb="0" cb="0"/><line nr="277" mi="0" ci="7" mb="0" cb="0"/><line nr="280" mi="0" ci="6" mb="0" cb="0"/><line nr="281" mi="0" ci="11" mb="0" cb="0"/><line nr="282" mi="0" ci="3" mb="0" cb="0"/><line nr="284" mi="0" ci="3" mb="0" cb="0"/><line nr="285" mi="1" ci="0" mb="0" cb="0"/><line nr="286" mi="5" ci="0" mb="0" cb="0"/><line nr="298" mi="0" ci="3" mb="0" cb="0"/><line nr="301" mi="0" ci="5" mb="0" cb="0"/><line nr="302" mi="0" ci="5" mb="0" cb="0"/><line nr="305" mi="0" ci="4" mb="0" cb="2"/><line nr="306" mi="0" ci="5" mb="0" cb="0"/><line nr="307" mi="0" ci="4" mb="1" cb="1"/><line nr="308" mi="5" ci="0" mb="0" cb="0"/><line nr="311" mi="0" ci="5" mb="0" cb="0"/><line nr="314" mi="0" ci="6" mb="0" cb="0"/><line nr="315" mi="0" ci="10" mb="0" cb="0"/><line nr="316" mi="0" ci="3" mb="0" cb="0"/><line nr="317" mi="0" ci="1" mb="0" cb="0"/><line nr="325" mi="0" ci="3" mb="0" cb="0"/><line nr="328" mi="0" ci="8" mb="0" cb="2"/><line nr="329" mi="0" ci="9" mb="0" cb="0"/><line nr="331" mi="0" ci="1" mb="0" cb="0"/><line nr="339" mi="0" ci="3" mb="0" cb="0"/><line nr="340" mi="0" ci="3" mb="0" cb="0"/><line nr="341" mi="0" ci="3" mb="0" cb="0"/><line nr="342" mi="0" ci="3" mb="0" cb="0"/><line nr="346" mi="0" ci="5" mb="0" cb="0"/><line nr="347" mi="0" ci="5" mb="0" cb="0"/><line nr="350" mi="0" ci="5" mb="0" cb="0"/><line nr="351" mi="0" ci="5" mb="0" cb="0"/><line nr="354" mi="0" ci="5" mb="0" cb="0"/><line nr="355" mi="0" ci="5" mb="0" cb="0"/><line nr="358" mi="0" ci="6" mb="0" cb="0"/><line nr="359" mi="0" ci="6" mb="0" cb="0"/><line nr="360" mi="0" ci="6" mb="0" cb="0"/><line nr="361" mi="0" ci="6" mb="0" cb="0"/><line nr="363" mi="0" ci="7" mb="0" cb="0"/><line nr="364" mi="1" ci="0" mb="0" cb="0"/><line nr="365" mi="5" ci="0" mb="0" cb="0"/><line nr="366" mi="0" ci="1" mb="0" cb="0"/><line nr="367" mi="0" ci="1" mb="0" cb="0"/><line nr="376" mi="0" ci="11" mb="0" cb="2"/><line nr="379" mi="0" ci="5" mb="0" cb="0"/><line nr="380" mi="0" ci="5" mb="0" cb="0"/><line nr="381" mi="0" ci="5" mb="0" cb="0"/><line nr="384" mi="0" ci="4" mb="0" cb="0"/><line nr="385" mi="0" ci="4" mb="0" cb="0"/><line nr="386" mi="0" ci="4" mb="0" cb="0"/><line nr="387" mi="1" ci="0" mb="0" cb="0"/><line nr="388" mi="5" ci="0" mb="0" cb="0"/><line nr="389" mi="0" ci="1" mb="0" cb="0"/><line nr="390" mi="0" ci="1" mb="0" cb="0"/><line nr="391" mi="0" ci="1" mb="0" cb="0"/><line nr="407" mi="0" ci="3" mb="0" cb="0"/><line nr="409" mi="0" ci="4" mb="0" cb="0"/><line nr="413" mi="0" ci="6" mb="0" cb="0"/><line nr="414" mi="0" ci="1" mb="0" cb="0"/><line nr="415" mi="0" ci="6" mb="0" cb="0"/><line nr="416" mi="0" ci="1" mb="0" cb="0"/><line nr="419" mi="0" ci="5" mb="1" cb="3"/><line nr="425" mi="0" ci="8" mb="0" cb="0"/><line nr="426" mi="1" ci="0" mb="0" cb="0"/><line nr="427" mi="5" ci="0" mb="0" cb="0"/><line nr="428" mi="0" ci="1" mb="0" cb="0"/><line nr="433" mi="0" ci="3" mb="0" cb="0"/><line nr="434" mi="1" ci="0" mb="0" cb="0"/><line nr="435" mi="5" ci="0" mb="0" cb="0"/><line nr="436" mi="0" ci="1" mb="0" cb="0"/><line nr="439" mi="0" ci="4" mb="0" cb="0"/><line nr="443" mi="0" ci="5" mb="1" cb="1"/><line nr="444" mi="3" ci="0" mb="0" cb="0"/><line nr="447" mi="0" ci="6" mb="0" cb="0"/><line nr="448" mi="0" ci="14" mb="0" cb="0"/><line nr="449" mi="0" ci="3" mb="0" cb="0"/><line nr="451" mi="0" ci="1" mb="0" cb="0"/><line nr="453" mi="0" ci="5" mb="0" cb="0"/><line nr="455" mi="0" ci="5" mb="0" cb="0"/><line nr="457" mi="0" ci="1" mb="0" cb="0"/><line nr="474" mi="0" ci="2" mb="0" cb="0"/><line nr="476" mi="0" ci="3" mb="0" cb="0"/><line nr="478" mi="0" ci="5" mb="1" cb="4"/><line nr="481" mi="0" ci="5" mb="0" cb="0"/><line nr="482" mi="0" ci="5" mb="0" cb="0"/><line nr="483" mi="0" ci="1" mb="0" cb="0"/><line nr="484" mi="0" ci="5" mb="0" cb="0"/><line nr="485" mi="0" ci="1" mb="0" cb="0"/><line nr="490" mi="0" ci="5" mb="0" cb="0"/><line nr="491" mi="0" ci="5" mb="0" cb="0"/><line nr="492" mi="0" ci="1" mb="0" cb="0"/><line nr="493" mi="0" ci="5" mb="0" cb="0"/><line nr="494" mi="0" ci="1" mb="0" cb="0"/><line nr="498" mi="0" ci="6" mb="0" cb="0"/><line nr="502" mi="0" ci="2" mb="1" cb="1"/><line nr="503" mi="5" ci="0" mb="0" cb="0"/><line nr="507" mi="0" ci="4" mb="0" cb="2"/><line nr="508" mi="0" ci="5" mb="0" cb="0"/><line nr="509" mi="0" ci="7" mb="0" cb="0"/><line nr="514" mi="0" ci="5" mb="0" cb="0"/><line nr="515" mi="0" ci="6" mb="0" cb="0"/><line nr="519" mi="0" ci="1" mb="0" cb="0"/><line nr="522" mi="0" ci="6" mb="0" cb="0"/><line nr="526" mi="0" ci="2" mb="1" cb="1"/><line nr="527" mi="5" ci="0" mb="0" cb="0"/><line nr="531" mi="0" ci="4" mb="1" cb="1"/><line nr="532" mi="0" ci="5" mb="0" cb="0"/><line nr="533" mi="0" ci="7" mb="0" cb="0"/><line nr="538" mi="5" ci="0" mb="0" cb="0"/><line nr="539" mi="6" ci="0" mb="0" cb="0"/><line nr="543" mi="1" ci="0" mb="0" cb="0"/><line nr="545" mi="5" ci="0" mb="0" cb="0"/><line nr="548" mi="0" ci="8" mb="0" cb="4"/><line nr="549" mi="0" ci="3" mb="0" cb="0"/><line nr="553" mi="0" ci="10" mb="0" cb="4"/><line nr="554" mi="0" ci="3" mb="0" cb="0"/><line nr="557" mi="0" ci="2" mb="0" cb="0"/><line nr="558" mi="0" ci="6" mb="0" cb="0"/><line nr="559" mi="0" ci="14" mb="0" cb="0"/><line nr="560" mi="0" ci="3" mb="0" cb="0"/><line nr="562" mi="0" ci="2" mb="0" cb="0"/><line nr="572" mi="0" ci="3" mb="0" cb="0"/><line nr="575" mi="0" ci="7" mb="0" cb="0"/><line nr="576" mi="1" ci="0" mb="0" cb="0"/><line nr="577" mi="5" ci="0" mb="0" cb="0"/><line nr="578" mi="0" ci="1" mb="0" cb="0"/><line nr="580" mi="0" ci="3" mb="0" cb="0"/><line nr="583" mi="0" ci="6" mb="0" cb="0"/><line nr="584" mi="0" ci="12" mb="0" cb="0"/><line nr="585" mi="0" ci="3" mb="0" cb="0"/><line nr="586" mi="0" ci="1" mb="0" cb="0"/><line nr="591" mi="0" ci="4" mb="0" cb="0"/><line nr="593" mi="0" ci="5" mb="0" cb="0"/><line nr="594" mi="0" ci="5" mb="0" cb="0"/><line nr="596" mi="0" ci="11" mb="0" cb="2"/><line nr="597" mi="0" ci="3" mb="0" cb="0"/><line nr="598" mi="0" ci="3" mb="0" cb="0"/><line nr="599" mi="0" ci="2" mb="0" cb="0"/><line nr="603" mi="0" ci="2" mb="0" cb="2"/><line nr="604" mi="0" ci="9" mb="0" cb="0"/><line nr="605" mi="0" ci="9" mb="0" cb="0"/><line nr="606" mi="0" ci="9" mb="0" cb="0"/><line nr="609" mi="0" ci="8" mb="0" cb="4"/><line nr="610" mi="0" ci="1" mb="0" cb="0"/><line nr="611" mi="0" ci="6" mb="0" cb="2"/><line nr="612" mi="0" ci="1" mb="0" cb="0"/><line nr="613" mi="0" ci="6" mb="0" cb="2"/><line nr="614" mi="0" ci="1" mb="0" cb="0"/><line nr="616" mi="0" ci="6" mb="0" cb="0"/><line nr="617" mi="0" ci="1" mb="0" cb="0"/><line nr="619" mi="0" ci="2" mb="0" cb="0"/><line nr="626" mi="0" ci="3" mb="0" cb="0"/><line nr="627" mi="0" ci="5" mb="0" cb="0"/><line nr="628" mi="0" ci="3" mb="0" cb="0"/><line nr="630" mi="0" ci="4" mb="0" cb="0"/><line nr="631" mi="0" ci="1" mb="0" cb="0"/><line nr="636" mi="0" ci="3" mb="0" cb="0"/><line nr="637" mi="0" ci="4" mb="0" cb="0"/><line nr="638" mi="0" ci="1" mb="0" cb="0"/><line nr="640" mi="0" ci="2" mb="0" cb="0"/><line nr="642" mi="0" ci="4" mb="0" cb="0"/><line nr="643" mi="0" ci="6" mb="0" cb="0"/><line nr="644" mi="0" ci="3" mb="0" cb="0"/><line nr="647" mi="0" ci="10" mb="0" cb="2"/><line nr="650" mi="0" ci="15" mb="0" cb="4"/><line nr="652" mi="0" ci="10" mb="0" cb="0"/><line nr="653" mi="0" ci="1" mb="0" cb="0"/><line nr="656" mi="0" ci="3" mb="0" cb="0"/><line nr="657" mi="0" ci="1" mb="0" cb="0"/><line nr="668" mi="0" ci="3" mb="0" cb="0"/><line nr="677" mi="0" ci="3" mb="0" cb="0"/><line nr="688" mi="0" ci="3" mb="0" cb="0"/><line nr="697" mi="0" ci="3" mb="0" cb="0"/><line nr="708" mi="0" ci="5" mb="0" cb="0"/><line nr="709" mi="0" ci="5" mb="0" cb="0"/><line nr="714" mi="0" ci="2" mb="0" cb="2"/><line nr="715" mi="0" ci="3" mb="0" cb="0"/><line nr="717" mi="0" ci="3" mb="0" cb="0"/><line nr="720" mi="0" ci="2" mb="0" cb="2"/><line nr="721" mi="0" ci="3" mb="0" cb="0"/><line nr="723" mi="0" ci="3" mb="0" cb="0"/><line nr="726" mi="0" ci="6" mb="0" cb="0"/><line nr="735" mi="0" ci="3" mb="0" cb="0"/><line nr="744" mi="0" ci="3" mb="0" cb="2"/><line nr="745" mi="0" ci="5" mb="0" cb="0"/><line nr="747" mi="0" ci="5" mb="0" cb="0"/><line nr="748" mi="0" ci="1" mb="0" cb="0"/><line nr="756" mi="0" ci="5" mb="0" cb="0"/><line nr="757" mi="0" ci="1" mb="0" cb="0"/><line nr="764" mi="0" ci="3" mb="0" cb="0"/><line nr="765" mi="0" ci="1" mb="0" cb="0"/><line nr="775" mi="0" ci="10" mb="0" cb="0"/><line nr="776" mi="0" ci="1" mb="0" cb="0"/><line nr="787" mi="0" ci="12" mb="0" cb="0"/><line nr="788" mi="0" ci="1" mb="0" cb="0"/><line nr="798" mi="0" ci="7" mb="1" cb="3"/><line nr="799" mi="0" ci="1" mb="0" cb="0"/><line nr="801" mi="0" ci="5" mb="0" cb="0"/><line nr="803" mi="0" ci="11" mb="0" cb="2"/><line nr="804" mi="0" ci="11" mb="0" cb="0"/><line nr="806" mi="0" ci="2" mb="0" cb="0"/><line nr="807" mi="0" ci="1" mb="0" cb="0"/><line nr="814" mi="7" ci="13" mb="4" cb="2"/><counter type="INSTRUCTION" missed="94" covered="1108"/><counter type="BRANCH" missed="16" covered="81"/><counter type="LINE" missed="24" covered="252"/><counter type="COMPLEXITY" missed="15" covered="85"/><counter type="METHOD" missed="0" covered="49"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="PlacementOutcome.java"><line nr="8" mi="0" ci="3" mb="0" cb="0"/><line nr="9" mi="0" ci="6" mb="0" cb="0"/><line nr="10" mi="0" ci="6" mb="0" cb="0"/><line nr="11" mi="0" ci="6" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="21"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="NextTurnState.java"><line nr="22" mi="0" ci="3" mb="0" cb="0"/><line nr="23" mi="0" ci="2" mb="0" cb="0"/><line nr="24" mi="0" ci="1" mb="0" cb="0"/><line nr="35" mi="0" ci="8" mb="1" cb="3"/><line nr="36" mi="0" ci="5" mb="0" cb="0"/><line nr="37" mi="0" ci="1" mb="0" cb="0"/><line nr="45" mi="0" ci="4" mb="1" cb="1"/><line nr="46" mi="5" ci="0" mb="0" cb="0"/><line nr="47" mi="0" ci="1" mb="0" cb="0"/><line nr="56" mi="0" ci="4" mb="1" cb="1"/><line nr="57" mi="5" ci="0" mb="0" cb="0"/><line nr="58" mi="0" ci="1" mb="0" cb="0"/><line nr="71" mi="0" ci="4" mb="0" cb="2"/><line nr="72" mi="0" ci="7" mb="0" cb="0"/><line nr="73" mi="0" ci="4" mb="0" cb="2"/><line nr="74" mi="0" ci="7" mb="0" cb="0"/><line nr="76" mi="0" ci="6" mb="0" cb="0"/><line nr="78" mi="0" ci="4" mb="0" cb="0"/><line nr="79" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="10" covered="63"/><counter type="BRANCH" missed="3" covered="9"/><counter type="LINE" missed="2" covered="17"/><counter type="COMPLEXITY" missed="3" covered="8"/><counter type="METHOD" missed="0" covered="5"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="ChooseSecretObjectiveState.java"><line nr="20" mi="0" ci="3" mb="0" cb="0"/><line nr="21" mi="0" ci="1" mb="0" cb="0"/><line nr="29" mi="0" ci="1" mb="0" cb="0"/><line nr="36" mi="0" ci="6" mb="0" cb="0"/><line nr="38" mi="0" ci="6" mb="0" cb="2"/><line nr="39" mi="0" ci="3" mb="0" cb="0"/><line nr="41" mi="0" ci="6" mb="0" cb="0"/><line nr="42" mi="0" ci="4" mb="0" cb="0"/><line nr="43" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="31"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="9"/><counter type="COMPLEXITY" missed="0" covered="4"/><counter type="METHOD" missed="0" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="Player.java"><line nr="38" mi="0" ci="2" mb="0" cb="0"/><line nr="39" mi="0" ci="3" mb="0" cb="0"/><line nr="40" mi="0" ci="3" mb="0" cb="0"/><line nr="42" mi="0" ci="3" mb="0" cb="0"/><line nr="44" mi="0" ci="5" mb="0" cb="0"/><line nr="45" mi="0" ci="3" mb="0" cb="0"/><line nr="46" mi="0" ci="1" mb="0" cb="0"/><line nr="53" mi="0" ci="2" mb="0" cb="0"/><line nr="54" mi="0" ci="4" mb="0" cb="0"/><line nr="55" mi="0" ci="4" mb="0" cb="0"/><line nr="56" mi="0" ci="4" mb="0" cb="0"/><line nr="57" mi="0" ci="4" mb="0" cb="0"/><line nr="58" mi="0" ci="4" mb="0" cb="0"/><line nr="59" mi="0" ci="4" mb="0" cb="0"/><line nr="60" mi="0" ci="1" mb="0" cb="0"/><line nr="64" mi="0" ci="5" mb="0" cb="2"/><line nr="65" mi="2" ci="7" mb="1" cb="1"/><line nr="67" mi="0" ci="11" mb="0" cb="2"/><line nr="68" mi="0" ci="5" mb="1" cb="1"/><line nr="73" mi="0" ci="35" mb="0" cb="0"/><line nr="88" mi="0" ci="5" mb="0" cb="0"/><line nr="89" mi="0" ci="6" mb="1" cb="1"/><line nr="90" mi="0" ci="7" mb="0" cb="0"/><line nr="92" mi="5" ci="0" mb="0" cb="0"/><line nr="93" mi="0" ci="3" mb="0" cb="0"/><line nr="94" mi="0" ci="1" mb="0" cb="0"/><line nr="104" mi="0" ci="5" mb="0" cb="0"/><line nr="105" mi="0" ci="6" mb="1" cb="1"/><line nr="106" mi="0" ci="6" mb="0" cb="0"/><line nr="108" mi="5" ci="0" mb="0" cb="0"/><line nr="121" mi="0" ci="5" mb="0" cb="0"/><line nr="122" mi="0" ci="6" mb="1" cb="1"/><line nr="123" mi="0" ci="6" mb="0" cb="0"/><line nr="125" mi="5" ci="0" mb="0" cb="0"/><line nr="137" mi="0" ci="5" mb="0" cb="0"/><line nr="138" mi="0" ci="6" mb="1" cb="1"/><line nr="139" mi="0" ci="8" mb="0" cb="0"/><line nr="141" mi="5" ci="0" mb="0" cb="0"/><line nr="142" mi="0" ci="3" mb="0" cb="0"/><line nr="143" mi="0" ci="1" mb="0" cb="0"/><line nr="155" mi="0" ci="5" mb="0" cb="0"/><line nr="156" mi="0" ci="6" mb="1" cb="1"/><line nr="157" mi="0" ci="5" mb="0" cb="0"/><line nr="158" mi="0" ci="4" mb="0" cb="0"/><line nr="159" mi="0" ci="1" mb="0" cb="0"/><line nr="160" mi="5" ci="0" mb="0" cb="0"/><line nr="162" mi="0" ci="3" mb="0" cb="0"/><line nr="163" mi="0" ci="1" mb="0" cb="0"/><line nr="174" mi="0" ci="5" mb="0" cb="0"/><line nr="175" mi="0" ci="6" mb="1" cb="1"/><line nr="176" mi="0" ci="4" mb="0" cb="0"/><line nr="177" mi="0" ci="4" mb="0" cb="0"/><line nr="179" mi="5" ci="0" mb="0" cb="0"/><line nr="181" mi="0" ci="3" mb="0" cb="0"/><line nr="182" mi="0" ci="1" mb="0" cb="0"/><line nr="190" mi="0" ci="5" mb="0" cb="0"/><line nr="191" mi="0" ci="1" mb="0" cb="0"/><line nr="200" mi="0" ci="6" mb="0" cb="0"/><line nr="201" mi="0" ci="1" mb="0" cb="0"/><line nr="207" mi="0" ci="3" mb="0" cb="0"/><line nr="214" mi="0" ci="3" mb="0" cb="0"/><line nr="221" mi="0" ci="3" mb="0" cb="0"/><line nr="228" mi="0" ci="3" mb="0" cb="0"/><line nr="229" mi="0" ci="1" mb="0" cb="0"/><line nr="237" mi="0" ci="3" mb="0" cb="0"/><line nr="246" mi="0" ci="6" mb="0" cb="0"/><line nr="247" mi="0" ci="1" mb="0" cb="0"/><line nr="253" mi="0" ci="3" mb="0" cb="0"/><line nr="257" mi="0" ci="5" mb="0" cb="0"/><line nr="258" mi="0" ci="5" mb="0" cb="0"/><line nr="263" mi="5" ci="0" mb="0" cb="0"/><line nr="264" mi="3" ci="0" mb="0" cb="0"/><line nr="265" mi="3" ci="0" mb="0" cb="0"/><line nr="266" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="44" covered="286"/><counter type="BRANCH" missed="8" covered="12"/><counter type="LINE" missed="10" covered="64"/><counter type="COMPLEXITY" missed="9" covered="22"/><counter type="METHOD" missed="1" covered="20"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="DrawSource.java"><line nr="6" mi="0" ci="3" mb="0" cb="0"/><line nr="10" mi="0" ci="6" mb="0" cb="0"/><line nr="14" mi="0" ci="6" mb="0" cb="0"/><line nr="18" mi="0" ci="6" mb="0" cb="0"/><line nr="22" mi="0" ci="6" mb="0" cb="0"/><line nr="26" mi="0" ci="6" mb="0" cb="0"/><line nr="30" mi="0" ci="6" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="39"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="Symbol.java"><line nr="11" mi="0" ci="3" mb="0" cb="0"/><line nr="12" mi="0" ci="6" mb="0" cb="0"/><line nr="13" mi="0" ci="6" mb="0" cb="0"/><line nr="14" mi="0" ci="6" mb="0" cb="0"/><line nr="15" mi="0" ci="6" mb="0" cb="0"/><line nr="16" mi="0" ci="6" mb="0" cb="0"/><line nr="17" mi="0" ci="6" mb="0" cb="0"/><line nr="18" mi="0" ci="6" mb="0" cb="0"/><line nr="19" mi="0" ci="6" mb="0" cb="0"/><line nr="20" mi="0" ci="6" mb="0" cb="0"/><line nr="21" mi="0" ci="6" mb="0" cb="0"/><line nr="22" mi="0" ci="6" mb="0" cb="0"/><line nr="30" mi="0" ci="6" mb="0" cb="0"/><line nr="44" mi="0" ci="29" mb="0" cb="0"/><line nr="61" mi="0" ci="37" mb="0" cb="0"/><line nr="80" mi="0" ci="37" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="178"/><counter type="LINE" missed="0" covered="16"/><counter type="COMPLEXITY" missed="0" covered="5"/><counter type="METHOD" missed="0" covered="5"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="MatchObserver.java"/><sourcefile name="Requirement.java"><line nr="19" mi="0" ci="2" mb="0" cb="0"/><line nr="20" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><counter type="INSTRUCTION" missed="298" covered="3231"/><counter type="BRANCH" missed="50" covered="218"/><counter type="LINE" missed="70" covered="691"/><counter type="COMPLEXITY" missed="60" covered="254"/><counter type="METHOD" missed="14" covered="162"/><counter type="CLASS" missed="0" covered="29"/></package><package name="it/polimi/ingsw/network/messages/responses"><class name="it/polimi/ingsw/network/messages/responses/ResponseMessage" sourcefilename="ResponseMessage.java"><method name="getUsername" desc="()Ljava/lang/String;" line="21"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getResponse" desc="()Ljava/lang/String;" line="28"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Ljava/lang/String;)V" line="14"><counter type="INSTRUCTION" missed="0" covered="14"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="6" covered="14"/><counter type="LINE" missed="2" covered="4"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/responses/SomeoneSetInitialSideMessage" sourcefilename="SomeoneSetInitialSideMessage.java"><method name="getAvailableResources" desc="()Ljava/util/Map;" line="18"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getSide" desc="()Lit/polimi/ingsw/gamemodel/Side;" line="25"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Side;Ljava/util/Map;)V" line="29"><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="3" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/network/messages/responses/MatchFinishedMessage" sourcefilename="MatchFinishedMessage.java"><method name="getRanking" desc="()Ljava/util/List;" line="22"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Ljava/util/List;)V" line="26"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="createLeaderboardEntry" desc="(Lit/polimi/ingsw/gamemodel/Player;Ljava/lang/Boolean;)Lit/polimi/ingsw/utils/LeaderboardEntry;" line="31"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$new$0" desc="(Lit/polimi/ingsw/utils/Pair;)Lit/polimi/ingsw/utils/LeaderboardEntry;" line="27"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="37" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="4" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/network/messages/responses/SomeoneQuitMessage" sourcefilename="SomeoneQuitMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;IZ)V" line="11"><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getJoinedPlayers" desc="()I" line="20"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="isEndMatch" desc="()Z" line="27"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="6" covered="10"/><counter type="LINE" missed="2" covered="4"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/responses/SomeonePlayedCardMessage" sourcefilename="SomeonePlayedCardMessage.java"><method name="getX" desc="()Ljava/lang/Integer;" line="22"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getY" desc="()Ljava/lang/Integer;" line="29"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getCardID" desc="()Ljava/lang/Integer;" line="36"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getSide" desc="()Lit/polimi/ingsw/gamemodel/Side;" line="43"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPoints" desc="()Ljava/lang/Integer;" line="50"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getAvailableResources" desc="()Ljava/util/Map;" line="57"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Ljava/lang/String;Lit/polimi/ingsw/utils/Pair;Ljava/lang/Integer;Lit/polimi/ingsw/gamemodel/Side;ILjava/util/Map;)V" line="61"><counter type="INSTRUCTION" missed="27" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="45" covered="0"/><counter type="LINE" missed="14" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="7" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/network/messages/responses/SomeoneDrewCardMessage" sourcefilename="SomeoneDrewCardMessage.java"><method name="getDrawSource" desc="()Lit/polimi/ingsw/gamemodel/DrawSource;" line="22"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getCardID" desc="()Ljava/lang/Integer;" line="29"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getReplacementCardID" desc="()Ljava/lang/Integer;" line="36"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getDeckTopReigns" desc="()Lit/polimi/ingsw/utils/Pair;" line="43"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/DrawSource;Ljava/lang/Integer;Ljava/lang/Integer;Lit/polimi/ingsw/utils/Pair;)V" line="47"><counter type="INSTRUCTION" missed="28" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="40" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="12" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="5" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/network/messages/responses/SomeoneSentPrivateTextMessage" sourcefilename="SomeoneSentPrivateTextMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V" line="11"><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getRecipient" desc="()Ljava/lang/String;" line="17"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getText" desc="()Ljava/lang/String;" line="21"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="6" covered="10"/><counter type="LINE" missed="2" covered="4"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/responses/SomeoneJoinedMessage" sourcefilename="SomeoneJoinedMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/util/List;I)V" line="15"><counter type="INSTRUCTION" missed="0" covered="14"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getJoinedPlayers" desc="()Ljava/util/List;" line="24"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getMaxPlayers" desc="()I" line="31"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="6" covered="14"/><counter type="LINE" missed="2" covered="4"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/responses/MatchStartedMessage" sourcefilename="MatchStartedMessage.java"><method name="getVisibleObjectives" desc="()[Ljava/lang/Integer;" line="24"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getVisibleCards" desc="()Ljava/util/Map;" line="31"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getVisibleDeckReigns" desc="()[Lit/polimi/ingsw/gamemodel/Symbol;" line="39"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlayerHands" desc="()Ljava/util/Map;" line="46"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlayerPawnColors" desc="()Ljava/util/Map;" line="53"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/utils/Pair;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Ljava/util/List;)V" line="67"><counter type="INSTRUCTION" missed="0" covered="114"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="19"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$new$1" desc="(I)[Ljava/lang/Integer;" line="83"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$new$0" desc="(Lit/polimi/ingsw/gamemodel/DrawSource;Lit/polimi/ingsw/gamemodel/PlayableCard;)V" line="73"><counter type="INSTRUCTION" missed="0" covered="8"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="15" covered="125"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="5" covered="19"/><counter type="COMPLEXITY" missed="5" covered="4"/><counter type="METHOD" missed="5" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/responses/AvailableMatchesMessage" sourcefilename="AvailableMatchesMessage.java"><method name="&lt;init&gt;" desc="(Ljava/util/Map;)V" line="23"><counter type="INSTRUCTION" missed="0" covered="13"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getMatches" desc="()Ljava/util/List;" line="35"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="encodeMatch" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Match;)Lit/polimi/ingsw/utils/AvailableMatch;" line="39"><counter type="INSTRUCTION" missed="0" covered="14"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="lambda$new$0" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Match;)V" line="25"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="3" covered="36"/><counter type="LINE" missed="1" covered="5"/><counter type="COMPLEXITY" missed="1" covered="3"/><counter type="METHOD" missed="1" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/responses/SomeoneDrewSecretObjectivesMessage" sourcefilename="SomeoneDrewSecretObjectivesMessage.java"><method name="getFirstID" desc="()Ljava/lang/Integer;" line="15"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getSecondID" desc="()Ljava/lang/Integer;" line="22"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Ljava/lang/String;Lit/polimi/ingsw/utils/Pair;)V" line="26"><counter type="INSTRUCTION" missed="0" covered="14"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="3" covered="17"/><counter type="LINE" missed="1" covered="5"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="1" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/network/messages/responses/MatchResumedMessage" sourcefilename="MatchResumedMessage.java"><method name="&lt;init&gt;" desc="(Ljava/util/Map;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Ljava/lang/Integer;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;Z)V" line="34"><counter type="INSTRUCTION" missed="37" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlayersUsernamesAndPawns" desc="()Ljava/util/Map;" line="53"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlayersHands" desc="()Ljava/util/Map;" line="60"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getVisibleObjectives" desc="()Lit/polimi/ingsw/utils/Pair;" line="67"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getVisiblePlayableCards" desc="()Ljava/util/Map;" line="74"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getDecksTopReigns" desc="()Lit/polimi/ingsw/utils/Pair;" line="81"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getSecretObjective" desc="()Ljava/lang/Integer;" line="88"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getAvailableResources" desc="()Ljava/util/Map;" line="95"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlacedCards" desc="()Ljava/util/Map;" line="102"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlayerPoints" desc="()Ljava/util/Map;" line="109"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getCurrentPlayer" desc="()Ljava/lang/String;" line="116"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="isDrawPhase" desc="()Z" line="123"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="70" covered="0"/><counter type="LINE" missed="24" covered="0"/><counter type="COMPLEXITY" missed="12" covered="0"/><counter type="METHOD" missed="12" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/network/messages/responses/SomeoneChoseSecretObjectiveMessage" sourcefilename="SomeoneChoseSecretObjectiveMessage.java"><method name="getObjectiveID" desc="()Ljava/lang/Integer;" line="13"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/Integer;)V" line="17"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/network/messages/responses/SomeoneDrewInitialCardMessage" sourcefilename="SomeoneDrewInitialCardMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/Integer;)V" line="10"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getInitialCardID" desc="()Ljava/lang/Integer;" line="16"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/network/messages/responses/SomeoneSentBroadcastTextMessage" sourcefilename="SomeoneSentBroadcastTextMessage.java"><method name="&lt;init&gt;" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="10"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getText" desc="()Ljava/lang/String;" line="15"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="3" covered="7"/><counter type="LINE" missed="1" covered="3"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="1" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><sourcefile name="MatchStartedMessage.java"><line nr="24" mi="3" ci="0" mb="0" cb="0"/><line nr="31" mi="3" ci="0" mb="0" cb="0"/><line nr="39" mi="3" ci="0" mb="0" cb="0"/><line nr="46" mi="3" ci="0" mb="0" cb="0"/><line nr="53" mi="3" ci="0" mb="0" cb="0"/><line nr="67" mi="0" ci="3" mb="0" cb="0"/><line nr="68" mi="0" ci="12" mb="0" cb="0"/><line nr="69" mi="0" ci="12" mb="0" cb="0"/><line nr="70" mi="0" ci="8" mb="0" cb="0"/><line nr="71" mi="0" ci="8" mb="0" cb="0"/><line nr="72" mi="0" ci="5" mb="0" cb="0"/><line nr="73" mi="0" ci="12" mb="0" cb="0"/><line nr="74" mi="0" ci="7" mb="0" cb="0"/><line nr="75" mi="0" ci="7" mb="0" cb="0"/><line nr="77" mi="0" ci="5" mb="0" cb="0"/><line nr="78" mi="0" ci="5" mb="0" cb="0"/><line nr="79" mi="0" ci="10" mb="0" cb="2"/><line nr="81" mi="0" ci="5" mb="0" cb="0"/><line nr="82" mi="0" ci="1" mb="0" cb="0"/><line nr="83" mi="0" ci="8" mb="0" cb="0"/><line nr="84" mi="0" ci="8" mb="0" cb="0"/><line nr="85" mi="0" ci="7" mb="0" cb="0"/><line nr="86" mi="0" ci="1" mb="0" cb="0"/><line nr="87" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="15" covered="125"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="5" covered="19"/><counter type="COMPLEXITY" missed="5" covered="4"/><counter type="METHOD" missed="5" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="MatchFinishedMessage.java"><line nr="22" mi="3" ci="0" mb="0" cb="0"/><line nr="26" mi="3" ci="0" mb="0" cb="0"/><line nr="27" mi="19" ci="0" mb="0" cb="0"/><line nr="28" mi="1" ci="0" mb="0" cb="0"/><line nr="31" mi="11" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="37" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="4" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="ResponseMessage.java"><line nr="14" mi="0" ci="8" mb="0" cb="0"/><line nr="21" mi="3" ci="0" mb="0" cb="0"/><line nr="28" mi="3" ci="0" mb="0" cb="0"/><line nr="31" mi="0" ci="2" mb="0" cb="0"/><line nr="32" mi="0" ci="3" mb="0" cb="0"/><line nr="33" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="6" covered="14"/><counter type="LINE" missed="2" covered="4"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="SomeoneChoseSecretObjectiveMessage.java"><line nr="13" mi="3" ci="0" mb="0" cb="0"/><line nr="17" mi="3" ci="0" mb="0" cb="0"/><line nr="18" mi="3" ci="0" mb="0" cb="0"/><line nr="19" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="SomeoneSetInitialSideMessage.java"><line nr="18" mi="3" ci="0" mb="0" cb="0"/><line nr="25" mi="3" ci="0" mb="0" cb="0"/><line nr="29" mi="3" ci="0" mb="0" cb="0"/><line nr="30" mi="3" ci="0" mb="0" cb="0"/><line nr="31" mi="3" ci="0" mb="0" cb="0"/><line nr="32" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="3" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="MatchResumedMessage.java"><line nr="34" mi="3" ci="0" mb="0" cb="0"/><line nr="35" mi="3" ci="0" mb="0" cb="0"/><line nr="36" mi="3" ci="0" mb="0" cb="0"/><line nr="37" mi="3" ci="0" mb="0" cb="0"/><line nr="38" mi="3" ci="0" mb="0" cb="0"/><line nr="39" mi="3" ci="0" mb="0" cb="0"/><line nr="40" mi="3" ci="0" mb="0" cb="0"/><line nr="41" mi="3" ci="0" mb="0" cb="0"/><line nr="42" mi="3" ci="0" mb="0" cb="0"/><line nr="43" mi="3" ci="0" mb="0" cb="0"/><line nr="44" mi="3" ci="0" mb="0" cb="0"/><line nr="45" mi="3" ci="0" mb="0" cb="0"/><line nr="46" mi="1" ci="0" mb="0" cb="0"/><line nr="53" mi="3" ci="0" mb="0" cb="0"/><line nr="60" mi="3" ci="0" mb="0" cb="0"/><line nr="67" mi="3" ci="0" mb="0" cb="0"/><line nr="74" mi="3" ci="0" mb="0" cb="0"/><line nr="81" mi="3" ci="0" mb="0" cb="0"/><line nr="88" mi="3" ci="0" mb="0" cb="0"/><line nr="95" mi="3" ci="0" mb="0" cb="0"/><line nr="102" mi="3" ci="0" mb="0" cb="0"/><line nr="109" mi="3" ci="0" mb="0" cb="0"/><line nr="116" mi="3" ci="0" mb="0" cb="0"/><line nr="123" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="70" covered="0"/><counter type="LINE" missed="24" covered="0"/><counter type="COMPLEXITY" missed="12" covered="0"/><counter type="METHOD" missed="12" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="SomeonePlayedCardMessage.java"><line nr="22" mi="3" ci="0" mb="0" cb="0"/><line nr="29" mi="3" ci="0" mb="0" cb="0"/><line nr="36" mi="3" ci="0" mb="0" cb="0"/><line nr="43" mi="3" ci="0" mb="0" cb="0"/><line nr="50" mi="3" ci="0" mb="0" cb="0"/><line nr="57" mi="3" ci="0" mb="0" cb="0"/><line nr="61" mi="3" ci="0" mb="0" cb="0"/><line nr="62" mi="5" ci="0" mb="0" cb="0"/><line nr="63" mi="5" ci="0" mb="0" cb="0"/><line nr="64" mi="3" ci="0" mb="0" cb="0"/><line nr="65" mi="3" ci="0" mb="0" cb="0"/><line nr="66" mi="4" ci="0" mb="0" cb="0"/><line nr="67" mi="3" ci="0" mb="0" cb="0"/><line nr="68" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="45" covered="0"/><counter type="LINE" missed="14" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="7" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="SomeoneDrewInitialCardMessage.java"><line nr="10" mi="3" ci="0" mb="0" cb="0"/><line nr="11" mi="3" ci="0" mb="0" cb="0"/><line nr="12" mi="1" ci="0" mb="0" cb="0"/><line nr="16" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="SomeoneDrewSecretObjectivesMessage.java"><line nr="15" mi="0" ci="3" mb="0" cb="0"/><line nr="22" mi="3" ci="0" mb="0" cb="0"/><line nr="26" mi="0" ci="3" mb="0" cb="0"/><line nr="27" mi="0" ci="5" mb="0" cb="0"/><line nr="28" mi="0" ci="5" mb="0" cb="0"/><line nr="29" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="3" covered="17"/><counter type="LINE" missed="1" covered="5"/><counter type="COMPLEXITY" missed="1" covered="2"/><counter type="METHOD" missed="1" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="SomeoneDrewCardMessage.java"><line nr="22" mi="3" ci="0" mb="0" cb="0"/><line nr="29" mi="3" ci="0" mb="0" cb="0"/><line nr="36" mi="3" ci="0" mb="0" cb="0"/><line nr="43" mi="3" ci="0" mb="0" cb="0"/><line nr="47" mi="3" ci="0" mb="0" cb="0"/><line nr="48" mi="3" ci="0" mb="0" cb="0"/><line nr="49" mi="3" ci="0" mb="0" cb="0"/><line nr="50" mi="3" ci="0" mb="0" cb="0"/><line nr="51" mi="8" ci="0" mb="4" cb="0"/><line nr="52" mi="4" ci="0" mb="0" cb="0"/><line nr="54" mi="3" ci="0" mb="0" cb="0"/><line nr="56" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="40" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="12" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="5" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="AvailableMatchesMessage.java"><line nr="23" mi="0" ci="3" mb="0" cb="0"/><line nr="24" mi="0" ci="5" mb="0" cb="0"/><line nr="25" mi="0" ci="13" mb="0" cb="0"/><line nr="26" mi="0" ci="1" mb="0" cb="0"/><line nr="35" mi="3" ci="0" mb="0" cb="0"/><line nr="39" mi="0" ci="14" mb="0" cb="0"/><counter type="INSTRUCTION" missed="3" covered="36"/><counter type="LINE" missed="1" covered="5"/><counter type="COMPLEXITY" missed="1" covered="3"/><counter type="METHOD" missed="1" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="SomeoneQuitMessage.java"><line nr="11" mi="0" ci="3" mb="0" cb="0"/><line nr="12" mi="0" ci="3" mb="0" cb="0"/><line nr="13" mi="0" ci="3" mb="0" cb="0"/><line nr="14" mi="0" ci="1" mb="0" cb="0"/><line nr="20" mi="3" ci="0" mb="0" cb="0"/><line nr="27" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="6" covered="10"/><counter type="LINE" missed="2" covered="4"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="SomeoneSentPrivateTextMessage.java"><line nr="11" mi="0" ci="3" mb="0" cb="0"/><line nr="12" mi="0" ci="3" mb="0" cb="0"/><line nr="13" mi="0" ci="3" mb="0" cb="0"/><line nr="14" mi="0" ci="1" mb="0" cb="0"/><line nr="17" mi="3" ci="0" mb="0" cb="0"/><line nr="21" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="6" covered="10"/><counter type="LINE" missed="2" covered="4"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="SomeoneSentBroadcastTextMessage.java"><line nr="10" mi="0" ci="3" mb="0" cb="0"/><line nr="11" mi="0" ci="3" mb="0" cb="0"/><line nr="12" mi="0" ci="1" mb="0" cb="0"/><line nr="15" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="3" covered="7"/><counter type="LINE" missed="1" covered="3"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="1" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="SomeoneJoinedMessage.java"><line nr="15" mi="0" ci="3" mb="0" cb="0"/><line nr="16" mi="0" ci="7" mb="0" cb="0"/><line nr="17" mi="0" ci="3" mb="0" cb="0"/><line nr="18" mi="0" ci="1" mb="0" cb="0"/><line nr="24" mi="3" ci="0" mb="0" cb="0"/><line nr="31" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="6" covered="14"/><counter type="LINE" missed="2" covered="4"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><counter type="INSTRUCTION" missed="276" covered="233"/><counter type="BRANCH" missed="4" covered="2"/><counter type="LINE" missed="85" covered="48"/><counter type="COMPLEXITY" missed="53" covered="14"/><counter type="METHOD" missed="51" covered="13"/><counter type="CLASS" missed="7" covered="8"/></package><package name="it/polimi/ingsw/client/frontend"><class name="it/polimi/ingsw/client/frontend/LastRequest" sourcefilename="LastRequest.java"><method name="&lt;init&gt;" desc="()V" line="8"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setStatus" desc="(Lit/polimi/ingsw/utils/RequestStatus;)V" line="17"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getStatus" desc="()Lit/polimi/ingsw/utils/RequestStatus;" line="24"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="3" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/GraphicalView" sourcefilename="GraphicalView.java"><method name="&lt;init&gt;" desc="()V" line="22"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setUsername" desc="(Ljava/lang/String;)V" line="43"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="isLastTurn" desc="()Z" line="51"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setLastRequestStatus" desc="(Lit/polimi/ingsw/utils/RequestStatus;)V" line="60"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyError" desc="(Ljava/lang/Exception;)V" line="69"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setNetworkHandler" desc="(Lit/polimi/ingsw/client/network/NetworkHandler;)V" line="78"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="createMatch" desc="(Ljava/lang/String;Ljava/lang/Integer;)V" line="88"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="joinMatch" desc="(Ljava/lang/String;)V" line="98"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="sendBroadcastText" desc="(Ljava/lang/String;)V" line="108"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="sendPrivateText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="118"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawInitialCard" desc="()V" line="125"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseInitialCardSide" desc="(Lit/polimi/ingsw/gamemodel/Side;)V" line="135"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawSecretObjectives" desc="()V" line="143"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Objective;)V" line="153"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="playCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="166"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawCard" desc="(Lit/polimi/ingsw/gamemodel/DrawSource;)V" line="176"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="nextPlayer" desc="()V" line="190"><counter type="INSTRUCTION" missed="63" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="matchStarted" desc="(Ljava/util/Map;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;)V" line="227"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="resumeMatch" desc="(Ljava/util/Map;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/Objective;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;Z)V" line="251"><counter type="INSTRUCTION" missed="120" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="23" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setupMatch" desc="(Ljava/util/Map;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;)V" line="291"><counter type="INSTRUCTION" missed="96" covered="0"/><counter type="BRANCH" missed="7" covered="0"/><counter type="LINE" missed="25" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="receiveAvailableMatches" desc="(Ljava/util/List;)V" line="345"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="giveInitialCard" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="355"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="giveSecretObjectives" desc="(Lit/polimi/ingsw/utils/Pair;)V" line="366"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewInitialCard" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="376"><counter type="INSTRUCTION" missed="17" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSetInitialSide" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Side;Ljava/util/Map;)V" line="403"><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewSecretObjective" desc="(Ljava/lang/String;)V" line="418"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneChoseSecretObjective" desc="(Ljava/lang/String;)V" line="429"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someonePlayedCard" desc="(Ljava/lang/String;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;ILjava/util/Map;)V" line="449"><counter type="INSTRUCTION" missed="32" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneDrewCard" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/DrawSource;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/utils/Pair;)V" line="472"><counter type="INSTRUCTION" missed="51" covered="0"/><counter type="BRANCH" missed="12" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyLastTurn" desc="()V" line="493"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneJoined" desc="(Ljava/lang/String;Ljava/util/List;)V" line="503"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSentBroadcastText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="530"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSentPrivateText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="542"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$someoneDrewInitialCard$4" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="380"><counter type="INSTRUCTION" missed="29" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$setupMatch$3" desc="(Ljava/util/Map;Ljava/lang/String;Ljava/util/List;)V" line="320"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$setupMatch$2" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Color;)V" line="295"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$resumeMatch$1" desc="(Ljava/util/Map;Lit/polimi/ingsw/utils/Pair;)I" line="257"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$playCard$0" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="167"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="679" covered="0"/><counter type="BRANCH" missed="55" covered="0"/><counter type="LINE" missed="173" covered="0"/><counter type="COMPLEXITY" missed="67" covered="0"/><counter type="METHOD" missed="38" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/ShownCard" sourcefilename="ShownCard.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Card;Lit/polimi/ingsw/gamemodel/Side;Lit/polimi/ingsw/utils/Pair;)V" line="14"><counter type="INSTRUCTION" missed="0" covered="12"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="12"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/client/frontend/ClientBoard" sourcefilename="ClientBoard.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Color;Ljava/util/List;)V" line="30"><counter type="INSTRUCTION" missed="36" covered="0"/><counter type="LINE" missed="10" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setSecretObjective" desc="(Lit/polimi/ingsw/gamemodel/Objective;)V" line="50"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="placeCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;Ljava/lang/Integer;Ljava/util/Map;)V" line="63"><counter type="INSTRUCTION" missed="37" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="drawCard" desc="(Lit/polimi/ingsw/gamemodel/PlayableCard;)V" line="76"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setInitial" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="88"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="placeInitial" desc="(Lit/polimi/ingsw/gamemodel/Side;Ljava/util/Map;)V" line="98"><counter type="INSTRUCTION" missed="36" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getInitialCard" desc="()Lit/polimi/ingsw/gamemodel/InitialCard;" line="106"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlacementNumber" desc="()Ljava/lang/Integer;" line="112"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getHand" desc="()Ljava/util/List;" line="119"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPoints" desc="()Ljava/lang/Integer;" line="126"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getPlaced" desc="()Ljava/util/Map;" line="133"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getAvailableResources" desc="()Ljava/util/Map;" line="140"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getColor" desc="()Lit/polimi/ingsw/gamemodel/Color;" line="147"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getObjective" desc="()Lit/polimi/ingsw/gamemodel/Objective;" line="154"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$new$0" desc="(Lit/polimi/ingsw/gamemodel/Symbol;)V" line="41"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="155" covered="0"/><counter type="LINE" missed="34" covered="0"/><counter type="COMPLEXITY" missed="15" covered="0"/><counter type="METHOD" missed="15" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/MatchStatus" sourcefilename="MatchStatus.java"><method name="&lt;clinit&gt;" desc="()V" line="11"><counter type="INSTRUCTION" missed="27" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="27" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><sourcefile name="ClientBoard.java"><line nr="30" mi="2" ci="0" mb="0" cb="0"/><line nr="31" mi="4" ci="0" mb="0" cb="0"/><line nr="32" mi="5" ci="0" mb="0" cb="0"/><line nr="33" mi="3" ci="0" mb="0" cb="0"/><line nr="35" mi="5" ci="0" mb="0" cb="0"/><line nr="36" mi="3" ci="0" mb="0" cb="0"/><line nr="38" mi="4" ci="0" mb="0" cb="0"/><line nr="40" mi="5" ci="0" mb="0" cb="0"/><line nr="41" mi="12" ci="0" mb="0" cb="0"/><line nr="42" mi="1" ci="0" mb="0" cb="0"/><line nr="50" mi="3" ci="0" mb="0" cb="0"/><line nr="51" mi="1" ci="0" mb="0" cb="0"/><line nr="63" mi="5" ci="0" mb="0" cb="0"/><line nr="64" mi="12" ci="0" mb="0" cb="0"/><line nr="65" mi="3" ci="0" mb="0" cb="0"/><line nr="66" mi="3" ci="0" mb="0" cb="0"/><line nr="67" mi="13" ci="0" mb="0" cb="0"/><line nr="68" mi="1" ci="0" mb="0" cb="0"/><line nr="76" mi="5" ci="0" mb="0" cb="0"/><line nr="77" mi="1" ci="0" mb="0" cb="0"/><line nr="88" mi="3" ci="0" mb="0" cb="0"/><line nr="89" mi="1" ci="0" mb="0" cb="0"/><line nr="98" mi="19" ci="0" mb="0" cb="0"/><line nr="99" mi="3" ci="0" mb="0" cb="0"/><line nr="100" mi="13" ci="0" mb="0" cb="0"/><line nr="101" mi="1" ci="0" mb="0" cb="0"/><line nr="106" mi="3" ci="0" mb="0" cb="0"/><line nr="112" mi="3" ci="0" mb="0" cb="0"/><line nr="119" mi="3" ci="0" mb="0" cb="0"/><line nr="126" mi="3" ci="0" mb="0" cb="0"/><line nr="133" mi="3" ci="0" mb="0" cb="0"/><line nr="140" mi="3" ci="0" mb="0" cb="0"/><line nr="147" mi="3" ci="0" mb="0" cb="0"/><line nr="154" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="155" covered="0"/><counter type="LINE" missed="34" covered="0"/><counter type="COMPLEXITY" missed="15" covered="0"/><counter type="METHOD" missed="15" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="GraphicalView.java"><line nr="22" mi="3" ci="0" mb="0" cb="0"/><line nr="26" mi="3" ci="0" mb="0" cb="0"/><line nr="27" mi="4" ci="0" mb="0" cb="0"/><line nr="32" mi="2" ci="0" mb="0" cb="0"/><line nr="33" mi="5" ci="0" mb="0" cb="0"/><line nr="34" mi="4" ci="0" mb="0" cb="0"/><line nr="35" mi="1" ci="0" mb="0" cb="0"/><line nr="43" mi="3" ci="0" mb="0" cb="0"/><line nr="44" mi="4" ci="0" mb="0" cb="0"/><line nr="45" mi="1" ci="0" mb="0" cb="0"/><line nr="51" mi="3" ci="0" mb="0" cb="0"/><line nr="60" mi="4" ci="0" mb="0" cb="0"/><line nr="61" mi="1" ci="0" mb="0" cb="0"/><line nr="69" mi="3" ci="0" mb="0" cb="0"/><line nr="70" mi="1" ci="0" mb="0" cb="0"/><line nr="78" mi="3" ci="0" mb="0" cb="0"/><line nr="79" mi="1" ci="0" mb="0" cb="0"/><line nr="88" mi="3" ci="0" mb="0" cb="0"/><line nr="89" mi="5" ci="0" mb="0" cb="0"/><line nr="90" mi="1" ci="0" mb="0" cb="0"/><line nr="98" mi="3" ci="0" mb="0" cb="0"/><line nr="99" mi="4" ci="0" mb="0" cb="0"/><line nr="100" mi="1" ci="0" mb="0" cb="0"/><line nr="108" mi="4" ci="0" mb="0" cb="0"/><line nr="109" mi="1" ci="0" mb="0" cb="0"/><line nr="118" mi="5" ci="0" mb="0" cb="0"/><line nr="119" mi="1" ci="0" mb="0" cb="0"/><line nr="125" mi="3" ci="0" mb="0" cb="0"/><line nr="126" mi="3" ci="0" mb="0" cb="0"/><line nr="127" mi="1" ci="0" mb="0" cb="0"/><line nr="135" mi="3" ci="0" mb="0" cb="0"/><line nr="136" mi="4" ci="0" mb="0" cb="0"/><line nr="137" mi="1" ci="0" mb="0" cb="0"/><line nr="143" mi="3" ci="0" mb="0" cb="0"/><line nr="144" mi="3" ci="0" mb="0" cb="0"/><line nr="145" mi="1" ci="0" mb="0" cb="0"/><line nr="153" mi="3" ci="0" mb="0" cb="0"/><line nr="154" mi="8" ci="0" mb="0" cb="0"/><line nr="155" mi="4" ci="0" mb="0" cb="0"/><line nr="156" mi="1" ci="0" mb="0" cb="0"/><line nr="166" mi="3" ci="0" mb="0" cb="0"/><line nr="167" mi="16" ci="0" mb="0" cb="0"/><line nr="168" mi="1" ci="0" mb="0" cb="0"/><line nr="176" mi="3" ci="0" mb="0" cb="0"/><line nr="177" mi="4" ci="0" mb="0" cb="0"/><line nr="178" mi="1" ci="0" mb="0" cb="0"/><line nr="190" mi="3" ci="0" mb="2" cb="0"/><line nr="191" mi="8" ci="0" mb="0" cb="0"/><line nr="193" mi="17" ci="0" mb="0" cb="0"/><line nr="196" mi="6" ci="0" mb="2" cb="0"/><line nr="197" mi="9" ci="0" mb="2" cb="0"/><line nr="198" mi="3" ci="0" mb="0" cb="0"/><line nr="199" mi="8" ci="0" mb="2" cb="0"/><line nr="200" mi="3" ci="0" mb="0" cb="0"/><line nr="202" mi="3" ci="0" mb="0" cb="0"/><line nr="204" mi="2" ci="0" mb="0" cb="0"/><line nr="206" mi="1" ci="0" mb="0" cb="0"/><line nr="227" mi="7" ci="0" mb="0" cb="0"/><line nr="228" mi="2" ci="0" mb="0" cb="0"/><line nr="229" mi="2" ci="0" mb="0" cb="0"/><line nr="230" mi="1" ci="0" mb="0" cb="0"/><line nr="251" mi="7" ci="0" mb="0" cb="0"/><line nr="252" mi="8" ci="0" mb="0" cb="0"/><line nr="253" mi="11" ci="0" mb="2" cb="0"/><line nr="254" mi="6" ci="0" mb="0" cb="0"/><line nr="255" mi="5" ci="0" mb="0" cb="0"/><line nr="256" mi="5" ci="0" mb="0" cb="0"/><line nr="257" mi="8" ci="0" mb="0" cb="0"/><line nr="258" mi="2" ci="0" mb="0" cb="0"/><line nr="259" mi="10" ci="0" mb="2" cb="0"/><line nr="260" mi="10" ci="0" mb="2" cb="0"/><line nr="261" mi="8" ci="0" mb="0" cb="0"/><line nr="262" mi="10" ci="0" mb="0" cb="0"/><line nr="263" mi="2" ci="0" mb="0" cb="0"/><line nr="265" mi="5" ci="0" mb="0" cb="0"/><line nr="266" mi="6" ci="0" mb="0" cb="0"/><line nr="267" mi="5" ci="0" mb="0" cb="0"/><line nr="268" mi="6" ci="0" mb="0" cb="0"/><line nr="271" mi="1" ci="0" mb="0" cb="0"/><line nr="272" mi="1" ci="0" mb="0" cb="0"/><line nr="273" mi="3" ci="0" mb="0" cb="0"/><line nr="274" mi="3" ci="0" mb="0" cb="0"/><line nr="275" mi="3" ci="0" mb="0" cb="0"/><line nr="276" mi="1" ci="0" mb="0" cb="0"/><line nr="291" mi="5" ci="0" mb="0" cb="0"/><line nr="292" mi="5" ci="0" mb="0" cb="0"/><line nr="293" mi="5" ci="0" mb="0" cb="0"/><line nr="295" mi="10" ci="0" mb="0" cb="0"/><line nr="297" mi="11" ci="0" mb="2" cb="0"/><line nr="298" mi="5" ci="0" mb="0" cb="0"/><line nr="299" mi="5" ci="0" mb="5" cb="0"/><line nr="301" mi="6" ci="0" mb="0" cb="0"/><line nr="302" mi="1" ci="0" mb="0" cb="0"/><line nr="304" mi="6" ci="0" mb="0" cb="0"/><line nr="305" mi="1" ci="0" mb="0" cb="0"/><line nr="307" mi="6" ci="0" mb="0" cb="0"/><line nr="308" mi="1" ci="0" mb="0" cb="0"/><line nr="310" mi="6" ci="0" mb="0" cb="0"/><line nr="311" mi="1" ci="0" mb="0" cb="0"/><line nr="315" mi="1" ci="0" mb="0" cb="0"/><line nr="317" mi="3" ci="0" mb="0" cb="0"/><line nr="319" mi="5" ci="0" mb="0" cb="0"/><line nr="320" mi="13" ci="0" mb="0" cb="0"/><line nr="321" mi="1" ci="0" mb="0" cb="0"/><line nr="323" mi="3" ci="0" mb="0" cb="0"/><line nr="324" mi="3" ci="0" mb="0" cb="0"/><line nr="325" mi="3" ci="0" mb="0" cb="0"/><line nr="326" mi="3" ci="0" mb="0" cb="0"/><line nr="327" mi="3" ci="0" mb="0" cb="0"/><line nr="328" mi="3" ci="0" mb="0" cb="0"/><line nr="329" mi="1" ci="0" mb="0" cb="0"/><line nr="345" mi="3" ci="0" mb="0" cb="0"/><line nr="346" mi="3" ci="0" mb="0" cb="0"/><line nr="347" mi="1" ci="0" mb="0" cb="0"/><line nr="355" mi="3" ci="0" mb="0" cb="0"/><line nr="356" mi="8" ci="0" mb="0" cb="0"/><line nr="357" mi="1" ci="0" mb="0" cb="0"/><line nr="366" mi="3" ci="0" mb="0" cb="0"/><line nr="367" mi="1" ci="0" mb="0" cb="0"/><line nr="376" mi="5" ci="0" mb="2" cb="0"/><line nr="377" mi="3" ci="0" mb="0" cb="0"/><line nr="379" mi="7" ci="0" mb="0" cb="0"/><line nr="380" mi="5" ci="0" mb="0" cb="0"/><line nr="381" mi="3" ci="0" mb="2" cb="0"/><line nr="383" mi="3" ci="0" mb="0" cb="0"/><line nr="384" mi="1" ci="0" mb="0" cb="0"/><line nr="385" mi="5" ci="0" mb="0" cb="0"/><line nr="386" mi="1" ci="0" mb="0" cb="0"/><line nr="388" mi="7" ci="0" mb="0" cb="0"/><line nr="389" mi="3" ci="0" mb="0" cb="0"/><line nr="390" mi="2" ci="0" mb="0" cb="0"/><line nr="391" mi="1" ci="0" mb="0" cb="0"/><line nr="403" mi="5" ci="0" mb="2" cb="0"/><line nr="404" mi="3" ci="0" mb="0" cb="0"/><line nr="406" mi="8" ci="0" mb="0" cb="0"/><line nr="407" mi="2" ci="0" mb="0" cb="0"/><line nr="408" mi="1" ci="0" mb="0" cb="0"/><line nr="418" mi="5" ci="0" mb="2" cb="0"/><line nr="419" mi="3" ci="0" mb="0" cb="0"/><line nr="421" mi="1" ci="0" mb="0" cb="0"/><line nr="429" mi="5" ci="0" mb="2" cb="0"/><line nr="430" mi="3" ci="0" mb="0" cb="0"/><line nr="432" mi="2" ci="0" mb="0" cb="0"/><line nr="433" mi="1" ci="0" mb="0" cb="0"/><line nr="449" mi="5" ci="0" mb="2" cb="0"/><line nr="450" mi="3" ci="0" mb="0" cb="0"/><line nr="452" mi="6" ci="0" mb="4" cb="0"/><line nr="453" mi="3" ci="0" mb="0" cb="0"/><line nr="454" mi="2" ci="0" mb="0" cb="0"/><line nr="456" mi="12" ci="0" mb="0" cb="0"/><line nr="457" mi="1" ci="0" mb="0" cb="0"/><line nr="472" mi="5" ci="0" mb="2" cb="0"/><line nr="473" mi="3" ci="0" mb="0" cb="0"/><line nr="475" mi="8" ci="0" mb="4" cb="0"/><line nr="476" mi="6" ci="0" mb="0" cb="0"/><line nr="478" mi="3" ci="0" mb="0" cb="0"/><line nr="480" mi="11" ci="0" mb="6" cb="0"/><line nr="481" mi="3" ci="0" mb="0" cb="0"/><line nr="482" mi="2" ci="0" mb="0" cb="0"/><line nr="484" mi="7" ci="0" mb="0" cb="0"/><line nr="486" mi="2" ci="0" mb="0" cb="0"/><line nr="487" mi="1" ci="0" mb="0" cb="0"/><line nr="493" mi="3" ci="0" mb="0" cb="0"/><line nr="494" mi="1" ci="0" mb="0" cb="0"/><line nr="503" mi="5" ci="0" mb="2" cb="0"/><line nr="504" mi="3" ci="0" mb="0" cb="0"/><line nr="506" mi="1" ci="0" mb="0" cb="0"/><line nr="530" mi="5" ci="0" mb="2" cb="0"/><line nr="531" mi="3" ci="0" mb="0" cb="0"/><line nr="533" mi="1" ci="0" mb="0" cb="0"/><line nr="542" mi="5" ci="0" mb="2" cb="0"/><line nr="543" mi="3" ci="0" mb="0" cb="0"/><line nr="545" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="679" covered="0"/><counter type="BRANCH" missed="55" covered="0"/><counter type="LINE" missed="173" covered="0"/><counter type="COMPLEXITY" missed="67" covered="0"/><counter type="METHOD" missed="38" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="ShownCard.java"><line nr="14" mi="0" ci="12" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="12"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="LastRequest.java"><line nr="8" mi="3" ci="0" mb="0" cb="0"/><line nr="17" mi="3" ci="0" mb="0" cb="0"/><line nr="18" mi="1" ci="0" mb="0" cb="0"/><line nr="24" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="10" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="3" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="MatchStatus.java"><line nr="11" mi="3" ci="0" mb="0" cb="0"/><line nr="12" mi="6" ci="0" mb="0" cb="0"/><line nr="13" mi="6" ci="0" mb="0" cb="0"/><line nr="14" mi="6" ci="0" mb="0" cb="0"/><line nr="15" mi="6" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="27" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><counter type="INSTRUCTION" missed="871" covered="12"/><counter type="BRANCH" missed="55" covered="0"/><counter type="LINE" missed="216" covered="1"/><counter type="COMPLEXITY" missed="86" covered="1"/><counter type="METHOD" missed="57" covered="1"/><counter type="CLASS" missed="4" covered="1"/></package><package name="it/polimi/ingsw/client/frontend/tui"><class name="it/polimi/ingsw/client/frontend/tui/BoardPosition" sourcefilename="BoardPosition.java"><method name="&lt;init&gt;" desc="(ZLjava/util/Optional;)V" line="15"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/client/frontend/tui/InputHandler" sourcefilename="InputHandler.java"><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/client/frontend/tui/TuiPrinter;)V" line="20"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setPrompt" desc="(Ljava/lang/String;)V" line="32"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getNextLine" desc="()Ljava/lang/String;" line="42"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="showPrompt" desc="()V" line="50"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="clearStdin" desc="()V" line="59"><counter type="INSTRUCTION" missed="14" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="askUser" desc="()Ljava/lang/String;" line="72"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="56" covered="0"/><counter type="LINE" missed="19" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/tui/ValidPositions" sourcefilename="ValidPositions.java"><method name="&lt;init&gt;" desc="()V" line="26"><counter type="INSTRUCTION" missed="0" covered="8"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="offsetCoord" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/utils/Pair;)Lit/polimi/ingsw/utils/Pair;" line="39"><counter type="INSTRUCTION" missed="0" covered="24"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="isValid" desc="(Lit/polimi/ingsw/utils/Pair;)Z" line="51"><counter type="INSTRUCTION" missed="2" covered="12"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="2"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getValidPlaces" desc="()Ljava/util/Map;" line="64"><counter type="INSTRUCTION" missed="46" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addCard" desc="(Lit/polimi/ingsw/client/frontend/ShownCard;)V" line="82"><counter type="INSTRUCTION" missed="1" covered="73"/><counter type="BRANCH" missed="0" covered="4"/><counter type="LINE" missed="1" covered="10"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><method name="&lt;clinit&gt;" desc="()V" line="18"><counter type="INSTRUCTION" missed="0" covered="35"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="49" covered="152"/><counter type="BRANCH" missed="5" covered="5"/><counter type="LINE" missed="10" covered="19"/><counter type="COMPLEXITY" missed="4" covered="7"/><counter type="METHOD" missed="1" covered="5"/><counter type="CLASS" missed="0" covered="1"/></class><class name="it/polimi/ingsw/client/frontend/tui/TuiPrinter" sourcefilename="TuiPrinter.java"><method name="&lt;init&gt;" desc="()V" line="32"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="sumCoords" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/utils/Pair;)Lit/polimi/ingsw/utils/Pair;" line="50"><counter type="INSTRUCTION" missed="24" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getHeight" desc="()Ljava/lang/Integer;" line="57"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getWidth" desc="()Ljava/lang/Integer;" line="64"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setPosition" desc="(Ljava/lang/Integer;Ljava/lang/Integer;)Ljava/lang/String;" line="79"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getAbsoluteCoords" desc="(Lit/polimi/ingsw/utils/Pair;)Lit/polimi/ingsw/utils/Pair;" line="83"><counter type="INSTRUCTION" missed="58" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="parseUsername" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Color;)Ljava/lang/String;" line="103"><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="BRANCH" missed="5" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printCard" desc="(Lit/polimi/ingsw/client/frontend/ShownCard;)V" line="121"><counter type="INSTRUCTION" missed="59" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printPoints" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Color;Ljava/lang/Integer;)V" line="140"><counter type="INSTRUCTION" missed="35" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getDimStart" desc="(II)I" line="148"><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printWelcome" desc="(II)V" line="165"><counter type="INSTRUCTION" missed="83" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="14" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printTitle" desc="(IIZ)V" line="195"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printBigTitle" desc="(II)V" line="208"><counter type="INSTRUCTION" missed="308" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="49" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printLittleTitle" desc="(II)V" line="288"><counter type="INSTRUCTION" missed="100" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="17" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printDeck" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/Symbol;Lit/polimi/ingsw/gamemodel/DrawSource;)V" line="322"><counter type="INSTRUCTION" missed="189" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="30" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printVisibleCards" desc="(Lit/polimi/ingsw/utils/Pair;Ljava/util/Map;)V" line="367"><counter type="INSTRUCTION" missed="256" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="42" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getCardIndex" desc="(Lit/polimi/ingsw/gamemodel/DrawSource;)C" line="437"><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="BRANCH" missed="7" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="7" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="repeatChar" desc="(CI)Ljava/lang/String;" line="458"><counter type="INSTRUCTION" missed="18" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="boxBuilder" desc="(ILjava/lang/StringBuffer;Ljava/lang/StringBuffer;Ljava/lang/StringBuffer;)V" line="474"><counter type="INSTRUCTION" missed="50" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getMaxElemLen" desc="(Ljava/util/List;)I" line="491"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getNumberCoords" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/Corner;)Lit/polimi/ingsw/utils/Pair;" line="509"><counter type="INSTRUCTION" missed="87" covered="0"/><counter type="BRANCH" missed="5" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getLinkedCoords" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/Corner;)Lit/polimi/ingsw/utils/Pair;" line="530"><counter type="INSTRUCTION" missed="79" covered="0"/><counter type="BRANCH" missed="5" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="clearTerminal" desc="()V" line="545"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printPrompt" desc="(Ljava/lang/String;)V" line="552"><counter type="INSTRUCTION" missed="41" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printMessages" desc="(Ljava/util/List;)V" line="570"><counter type="INSTRUCTION" missed="46" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printListReverse" desc="(Ljava/util/List;)V" line="586"><counter type="INSTRUCTION" missed="53" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printMessage" desc="(Ljava/lang/String;)V" line="602"><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printAvailableResources" desc="(Ljava/util/Map;Ljava/lang/Integer;)V" line="614"><counter type="INSTRUCTION" missed="78" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="12" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printPlayerBoard" desc="(Ljava/lang/String;Lit/polimi/ingsw/client/frontend/ClientBoard;)V" line="638"><counter type="INSTRUCTION" missed="47" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printHand" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Color;Ljava/util/List;)V" line="659"><counter type="INSTRUCTION" missed="74" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printObjectives" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Color;Lit/polimi/ingsw/gamemodel/Objective;Lit/polimi/ingsw/utils/Pair;)V" line="686"><counter type="INSTRUCTION" missed="60" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printObjectivePair" desc="(Ljava/lang/String;Lit/polimi/ingsw/utils/Pair;I)V" line="712"><counter type="INSTRUCTION" missed="84" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printChat" desc="(Ljava/util/List;)V" line="738"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printWelcomeScreen" desc="()V" line="747"><counter type="INSTRUCTION" missed="83" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="19" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printEndScreen" desc="(Ljava/util/List;Ljava/lang/String;)V" line="781"><counter type="INSTRUCTION" missed="170" covered="0"/><counter type="BRANCH" missed="16" covered="0"/><counter type="LINE" missed="37" covered="0"/><counter type="COMPLEXITY" missed="9" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printInitialSideBySide" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;I)V" line="840"><counter type="INSTRUCTION" missed="67" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="12" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printPlayableFrontAndBack" desc="(Lit/polimi/ingsw/gamemodel/PlayableCard;I)V" line="864"><counter type="INSTRUCTION" missed="77" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printCenteredMessage" desc="(Ljava/lang/String;I)V" line="888"><counter type="INSTRUCTION" missed="129" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="22" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printDrawingScreen" desc="(Lit/polimi/ingsw/utils/Pair;Ljava/util/Map;)V" line="929"><counter type="INSTRUCTION" missed="83" covered="0"/><counter type="LINE" missed="12" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printMatchesLobby" desc="(Ljava/util/List;Ljava/util/List;I)V" line="954"><counter type="INSTRUCTION" missed="251" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="34" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printScoreboard" desc="(Ljava/util/Map;I)V" line="1020"><counter type="INSTRUCTION" missed="165" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="25" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printHandAtBottom" desc="(Ljava/util/List;)V" line="1068"><counter type="INSTRUCTION" missed="83" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="14" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printStringsBoxed" desc="(Ljava/util/List;Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Color;Ljava/lang/Boolean;)V" line="1097"><counter type="INSTRUCTION" missed="335" covered="0"/><counter type="BRANCH" missed="13" covered="0"/><counter type="LINE" missed="51" covered="0"/><counter type="COMPLEXITY" missed="8" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printSimpleList" desc="(Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/Boolean;)V" line="1181"><counter type="INSTRUCTION" missed="95" covered="0"/><counter type="BRANCH" missed="10" covered="0"/><counter type="LINE" missed="15" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printValidPlaces" desc="(Ljava/util/Map;)V" line="1213"><counter type="INSTRUCTION" missed="51" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;clinit&gt;" desc="()V" line="24"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="3582" covered="0"/><counter type="BRANCH" missed="147" covered="0"/><counter type="LINE" missed="595" covered="0"/><counter type="COMPLEXITY" missed="127" covered="0"/><counter type="METHOD" missed="46" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/tui/GraphicalViewTUI" sourcefilename="GraphicalViewTUI.java"><method name="&lt;init&gt;" desc="()V" line="48"><counter type="INSTRUCTION" missed="50" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="startInterface" desc="()V" line="70"><counter type="INSTRUCTION" missed="17" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setLastRequestStatus" desc="(Lit/polimi/ingsw/utils/RequestStatus;)V" line="87"><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getServerResponse" desc="()Z" line="103"><counter type="INSTRUCTION" missed="34" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="showHand" desc="(Lit/polimi/ingsw/client/frontend/ClientBoard;)V" line="124"><counter type="INSTRUCTION" missed="12" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseCardFromHand" desc="(Lit/polimi/ingsw/client/frontend/ClientBoard;)Lit/polimi/ingsw/gamemodel/PlayableCard;" line="136"><counter type="INSTRUCTION" missed="64" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="17" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseCardSide" desc="(Lit/polimi/ingsw/gamemodel/PlayableCard;)Lit/polimi/ingsw/gamemodel/Side;" line="171"><counter type="INSTRUCTION" missed="28" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseCoords" desc="(Lit/polimi/ingsw/client/frontend/ClientBoard;)Lit/polimi/ingsw/utils/Pair;" line="192"><counter type="INSTRUCTION" missed="70" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="20" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="parsePlayerControl" desc="()V" line="225"><counter type="INSTRUCTION" missed="276" covered="0"/><counter type="BRANCH" missed="31" covered="0"/><counter type="LINE" missed="57" covered="0"/><counter type="COMPLEXITY" missed="21" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="enablePlayerControls" desc="()V" line="331"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="startPlayerControls" desc="()V" line="343"><counter type="INSTRUCTION" missed="40" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="16" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setNetworkHandler" desc="()V" line="376"><counter type="INSTRUCTION" missed="88" covered="0"/><counter type="BRANCH" missed="7" covered="0"/><counter type="LINE" missed="27" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="chooseUsername" desc="()V" line="421"><counter type="INSTRUCTION" missed="23" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="getAvailableMatches" desc="()V" line="435"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="createMatch" desc="()V" line="453"><counter type="INSTRUCTION" missed="44" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="11" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="joinMatch" desc="(Ljava/util/List;)V" line="480"><counter type="INSTRUCTION" missed="40" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setMatch" desc="()V" line="503"><counter type="INSTRUCTION" missed="115" covered="0"/><counter type="BRANCH" missed="10" covered="0"/><counter type="LINE" missed="35" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneJoined" desc="(Ljava/lang/String;Ljava/util/List;)V" line="573"><counter type="INSTRUCTION" missed="33" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="giveInitialCard" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;)V" line="593"><counter type="INSTRUCTION" missed="61" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="16" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="giveSecretObjectives" desc="(Lit/polimi/ingsw/utils/Pair;)V" line="627"><counter type="INSTRUCTION" missed="47" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneChoseSecretObjective" desc="(Ljava/lang/String;)V" line="659"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="changePlayer" desc="()V" line="669"><counter type="INSTRUCTION" missed="18" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="makeMove" desc="()V" line="695"><counter type="INSTRUCTION" missed="115" covered="0"/><counter type="BRANCH" missed="10" covered="0"/><counter type="LINE" missed="30" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="makeUserDraw" desc="(Ljava/util/Map;)V" line="744"><counter type="INSTRUCTION" missed="74" covered="0"/><counter type="BRANCH" missed="11" covered="0"/><counter type="LINE" missed="28" covered="0"/><counter type="COMPLEXITY" missed="9" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someonePlayedCard" desc="(Ljava/lang/String;Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;ILjava/util/Map;)V" line="799"><counter type="INSTRUCTION" missed="17" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneQuit" desc="(Ljava/lang/String;)V" line="814"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="matchFinished" desc="(Ljava/util/List;)V" line="825"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyError" desc="(Ljava/lang/Exception;)V" line="838"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyMatchStarted" desc="()V" line="850"><counter type="INSTRUCTION" missed="1" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyMatchResumed" desc="(Z)V" line="860"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSentPrivateText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="896"><counter type="INSTRUCTION" missed="31" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="someoneSentBroadcastText" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="915"><counter type="INSTRUCTION" missed="31" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="notifyConnectionLost" desc="()V" line="931"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="main" desc="([Ljava/lang/String;)V" line="942"><counter type="INSTRUCTION" missed="11" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$notifyMatchResumed$3" desc="(Z)V" line="862"><counter type="INSTRUCTION" missed="46" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="10" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$notifyMatchResumed$2" desc="(Ljava/lang/Integer;Lit/polimi/ingsw/client/frontend/ShownCard;)V" line="863"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$changePlayer$1" desc="(Lit/polimi/ingsw/client/frontend/ClientBoard;)V" line="673"><counter type="INSTRUCTION" missed="37" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="lambda$setMatch$0" desc="(Ljava/util/List;Ljava/util/List;Lit/polimi/ingsw/utils/AvailableMatch;)V" line="512"><counter type="INSTRUCTION" missed="20" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;clinit&gt;" desc="()V" line="30"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="1581" covered="0"/><counter type="BRANCH" missed="135" covered="0"/><counter type="LINE" missed="422" covered="0"/><counter type="COMPLEXITY" missed="114" covered="0"/><counter type="METHOD" missed="39" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/tui/PlayerControls" sourcefilename="PlayerControls.java"><method name="&lt;init&gt;" desc="()V" line="13"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="isEnabled" desc="()Z" line="22"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="enable" desc="()V" line="30"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="disable" desc="()V" line="39"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="4" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><sourcefile name="ValidPositions.java"><line nr="18" mi="0" ci="5" mb="0" cb="0"/><line nr="19" mi="0" ci="18" mb="0" cb="0"/><line nr="20" mi="0" ci="12" mb="0" cb="0"/><line nr="26" mi="0" ci="2" mb="0" cb="0"/><line nr="27" mi="0" ci="5" mb="0" cb="0"/><line nr="28" mi="0" ci="1" mb="0" cb="0"/><line nr="39" mi="0" ci="24" mb="0" cb="0"/><line nr="51" mi="0" ci="5" mb="1" cb="1"/><line nr="52" mi="2" ci="0" mb="0" cb="0"/><line nr="55" mi="0" ci="7" mb="0" cb="0"/><line nr="64" mi="4" ci="0" mb="0" cb="0"/><line nr="65" mi="2" ci="0" mb="0" cb="0"/><line nr="66" mi="12" ci="0" mb="2" cb="0"/><line nr="67" mi="7" ci="0" mb="2" cb="0"/><line nr="68" mi="17" ci="0" mb="0" cb="0"/><line nr="69" mi="1" ci="0" mb="0" cb="0"/><line nr="71" mi="1" ci="0" mb="0" cb="0"/><line nr="73" mi="2" ci="0" mb="0" cb="0"/><line nr="82" mi="0" ci="6" mb="0" cb="0"/><line nr="83" mi="0" ci="3" mb="0" cb="0"/><line nr="84" mi="0" ci="10" mb="0" cb="0"/><line nr="85" mi="0" ci="11" mb="0" cb="2"/><line nr="87" mi="0" ci="6" mb="0" cb="2"/><line nr="88" mi="0" ci="18" mb="0" cb="0"/><line nr="90" mi="0" ci="16" mb="0" cb="0"/><line nr="92" mi="1" ci="0" mb="0" cb="0"/><line nr="93" mi="0" ci="1" mb="0" cb="0"/><line nr="94" mi="0" ci="1" mb="0" cb="0"/><line nr="95" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="49" covered="152"/><counter type="BRANCH" missed="5" covered="5"/><counter type="LINE" missed="10" covered="19"/><counter type="COMPLEXITY" missed="4" covered="7"/><counter type="METHOD" missed="1" covered="5"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="GraphicalViewTUI.java"><line nr="30" mi="9" ci="0" mb="0" cb="0"/><line nr="48" mi="2" ci="0" mb="0" cb="0"/><line nr="49" mi="3" ci="0" mb="0" cb="0"/><line nr="50" mi="5" ci="0" mb="0" cb="0"/><line nr="51" mi="5" ci="0" mb="0" cb="0"/><line nr="52" mi="5" ci="0" mb="0" cb="0"/><line nr="54" mi="5" ci="0" mb="0" cb="0"/><line nr="55" mi="5" ci="0" mb="0" cb="0"/><line nr="57" mi="5" ci="0" mb="0" cb="0"/><line nr="58" mi="1" ci="0" mb="0" cb="0"/><line nr="59" mi="5" ci="0" mb="0" cb="0"/><line nr="60" mi="1" ci="0" mb="0" cb="0"/><line nr="62" mi="7" ci="0" mb="0" cb="0"/><line nr="64" mi="1" ci="0" mb="0" cb="0"/><line nr="70" mi="3" ci="0" mb="0" cb="0"/><line nr="71" mi="2" ci="0" mb="0" cb="0"/><line nr="72" mi="3" ci="0" mb="0" cb="0"/><line nr="73" mi="2" ci="0" mb="0" cb="0"/><line nr="74" mi="6" ci="0" mb="0" cb="0"/><line nr="75" mi="1" ci="0" mb="0" cb="0"/><line nr="87" mi="5" ci="0" mb="0" cb="0"/><line nr="88" mi="3" ci="0" mb="0" cb="0"/><line nr="89" mi="4" ci="0" mb="2" cb="0"/><line nr="90" mi="3" ci="0" mb="0" cb="0"/><line nr="92" mi="3" ci="0" mb="0" cb="0"/><line nr="93" mi="1" ci="0" mb="0" cb="0"/><line nr="103" mi="5" ci="0" mb="0" cb="0"/><line nr="105" mi="5" ci="0" mb="0" cb="0"/><line nr="106" mi="6" ci="0" mb="2" cb="0"/><line nr="107" mi="4" ci="0" mb="0" cb="0"/><line nr="109" mi="3" ci="0" mb="0" cb="0"/><line nr="110" mi="6" ci="0" mb="0" cb="0"/><line nr="111" mi="1" ci="0" mb="0" cb="0"/><line nr="112" mi="4" ci="0" mb="0" cb="0"/><line nr="124" mi="6" ci="0" mb="0" cb="0"/><line nr="125" mi="5" ci="0" mb="0" cb="0"/><line nr="126" mi="1" ci="0" mb="0" cb="0"/><line nr="136" mi="3" ci="0" mb="0" cb="0"/><line nr="138" mi="4" ci="0" mb="0" cb="0"/><line nr="139" mi="3" ci="0" mb="0" cb="0"/><line nr="140" mi="4" ci="0" mb="0" cb="0"/><line nr="142" mi="2" ci="0" mb="0" cb="0"/><line nr="143" mi="4" ci="0" mb="0" cb="0"/><line nr="144" mi="2" ci="0" mb="2" cb="0"/><line nr="146" mi="6" ci="0" mb="0" cb="0"/><line nr="147" mi="8" ci="0" mb="4" cb="0"/><line nr="148" mi="7" ci="0" mb="0" cb="0"/><line nr="150" mi="5" ci="0" mb="0" cb="0"/><line nr="152" mi="1" ci="0" mb="0" cb="0"/><line nr="153" mi="4" ci="0" mb="0" cb="0"/><line nr="154" mi="3" ci="0" mb="0" cb="0"/><line nr="155" mi="4" ci="0" mb="0" cb="0"/><line nr="156" mi="2" ci="0" mb="0" cb="0"/><line nr="159" mi="2" ci="0" mb="0" cb="0"/><line nr="171" mi="3" ci="0" mb="0" cb="0"/><line nr="172" mi="5" ci="0" mb="0" cb="0"/><line nr="174" mi="3" ci="0" mb="0" cb="0"/><line nr="175" mi="1" ci="0" mb="0" cb="0"/><line nr="176" mi="4" ci="0" mb="0" cb="0"/><line nr="177" mi="9" ci="0" mb="2" cb="0"/><line nr="178" mi="2" ci="0" mb="0" cb="0"/><line nr="179" mi="1" ci="0" mb="0" cb="0"/><line nr="192" mi="2" ci="0" mb="0" cb="0"/><line nr="193" mi="2" ci="0" mb="0" cb="0"/><line nr="195" mi="2" ci="0" mb="0" cb="0"/><line nr="197" mi="4" ci="0" mb="0" cb="0"/><line nr="198" mi="2" ci="0" mb="2" cb="0"/><line nr="199" mi="4" ci="0" mb="0" cb="0"/><line nr="200" mi="6" ci="0" mb="0" cb="0"/><line nr="202" mi="3" ci="0" mb="0" cb="0"/><line nr="204" mi="5" ci="0" mb="0" cb="0"/><line nr="205" mi="1" ci="0" mb="0" cb="0"/><line nr="206" mi="4" ci="0" mb="0" cb="0"/><line nr="207" mi="1" ci="0" mb="0" cb="0"/><line nr="208" mi="4" ci="0" mb="2" cb="0"/><line nr="209" mi="11" ci="0" mb="2" cb="0"/><line nr="210" mi="9" ci="0" mb="2" cb="0"/><line nr="211" mi="2" ci="0" mb="0" cb="0"/><line nr="213" mi="1" ci="0" mb="0" cb="0"/><line nr="214" mi="4" ci="0" mb="0" cb="0"/><line nr="216" mi="1" ci="0" mb="0" cb="0"/><line nr="217" mi="2" ci="0" mb="0" cb="0"/><line nr="225" mi="7" ci="0" mb="0" cb="0"/><line nr="228" mi="4" ci="0" mb="0" cb="0"/><line nr="229" mi="3" ci="0" mb="0" cb="0"/><line nr="231" mi="4" ci="0" mb="0" cb="0"/><line nr="232" mi="3" ci="0" mb="2" cb="0"/><line nr="233" mi="2" ci="0" mb="0" cb="0"/><line nr="234" mi="3" ci="0" mb="0" cb="0"/><line nr="236" mi="5" ci="0" mb="0" cb="0"/><line nr="237" mi="6" ci="0" mb="0" cb="0"/><line nr="240" mi="8" ci="0" mb="8" cb="0"/><line nr="242" mi="11" ci="0" mb="0" cb="0"/><line nr="244" mi="1" ci="0" mb="0" cb="0"/><line nr="246" mi="9" ci="0" mb="0" cb="0"/><line nr="247" mi="1" ci="0" mb="0" cb="0"/><line nr="249" mi="8" ci="0" mb="5" cb="0"/><line nr="251" mi="6" ci="0" mb="0" cb="0"/><line nr="252" mi="9" ci="0" mb="0" cb="0"/><line nr="253" mi="1" ci="0" mb="0" cb="0"/><line nr="255" mi="6" ci="0" mb="0" cb="0"/><line nr="256" mi="9" ci="0" mb="0" cb="0"/><line nr="257" mi="1" ci="0" mb="0" cb="0"/><line nr="259" mi="5" ci="0" mb="2" cb="0"/><line nr="260" mi="6" ci="0" mb="0" cb="0"/><line nr="261" mi="10" ci="0" mb="0" cb="0"/><line nr="265" mi="5" ci="0" mb="2" cb="0"/><line nr="266" mi="6" ci="0" mb="0" cb="0"/><line nr="267" mi="10" ci="0" mb="0" cb="0"/><line nr="272" mi="9" ci="0" mb="0" cb="0"/><line nr="273" mi="2" ci="0" mb="0" cb="0"/><line nr="276" mi="1" ci="0" mb="0" cb="0"/><line nr="278" mi="5" ci="0" mb="0" cb="0"/><line nr="279" mi="1" ci="0" mb="0" cb="0"/><line nr="281" mi="4" ci="0" mb="2" cb="0"/><line nr="282" mi="5" ci="0" mb="2" cb="0"/><line nr="283" mi="4" ci="0" mb="0" cb="0"/><line nr="284" mi="3" ci="0" mb="2" cb="0"/><line nr="285" mi="6" ci="0" mb="0" cb="0"/><line nr="286" mi="5" ci="0" mb="0" cb="0"/><line nr="287" mi="4" ci="0" mb="2" cb="0"/><line nr="288" mi="4" ci="0" mb="0" cb="0"/><line nr="290" mi="3" ci="0" mb="2" cb="0"/><line nr="291" mi="7" ci="0" mb="0" cb="0"/><line nr="293" mi="7" ci="0" mb="0" cb="0"/><line nr="295" mi="1" ci="0" mb="0" cb="0"/><line nr="297" mi="3" ci="0" mb="0" cb="0"/><line nr="298" mi="3" ci="0" mb="2" cb="0"/><line nr="299" mi="7" ci="0" mb="0" cb="0"/><line nr="301" mi="6" ci="0" mb="0" cb="0"/><line nr="305" mi="4" ci="0" mb="0" cb="0"/><line nr="309" mi="9" ci="0" mb="0" cb="0"/><line nr="310" mi="1" ci="0" mb="0" cb="0"/><line nr="313" mi="8" ci="0" mb="0" cb="0"/><line nr="314" mi="1" ci="0" mb="0" cb="0"/><line nr="317" mi="6" ci="0" mb="0" cb="0"/><line nr="322" mi="4" ci="0" mb="0" cb="0"/><line nr="323" mi="3" ci="0" mb="0" cb="0"/><line nr="324" mi="1" ci="0" mb="0" cb="0"/><line nr="331" mi="4" ci="0" mb="0" cb="0"/><line nr="332" mi="3" ci="0" mb="0" cb="0"/><line nr="333" mi="3" ci="0" mb="0" cb="0"/><line nr="334" mi="1" ci="0" mb="0" cb="0"/><line nr="343" mi="3" ci="0" mb="2" cb="0"/><line nr="344" mi="5" ci="0" mb="0" cb="0"/><line nr="345" mi="4" ci="0" mb="2" cb="0"/><line nr="347" mi="3" ci="0" mb="2" cb="0"/><line nr="348" mi="3" ci="0" mb="0" cb="0"/><line nr="350" mi="2" ci="0" mb="0" cb="0"/><line nr="352" mi="1" ci="0" mb="0" cb="0"/><line nr="353" mi="1" ci="0" mb="0" cb="0"/><line nr="354" mi="3" ci="0" mb="0" cb="0"/><line nr="355" mi="2" ci="0" mb="0" cb="0"/><line nr="356" mi="3" ci="0" mb="0" cb="0"/><line nr="359" mi="3" ci="0" mb="0" cb="0"/><line nr="360" mi="1" ci="0" mb="0" cb="0"/><line nr="361" mi="1" ci="0" mb="0" cb="0"/><line nr="364" mi="4" ci="0" mb="0" cb="0"/><line nr="366" mi="1" ci="0" mb="0" cb="0"/><line nr="376" mi="2" ci="0" mb="0" cb="0"/><line nr="378" mi="4" ci="0" mb="0" cb="0"/><line nr="379" mi="4" ci="0" mb="0" cb="0"/><line nr="380" mi="4" ci="0" mb="0" cb="0"/><line nr="381" mi="4" ci="0" mb="0" cb="0"/><line nr="382" mi="2" ci="0" mb="2" cb="0"/><line nr="384" mi="3" ci="0" mb="0" cb="0"/><line nr="385" mi="1" ci="0" mb="0" cb="0"/><line nr="386" mi="4" ci="0" mb="0" cb="0"/><line nr="387" mi="2" ci="0" mb="0" cb="0"/><line nr="390" mi="4" ci="0" mb="0" cb="0"/><line nr="391" mi="3" ci="0" mb="0" cb="0"/><line nr="392" mi="3" ci="0" mb="2" cb="0"/><line nr="393" mi="4" ci="0" mb="0" cb="0"/><line nr="395" mi="8" ci="0" mb="3" cb="0"/><line nr="397" mi="8" ci="0" mb="0" cb="0"/><line nr="398" mi="1" ci="0" mb="0" cb="0"/><line nr="400" mi="9" ci="0" mb="0" cb="0"/><line nr="401" mi="1" ci="0" mb="0" cb="0"/><line nr="403" mi="4" ci="0" mb="0" cb="0"/><line nr="407" mi="1" ci="0" mb="0" cb="0"/><line nr="408" mi="3" ci="0" mb="0" cb="0"/><line nr="409" mi="4" ci="0" mb="0" cb="0"/><line nr="410" mi="2" ci="0" mb="0" cb="0"/><line nr="411" mi="1" ci="0" mb="0" cb="0"/><line nr="412" mi="1" ci="0" mb="0" cb="0"/><line nr="414" mi="1" ci="0" mb="0" cb="0"/><line nr="421" mi="2" ci="0" mb="0" cb="0"/><line nr="422" mi="4" ci="0" mb="0" cb="0"/><line nr="423" mi="4" ci="0" mb="2" cb="0"/><line nr="424" mi="4" ci="0" mb="0" cb="0"/><line nr="425" mi="5" ci="0" mb="0" cb="0"/><line nr="427" mi="3" ci="0" mb="0" cb="0"/><line nr="428" mi="1" ci="0" mb="0" cb="0"/><line nr="435" mi="4" ci="0" mb="0" cb="0"/><line nr="436" mi="3" ci="0" mb="0" cb="0"/><line nr="438" mi="3" ci="0" mb="2" cb="0"/><line nr="439" mi="3" ci="0" mb="0" cb="0"/><line nr="440" mi="5" ci="0" mb="0" cb="0"/><line nr="441" mi="2" ci="0" mb="0" cb="0"/><line nr="442" mi="1" ci="0" mb="0" cb="0"/><line nr="444" mi="1" ci="0" mb="0" cb="0"/><line nr="453" mi="4" ci="0" mb="0" cb="0"/><line nr="454" mi="5" ci="0" mb="0" cb="0"/><line nr="455" mi="4" ci="0" mb="2" cb="0"/><line nr="456" mi="5" ci="0" mb="0" cb="0"/><line nr="459" mi="6" ci="0" mb="0" cb="0"/><line nr="462" mi="8" ci="0" mb="0" cb="0"/><line nr="463" mi="1" ci="0" mb="0" cb="0"/><line nr="464" mi="5" ci="0" mb="0" cb="0"/><line nr="465" mi="1" ci="0" mb="0" cb="0"/><line nr="467" mi="4" ci="0" mb="0" cb="0"/><line nr="468" mi="1" ci="0" mb="0" cb="0"/><line nr="480" mi="4" ci="0" mb="0" cb="0"/><line nr="483" mi="7" ci="0" mb="0" cb="0"/><line nr="484" mi="1" ci="0" mb="0" cb="0"/><line nr="485" mi="5" ci="0" mb="0" cb="0"/><line nr="486" mi="1" ci="0" mb="0" cb="0"/><line nr="488" mi="8" ci="0" mb="4" cb="0"/><line nr="489" mi="5" ci="0" mb="0" cb="0"/><line nr="492" mi="8" ci="0" mb="0" cb="0"/><line nr="493" mi="1" ci="0" mb="0" cb="0"/><line nr="503" mi="8" ci="0" mb="0" cb="0"/><line nr="504" mi="2" ci="0" mb="0" cb="0"/><line nr="506" mi="2" ci="0" mb="0" cb="0"/><line nr="508" mi="2" ci="0" mb="0" cb="0"/><line nr="509" mi="2" ci="0" mb="0" cb="0"/><line nr="511" mi="6" ci="0" mb="0" cb="0"/><line nr="512" mi="10" ci="0" mb="4" cb="0"/><line nr="513" mi="5" ci="0" mb="0" cb="0"/><line nr="515" mi="4" ci="0" mb="0" cb="0"/><line nr="517" mi="1" ci="0" mb="0" cb="0"/><line nr="518" mi="3" ci="0" mb="0" cb="0"/><line nr="520" mi="2" ci="0" mb="0" cb="0"/><line nr="522" mi="2" ci="0" mb="2" cb="0"/><line nr="524" mi="4" ci="0" mb="2" cb="0"/><line nr="525" mi="5" ci="0" mb="0" cb="0"/><line nr="526" mi="2" ci="0" mb="0" cb="0"/><line nr="527" mi="3" ci="0" mb="0" cb="0"/><line nr="529" mi="3" ci="0" mb="2" cb="0"/><line nr="530" mi="3" ci="0" mb="0" cb="0"/><line nr="532" mi="4" ci="0" mb="0" cb="0"/><line nr="534" mi="4" ci="0" mb="0" cb="0"/><line nr="535" mi="6" ci="0" mb="0" cb="0"/><line nr="536" mi="8" ci="0" mb="2" cb="0"/><line nr="538" mi="4" ci="0" mb="0" cb="0"/><line nr="539" mi="2" ci="0" mb="0" cb="0"/><line nr="540" mi="2" ci="0" mb="0" cb="0"/><line nr="541" mi="1" ci="0" mb="0" cb="0"/><line nr="544" mi="4" ci="0" mb="0" cb="0"/><line nr="545" mi="3" ci="0" mb="0" cb="0"/><line nr="546" mi="2" ci="0" mb="0" cb="0"/><line nr="550" mi="1" ci="0" mb="0" cb="0"/><line nr="551" mi="6" ci="0" mb="0" cb="0"/><line nr="552" mi="2" ci="0" mb="0" cb="0"/><line nr="555" mi="3" ci="0" mb="2" cb="0"/><line nr="556" mi="3" ci="0" mb="0" cb="0"/><line nr="557" mi="7" ci="0" mb="0" cb="0"/><line nr="558" mi="2" ci="0" mb="0" cb="0"/><line nr="559" mi="1" ci="0" mb="0" cb="0"/><line nr="562" mi="1" ci="0" mb="0" cb="0"/><line nr="573" mi="4" ci="0" mb="0" cb="0"/><line nr="574" mi="3" ci="0" mb="0" cb="0"/><line nr="575" mi="3" ci="0" mb="0" cb="0"/><line nr="576" mi="5" ci="0" mb="0" cb="0"/><line nr="577" mi="5" ci="0" mb="0" cb="0"/><line nr="578" mi="5" ci="0" mb="0" cb="0"/><line nr="579" mi="4" ci="0" mb="0" cb="0"/><line nr="580" mi="3" ci="0" mb="0" cb="0"/><line nr="581" mi="1" ci="0" mb="0" cb="0"/><line nr="593" mi="3" ci="0" mb="0" cb="0"/><line nr="594" mi="3" ci="0" mb="0" cb="0"/><line nr="595" mi="5" ci="0" mb="0" cb="0"/><line nr="597" mi="4" ci="0" mb="0" cb="0"/><line nr="598" mi="4" ci="0" mb="0" cb="0"/><line nr="600" mi="8" ci="0" mb="2" cb="0"/><line nr="602" mi="2" ci="0" mb="0" cb="0"/><line nr="603" mi="1" ci="0" mb="0" cb="0"/><line nr="605" mi="2" ci="0" mb="0" cb="0"/><line nr="609" mi="3" ci="0" mb="0" cb="0"/><line nr="610" mi="3" ci="0" mb="2" cb="0"/><line nr="611" mi="4" ci="0" mb="0" cb="0"/><line nr="613" mi="3" ci="0" mb="0" cb="0"/><line nr="614" mi="9" ci="0" mb="0" cb="0"/><line nr="615" mi="6" ci="0" mb="0" cb="0"/><line nr="617" mi="1" ci="0" mb="0" cb="0"/><line nr="627" mi="3" ci="0" mb="0" cb="0"/><line nr="628" mi="3" ci="0" mb="0" cb="0"/><line nr="629" mi="6" ci="0" mb="0" cb="0"/><line nr="631" mi="4" ci="0" mb="0" cb="0"/><line nr="632" mi="4" ci="0" mb="0" cb="0"/><line nr="634" mi="8" ci="0" mb="2" cb="0"/><line nr="636" mi="4" ci="0" mb="0" cb="0"/><line nr="637" mi="1" ci="0" mb="0" cb="0"/><line nr="639" mi="4" ci="0" mb="0" cb="0"/><line nr="643" mi="3" ci="0" mb="0" cb="0"/><line nr="644" mi="3" ci="0" mb="2" cb="0"/><line nr="645" mi="3" ci="0" mb="0" cb="0"/><line nr="647" mi="1" ci="0" mb="0" cb="0"/><line nr="659" mi="3" ci="0" mb="0" cb="0"/><line nr="660" mi="5" ci="0" mb="0" cb="0"/><line nr="661" mi="1" ci="0" mb="0" cb="0"/><line nr="669" mi="3" ci="0" mb="0" cb="0"/><line nr="670" mi="7" ci="0" mb="0" cb="0"/><line nr="672" mi="6" ci="0" mb="0" cb="0"/><line nr="673" mi="4" ci="0" mb="2" cb="0"/><line nr="674" mi="7" ci="0" mb="0" cb="0"/><line nr="676" mi="5" ci="0" mb="0" cb="0"/><line nr="677" mi="6" ci="0" mb="2" cb="0"/><line nr="679" mi="7" ci="0" mb="0" cb="0"/><line nr="681" mi="5" ci="0" mb="0" cb="0"/><line nr="683" mi="2" ci="0" mb="0" cb="0"/><line nr="685" mi="2" ci="0" mb="0" cb="0"/><line nr="686" mi="1" ci="0" mb="0" cb="0"/><line nr="695" mi="3" ci="0" mb="0" cb="0"/><line nr="696" mi="3" ci="0" mb="0" cb="0"/><line nr="698" mi="6" ci="0" mb="2" cb="0"/><line nr="699" mi="7" ci="0" mb="0" cb="0"/><line nr="701" mi="3" ci="0" mb="2" cb="0"/><line nr="702" mi="5" ci="0" mb="0" cb="0"/><line nr="704" mi="4" ci="0" mb="2" cb="0"/><line nr="705" mi="5" ci="0" mb="0" cb="0"/><line nr="708" mi="7" ci="0" mb="0" cb="0"/><line nr="709" mi="4" ci="0" mb="0" cb="0"/><line nr="710" mi="4" ci="0" mb="0" cb="0"/><line nr="711" mi="4" ci="0" mb="0" cb="0"/><line nr="712" mi="7" ci="0" mb="0" cb="0"/><line nr="714" mi="3" ci="0" mb="0" cb="0"/><line nr="715" mi="6" ci="0" mb="0" cb="0"/><line nr="716" mi="4" ci="0" mb="0" cb="0"/><line nr="718" mi="4" ci="0" mb="0" cb="0"/><line nr="719" mi="4" ci="0" mb="0" cb="0"/><line nr="720" mi="4" ci="0" mb="2" cb="0"/><line nr="721" mi="2" ci="0" mb="0" cb="0"/><line nr="722" mi="1" ci="0" mb="0" cb="0"/><line nr="725" mi="5" ci="0" mb="0" cb="0"/><line nr="726" mi="3" ci="0" mb="2" cb="0"/><line nr="727" mi="3" ci="0" mb="0" cb="0"/><line nr="728" mi="3" ci="0" mb="0" cb="0"/><line nr="729" mi="2" ci="0" mb="0" cb="0"/><line nr="730" mi="1" ci="0" mb="0" cb="0"/><line nr="732" mi="3" ci="0" mb="0" cb="0"/><line nr="733" mi="4" ci="0" mb="0" cb="0"/><line nr="735" mi="1" ci="0" mb="0" cb="0"/><line nr="744" mi="3" ci="0" mb="0" cb="0"/><line nr="745" mi="2" ci="0" mb="0" cb="0"/><line nr="746" mi="6" ci="0" mb="0" cb="0"/><line nr="748" mi="4" ci="0" mb="0" cb="0"/><line nr="749" mi="2" ci="0" mb="2" cb="0"/><line nr="750" mi="7" ci="0" mb="0" cb="0"/><line nr="752" mi="4" ci="0" mb="0" cb="0"/><line nr="753" mi="4" ci="0" mb="0" cb="0"/><line nr="754" mi="8" ci="0" mb="7" cb="0"/><line nr="756" mi="2" ci="0" mb="0" cb="0"/><line nr="757" mi="1" ci="0" mb="0" cb="0"/><line nr="759" mi="2" ci="0" mb="0" cb="0"/><line nr="760" mi="1" ci="0" mb="0" cb="0"/><line nr="762" mi="2" ci="0" mb="0" cb="0"/><line nr="763" mi="1" ci="0" mb="0" cb="0"/><line nr="765" mi="2" ci="0" mb="0" cb="0"/><line nr="766" mi="1" ci="0" mb="0" cb="0"/><line nr="768" mi="2" ci="0" mb="0" cb="0"/><line nr="769" mi="1" ci="0" mb="0" cb="0"/><line nr="771" mi="2" ci="0" mb="0" cb="0"/><line nr="772" mi="1" ci="0" mb="0" cb="0"/><line nr="774" mi="4" ci="0" mb="0" cb="0"/><line nr="776" mi="1" ci="0" mb="0" cb="0"/><line nr="778" mi="3" ci="0" mb="0" cb="0"/><line nr="779" mi="3" ci="0" mb="2" cb="0"/><line nr="780" mi="3" ci="0" mb="0" cb="0"/><line nr="781" mi="1" ci="0" mb="0" cb="0"/><line nr="783" mi="1" ci="0" mb="0" cb="0"/><line nr="799" mi="8" ci="0" mb="0" cb="0"/><line nr="801" mi="5" ci="0" mb="2" cb="0"/><line nr="802" mi="3" ci="0" mb="0" cb="0"/><line nr="804" mi="1" ci="0" mb="0" cb="0"/><line nr="814" mi="6" ci="0" mb="0" cb="0"/><line nr="815" mi="1" ci="0" mb="0" cb="0"/><line nr="825" mi="3" ci="0" mb="0" cb="0"/><line nr="826" mi="3" ci="0" mb="0" cb="0"/><line nr="827" mi="6" ci="0" mb="0" cb="0"/><line nr="828" mi="1" ci="0" mb="0" cb="0"/><line nr="838" mi="3" ci="0" mb="0" cb="0"/><line nr="839" mi="4" ci="0" mb="0" cb="0"/><line nr="840" mi="3" ci="0" mb="2" cb="0"/><line nr="841" mi="5" ci="0" mb="0" cb="0"/><line nr="843" mi="1" ci="0" mb="0" cb="0"/><line nr="850" mi="1" ci="0" mb="0" cb="0"/><line nr="860" mi="6" ci="0" mb="0" cb="0"/><line nr="862" mi="9" ci="0" mb="0" cb="0"/><line nr="863" mi="8" ci="0" mb="0" cb="0"/><line nr="864" mi="6" ci="0" mb="0" cb="0"/><line nr="868" mi="9" ci="0" mb="0" cb="0"/><line nr="870" mi="3" ci="0" mb="0" cb="0"/><line nr="871" mi="6" ci="0" mb="2" cb="0"/><line nr="872" mi="2" ci="0" mb="2" cb="0"/><line nr="873" mi="10" ci="0" mb="0" cb="0"/><line nr="878" mi="3" ci="0" mb="0" cb="0"/><line nr="881" mi="2" ci="0" mb="0" cb="0"/><line nr="884" mi="2" ci="0" mb="0" cb="0"/><line nr="885" mi="1" ci="0" mb="0" cb="0"/><line nr="896" mi="4" ci="0" mb="0" cb="0"/><line nr="898" mi="5" ci="0" mb="2" cb="0"/><line nr="899" mi="7" ci="0" mb="0" cb="0"/><line nr="900" mi="6" ci="0" mb="0" cb="0"/><line nr="901" mi="5" ci="0" mb="0" cb="0"/><line nr="902" mi="3" ci="0" mb="0" cb="0"/><line nr="904" mi="1" ci="0" mb="0" cb="0"/><line nr="915" mi="4" ci="0" mb="0" cb="0"/><line nr="917" mi="5" ci="0" mb="2" cb="0"/><line nr="918" mi="7" ci="0" mb="0" cb="0"/><line nr="919" mi="6" ci="0" mb="0" cb="0"/><line nr="920" mi="5" ci="0" mb="0" cb="0"/><line nr="921" mi="3" ci="0" mb="0" cb="0"/><line nr="923" mi="1" ci="0" mb="0" cb="0"/><line nr="931" mi="3" ci="0" mb="0" cb="0"/><line nr="932" mi="5" ci="0" mb="0" cb="0"/><line nr="933" mi="2" ci="0" mb="0" cb="0"/><line nr="934" mi="1" ci="0" mb="0" cb="0"/><line nr="942" mi="4" ci="0" mb="0" cb="0"/><line nr="943" mi="2" ci="0" mb="0" cb="0"/><line nr="944" mi="4" ci="0" mb="2" cb="0"/><line nr="946" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="1581" covered="0"/><counter type="BRANCH" missed="135" covered="0"/><counter type="LINE" missed="422" covered="0"/><counter type="COMPLEXITY" missed="114" covered="0"/><counter type="METHOD" missed="39" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="BoardPosition.java"><line nr="15" mi="0" ci="9" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="InputHandler.java"><line nr="20" mi="2" ci="0" mb="0" cb="0"/><line nr="21" mi="3" ci="0" mb="0" cb="0"/><line nr="22" mi="6" ci="0" mb="0" cb="0"/><line nr="23" mi="1" ci="0" mb="0" cb="0"/><line nr="32" mi="3" ci="0" mb="0" cb="0"/><line nr="33" mi="1" ci="0" mb="0" cb="0"/><line nr="42" mi="4" ci="0" mb="0" cb="0"/><line nr="50" mi="5" ci="0" mb="0" cb="0"/><line nr="51" mi="1" ci="0" mb="0" cb="0"/><line nr="59" mi="6" ci="0" mb="0" cb="0"/><line nr="60" mi="1" ci="0" mb="0" cb="0"/><line nr="61" mi="5" ci="0" mb="0" cb="0"/><line nr="62" mi="1" ci="0" mb="0" cb="0"/><line nr="63" mi="1" ci="0" mb="0" cb="0"/><line nr="72" mi="2" ci="0" mb="0" cb="0"/><line nr="73" mi="5" ci="0" mb="0" cb="0"/><line nr="74" mi="4" ci="0" mb="0" cb="0"/><line nr="75" mi="3" ci="0" mb="0" cb="0"/><line nr="76" mi="2" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="56" covered="0"/><counter type="LINE" missed="19" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="PlayerControls.java"><line nr="13" mi="2" ci="0" mb="0" cb="0"/><line nr="14" mi="3" ci="0" mb="0" cb="0"/><line nr="15" mi="1" ci="0" mb="0" cb="0"/><line nr="22" mi="3" ci="0" mb="0" cb="0"/><line nr="30" mi="3" ci="0" mb="0" cb="0"/><line nr="31" mi="2" ci="0" mb="0" cb="0"/><line nr="32" mi="1" ci="0" mb="0" cb="0"/><line nr="39" mi="3" ci="0" mb="0" cb="0"/><line nr="40" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="19" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="4" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="TuiPrinter.java"><line nr="24" mi="13" ci="0" mb="0" cb="0"/><line nr="32" mi="2" ci="0" mb="0" cb="0"/><line nr="33" mi="3" ci="0" mb="0" cb="0"/><line nr="34" mi="5" ci="0" mb="0" cb="0"/><line nr="35" mi="4" ci="0" mb="0" cb="0"/><line nr="37" mi="1" ci="0" mb="0" cb="0"/><line nr="50" mi="24" ci="0" mb="0" cb="0"/><line nr="57" mi="5" ci="0" mb="0" cb="0"/><line nr="64" mi="5" ci="0" mb="0" cb="0"/><line nr="79" mi="4" ci="0" mb="0" cb="0"/><line nr="83" mi="8" ci="0" mb="0" cb="0"/><line nr="85" mi="4" ci="0" mb="0" cb="0"/><line nr="86" mi="14" ci="0" mb="0" cb="0"/><line nr="87" mi="3" ci="0" mb="0" cb="0"/><line nr="88" mi="11" ci="0" mb="0" cb="0"/><line nr="89" mi="13" ci="0" mb="0" cb="0"/><line nr="91" mi="5" ci="0" mb="0" cb="0"/><line nr="103" mi="5" ci="0" mb="5" cb="0"/><line nr="104" mi="2" ci="0" mb="0" cb="0"/><line nr="105" mi="2" ci="0" mb="0" cb="0"/><line nr="106" mi="2" ci="0" mb="0" cb="0"/><line nr="107" mi="2" ci="0" mb="0" cb="0"/><line nr="108" mi="2" ci="0" mb="0" cb="0"/><line nr="111" mi="4" ci="0" mb="0" cb="0"/><line nr="121" mi="11" ci="0" mb="2" cb="0"/><line nr="122" mi="14" ci="0" mb="0" cb="0"/><line nr="123" mi="7" ci="0" mb="2" cb="0"/><line nr="125" mi="12" ci="0" mb="0" cb="0"/><line nr="126" mi="9" ci="0" mb="2" cb="0"/><line nr="127" mi="3" ci="0" mb="0" cb="0"/><line nr="128" mi="1" ci="0" mb="0" cb="0"/><line nr="129" mi="1" ci="0" mb="0" cb="0"/><line nr="130" mi="1" ci="0" mb="0" cb="0"/><line nr="140" mi="8" ci="0" mb="0" cb="0"/><line nr="141" mi="4" ci="0" mb="0" cb="0"/><line nr="143" mi="7" ci="0" mb="0" cb="0"/><line nr="144" mi="15" ci="0" mb="0" cb="0"/><line nr="145" mi="1" ci="0" mb="0" cb="0"/><line nr="148" mi="3" ci="0" mb="2" cb="0"/><line nr="149" mi="2" ci="0" mb="0" cb="0"/><line nr="151" mi="4" ci="0" mb="0" cb="0"/><line nr="152" mi="5" ci="0" mb="2" cb="0"/><line nr="153" mi="1" ci="0" mb="0" cb="0"/><line nr="154" mi="4" ci="0" mb="0" cb="0"/><line nr="165" mi="4" ci="0" mb="0" cb="0"/><line nr="167" mi="7" ci="0" mb="0" cb="0"/><line nr="168" mi="5" ci="0" mb="0" cb="0"/><line nr="170" mi="8" ci="0" mb="0" cb="0"/><line nr="171" mi="5" ci="0" mb="0" cb="0"/><line nr="173" mi="8" ci="0" mb="0" cb="0"/><line nr="174" mi="5" ci="0" mb="0" cb="0"/><line nr="176" mi="8" ci="0" mb="0" cb="0"/><line nr="177" mi="5" ci="0" mb="0" cb="0"/><line nr="179" mi="8" ci="0" mb="0" cb="0"/><line nr="180" mi="5" ci="0" mb="0" cb="0"/><line nr="183" mi="8" ci="0" mb="2" cb="0"/><line nr="184" mi="6" ci="0" mb="0" cb="0"/><line nr="185" mi="1" ci="0" mb="0" cb="0"/><line nr="195" mi="2" ci="0" mb="2" cb="0"/><line nr="196" mi="5" ci="0" mb="0" cb="0"/><line nr="198" mi="4" ci="0" mb="0" cb="0"/><line nr="199" mi="1" ci="0" mb="0" cb="0"/><line nr="208" mi="9" ci="0" mb="0" cb="0"/><line nr="209" mi="4" ci="0" mb="0" cb="0"/><line nr="211" mi="7" ci="0" mb="0" cb="0"/><line nr="212" mi="5" ci="0" mb="0" cb="0"/><line nr="214" mi="8" ci="0" mb="0" cb="0"/><line nr="215" mi="5" ci="0" mb="0" cb="0"/><line nr="217" mi="8" ci="0" mb="0" cb="0"/><line nr="218" mi="5" ci="0" mb="0" cb="0"/><line nr="220" mi="8" ci="0" mb="0" cb="0"/><line nr="221" mi="5" ci="0" mb="0" cb="0"/><line nr="223" mi="8" ci="0" mb="0" cb="0"/><line nr="224" mi="5" ci="0" mb="0" cb="0"/><line nr="226" mi="8" ci="0" mb="0" cb="0"/><line nr="227" mi="5" ci="0" mb="0" cb="0"/><line nr="229" mi="8" ci="0" mb="0" cb="0"/><line nr="230" mi="5" ci="0" mb="0" cb="0"/><line nr="232" mi="8" ci="0" mb="0" cb="0"/><line nr="233" mi="5" ci="0" mb="0" cb="0"/><line nr="235" mi="8" ci="0" mb="0" cb="0"/><line nr="236" mi="5" ci="0" mb="0" cb="0"/><line nr="238" mi="8" ci="0" mb="0" cb="0"/><line nr="239" mi="5" ci="0" mb="0" cb="0"/><line nr="241" mi="8" ci="0" mb="0" cb="0"/><line nr="242" mi="5" ci="0" mb="0" cb="0"/><line nr="244" mi="8" ci="0" mb="0" cb="0"/><line nr="245" mi="5" ci="0" mb="0" cb="0"/><line nr="247" mi="8" ci="0" mb="0" cb="0"/><line nr="248" mi="5" ci="0" mb="0" cb="0"/><line nr="250" mi="8" ci="0" mb="0" cb="0"/><line nr="251" mi="5" ci="0" mb="0" cb="0"/><line nr="253" mi="8" ci="0" mb="0" cb="0"/><line nr="254" mi="5" ci="0" mb="0" cb="0"/><line nr="256" mi="8" ci="0" mb="0" cb="0"/><line nr="257" mi="5" ci="0" mb="0" cb="0"/><line nr="259" mi="8" ci="0" mb="0" cb="0"/><line nr="260" mi="5" ci="0" mb="0" cb="0"/><line nr="262" mi="8" ci="0" mb="0" cb="0"/><line nr="263" mi="5" ci="0" mb="0" cb="0"/><line nr="265" mi="8" ci="0" mb="0" cb="0"/><line nr="266" mi="5" ci="0" mb="0" cb="0"/><line nr="268" mi="8" ci="0" mb="0" cb="0"/><line nr="269" mi="5" ci="0" mb="0" cb="0"/><line nr="271" mi="8" ci="0" mb="0" cb="0"/><line nr="272" mi="5" ci="0" mb="0" cb="0"/><line nr="275" mi="5" ci="0" mb="0" cb="0"/><line nr="276" mi="8" ci="0" mb="2" cb="0"/><line nr="277" mi="6" ci="0" mb="0" cb="0"/><line nr="278" mi="3" ci="0" mb="0" cb="0"/><line nr="279" mi="1" ci="0" mb="0" cb="0"/><line nr="288" mi="9" ci="0" mb="0" cb="0"/><line nr="289" mi="4" ci="0" mb="0" cb="0"/><line nr="291" mi="7" ci="0" mb="0" cb="0"/><line nr="292" mi="5" ci="0" mb="0" cb="0"/><line nr="294" mi="8" ci="0" mb="0" cb="0"/><line nr="295" mi="5" ci="0" mb="0" cb="0"/><line nr="297" mi="8" ci="0" mb="0" cb="0"/><line nr="298" mi="5" ci="0" mb="0" cb="0"/><line nr="300" mi="8" ci="0" mb="0" cb="0"/><line nr="301" mi="5" ci="0" mb="0" cb="0"/><line nr="303" mi="8" ci="0" mb="0" cb="0"/><line nr="304" mi="5" ci="0" mb="0" cb="0"/><line nr="307" mi="5" ci="0" mb="0" cb="0"/><line nr="308" mi="8" ci="0" mb="2" cb="0"/><line nr="309" mi="6" ci="0" mb="0" cb="0"/><line nr="310" mi="3" ci="0" mb="0" cb="0"/><line nr="311" mi="1" ci="0" mb="0" cb="0"/><line nr="322" mi="2" ci="0" mb="2" cb="0"/><line nr="323" mi="1" ci="0" mb="0" cb="0"/><line nr="324" mi="2" ci="0" mb="0" cb="0"/><line nr="325" mi="4" ci="0" mb="0" cb="0"/><line nr="327" mi="4" ci="0" mb="0" cb="0"/><line nr="328" mi="10" ci="0" mb="0" cb="0"/><line nr="330" mi="7" ci="0" mb="0" cb="0"/><line nr="331" mi="5" ci="0" mb="0" cb="0"/><line nr="332" mi="8" ci="0" mb="0" cb="0"/><line nr="333" mi="5" ci="0" mb="0" cb="0"/><line nr="334" mi="8" ci="0" mb="0" cb="0"/><line nr="335" mi="5" ci="0" mb="0" cb="0"/><line nr="336" mi="8" ci="0" mb="0" cb="0"/><line nr="337" mi="5" ci="0" mb="0" cb="0"/><line nr="338" mi="8" ci="0" mb="0" cb="0"/><line nr="339" mi="5" ci="0" mb="0" cb="0"/><line nr="340" mi="8" ci="0" mb="0" cb="0"/><line nr="341" mi="5" ci="0" mb="0" cb="0"/><line nr="343" mi="3" ci="0" mb="0" cb="0"/><line nr="344" mi="10" ci="0" mb="2" cb="0"/><line nr="345" mi="4" ci="0" mb="0" cb="0"/><line nr="347" mi="7" ci="0" mb="0" cb="0"/><line nr="348" mi="7" ci="0" mb="0" cb="0"/><line nr="349" mi="12" ci="0" mb="0" cb="0"/><line nr="350" mi="3" ci="0" mb="0" cb="0"/><line nr="352" mi="3" ci="0" mb="2" cb="0"/><line nr="353" mi="18" ci="0" mb="0" cb="0"/><line nr="354" mi="3" ci="0" mb="2" cb="0"/><line nr="355" mi="18" ci="0" mb="0" cb="0"/><line nr="357" mi="1" ci="0" mb="0" cb="0"/><line nr="367" mi="2" ci="0" mb="0" cb="0"/><line nr="370" mi="5" ci="0" mb="0" cb="0"/><line nr="371" mi="5" ci="0" mb="0" cb="0"/><line nr="372" mi="5" ci="0" mb="0" cb="0"/><line nr="373" mi="5" ci="0" mb="0" cb="0"/><line nr="376" mi="10" ci="0" mb="0" cb="0"/><line nr="377" mi="4" ci="0" mb="0" cb="0"/><line nr="378" mi="8" ci="0" mb="0" cb="0"/><line nr="379" mi="20" ci="0" mb="0" cb="0"/><line nr="380" mi="12" ci="0" mb="0" cb="0"/><line nr="388" mi="4" ci="0" mb="0" cb="0"/><line nr="390" mi="2" ci="0" mb="2" cb="0"/><line nr="391" mi="9" ci="0" mb="0" cb="0"/><line nr="392" mi="3" ci="0" mb="0" cb="0"/><line nr="393" mi="22" ci="0" mb="0" cb="0"/><line nr="394" mi="2" ci="0" mb="0" cb="0"/><line nr="395" mi="3" ci="0" mb="0" cb="0"/><line nr="397" mi="2" ci="0" mb="2" cb="0"/><line nr="398" mi="9" ci="0" mb="0" cb="0"/><line nr="399" mi="3" ci="0" mb="0" cb="0"/><line nr="400" mi="3" ci="0" mb="0" cb="0"/><line nr="401" mi="19" ci="0" mb="0" cb="0"/><line nr="402" mi="2" ci="0" mb="0" cb="0"/><line nr="403" mi="3" ci="0" mb="0" cb="0"/><line nr="405" mi="2" ci="0" mb="2" cb="0"/><line nr="406" mi="9" ci="0" mb="0" cb="0"/><line nr="407" mi="3" ci="0" mb="0" cb="0"/><line nr="408" mi="4" ci="0" mb="0" cb="0"/><line nr="409" mi="20" ci="0" mb="0" cb="0"/><line nr="410" mi="2" ci="0" mb="0" cb="0"/><line nr="411" mi="3" ci="0" mb="0" cb="0"/><line nr="413" mi="2" ci="0" mb="2" cb="0"/><line nr="414" mi="9" ci="0" mb="0" cb="0"/><line nr="415" mi="3" ci="0" mb="0" cb="0"/><line nr="416" mi="4" ci="0" mb="0" cb="0"/><line nr="417" mi="20" ci="0" mb="0" cb="0"/><line nr="418" mi="2" ci="0" mb="0" cb="0"/><line nr="419" mi="3" ci="0" mb="0" cb="0"/><line nr="422" mi="1" ci="0" mb="0" cb="0"/><line nr="423" mi="5" ci="0" mb="0" cb="0"/><line nr="424" mi="1" ci="0" mb="0" cb="0"/><line nr="426" mi="1" ci="0" mb="0" cb="0"/><line nr="437" mi="6" ci="0" mb="7" cb="0"/><line nr="438" mi="2" ci="0" mb="0" cb="0"/><line nr="439" mi="2" ci="0" mb="0" cb="0"/><line nr="440" mi="2" ci="0" mb="0" cb="0"/><line nr="441" mi="2" ci="0" mb="0" cb="0"/><line nr="442" mi="2" ci="0" mb="0" cb="0"/><line nr="443" mi="2" ci="0" mb="0" cb="0"/><line nr="444" mi="1" ci="0" mb="0" cb="0"/><line nr="458" mi="4" ci="0" mb="0" cb="0"/><line nr="459" mi="7" ci="0" mb="2" cb="0"/><line nr="460" mi="4" ci="0" mb="0" cb="0"/><line nr="461" mi="3" ci="0" mb="0" cb="0"/><line nr="474" mi="4" ci="0" mb="0" cb="0"/><line nr="477" mi="4" ci="0" mb="0" cb="0"/><line nr="478" mi="7" ci="0" mb="0" cb="0"/><line nr="479" mi="4" ci="0" mb="0" cb="0"/><line nr="481" mi="4" ci="0" mb="0" cb="0"/><line nr="482" mi="7" ci="0" mb="0" cb="0"/><line nr="483" mi="4" ci="0" mb="0" cb="0"/><line nr="485" mi="4" ci="0" mb="0" cb="0"/><line nr="486" mi="7" ci="0" mb="0" cb="0"/><line nr="487" mi="4" ci="0" mb="0" cb="0"/><line nr="488" mi="1" ci="0" mb="0" cb="0"/><line nr="491" mi="2" ci="0" mb="0" cb="0"/><line nr="492" mi="10" ci="0" mb="2" cb="0"/><line nr="493" mi="4" ci="0" mb="2" cb="0"/><line nr="494" mi="3" ci="0" mb="0" cb="0"/><line nr="495" mi="1" ci="0" mb="0" cb="0"/><line nr="496" mi="2" ci="0" mb="0" cb="0"/><line nr="509" mi="6" ci="0" mb="5" cb="0"/><line nr="510" mi="18" ci="0" mb="0" cb="0"/><line nr="511" mi="21" ci="0" mb="0" cb="0"/><line nr="512" mi="19" ci="0" mb="0" cb="0"/><line nr="513" mi="13" ci="0" mb="0" cb="0"/><line nr="514" mi="9" ci="0" mb="0" cb="0"/><line nr="515" mi="1" ci="0" mb="0" cb="0"/><line nr="530" mi="6" ci="0" mb="5" cb="0"/><line nr="531" mi="18" ci="0" mb="0" cb="0"/><line nr="532" mi="18" ci="0" mb="0" cb="0"/><line nr="533" mi="18" ci="0" mb="0" cb="0"/><line nr="534" mi="18" ci="0" mb="0" cb="0"/><line nr="535" mi="1" ci="0" mb="0" cb="0"/><line nr="545" mi="3" ci="0" mb="0" cb="0"/><line nr="546" mi="1" ci="0" mb="0" cb="0"/><line nr="552" mi="4" ci="0" mb="0" cb="0"/><line nr="553" mi="3" ci="0" mb="2" cb="0"/><line nr="554" mi="15" ci="0" mb="0" cb="0"/><line nr="556" mi="4" ci="0" mb="0" cb="0"/><line nr="557" mi="12" ci="0" mb="0" cb="0"/><line nr="559" mi="2" ci="0" mb="0" cb="0"/><line nr="560" mi="1" ci="0" mb="0" cb="0"/><line nr="570" mi="4" ci="0" mb="0" cb="0"/><line nr="571" mi="3" ci="0" mb="0" cb="0"/><line nr="572" mi="10" ci="0" mb="2" cb="0"/><line nr="573" mi="17" ci="0" mb="0" cb="0"/><line nr="574" mi="10" ci="0" mb="0" cb="0"/><line nr="575" mi="1" ci="0" mb="0" cb="0"/><line nr="576" mi="1" ci="0" mb="0" cb="0"/><line nr="586" mi="4" ci="0" mb="0" cb="0"/><line nr="587" mi="3" ci="0" mb="0" cb="0"/><line nr="588" mi="3" ci="0" mb="0" cb="0"/><line nr="589" mi="10" ci="0" mb="2" cb="0"/><line nr="590" mi="4" ci="0" mb="0" cb="0"/><line nr="591" mi="17" ci="0" mb="0" cb="0"/><line nr="592" mi="10" ci="0" mb="0" cb="0"/><line nr="593" mi="1" ci="0" mb="0" cb="0"/><line nr="594" mi="1" ci="0" mb="0" cb="0"/><line nr="602" mi="4" ci="0" mb="0" cb="0"/><line nr="603" mi="14" ci="0" mb="0" cb="0"/><line nr="604" mi="1" ci="0" mb="0" cb="0"/><line nr="614" mi="8" ci="0" mb="0" cb="0"/><line nr="615" mi="4" ci="0" mb="0" cb="0"/><line nr="616" mi="2" ci="0" mb="0" cb="0"/><line nr="617" mi="2" ci="0" mb="0" cb="0"/><line nr="618" mi="10" ci="0" mb="0" cb="0"/><line nr="620" mi="9" ci="0" mb="0" cb="0"/><line nr="623" mi="10" ci="0" mb="2" cb="0"/><line nr="624" mi="11" ci="0" mb="0" cb="0"/><line nr="625" mi="5" ci="0" mb="0" cb="0"/><line nr="626" mi="1" ci="0" mb="0" cb="0"/><line nr="628" mi="15" ci="0" mb="0" cb="0"/><line nr="629" mi="1" ci="0" mb="0" cb="0"/><line nr="638" mi="2" ci="0" mb="2" cb="0"/><line nr="639" mi="3" ci="0" mb="0" cb="0"/><line nr="640" mi="1" ci="0" mb="0" cb="0"/><line nr="642" mi="3" ci="0" mb="0" cb="0"/><line nr="643" mi="11" ci="0" mb="2" cb="0"/><line nr="644" mi="6" ci="0" mb="0" cb="0"/><line nr="645" mi="1" ci="0" mb="0" cb="0"/><line nr="646" mi="5" ci="0" mb="0" cb="0"/><line nr="647" mi="7" ci="0" mb="0" cb="0"/><line nr="648" mi="7" ci="0" mb="0" cb="0"/><line nr="649" mi="1" ci="0" mb="0" cb="0"/><line nr="659" mi="4" ci="0" mb="0" cb="0"/><line nr="660" mi="4" ci="0" mb="0" cb="0"/><line nr="661" mi="3" ci="0" mb="0" cb="0"/><line nr="663" mi="21" ci="0" mb="0" cb="0"/><line nr="664" mi="10" ci="0" mb="2" cb="0"/><line nr="666" mi="9" ci="0" mb="0" cb="0"/><line nr="667" mi="7" ci="0" mb="0" cb="0"/><line nr="669" mi="10" ci="0" mb="0" cb="0"/><line nr="670" mi="1" ci="0" mb="0" cb="0"/><line nr="671" mi="2" ci="0" mb="0" cb="0"/><line nr="672" mi="1" ci="0" mb="0" cb="0"/><line nr="673" mi="1" ci="0" mb="0" cb="0"/><line nr="674" mi="1" ci="0" mb="0" cb="0"/><line nr="686" mi="4" ci="0" mb="0" cb="0"/><line nr="689" mi="4" ci="0" mb="0" cb="0"/><line nr="690" mi="6" ci="0" mb="0" cb="0"/><line nr="691" mi="8" ci="0" mb="0" cb="0"/><line nr="692" mi="9" ci="0" mb="0" cb="0"/><line nr="694" mi="8" ci="0" mb="0" cb="0"/><line nr="695" mi="9" ci="0" mb="0" cb="0"/><line nr="696" mi="4" ci="0" mb="0" cb="0"/><line nr="698" mi="2" ci="0" mb="0" cb="0"/><line nr="699" mi="5" ci="0" mb="0" cb="0"/><line nr="702" mi="1" ci="0" mb="0" cb="0"/><line nr="712" mi="6" ci="0" mb="2" cb="0"/><line nr="715" mi="8" ci="0" mb="0" cb="0"/><line nr="716" mi="10" ci="0" mb="0" cb="0"/><line nr="717" mi="3" ci="0" mb="0" cb="0"/><line nr="720" mi="4" ci="0" mb="0" cb="0"/><line nr="721" mi="11" ci="0" mb="0" cb="0"/><line nr="723" mi="8" ci="0" mb="0" cb="0"/><line nr="724" mi="7" ci="0" mb="0" cb="0"/><line nr="725" mi="5" ci="0" mb="0" cb="0"/><line nr="726" mi="8" ci="0" mb="0" cb="0"/><line nr="727" mi="8" ci="0" mb="0" cb="0"/><line nr="729" mi="5" ci="0" mb="0" cb="0"/><line nr="730" mi="1" ci="0" mb="0" cb="0"/><line nr="738" mi="7" ci="0" mb="0" cb="0"/><line nr="739" mi="1" ci="0" mb="0" cb="0"/><line nr="747" mi="4" ci="0" mb="0" cb="0"/><line nr="748" mi="2" ci="0" mb="0" cb="0"/><line nr="749" mi="4" ci="0" mb="0" cb="0"/><line nr="750" mi="2" ci="0" mb="0" cb="0"/><line nr="752" mi="7" ci="0" mb="2" cb="0"/><line nr="753" mi="9" ci="0" mb="2" cb="0"/><line nr="754" mi="2" ci="0" mb="0" cb="0"/><line nr="755" mi="2" ci="0" mb="2" cb="0"/><line nr="756" mi="2" ci="0" mb="0" cb="0"/><line nr="757" mi="2" ci="0" mb="0" cb="0"/><line nr="758" mi="2" ci="0" mb="0" cb="0"/><line nr="762" mi="2" ci="0" mb="0" cb="0"/><line nr="763" mi="9" ci="0" mb="0" cb="0"/><line nr="764" mi="6" ci="0" mb="0" cb="0"/><line nr="766" mi="7" ci="0" mb="0" cb="0"/><line nr="767" mi="7" ci="0" mb="0" cb="0"/><line nr="770" mi="6" ci="0" mb="0" cb="0"/><line nr="771" mi="7" ci="0" mb="0" cb="0"/><line nr="772" mi="1" ci="0" mb="0" cb="0"/><line nr="781" mi="6" ci="0" mb="0" cb="0"/><line nr="783" mi="2" ci="0" mb="0" cb="0"/><line nr="784" mi="4" ci="0" mb="0" cb="0"/><line nr="785" mi="4" ci="0" mb="0" cb="0"/><line nr="786" mi="10" ci="0" mb="2" cb="0"/><line nr="787" mi="3" ci="0" mb="0" cb="0"/><line nr="788" mi="4" ci="0" mb="2" cb="0"/><line nr="790" mi="3" ci="0" mb="2" cb="0"/><line nr="791" mi="3" ci="0" mb="0" cb="0"/><line nr="793" mi="2" ci="0" mb="0" cb="0"/><line nr="796" mi="3" ci="0" mb="0" cb="0"/><line nr="798" mi="5" ci="0" mb="0" cb="0"/><line nr="799" mi="3" ci="0" mb="2" cb="0"/><line nr="800" mi="5" ci="0" mb="0" cb="0"/><line nr="802" mi="4" ci="0" mb="0" cb="0"/><line nr="804" mi="1" ci="0" mb="0" cb="0"/><line nr="806" mi="8" ci="0" mb="2" cb="0"/><line nr="807" mi="2" ci="0" mb="0" cb="0"/><line nr="809" mi="7" ci="0" mb="0" cb="0"/><line nr="810" mi="10" ci="0" mb="0" cb="0"/><line nr="811" mi="2" ci="0" mb="0" cb="0"/><line nr="812" mi="2" ci="0" mb="0" cb="0"/><line nr="813" mi="10" ci="0" mb="2" cb="0"/><line nr="814" mi="12" ci="0" mb="0" cb="0"/><line nr="815" mi="1" ci="0" mb="0" cb="0"/><line nr="816" mi="1" ci="0" mb="0" cb="0"/><line nr="818" mi="3" ci="0" mb="2" cb="0"/><line nr="819" mi="1" ci="0" mb="0" cb="0"/><line nr="820" mi="12" ci="0" mb="0" cb="0"/><line nr="821" mi="1" ci="0" mb="0" cb="0"/><line nr="822" mi="10" ci="0" mb="2" cb="0"/><line nr="823" mi="12" ci="0" mb="0" cb="0"/><line nr="824" mi="1" ci="0" mb="0" cb="0"/><line nr="825" mi="1" ci="0" mb="0" cb="0"/><line nr="828" mi="9" ci="0" mb="0" cb="0"/><line nr="829" mi="2" ci="0" mb="0" cb="0"/><line nr="830" mi="1" ci="0" mb="0" cb="0"/><line nr="840" mi="6" ci="0" mb="2" cb="0"/><line nr="842" mi="4" ci="0" mb="0" cb="0"/><line nr="843" mi="11" ci="0" mb="0" cb="0"/><line nr="845" mi="8" ci="0" mb="0" cb="0"/><line nr="846" mi="7" ci="0" mb="0" cb="0"/><line nr="847" mi="5" ci="0" mb="0" cb="0"/><line nr="850" mi="9" ci="0" mb="0" cb="0"/><line nr="851" mi="9" ci="0" mb="0" cb="0"/><line nr="852" mi="5" ci="0" mb="0" cb="0"/><line nr="853" mi="1" ci="0" mb="0" cb="0"/><line nr="854" mi="1" ci="0" mb="0" cb="0"/><line nr="855" mi="1" ci="0" mb="0" cb="0"/><line nr="864" mi="13" ci="0" mb="2" cb="0"/><line nr="865" mi="4" ci="0" mb="0" cb="0"/><line nr="866" mi="11" ci="0" mb="0" cb="0"/><line nr="868" mi="2" ci="0" mb="0" cb="0"/><line nr="869" mi="8" ci="0" mb="0" cb="0"/><line nr="870" mi="7" ci="0" mb="0" cb="0"/><line nr="871" mi="5" ci="0" mb="0" cb="0"/><line nr="874" mi="9" ci="0" mb="0" cb="0"/><line nr="875" mi="9" ci="0" mb="0" cb="0"/><line nr="876" mi="6" ci="0" mb="0" cb="0"/><line nr="877" mi="1" ci="0" mb="0" cb="0"/><line nr="878" mi="1" ci="0" mb="0" cb="0"/><line nr="879" mi="1" ci="0" mb="0" cb="0"/><line nr="888" mi="3" ci="0" mb="0" cb="0"/><line nr="889" mi="7" ci="0" mb="2" cb="0"/><line nr="890" mi="1" ci="0" mb="0" cb="0"/><line nr="892" mi="4" ci="0" mb="0" cb="0"/><line nr="895" mi="11" ci="0" mb="2" cb="0"/><line nr="896" mi="9" ci="0" mb="0" cb="0"/><line nr="897" mi="7" ci="0" mb="0" cb="0"/><line nr="900" mi="5" ci="0" mb="0" cb="0"/><line nr="901" mi="9" ci="0" mb="0" cb="0"/><line nr="902" mi="4" ci="0" mb="0" cb="0"/><line nr="903" mi="5" ci="0" mb="0" cb="0"/><line nr="904" mi="7" ci="0" mb="0" cb="0"/><line nr="905" mi="4" ci="0" mb="0" cb="0"/><line nr="906" mi="5" ci="0" mb="0" cb="0"/><line nr="907" mi="9" ci="0" mb="0" cb="0"/><line nr="908" mi="4" ci="0" mb="0" cb="0"/><line nr="911" mi="6" ci="0" mb="0" cb="0"/><line nr="912" mi="8" ci="0" mb="0" cb="0"/><line nr="913" mi="6" ci="0" mb="0" cb="0"/><line nr="914" mi="8" ci="0" mb="0" cb="0"/><line nr="915" mi="6" ci="0" mb="0" cb="0"/><line nr="917" mi="1" ci="0" mb="0" cb="0"/><line nr="929" mi="4" ci="0" mb="0" cb="0"/><line nr="930" mi="4" ci="0" mb="0" cb="0"/><line nr="931" mi="4" ci="0" mb="0" cb="0"/><line nr="933" mi="11" ci="0" mb="0" cb="0"/><line nr="934" mi="11" ci="0" mb="0" cb="0"/><line nr="935" mi="6" ci="0" mb="0" cb="0"/><line nr="936" mi="2" ci="0" mb="0" cb="0"/><line nr="938" mi="13" ci="0" mb="0" cb="0"/><line nr="939" mi="14" ci="0" mb="0" cb="0"/><line nr="940" mi="3" ci="0" mb="0" cb="0"/><line nr="941" mi="10" ci="0" mb="0" cb="0"/><line nr="942" mi="1" ci="0" mb="0" cb="0"/><line nr="954" mi="6" ci="0" mb="2" cb="0"/><line nr="955" mi="2" ci="0" mb="0" cb="0"/><line nr="956" mi="7" ci="0" mb="0" cb="0"/><line nr="957" mi="7" ci="0" mb="0" cb="0"/><line nr="960" mi="4" ci="0" mb="0" cb="0"/><line nr="961" mi="4" ci="0" mb="0" cb="0"/><line nr="962" mi="4" ci="0" mb="0" cb="0"/><line nr="963" mi="6" ci="0" mb="0" cb="0"/><line nr="966" mi="6" ci="0" mb="0" cb="0"/><line nr="967" mi="8" ci="0" mb="0" cb="0"/><line nr="968" mi="4" ci="0" mb="0" cb="0"/><line nr="973" mi="8" ci="0" mb="0" cb="0"/><line nr="974" mi="6" ci="0" mb="0" cb="0"/><line nr="975" mi="8" ci="0" mb="0" cb="0"/><line nr="979" mi="6" ci="0" mb="0" cb="0"/><line nr="980" mi="2" ci="0" mb="0" cb="0"/><line nr="981" mi="10" ci="0" mb="2" cb="0"/><line nr="983" mi="8" ci="0" mb="2" cb="0"/><line nr="984" mi="23" ci="0" mb="0" cb="0"/><line nr="985" mi="7" ci="0" mb="0" cb="0"/><line nr="987" mi="22" ci="0" mb="0" cb="0"/><line nr="988" mi="12" ci="0" mb="0" cb="0"/><line nr="989" mi="7" ci="0" mb="0" cb="0"/><line nr="992" mi="8" ci="0" mb="0" cb="0"/><line nr="993" mi="1" ci="0" mb="0" cb="0"/><line nr="994" mi="1" ci="0" mb="0" cb="0"/><line nr="997" mi="2" ci="0" mb="0" cb="0"/><line nr="998" mi="10" ci="0" mb="2" cb="0"/><line nr="1000" mi="23" ci="0" mb="0" cb="0"/><line nr="1001" mi="13" ci="0" mb="0" cb="0"/><line nr="1006" mi="8" ci="0" mb="0" cb="0"/><line nr="1007" mi="1" ci="0" mb="0" cb="0"/><line nr="1010" mi="6" ci="0" mb="0" cb="0"/><line nr="1011" mi="1" ci="0" mb="0" cb="0"/><line nr="1020" mi="6" ci="0" mb="2" cb="0"/><line nr="1021" mi="2" ci="0" mb="0" cb="0"/><line nr="1022" mi="7" ci="0" mb="0" cb="0"/><line nr="1023" mi="7" ci="0" mb="0" cb="0"/><line nr="1026" mi="5" ci="0" mb="0" cb="0"/><line nr="1027" mi="9" ci="0" mb="0" cb="0"/><line nr="1028" mi="4" ci="0" mb="0" cb="0"/><line nr="1029" mi="5" ci="0" mb="0" cb="0"/><line nr="1030" mi="9" ci="0" mb="0" cb="0"/><line nr="1031" mi="4" ci="0" mb="0" cb="0"/><line nr="1032" mi="5" ci="0" mb="0" cb="0"/><line nr="1033" mi="9" ci="0" mb="0" cb="0"/><line nr="1034" mi="4" ci="0" mb="0" cb="0"/><line nr="1037" mi="6" ci="0" mb="0" cb="0"/><line nr="1038" mi="8" ci="0" mb="0" cb="0"/><line nr="1039" mi="4" ci="0" mb="0" cb="0"/><line nr="1044" mi="8" ci="0" mb="0" cb="0"/><line nr="1045" mi="6" ci="0" mb="0" cb="0"/><line nr="1046" mi="8" ci="0" mb="0" cb="0"/><line nr="1049" mi="11" ci="0" mb="2" cb="0"/><line nr="1050" mi="22" ci="0" mb="0" cb="0"/><line nr="1055" mi="8" ci="0" mb="0" cb="0"/><line nr="1056" mi="1" ci="0" mb="0" cb="0"/><line nr="1059" mi="6" ci="0" mb="0" cb="0"/><line nr="1060" mi="1" ci="0" mb="0" cb="0"/><line nr="1068" mi="4" ci="0" mb="0" cb="0"/><line nr="1069" mi="4" ci="0" mb="0" cb="0"/><line nr="1070" mi="3" ci="0" mb="0" cb="0"/><line nr="1072" mi="21" ci="0" mb="0" cb="0"/><line nr="1073" mi="10" ci="0" mb="0" cb="0"/><line nr="1075" mi="10" ci="0" mb="2" cb="0"/><line nr="1077" mi="12" ci="0" mb="0" cb="0"/><line nr="1078" mi="3" ci="0" mb="0" cb="0"/><line nr="1080" mi="10" ci="0" mb="0" cb="0"/><line nr="1081" mi="1" ci="0" mb="0" cb="0"/><line nr="1082" mi="2" ci="0" mb="0" cb="0"/><line nr="1083" mi="1" ci="0" mb="0" cb="0"/><line nr="1084" mi="1" ci="0" mb="0" cb="0"/><line nr="1085" mi="1" ci="0" mb="0" cb="0"/><line nr="1097" mi="2" ci="0" mb="0" cb="0"/><line nr="1098" mi="7" ci="0" mb="0" cb="0"/><line nr="1099" mi="15" ci="0" mb="2" cb="0"/><line nr="1100" mi="4" ci="0" mb="0" cb="0"/><line nr="1101" mi="5" ci="0" mb="3" cb="0"/><line nr="1103" mi="2" ci="0" mb="0" cb="0"/><line nr="1104" mi="1" ci="0" mb="0" cb="0"/><line nr="1106" mi="2" ci="0" mb="0" cb="0"/><line nr="1107" mi="1" ci="0" mb="0" cb="0"/><line nr="1109" mi="2" ci="0" mb="0" cb="0"/><line nr="1114" mi="4" ci="0" mb="0" cb="0"/><line nr="1115" mi="4" ci="0" mb="0" cb="0"/><line nr="1116" mi="4" ci="0" mb="0" cb="0"/><line nr="1117" mi="6" ci="0" mb="0" cb="0"/><line nr="1121" mi="4" ci="0" mb="0" cb="0"/><line nr="1122" mi="6" ci="0" mb="0" cb="0"/><line nr="1123" mi="5" ci="0" mb="2" cb="0"/><line nr="1124" mi="14" ci="0" mb="0" cb="0"/><line nr="1125" mi="4" ci="0" mb="0" cb="0"/><line nr="1126" mi="17" ci="0" mb="0" cb="0"/><line nr="1129" mi="14" ci="0" mb="0" cb="0"/><line nr="1130" mi="4" ci="0" mb="0" cb="0"/><line nr="1131" mi="14" ci="0" mb="0" cb="0"/><line nr="1133" mi="6" ci="0" mb="0" cb="0"/><line nr="1136" mi="4" ci="0" mb="0" cb="0"/><line nr="1137" mi="10" ci="0" mb="2" cb="0"/><line nr="1139" mi="4" ci="0" mb="0" cb="0"/><line nr="1140" mi="6" ci="0" mb="0" cb="0"/><line nr="1141" mi="5" ci="0" mb="2" cb="0"/><line nr="1142" mi="14" ci="0" mb="0" cb="0"/><line nr="1143" mi="4" ci="0" mb="0" cb="0"/><line nr="1144" mi="17" ci="0" mb="0" cb="0"/><line nr="1147" mi="14" ci="0" mb="0" cb="0"/><line nr="1148" mi="4" ci="0" mb="0" cb="0"/><line nr="1149" mi="14" ci="0" mb="0" cb="0"/><line nr="1151" mi="6" ci="0" mb="0" cb="0"/><line nr="1153" mi="5" ci="0" mb="0" cb="0"/><line nr="1154" mi="1" ci="0" mb="0" cb="0"/><line nr="1157" mi="7" ci="0" mb="0" cb="0"/><line nr="1158" mi="6" ci="0" mb="0" cb="0"/><line nr="1159" mi="8" ci="0" mb="0" cb="0"/><line nr="1160" mi="6" ci="0" mb="0" cb="0"/><line nr="1161" mi="8" ci="0" mb="0" cb="0"/><line nr="1162" mi="6" ci="0" mb="0" cb="0"/><line nr="1163" mi="8" ci="0" mb="0" cb="0"/><line nr="1164" mi="10" ci="0" mb="2" cb="0"/><line nr="1165" mi="5" ci="0" mb="0" cb="0"/><line nr="1166" mi="8" ci="0" mb="0" cb="0"/><line nr="1167" mi="1" ci="0" mb="0" cb="0"/><line nr="1168" mi="6" ci="0" mb="0" cb="0"/><line nr="1170" mi="1" ci="0" mb="0" cb="0"/><line nr="1181" mi="14" ci="0" mb="2" cb="0"/><line nr="1182" mi="10" ci="0" mb="2" cb="0"/><line nr="1183" mi="13" ci="0" mb="0" cb="0"/><line nr="1184" mi="2" ci="0" mb="0" cb="0"/><line nr="1185" mi="2" ci="0" mb="2" cb="0"/><line nr="1186" mi="5" ci="0" mb="0" cb="0"/><line nr="1187" mi="2" ci="0" mb="0" cb="0"/><line nr="1191" mi="2" ci="0" mb="0" cb="0"/><line nr="1192" mi="7" ci="0" mb="0" cb="0"/><line nr="1193" mi="6" ci="0" mb="2" cb="0"/><line nr="1194" mi="3" ci="0" mb="2" cb="0"/><line nr="1195" mi="12" ci="0" mb="0" cb="0"/><line nr="1197" mi="8" ci="0" mb="0" cb="0"/><line nr="1199" mi="8" ci="0" mb="0" cb="0"/><line nr="1201" mi="1" ci="0" mb="0" cb="0"/><line nr="1213" mi="11" ci="0" mb="2" cb="0"/><line nr="1214" mi="7" ci="0" mb="0" cb="0"/><line nr="1215" mi="5" ci="0" mb="0" cb="0"/><line nr="1216" mi="7" ci="0" mb="0" cb="0"/><line nr="1218" mi="4" ci="0" mb="0" cb="0"/><line nr="1219" mi="13" ci="0" mb="0" cb="0"/><line nr="1220" mi="2" ci="0" mb="0" cb="0"/><line nr="1221" mi="1" ci="0" mb="0" cb="0"/><line nr="1222" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="3582" covered="0"/><counter type="BRANCH" missed="147" covered="0"/><counter type="LINE" missed="595" covered="0"/><counter type="COMPLEXITY" missed="127" covered="0"/><counter type="METHOD" missed="46" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><counter type="INSTRUCTION" missed="5287" covered="161"/><counter type="BRANCH" missed="287" covered="5"/><counter type="LINE" missed="1055" covered="20"/><counter type="COMPLEXITY" missed="255" covered="8"/><counter type="METHOD" missed="96" covered="6"/><counter type="CLASS" missed="4" covered="2"/></package><package name="it/polimi/ingsw/client/frontend/gui/nodes"><class name="it/polimi/ingsw/client/frontend/gui/nodes/PlateauPane" sourcefilename="PlateauPane.java"><method name="&lt;init&gt;" desc="()V" line="26"><counter type="INSTRUCTION" missed="408" covered="0"/><counter type="LINE" missed="35" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setColor" desc="(Ljava/lang/String;Lit/polimi/ingsw/gamemodel/Color;)V" line="69"><counter type="INSTRUCTION" missed="26" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setPoints" desc="(Ljava/lang/String;I)V" line="83"><counter type="INSTRUCTION" missed="76" covered="0"/><counter type="BRANCH" missed="8" covered="0"/><counter type="LINE" missed="13" covered="0"/><counter type="COMPLEXITY" missed="5" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="playersAtPosition" desc="(I)I" line="109"><counter type="INSTRUCTION" missed="26" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="convertCoords" desc="(Lit/polimi/ingsw/utils/Pair;)Lit/polimi/ingsw/utils/Pair;" line="126"><counter type="INSTRUCTION" missed="24" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;clinit&gt;" desc="()V" line="17"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="565" covered="0"/><counter type="BRANCH" missed="12" covered="0"/><counter type="LINE" missed="63" covered="0"/><counter type="COMPLEXITY" missed="12" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/gui/nodes/CardView" sourcefilename="CardView.java"><method name="&lt;init&gt;" desc="()V" line="46"><counter type="INSTRUCTION" missed="20" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="59"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="72"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;init&gt;" desc="(Lit/polimi/ingsw/gamemodel/Objective;Lit/polimi/ingsw/gamemodel/Side;)V" line="85"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setCard" desc="(Lit/polimi/ingsw/gamemodel/InitialCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="98"><counter type="INSTRUCTION" missed="20" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setCard" desc="(Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="110"><counter type="INSTRUCTION" missed="20" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setCard" desc="(Lit/polimi/ingsw/gamemodel/Objective;Lit/polimi/ingsw/gamemodel/Side;)V" line="122"><counter type="INSTRUCTION" missed="20" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setResourcesCardBack" desc="(Lit/polimi/ingsw/gamemodel/Symbol;)V" line="134"><counter type="INSTRUCTION" missed="24" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setGoldsCardBack" desc="(Lit/polimi/ingsw/gamemodel/Symbol;)V" line="150"><counter type="INSTRUCTION" missed="24" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addProperties" desc="(Ljava/lang/String;)V" line="165"><counter type="INSTRUCTION" missed="52" covered="0"/><counter type="LINE" missed="14" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setArc" desc="(D)V" line="187"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addCorners" desc="()V" line="196"><counter type="INSTRUCTION" missed="53" covered="0"/><counter type="LINE" missed="9" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setCornerProperties" desc="(Ljavafx/scene/layout/Pane;DD)V" line="214"><counter type="INSTRUCTION" missed="18" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setToken" desc="(Lit/polimi/ingsw/gamemodel/Color;)V" line="226"><counter type="INSTRUCTION" missed="115" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="19" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;clinit&gt;" desc="()V" line="23"><counter type="INSTRUCTION" missed="13" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="454" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="110" covered="0"/><counter type="COMPLEXITY" missed="18" covered="0"/><counter type="METHOD" missed="15" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="it/polimi/ingsw/client/frontend/gui/nodes/BoardPane" sourcefilename="BoardPane.java"><method name="&lt;init&gt;" desc="()V" line="27"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/PlayableCard;Lit/polimi/ingsw/gamemodel/Side;)V" line="43"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/gamemodel/InitialCard;Lit/polimi/ingsw/gamemodel/Side;)Lit/polimi/ingsw/client/frontend/gui/nodes/CardView;" line="57"><counter type="INSTRUCTION" missed="23" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="displayCard" desc="(Lit/polimi/ingsw/utils/Pair;Lit/polimi/ingsw/client/frontend/gui/nodes/CardView;)V" line="70"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="convertCoordinates" desc="(Lit/polimi/ingsw/utils/Pair;)Lit/polimi/ingsw/utils/Pair;" line="82"><counter type="INSTRUCTION" missed="42" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="&lt;clinit&gt;" desc="()V" line="22"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="126" covered="0"/><counter type="LINE" missed="27" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><sourcefile name="CardView.java"><line nr="23" mi="2" ci="0" mb="0" cb="0"/><line nr="24" mi="2" ci="0" mb="0" cb="0"/><line nr="25" mi="2" ci="0" mb="0" cb="0"/><line nr="26" mi="2" ci="0" mb="0" cb="0"/><line nr="29" mi="2" ci="0" mb="0" cb="0"/><line nr="32" mi="3" ci="0" mb="0" cb="0"/><line nr="46" mi="2" ci="0" mb="0" cb="0"/><line nr="47" mi="2" ci="0" mb="0" cb="0"/><line nr="48" mi="6" ci="0" mb="0" cb="0"/><line nr="49" mi="6" ci="0" mb="0" cb="0"/><line nr="50" mi="3" ci="0" mb="0" cb="0"/><line nr="51" mi="1" ci="0" mb="0" cb="0"/><line nr="59" mi="2" ci="0" mb="0" cb="0"/><line nr="60" mi="4" ci="0" mb="0" cb="0"/><line nr="61" mi="6" ci="0" mb="0" cb="0"/><line nr="62" mi="6" ci="0" mb="0" cb="0"/><line nr="63" mi="3" ci="0" mb="0" cb="0"/><line nr="64" mi="1" ci="0" mb="0" cb="0"/><line nr="72" mi="2" ci="0" mb="0" cb="0"/><line nr="73" mi="4" ci="0" mb="0" cb="0"/><line nr="74" mi="6" ci="0" mb="0" cb="0"/><line nr="75" mi="6" ci="0" mb="0" cb="0"/><line nr="76" mi="3" ci="0" mb="0" cb="0"/><line nr="77" mi="1" ci="0" mb="0" cb="0"/><line nr="85" mi="2" ci="0" mb="0" cb="0"/><line nr="86" mi="4" ci="0" mb="0" cb="0"/><line nr="87" mi="6" ci="0" mb="0" cb="0"/><line nr="88" mi="6" ci="0" mb="0" cb="0"/><line nr="89" mi="3" ci="0" mb="0" cb="0"/><line nr="90" mi="1" ci="0" mb="0" cb="0"/><line nr="98" mi="4" ci="0" mb="0" cb="0"/><line nr="99" mi="6" ci="0" mb="0" cb="0"/><line nr="100" mi="6" ci="0" mb="0" cb="0"/><line nr="101" mi="3" ci="0" mb="0" cb="0"/><line nr="102" mi="1" ci="0" mb="0" cb="0"/><line nr="110" mi="4" ci="0" mb="0" cb="0"/><line nr="111" mi="6" ci="0" mb="0" cb="0"/><line nr="112" mi="6" ci="0" mb="0" cb="0"/><line nr="113" mi="3" ci="0" mb="0" cb="0"/><line nr="114" mi="1" ci="0" mb="0" cb="0"/><line nr="122" mi="4" ci="0" mb="0" cb="0"/><line nr="123" mi="6" ci="0" mb="0" cb="0"/><line nr="124" mi="6" ci="0" mb="0" cb="0"/><line nr="125" mi="3" ci="0" mb="0" cb="0"/><line nr="126" mi="1" ci="0" mb="0" cb="0"/><line nr="134" mi="6" ci="0" mb="0" cb="0"/><line nr="135" mi="6" ci="0" mb="0" cb="0"/><line nr="136" mi="2" ci="0" mb="2" cb="0"/><line nr="137" mi="4" ci="0" mb="0" cb="0"/><line nr="139" mi="2" ci="0" mb="0" cb="0"/><line nr="141" mi="3" ci="0" mb="0" cb="0"/><line nr="142" mi="1" ci="0" mb="0" cb="0"/><line nr="150" mi="6" ci="0" mb="0" cb="0"/><line nr="151" mi="6" ci="0" mb="0" cb="0"/><line nr="152" mi="2" ci="0" mb="2" cb="0"/><line nr="153" mi="4" ci="0" mb="0" cb="0"/><line nr="155" mi="2" ci="0" mb="0" cb="0"/><line nr="157" mi="3" ci="0" mb="0" cb="0"/><line nr="158" mi="1" ci="0" mb="0" cb="0"/><line nr="165" mi="3" ci="0" mb="0" cb="0"/><line nr="166" mi="3" ci="0" mb="0" cb="0"/><line nr="167" mi="3" ci="0" mb="0" cb="0"/><line nr="168" mi="3" ci="0" mb="0" cb="0"/><line nr="169" mi="6" ci="0" mb="0" cb="0"/><line nr="170" mi="6" ci="0" mb="0" cb="0"/><line nr="171" mi="6" ci="0" mb="0" cb="0"/><line nr="174" mi="3" ci="0" mb="0" cb="0"/><line nr="175" mi="3" ci="0" mb="0" cb="0"/><line nr="176" mi="3" ci="0" mb="0" cb="0"/><line nr="177" mi="5" ci="0" mb="0" cb="0"/><line nr="178" mi="5" ci="0" mb="0" cb="0"/><line nr="179" mi="2" ci="0" mb="0" cb="0"/><line nr="180" mi="1" ci="0" mb="0" cb="0"/><line nr="187" mi="4" ci="0" mb="0" cb="0"/><line nr="188" mi="4" ci="0" mb="0" cb="0"/><line nr="189" mi="1" ci="0" mb="0" cb="0"/><line nr="196" mi="5" ci="0" mb="0" cb="0"/><line nr="197" mi="5" ci="0" mb="0" cb="0"/><line nr="198" mi="5" ci="0" mb="0" cb="0"/><line nr="199" mi="5" ci="0" mb="0" cb="0"/><line nr="201" mi="6" ci="0" mb="0" cb="0"/><line nr="202" mi="8" ci="0" mb="0" cb="0"/><line nr="203" mi="10" ci="0" mb="0" cb="0"/><line nr="204" mi="8" ci="0" mb="0" cb="0"/><line nr="205" mi="1" ci="0" mb="0" cb="0"/><line nr="214" mi="3" ci="0" mb="0" cb="0"/><line nr="215" mi="3" ci="0" mb="0" cb="0"/><line nr="216" mi="3" ci="0" mb="0" cb="0"/><line nr="217" mi="3" ci="0" mb="0" cb="0"/><line nr="218" mi="5" ci="0" mb="0" cb="0"/><line nr="219" mi="1" ci="0" mb="0" cb="0"/><line nr="226" mi="2" ci="0" mb="0" cb="0"/><line nr="227" mi="4" ci="0" mb="0" cb="0"/><line nr="228" mi="11" ci="0" mb="0" cb="0"/><line nr="229" mi="11" ci="0" mb="0" cb="0"/><line nr="231" mi="6" ci="0" mb="0" cb="0"/><line nr="233" mi="9" ci="0" mb="0" cb="0"/><line nr="234" mi="3" ci="0" mb="0" cb="0"/><line nr="235" mi="3" ci="0" mb="0" cb="0"/><line nr="237" mi="13" ci="0" mb="0" cb="0"/><line nr="238" mi="7" ci="0" mb="0" cb="0"/><line nr="240" mi="4" ci="0" mb="2" cb="0"/><line nr="241" mi="5" ci="0" mb="0" cb="0"/><line nr="242" mi="3" ci="0" mb="0" cb="0"/><line nr="243" mi="3" ci="0" mb="0" cb="0"/><line nr="244" mi="13" ci="0" mb="0" cb="0"/><line nr="245" mi="7" ci="0" mb="0" cb="0"/><line nr="246" mi="5" ci="0" mb="0" cb="0"/><line nr="248" mi="5" ci="0" mb="0" cb="0"/><line nr="249" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="454" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="110" covered="0"/><counter type="COMPLEXITY" missed="18" covered="0"/><counter type="METHOD" missed="15" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="PlateauPane.java"><line nr="17" mi="2" ci="0" mb="0" cb="0"/><line nr="18" mi="3" ci="0" mb="0" cb="0"/><line nr="26" mi="2" ci="0" mb="0" cb="0"/><line nr="27" mi="5" ci="0" mb="0" cb="0"/><line nr="28" mi="5" ci="0" mb="0" cb="0"/><line nr="29" mi="5" ci="0" mb="0" cb="0"/><line nr="30" mi="13" ci="0" mb="0" cb="0"/><line nr="31" mi="13" ci="0" mb="0" cb="0"/><line nr="32" mi="13" ci="0" mb="0" cb="0"/><line nr="33" mi="13" ci="0" mb="0" cb="0"/><line nr="34" mi="13" ci="0" mb="0" cb="0"/><line nr="35" mi="13" ci="0" mb="0" cb="0"/><line nr="36" mi="13" ci="0" mb="0" cb="0"/><line nr="37" mi="13" ci="0" mb="0" cb="0"/><line nr="38" mi="13" ci="0" mb="0" cb="0"/><line nr="39" mi="13" ci="0" mb="0" cb="0"/><line nr="40" mi="13" ci="0" mb="0" cb="0"/><line nr="41" mi="13" ci="0" mb="0" cb="0"/><line nr="42" mi="13" ci="0" mb="0" cb="0"/><line nr="43" mi="13" ci="0" mb="0" cb="0"/><line nr="44" mi="13" ci="0" mb="0" cb="0"/><line nr="45" mi="13" ci="0" mb="0" cb="0"/><line nr="46" mi="13" ci="0" mb="0" cb="0"/><line nr="47" mi="13" ci="0" mb="0" cb="0"/><line nr="48" mi="13" ci="0" mb="0" cb="0"/><line nr="49" mi="13" ci="0" mb="0" cb="0"/><line nr="50" mi="13" ci="0" mb="0" cb="0"/><line nr="51" mi="13" ci="0" mb="0" cb="0"/><line nr="52" mi="13" ci="0" mb="0" cb="0"/><line nr="53" mi="13" ci="0" mb="0" cb="0"/><line nr="54" mi="13" ci="0" mb="0" cb="0"/><line nr="55" mi="13" ci="0" mb="0" cb="0"/><line nr="56" mi="13" ci="0" mb="0" cb="0"/><line nr="57" mi="13" ci="0" mb="0" cb="0"/><line nr="58" mi="13" ci="0" mb="0" cb="0"/><line nr="59" mi="13" ci="0" mb="0" cb="0"/><line nr="60" mi="1" ci="0" mb="0" cb="0"/><line nr="69" mi="9" ci="0" mb="0" cb="0"/><line nr="70" mi="3" ci="0" mb="0" cb="0"/><line nr="71" mi="3" ci="0" mb="0" cb="0"/><line nr="72" mi="6" ci="0" mb="0" cb="0"/><line nr="73" mi="4" ci="0" mb="0" cb="0"/><line nr="74" mi="1" ci="0" mb="0" cb="0"/><line nr="83" mi="3" ci="0" mb="2" cb="0"/><line nr="84" mi="1" ci="0" mb="0" cb="0"/><line nr="86" mi="13" ci="0" mb="4" cb="0"/><line nr="87" mi="9" ci="0" mb="0" cb="0"/><line nr="89" mi="4" ci="0" mb="0" cb="0"/><line nr="90" mi="7" ci="0" mb="0" cb="0"/><line nr="92" mi="6" ci="0" mb="0" cb="0"/><line nr="93" mi="6" ci="0" mb="0" cb="0"/><line nr="94" mi="11" ci="0" mb="0" cb="0"/><line nr="96" mi="5" ci="0" mb="2" cb="0"/><line nr="97" mi="5" ci="0" mb="0" cb="0"/><line nr="98" mi="5" ci="0" mb="0" cb="0"/><line nr="100" mi="1" ci="0" mb="0" cb="0"/><line nr="109" mi="2" ci="0" mb="0" cb="0"/><line nr="110" mi="12" ci="0" mb="2" cb="0"/><line nr="111" mi="8" ci="0" mb="2" cb="0"/><line nr="112" mi="1" ci="0" mb="0" cb="0"/><line nr="114" mi="1" ci="0" mb="0" cb="0"/><line nr="115" mi="2" ci="0" mb="0" cb="0"/><line nr="126" mi="24" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="565" covered="0"/><counter type="BRANCH" missed="12" covered="0"/><counter type="LINE" missed="63" covered="0"/><counter type="COMPLEXITY" missed="12" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="BoardPane.java"><line nr="22" mi="2" ci="0" mb="0" cb="0"/><line nr="23" mi="2" ci="0" mb="0" cb="0"/><line nr="24" mi="2" ci="0" mb="0" cb="0"/><line nr="25" mi="3" ci="0" mb="0" cb="0"/><line nr="27" mi="5" ci="0" mb="0" cb="0"/><line nr="33" mi="2" ci="0" mb="0" cb="0"/><line nr="34" mi="1" ci="0" mb="0" cb="0"/><line nr="43" mi="6" ci="0" mb="0" cb="0"/><line nr="44" mi="6" ci="0" mb="0" cb="0"/><line nr="45" mi="4" ci="0" mb="0" cb="0"/><line nr="46" mi="5" ci="0" mb="0" cb="0"/><line nr="47" mi="1" ci="0" mb="0" cb="0"/><line nr="57" mi="6" ci="0" mb="0" cb="0"/><line nr="58" mi="4" ci="0" mb="0" cb="0"/><line nr="59" mi="5" ci="0" mb="0" cb="0"/><line nr="60" mi="6" ci="0" mb="0" cb="0"/><line nr="61" mi="2" ci="0" mb="0" cb="0"/><line nr="70" mi="4" ci="0" mb="0" cb="0"/><line nr="71" mi="6" ci="0" mb="0" cb="0"/><line nr="72" mi="6" ci="0" mb="0" cb="0"/><line nr="73" mi="5" ci="0" mb="0" cb="0"/><line nr="74" mi="1" ci="0" mb="0" cb="0"/><line nr="82" mi="3" ci="0" mb="0" cb="0"/><line nr="83" mi="3" ci="0" mb="0" cb="0"/><line nr="84" mi="14" ci="0" mb="0" cb="0"/><line nr="85" mi="14" ci="0" mb="0" cb="0"/><line nr="86" mi="8" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="126" covered="0"/><counter type="LINE" missed="27" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="6" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><counter type="INSTRUCTION" missed="1145" covered="0"/><counter type="BRANCH" missed="18" covered="0"/><counter type="LINE" missed="200" covered="0"/><counter type="COMPLEXITY" missed="36" covered="0"/><counter type="METHOD" missed="27" covered="0"/><counter type="CLASS" missed="3" covered="0"/></package><counter type="INSTRUCTION" missed="19533" covered="5403"/><counter type="BRANCH" missed="821" covered="307"/><counter type="LINE" missed="4244" covered="1213"/><counter type="COMPLEXITY" missed="1102" covered="430"/><counter type="METHOD" missed="602" covered="311"/><counter type="CLASS" missed="48" covered="77"/></report>
      \ No newline at end of file
      diff --git a/deliveries/UML/README.md b/deliveries/UML/README.md
      new file mode 100644
      index 00000000..102b8ae5
      --- /dev/null
      +++ b/deliveries/UML/README.md
      @@ -0,0 +1,9 @@
      +# Diagrammi UML
      +- Cartella `Sources`: contiene i file mermaid utilizzati per generare i diagrammi UML
      +- `model_diagram.pdf`: diagramma UML semplificato del model
      +- `server_diagram.pdf`: diagramma UML semplificato del server, della gestione della connessione e dei controller
      +- `messages_sequence_diagram.pdf`: Sequence diagram rappresentante i messaggi scambiati tra server e PlayerController
      +- `class_sequence_diagram.pdf`: Sequence diagram rappresentante le interazioni tra due client e il server e gestione delle notifiche
      +- `generated_full_diagram.png`: diagramma UML completo di tutto il progetto generato da IntelliJ con i metodi
      +- `generated_small_diagram_methods.png`: diagramma UML che esclude i package `messages`, `exceptions` e `utils` (esclude classi ausiliarie che non sono necessarie per comprendere la struttura generale)
      +- `generated_small_diagram.png`: diagramma UML come `generated_small_diagram_methods.png` ma senza metodi
      diff --git a/deliveries/UML/class_sequence_diagram.mmd b/deliveries/UML/Sources/class_sequence_diagram.mmd
      similarity index 100%
      rename from deliveries/UML/class_sequence_diagram.mmd
      rename to deliveries/UML/Sources/class_sequence_diagram.mmd
      diff --git a/deliveries/UML/messages_sequence_diagram.mmd b/deliveries/UML/Sources/messages_sequence_diagram.mmd
      similarity index 100%
      rename from deliveries/UML/messages_sequence_diagram.mmd
      rename to deliveries/UML/Sources/messages_sequence_diagram.mmd
      diff --git a/deliveries/UML/model_diagram.mmd b/deliveries/UML/Sources/model_diagram.mmd
      similarity index 88%
      rename from deliveries/UML/model_diagram.mmd
      rename to deliveries/UML/Sources/model_diagram.mmd
      index 9fbfdd32..52cf8119 100644
      --- a/deliveries/UML/model_diagram.mmd
      +++ b/deliveries/UML/Sources/model_diagram.mmd
      @@ -164,7 +164,7 @@ classDiagram
       
               + Player(String nickname, Match match)
               + playCard(Pair<Integer, Integer> coord, PlayableCard card, Side side) void
      -        + drawSecretObjective Pair~Objective, Objective~
      +        + drawSecretObjective() Pair~Objective, Objective~
               + drawInitialCard() InitialCard
               + drawCard(DrawSource source) void
               + chooseSecretObjective(Objective objective) void
      @@ -230,10 +230,11 @@ classDiagram
               - objectivesDeck: GameDeck~Objective~
               - visiblePlayableCards: Map~DrawSource, PlayableCard~
               - visibleObjectives: Pair~Objective, Objective~
      +        - decksTopReigns: Pair~Symbol, Symbol~
               - currentProposedObjectives: Pair~Objective, Objective~
               - currentGivenInitialCard: InitialCard
               - started: boolean
      -        - initialTurn: boolean
      +        - initialTurnFinished: boolean
               - lastTurn: boolean
               - finished: boolean
       
      @@ -252,6 +253,8 @@ classDiagram
               + getVisibleObjectives() Pair~Objective, Objective~
               + getDeckVisibleReign() Pair~Symbol, Symbol~
               + getPlayersFinalRanking() List~Pair~Player, Boolean~~
      +        + subscribeObserver(MatchObserver) void
      +        + unsubscribeObserver(MatchObserver) void
               # getPoints() int
               # addPoints() void
               # setSecretObjective(Objective obj) void
      @@ -269,22 +272,26 @@ classDiagram
               # setupBoards() void
               # nextPlayer() void
               # decideWinner() void
      +        # sendBroadcastText(Player sender, String content) void
      +        # sendPrivateText(Player sender, Player receiver, String content) void
               - checkObjectivesAchievement() Map~Player, Integer~      
               - notifyObservers(MatchObserverCallable matchObserver) void
           }
             class MatchObserver{
               <<Interface>>
      -      +playerQuit(Player p) void
      -      +playerJoined(Player p) void
      -      +matchStarted() void
      -      +someoneDrewInitialCard(Player someone, InitialCard card) void
      -      +someoneSetInitialSide(Player someone, Side side) void
      -      +someoneDrewSecretObjectives(Player someone, Pair~Objective, Objective~) void
      -      +someoneChoseSecretObjective(Player someone, Objective objective) void
      -      +someonePlayedCard(Player someone, Pair~Integer, Integer~ coords, PlayableCard card, Side side) void
      -      +someoneDrewCard(Player someone, DrawSource source, PlayableCard card, PlayebleCard replacementCard) void
      -      +matchFinished() void
      -    }
      +        + someoneSetInitialSide(Player someone, Side side, Map~Symbol, Integer~ availableResources) void
      +        + someoneJoined(Player someone) void
      +        + someoneQuit(Player someone) void
      +        + someoneChoseSecretObjective(Player someone, Objective objective) void
      +        + matchFinished() void
      +        + someoneDrewSecretObjective(Player someone, Pair~Objective, Objective~ objectives) void
      +        + someoneSentBroadcastText(Player someone, String content) void
      +        + someoneDrewCard(Player someone, DrawSource drawSource, PlayableCard card, PlayableCard replacementCard) void
      +        + someoneSentPrivateText(Player someone, Player receiver, String content) void
      +        + someoneDrewInitialCard(Player someone, InitialCard card) void
      +        + someonePlayedCard(Player someone, Pair~Integer, Integer~ coords, PlayableCard card, Side side) void
      +        + matchStarted() void
      +      } 
       
           class MatchObserverCallable {
             <<FunctionalInterface>>
      diff --git a/deliveries/UML/server_diagram.mmd b/deliveries/UML/Sources/server_diagram.mmd
      similarity index 54%
      rename from deliveries/UML/server_diagram.mmd
      rename to deliveries/UML/Sources/server_diagram.mmd
      index 6dccc344..60ee2800 100644
      --- a/deliveries/UML/server_diagram.mmd
      +++ b/deliveries/UML/Sources/server_diagram.mmd
      @@ -5,32 +5,32 @@ classDiagram
           Server --> PlayerControllerRMI
           PlayerControllerTCP --> IOHandler
           PlayerControllerRMI --> ViewInterface
      -    
      +    Server --|> ServerRMIInterface
      +    MatchStatusObserver --|> MatchObserver
           class MatchObserver{
               <<Interface>>
      -      +matchStarted() void
      -      +someoneJoined(Player someone)
      -      +someoneQuit(Player someone)
      -      +someoneDrewInitialCard(Player someone, InitialCard card) void
      -      +someoneSetInitialSide(Player someone, Side side) void
      -      +someoneDrewSecretObjectives(Player someone, Pair~Objective, Objective~) void
      -      +someoneChoseSecretObjective(Player someone, Objective objective) void
      -      +someonePlayedCard(Player someone, Pair~Integer, Integer~ coords, PlayableCard card, Side side) void
      -      +someoneDrewCard(Player someone, DrawSource source, PlayableCard card, PlayebleCard replacementCard) void
      -      +matchFinished() void
      -    }
      -    
      +        + someoneSetInitialSide(Player someone, Side side, Map~Symbol, Integer~ availableResources) void
      +        + someoneJoined(Player someone) void
      +        + someoneQuit(Player someone) void
      +        + someoneChoseSecretObjective(Player someone, Objective objective) void
      +        + matchFinished() void
      +        + someoneDrewSecretObjective(Player someone, Pair~Objective, Objective~ objectives) void
      +        + someoneSentBroadcastText(Player someone, String content) void
      +        + someoneDrewCard(Player someone, DrawSource drawSource, PlayableCard card, PlayableCard replacementCard) void
      +        + someoneSentPrivateText(Player someone, Player receiver, String content) void
      +        + someoneDrewInitialCard(Player someone, InitialCard card) void
      +        + someonePlayedCard(Player someone, Pair~Integer, Integer~ coords, PlayableCard card, Side side) void
      +        + matchStarted() void
      +    } 
      +
      +  
           class PlayerController{
             - Player player
             - Match match
      -      +PlayerController()
      -      +drawInitialCard(Side side) void
      -      +chooseInitialCardSide() void
      -      +drawSecretObjectives() void
      -      +playeCard(Pair~Integer, Integer~ coords, PlayableCard card, Side side, int points) void
      -      +drawCard(DrawSource source)
      -      +chooseSecretObjective(Objective objective) void 
      -      +drawSecretObjectives() void
      +      + PlayerController()
      +      + getPlayer() Player
      +      + matchResumed() void
      +      + sendJoined() void  
           }
           
           class PlayerControllerTCP{
      @@ -41,18 +41,23 @@ classDiagram
             +matchStarted() void
             +someoneDrewInitialCard(Player someone, InitialCard card) void
             +someoneSetInitialSide(Player someone, Side side) void
      -      +someoneDrewSecretObjectives(Player someone, Pair~Objective, Objective~) void
      +      +someoneDrewSecretObjectives(Player someone, Pair~Objective, Objective~ objectives) void
             +someoneChoseSecretObjective(Player someone, Objective objective) void
             +someonePlayedCard(Player someone, Pair~Integer, Integer~ coords, PlayableCard card, Side side) void
             +someoneDrewCard(Player someone, DrawSource source, PlayableCard card, PlayebleCard replacementCard) void
             +matchFinished() void
      -      +drawInitialCard(Side side) void
      -      +chooseInitialCardSide() void
      +      +drawInitialCard() void
      +      +chooseInitialCardSide(Side side) void
             +drawSecretObjectives() void
      -      +playeCard(Pair~Integer, Integer~ coords, PlayableCard card, Side side, int points) void
      +      +playCard(Pair~Integer, Integer~ coords, PlayableCard card, Side side, int points) void
             +drawCard(DrawSource source)
             +chooseSecretObjective(Objective objective) void 
             +drawSecretObjectives() void
      +      +sendBroadcastText(String text) void
      +      +sendPrivateText(Player receiver, String text) void
      +      +someoneSentBroadcastText(Player someone, String text) void
      +      +someoneSentPrivateText(Player someone, Player receiver, String text) void
      +
             - sendMessage(Message msg) void
             - connectionError() void
             - createErrorMessage(Exception e) ErrorMessage
      @@ -60,26 +65,39 @@ classDiagram
           
           class PlayerControllerRMI {
             - ViewInterface view
      -      +PlayerControllerRMI(String nickname, Match match, int port)
      +      +PlayerControllerRMI(String nickname, Match match)
      +      + registerView(RemoteViewInterface view)
             +someoneJoined(Player someone) void
             +someoneQuit(Player someone) void
             +matchStarted() void
             +someoneDrewInitialCard(Player someone, InitialCard card) void
             +someoneSetInitialSide(Player someone, Side side) void
      -      +someoneDrewSecretObjectives(Player someone, Pair~Objective, Objective~) void
      +      +someoneDrewSecretObjectives(Player someone, Pair~Objective, Objective~ objectives) void
             +someoneChoseSecretObjective(Player someone, Objective objective) void
             +someonePlayedCard(Player someone, Pair~Integer, Integer~ coords, PlayableCard card, Side side) void
             +someoneDrewCard(Player someone, DrawSource source, PlayableCard card, PlayebleCard replacementCard) void
             +matchFinished() void
      -      +drawInitialCard(Side side) void
      -      +chooseInitialCardSide() void
      +      +drawInitialCard() void
      +      +chooseInitialCardSide(Side side) void
             +drawSecretObjectives() void
      -      +playeCard(Pair~Integer, Integer~ coords, PlayableCard card, Side side, int points) void
      +      +playCard(Pair~Integer, Integer~ coords, PlayableCard card, Side side, int points) void
             +drawCard(DrawSource source)
             +chooseSecretObjective(Objective objective) void 
             +drawSecretObjectives() void
      +      +sendBroadcastText(String text) void
      +      +sendPrivateText(Player receiver, String text) void
      +      +someoneSentBroadcastText(Player someone, String text) void
      +      +someoneSentPrivateText(Player someone, Player receiver, String text) void
             -onConnectionError() void
           }
      +
      +    class ServerRMIInterface {
      +      <<Interface>>
      +      + createMatch(String name, int maxPlayers) void
      +      + getJoinableMatches() List~AvailableMatch~
      +      + joinMatch(String matchName, String username) PlayerControllerRMIInterface
      +      + ping() boolean
      +    }
           
           class Server {
               - Map~String, Match~ matches
      @@ -90,12 +108,15 @@ classDiagram
               - int portTCP
               + Server(int portRMI, int portTCP)
               + main() void
      -        + joinMatch(String matchName, String nickname) PlayerControllerRMI
      +        + loadCrashedMatches() void
      +        + joinMatch(String matchName, String nickname) PlayerControllerRMIInterface
               + createMatch(String matchName, int maxPlayers) void
               + getNewMatch(int maxPlayers) Match
      -        + getJoinableMatches() Map~String, Match~
      +        + getJoinableMatches() List~AvailableMatch~
      +        + getJoinableMatchesMap() Map~String, List&ltMatch&gt~
               + startRMIServer() void
               + startTCPServer() void
      +        + ping() boolean
           }
           
           class IOHandler {
      @@ -119,3 +140,21 @@ classDiagram
             + someoneDrewCard(Player someone, DrawSource source, Card card) void
             + matchFinished() void
           }
      +
      +class MatchStatusObserver {
      +  + MatchStatusObserver(String, Map~String, Match~) 
      +  + someoneJoined(Player) void
      +  + someonePlayedCard(Player, Pair~Integer, Integer~, PlayableCard, Side) void
      +  + someoneSentBroadcastText(Player, String) void
      +  + someoneChoseSecretObjective(Player, Objective) void
      +  + matchStarted() void
      +  + someoneDrewCard(Player, DrawSource, PlayableCard, PlayableCard) void
      +  + someoneQuit(Player) void
      +  - removeSerializedMatch() void
      +  + someoneSetInitialSide(Player, Side, Map~Symbol, Integer~) void
      +  + someoneDrewInitialCard(Player, InitialCard) void
      +  + matchFinished() void
      +  - serializeMatch() void
      +  + someoneSentPrivateText(Player, Player, String) void
      +  + someoneDrewSecretObjective(Player, Pair~Objective, Objective~) void
      +}
      diff --git a/deliveries/UML/generated_full_diagram.png b/deliveries/UML/generated_full_diagram.png
      new file mode 100644
      index 00000000..87b91921
      Binary files /dev/null and b/deliveries/UML/generated_full_diagram.png differ
      diff --git a/deliveries/UML/generated_small_diagram.png b/deliveries/UML/generated_small_diagram.png
      new file mode 100644
      index 00000000..a868931f
      Binary files /dev/null and b/deliveries/UML/generated_small_diagram.png differ
      diff --git a/deliveries/UML/generated_small_diagram_methods.png b/deliveries/UML/generated_small_diagram_methods.png
      new file mode 100644
      index 00000000..b7631064
      Binary files /dev/null and b/deliveries/UML/generated_small_diagram_methods.png differ
      diff --git a/deliveries/UML/model_diagram.pdf b/deliveries/UML/model_diagram.pdf
      index 4da065fa..efdffbd1 100644
      Binary files a/deliveries/UML/model_diagram.pdf and b/deliveries/UML/model_diagram.pdf differ
      diff --git a/deliveries/UML/sequence_messages.pdf b/deliveries/UML/sequence_messages.pdf
      deleted file mode 100644
      index 81cbb4b1..00000000
      Binary files a/deliveries/UML/sequence_messages.pdf and /dev/null differ
      diff --git a/deliveries/UML/server_diagram.pdf b/deliveries/UML/server_diagram.pdf
      index da4dbd42..1e665a1c 100644
      Binary files a/deliveries/UML/server_diagram.pdf and b/deliveries/UML/server_diagram.pdf differ
      diff --git a/pom.xml b/pom.xml
      index cba91351..b12fcd0b 100644
      --- a/pom.xml
      +++ b/pom.xml
      @@ -34,6 +34,38 @@
                   <artifactId>gson</artifactId>
                   <version>2.10.1</version>
               </dependency>
      +        <!-- Multi OS JavaFX Dependencies -->
      +        <dependency>
      +            <groupId>org.openjfx</groupId>
      +            <artifactId>javafx-graphics</artifactId>
      +            <version>21</version>
      +            <classifier>win</classifier>
      +        </dependency>
      +        <dependency>
      +            <groupId>org.openjfx</groupId>
      +            <artifactId>javafx-graphics</artifactId>
      +            <version>21</version>
      +            <classifier>linux</classifier>
      +        </dependency>
      +        <dependency>
      +            <groupId>org.openjfx</groupId>
      +            <artifactId>javafx-graphics</artifactId>
      +            <version>21</version>
      +            <classifier>linux-aarch64</classifier>
      +        </dependency>
      +        <dependency>
      +            <groupId>org.openjfx</groupId>
      +            <artifactId>javafx-graphics</artifactId>
      +            <version>21</version>
      +            <classifier>mac</classifier>
      +        </dependency>
      +        <dependency>
      +            <groupId>org.openjfx</groupId>
      +            <artifactId>javafx-graphics</artifactId>
      +            <version>21</version>
      +            <classifier>mac-aarch64</classifier>
      +        </dependency>
      +        <!-- General JavaFX dependencies -->
               <dependency>
                   <groupId>org.openjfx</groupId>
                   <artifactId>javafx-controls</artifactId>
      @@ -163,18 +195,60 @@
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-assembly-plugin</artifactId>
                       <version>3.4.2</version>
      -                <configuration>
      -                    <descriptorRefs>
      -                        <descriptorRef>jar-with-dependencies</descriptorRef>
      -                    </descriptorRefs>
      -                </configuration>
                       <executions>
                           <execution>
      +                        <id>create-jar-tui</id>
      +                        <phase>package</phase>
      +                        <goals>
      +                            <goal>single</goal>
      +                        </goals>
      +                        <configuration>
      +                            <finalName>TUI</finalName>
      +                            <archive>
      +                                <manifest>
      +                                    <mainClass>it.polimi.ingsw.client.frontend.tui.GraphicalViewTUI</mainClass>
      +                                </manifest>
      +                            </archive>
      +                            <descriptorRefs>
      +                                <descriptorRef>jar-with-dependencies</descriptorRef>
      +                            </descriptorRefs>
      +                        </configuration>
      +                    </execution>
      +                    <execution>
      +                        <id>create-jar-gui</id>
      +                        <phase>package</phase>
      +                        <goals>
      +                            <goal>single</goal>
      +                        </goals>
      +                        <configuration>
      +                            <finalName>GUI</finalName>
      +                            <archive>
      +                                <manifest>
      +                                    <mainClass>it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI</mainClass>
      +                                </manifest>
      +                            </archive>
      +                            <descriptorRefs>
      +                                <descriptorRef>jar-with-dependencies</descriptorRef>
      +                            </descriptorRefs>
      +                        </configuration>
      +                    </execution>
      +                    <execution>
      +                        <id>create-jar-server</id>
                               <phase>package</phase>
      -                        <id>make-assembly</id>
                               <goals>
                                   <goal>single</goal>
                               </goals>
      +                        <configuration>
      +                            <finalName>Server</finalName>
      +                            <archive>
      +                                <manifest>
      +                                    <mainClass>it.polimi.ingsw.server.Server</mainClass>
      +                                </manifest>
      +                            </archive>
      +                            <descriptorRefs>
      +                                <descriptorRef>jar-with-dependencies</descriptorRef>
      +                            </descriptorRefs>
      +                        </configuration>
                           </execution>
                       </executions>
                   </plugin>
      diff --git a/src/main/java/it/polimi/ingsw/Main.java b/src/main/java/it/polimi/ingsw/Main.java
      deleted file mode 100644
      index 09eec218..00000000
      --- a/src/main/java/it/polimi/ingsw/Main.java
      +++ /dev/null
      @@ -1,12 +0,0 @@
      -package it.polimi.ingsw;
      -
      -import it.polimi.ingsw.client.frontend.gui.GraphicalApplication;
      -import javafx.application.Application;
      -
      -import static javafx.application.Application.launch;
      -
      -public class Main {
      -    public static void main(String[] args) {
      -        Application.launch(GraphicalApplication.class, args);
      -    }
      -}
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/ClientBoard.java b/src/main/java/it/polimi/ingsw/client/frontend/ClientBoard.java
      index c0f82ad2..c1d63978 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/ClientBoard.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/ClientBoard.java
      @@ -1,12 +1,11 @@
       package it.polimi.ingsw.client.frontend;
       
      -import it.polimi.ingsw.gamemodel.*;
      -import it.polimi.ingsw.utils.Pair;
      -
       import java.util.ArrayList;
       import java.util.HashMap;
       import java.util.List;
       import java.util.Map;
      +import it.polimi.ingsw.gamemodel.*;
      +import it.polimi.ingsw.utils.Pair;
       
       /**
        * This class contains just elements needed to show the player's board, points, resources, hand and objectives
      @@ -21,6 +20,13 @@ public class ClientBoard {
           private Objective objective;
           private InitialCard initialCard;
       
      +    
      +    /**
      +     * Class constructor.
      +     * 
      +     * @param color The player pawn's color
      +     * @param hand The player's hand
      +     */
           public ClientBoard(Color color, List<PlayableCard> hand) {
               this.placementNumber = 0;
               this.placed = new HashMap<>();
      @@ -34,11 +40,25 @@ public ClientBoard(Color color, List<PlayableCard> hand) {
               this.availableResources = new HashMap<>();
               Symbol.getBasicResources().forEach((reign -> this.availableResources.put(reign, 0)));
           }
      -
      +    
      +    /**
      +     * Sets the secret objective.
      +     * 
      +     * @param objective The chosen secret objective
      +     */
           public void setSecretObjective(Objective objective) {
               this.objective = objective;
           }
      -
      +    
      +    /**
      +     * Adds a card to the player's board.
      +     * 
      +     * @param coords The card's coordinates
      +     * @param card The chosen card
      +     * @param side The chosen side
      +     * @param points The player's point (total)
      +     * @param resources The player's resources (total)
      +     */
           public void placeCard(Pair<Integer, Integer> coords, PlayableCard card, Side side, Integer points, Map<Symbol, Integer> resources) {
               this.hand.remove(card);
               this.placed.put(placementNumber, new ShownCard(card, side, coords));
      @@ -46,47 +66,90 @@ public void placeCard(Pair<Integer, Integer> coords, PlayableCard card, Side sid
               this.availableResources = resources;
               this.placementNumber++;
           }
      -
      +    
      +    /**
      +     * Adds a card to the player's hand.
      +     * 
      +     * @param card The drawn card
      +     */
           public void drawCard(PlayableCard card) {
               this.hand.add(card);
           }
       
      +    
      +    /**
      +     * Sets the initial card. This still does not put it in the board, as the side is still not chosen.
      +     * 
      +     * @param card The chosen card
      +     *
      +     * @see ClientBoard#placeInitial(Side, Map)
      +     */
           public void setInitial(InitialCard card) {
               this.initialCard = card;
           }
      -
      -    public InitialCard getInitialCard() {return this.initialCard;}
      -
      +    
      +    /**
      +     * Places initial card on the board. At this point, the initial card's side has been chosen
      +     * 
      +     * @param side The chosen side
      +     * @param availableResources The player's resources (total)
      +     */
           public void placeInitial(Side side, Map<Symbol, Integer> availableResources) {
               this.placed.put(placementNumber, new ShownCard(this.initialCard, side, new Pair<>(0, 0)));
               this.availableResources = availableResources;
               this.placementNumber++;
           }
       
      +    /**
      +     * @return The initial card.
      +     */
      +    public InitialCard getInitialCard() {return this.initialCard;}
      +
      +    /**
      +     * @return The card's index (ie, the first card played would have a placementNumber of 1).
      +     */
           public Integer getPlacementNumber() {
               return placementNumber;
           }
       
      +    /**
      +     * @return The player's hand.
      +     */
           public List<PlayableCard> getHand() {
               return hand;
           }
       
      +    /**
      +     * @return The player's points.
      +     */
           public Integer getPoints() {
               return points;
           }
       
      +    /**
      +     * @return The player's board.
      +     */
           public Map<Integer, ShownCard> getPlaced() {
               return placed;
           }
       
      +    /**
      +     * @return The player's resources.
      +     */
           public Map<Symbol, Integer> getAvailableResources() {
               return availableResources;
           }
       
      +    /**
      +     * @return The player pawn's color.
      +     */
           public Color getColor() {
               return color;
           }
       
      +    /**
      +     * @return The player's secret objective.
      +     */
           public Objective getObjective() {
               return objective;
           }
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/GraphicalView.java b/src/main/java/it/polimi/ingsw/client/frontend/GraphicalView.java
      index bf0beebe..722452dc 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/GraphicalView.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/GraphicalView.java
      @@ -1,19 +1,18 @@
       package it.polimi.ingsw.client.frontend;
       
      -import it.polimi.ingsw.client.network.NetworkView;
      +import java.util.*;
      +import it.polimi.ingsw.client.network.NetworkHandler;
       import it.polimi.ingsw.gamemodel.*;
       import it.polimi.ingsw.utils.AvailableMatch;
       import it.polimi.ingsw.utils.LeaderboardEntry;
       import it.polimi.ingsw.utils.Pair;
       import it.polimi.ingsw.utils.RequestStatus;
       
      -import java.util.ArrayList;
      -import java.util.HashMap;
      -import java.util.List;
      -import java.util.Map;
      -
      +/**
      + * Class to manage graphical clients
      + */
       public abstract class GraphicalView {
      -    protected NetworkView networkView;
      +    protected NetworkHandler networkHandler;
           protected Map<String, ClientBoard> clientBoards;
           protected List<String> players; // ordered by turn
           protected String currentPlayer;
      @@ -24,27 +23,45 @@ public abstract class GraphicalView {
           protected List<AvailableMatch> availableMatches;
           protected String username;
           protected final LastRequest lastRequest;
      +    private boolean matchStarted = false;
      +    private final Boolean sync = true;
       
      +    /**
      +     * Class constructor.
      +     */
           public GraphicalView() {
               this.lastRequest = new LastRequest();
               this.lastRequest.setStatus(RequestStatus.PENDING);
           }
      -
      +    
      +    /**
      +     * Sets the username of the corresponding player.
      +     * 
      +     * @param username The chosen username
      +     */
           protected void setUsername(String username) {
               this.username = username;
      -        this.networkView.setUsername(username);
      +        this.networkHandler.setUsername(username);
           }
      -
      +    
      +    /**
      +     * @return Whether is the last turn or not.
      +     */
           public boolean isLastTurn() {
               return this.lastTurn;
           }
      -
      +    
      +    /**
      +     * Sets the last request's status.
      +     * 
      +     * @param status Last request's status
      +     */
           public void setLastRequestStatus(RequestStatus status) {
               this.lastRequest.setStatus(status);
           }
       
           /**
      -     * Sets the internal state according to the occurance of an error.
      +     * Sets the internal state according to the occurrence of an error.
            *
            * @param exception The thrown exception
            */
      @@ -55,38 +72,50 @@ public void notifyError(Exception exception) {
           /**
            * Sets the network interface in order to communicate.
            *
      -     * @param networkView the interface to communicate
      +     * @param networkHandler the interface to communicate
            */
      -    public void setNetworkInterface(NetworkView networkView) {
      -        this.networkView = networkView;
      +    public void setNetworkHandler(NetworkHandler networkHandler) {
      +        this.networkHandler = networkHandler;
           }
       
           /**
      -     * Tries to create a match
      +     * Tries to create a match.
            *
      +     * @param maxPlayers maximum amount of players
            * @param matchName The match's name
            */
           public void createMatch(String matchName, Integer maxPlayers) {
               this.setLastRequestStatus(RequestStatus.PENDING);
      -        this.networkView.createMatch(matchName, maxPlayers);
      +        this.networkHandler.createMatch(matchName, maxPlayers);
           }
       
           /**
      -     * Tries to join a match
      +     * Tries to join a match.
            *
            * @param matchName the match's name
            */
           public void joinMatch(String matchName) {
               this.setLastRequestStatus(RequestStatus.PENDING);
      -        this.networkView.joinMatch(matchName);
      +        this.networkHandler.joinMatch(matchName);
           }
       
      +    /**
      +     * Sends a broadcast text.
      +     * 
      +     * @param text The content
      +     */
           public void sendBroadcastText(String text) {
      -        this.networkView.sendBroadcastText(text);
      +        this.networkHandler.sendBroadcastText(text);
           }
      -
      +    
      +    /**
      +     * Sends a private text.
      +     * 
      +     * @param recipient The recipient
      +     * @param text The content
      +     */
           public void sendPrivateText(String recipient, String text) {
      -        this.networkView.sendPrivateText(recipient, text);
      +        this.networkHandler.sendPrivateText(recipient, text);
           }
       
           /**
      @@ -94,7 +123,7 @@ public void sendPrivateText(String recipient, String text) {
            */
           public void drawInitialCard() {
               this.setLastRequestStatus(RequestStatus.PENDING);
      -        this.networkView.drawInitialCard();
      +        this.networkHandler.drawInitialCard();
           }
       
           /**
      @@ -104,7 +133,7 @@ public void drawInitialCard() {
            */
           public void chooseInitialCardSide(Side side) {
               this.setLastRequestStatus(RequestStatus.PENDING);
      -        this.networkView.chooseInitialCardSide(side);
      +        this.networkHandler.chooseInitialCardSide(side);
           }
       
           /**
      @@ -112,7 +141,7 @@ public void chooseInitialCardSide(Side side) {
            */
           public void drawSecretObjectives() {
               this.setLastRequestStatus(RequestStatus.PENDING);
      -        this.networkView.drawSecretObjectives();
      +        this.networkHandler.drawSecretObjectives();
           }
       
           /**
      @@ -123,7 +152,7 @@ public void drawSecretObjectives() {
           public void chooseSecretObjective(Objective objective) {
               this.setLastRequestStatus(RequestStatus.PENDING);
               this.clientBoards.get(this.username).setSecretObjective(objective);
      -        this.networkView.chooseSecretObjective(objective);
      +        this.networkHandler.chooseSecretObjective(objective);
           }
       
           /**
      @@ -135,7 +164,7 @@ public void chooseSecretObjective(Objective objective) {
            */
           public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) {
               this.setLastRequestStatus(RequestStatus.PENDING);
      -        this.networkView.playCard(coords, card, side);
      +        new Thread(() -> this.networkHandler.playCard(coords, card, side)).start();
           }
       
           /**
      @@ -145,11 +174,11 @@ public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side
            */
           public void drawCard(DrawSource source) {
               this.setLastRequestStatus(RequestStatus.PENDING);
      -        this.networkView.drawCard(source);
      +        this.networkHandler.drawCard(source);
           }
       
           /**
      -     * Method used to show the turn has changed
      +     * Method used to show the turn has changed.
            */
           public abstract void changePlayer();
       
      @@ -178,13 +207,13 @@ else if (this.clientBoards.get(this.username).getObjective() == null)
       
       
           /**
      -     * Ask the user to make a play. Must call {@link GraphicalView#playCard(Pair, PlayableCard, Side)}
      +     * Ask the user to make a play. Must call {@link GraphicalView#playCard(Pair, PlayableCard, Side)}.
            */
           public abstract void makeMove();
       
       
           /**
      -     * Starts match on the client side, setting all variables to their initial values
      +     * Starts match on the client side, setting all variables to their initial values.
            *
            * @param playersUsernamesAndPawns Map containing all players' pawns, indexed by their username
            * @param playersHands             Map containing all the players' hands, indexed by their username
      @@ -195,59 +224,130 @@ else if (this.clientBoards.get(this.username).getObjective() == null)
           public void matchStarted(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
                                    Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
                                    Pair<Symbol, Symbol> decksTopReign) {
      -        this.players = new ArrayList<>();
      -        this.clientBoards = new HashMap<>();
      -        Color curr;
      -        playersUsernamesAndPawns.forEach((player, pawn) -> this.players.add(player));
      -
      -        for (String username : playersUsernamesAndPawns.keySet()) {
      -            curr = playersUsernamesAndPawns.get(username);
      -            switch (curr) {
      -                case Color.RED:
      -                    this.players.set(0, username);
      -                    break;
      -                case Color.BLUE:
      -                    this.players.set(1, username);
      -                    break;
      -                case Color.GREEN:
      -                    this.players.set(2, username);
      -                    break;
      -                case Color.YELLOW:
      -                    this.players.set(3, username);
      -                    break;
      -                default:
      -                    break;
      +        this.setupMatch(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReign);
      +        this.notifyMatchStarted();
      +        this.nextPlayer();
      +    }
      +
      +    /**
      +     * Resumes match on the client side, setting all variables to their initial values.
      +     *
      +     * @param playersUsernamesAndPawns Map containing all players' pawns, indexed by their username
      +     * @param playersHands             Map containing all the players' hands, indexed by their username
      +     * @param visibleObjectives        The two objectives common to every player
      +     * @param visiblePlayableCards     The four cards that can be drawn, visible to everyone
      +     * @param decksTopReign            the reigns of the two decks' top
      +     * @param secretObjective          Secret objective of the current player
      +     * @param availableResources       Available resources of all the players
      +     * @param placedCards              Placed cards of all the players
      +     * @param playerPoints             Points of all the players
      +     * @param currentPlayer            The current player
      +     * @param drawPhase                If the match is resumed in draw phase
      +     */
      +    public void resumeMatch(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
      +                            Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
      +                            Pair<Symbol, Symbol> decksTopReign, Objective secretObjective, Map<String, Map<Symbol, Integer>> availableResources,
      +                            Map<String, Map<Pair<Integer, Integer>, PlacedCard>> placedCards, Map<String, Integer> playerPoints, String currentPlayer, boolean drawPhase) {
      +        this.setupMatch(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReign);
      +        this.clientBoards.get(username).setSecretObjective(secretObjective);
      +        for (String player : placedCards.keySet()) {
      +            ClientBoard clientBoard = this.clientBoards.get(player);
      +            Map<Pair<Integer, Integer>, PlacedCard> playerBoard = placedCards.get(player);
      +            List<Pair<Integer, Integer>> orderedCards = playerBoard.keySet().stream()
      +                    .sorted(Comparator.comparingInt(c -> playerBoard.get(c).getTurn()))
      +                    .toList();
      +            for (Pair<Integer, Integer> cardCoord : orderedCards) {
      +                if (cardCoord.equals(new Pair<>(0, 0))) {
      +                    clientBoard.setInitial((InitialCard) playerBoard.get(cardCoord).getCard());
      +                    clientBoard.placeInitial(playerBoard.get(cardCoord).getPlayedSide(),
      +                            availableResources.get(player));
      +                } else {
      +                    clientBoard.placeCard(cardCoord,
      +                            (PlayableCard) playerBoard.get(cardCoord).getCard(),
      +                            playerBoard.get(cardCoord).getPlayedSide(),
      +                            playerPoints.get(player), availableResources.get(player)
      +                    );
      +                }
                   }
               }
      +        this.currentPlayer = currentPlayer;
      +        this.notifyMatchResumed(drawPhase);
      +        this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
      +    }
       
      -        this.currentPlayer = null;
      +    
      +    /**
      +     * Initialize everything about the match.
      +     * 
      +     * @param playersUsernamesAndPawns Map from player's username to pawn color
      +     * @param playersHands Map from player's username to hand
      +     * @param visibleObjectives Common objectives
      +     * @param visiblePlayableCards Common cards that can be drawn
      +     * @param decksTopReign The two decks' top cards
      +     */
      +    private void setupMatch(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
      +                            Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
      +                            Pair<Symbol, Symbol> decksTopReign) {
      +        synchronized (sync) {
      +            this.players = new ArrayList<>();
      +            this.clientBoards = new HashMap<>();
      +            Color curr;
      +            playersUsernamesAndPawns.forEach((player, pawn) -> this.players.add(player));
      +
      +            for (String username : playersUsernamesAndPawns.keySet()) {
      +                curr = playersUsernamesAndPawns.get(username);
      +                switch (curr) {
      +                    case Color.RED:
      +                        this.players.set(0, username);
      +                        break;
      +                    case Color.BLUE:
      +                        this.players.set(1, username);
      +                        break;
      +                    case Color.GREEN:
      +                        this.players.set(2, username);
      +                        break;
      +                    case Color.YELLOW:
      +                        this.players.set(3, username);
      +                        break;
      +                    default:
      +                        break;
      +                }
      +            }
       
      -        playersHands.forEach((username, hand) -> {
      -            this.clientBoards.put(username, new ClientBoard(playersUsernamesAndPawns.get(username), hand));
      -        });
      +            this.currentPlayer = null;
       
      -        this.visiblePlayableCards = visiblePlayableCards;
      -        this.visibleObjectives = visibleObjectives;
      -        this.decksTopReign = decksTopReign;
      +            playersHands.forEach((username, hand) -> {
      +                this.clientBoards.put(username, new ClientBoard(playersUsernamesAndPawns.get(username), hand));
      +            });
       
      -        this.notifyMatchStarted();
      -        this.nextPlayer();
      +            this.visiblePlayableCards = visiblePlayableCards;
      +            this.visibleObjectives = visibleObjectives;
      +            this.decksTopReign = decksTopReign;
      +            matchStarted = true;
      +            sync.notifyAll();
      +        }
           }
      -
      -
           /**
      -     * Method that shows the user that the match has started
      +     * Method that shows the user that the match has started.
            */
           protected abstract void notifyMatchStarted();
       
      +    /**
      +     * Method that shows the user that the match has resumed.
      +     */
      +    protected abstract void notifyMatchResumed(boolean  drawPhase);
       
      +    /**
      +     * Receive the list of matches currently available
      +     * @param availableMatches the list of available matches
      +     */
           public void receiveAvailableMatches(List<AvailableMatch> availableMatches) {
               this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
               this.availableMatches = availableMatches;
           }
       
           /**
      -     * Give the user its initial card
      +     * Give the user its initial card.
            *
            * @param initialCard the player's initial card
            */
      @@ -258,7 +358,7 @@ public void giveInitialCard(InitialCard initialCard) {
       
       
           /**
      -     * Gives the player two secret objectives to choose from
      +     * Gives the player two secret objectives to choose from.
            *
            * @param secretObjectives the two objectives to choose from
            */
      @@ -267,7 +367,7 @@ public void giveSecretObjectives(Pair<Objective, Objective> secretObjectives) {
           }
       
           /**
      -     * Notifies other players that someone drew the initial card
      +     * Notifies other players that someone drew the initial card.
            *
            * @param someoneUsername Player who drew the initial
            * @param card            The card he drew
      @@ -276,14 +376,26 @@ public void someoneDrewInitialCard(String someoneUsername, InitialCard card) {
               if (this.username.equals(someoneUsername)) {
                   this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
               }
      -        this.clientBoards.get(someoneUsername).setInitial(card);
      +        new Thread( () -> {
      +            synchronized (sync) {
      +                while (!matchStarted) {
      +                    try {
      +                        sync.wait();
      +                    } catch (InterruptedException e) {
      +                        throw new RuntimeException(e);
      +                    }
      +                }
      +                this.clientBoards.get(someoneUsername).setInitial(card);
      +            }
      +        }).start();
           }
       
       
           /**
            * Effectively place the initial card on the player's board, on the right side. Note that the card
      -     * must have already been set
      +     * must have already been set.
            *
      +     * @param availableResources Currently available resources for the player
            * @param someoneUsername Player who chose the initial card's side
            * @param side            Chosen side
            */
      @@ -298,7 +410,7 @@ public void someoneSetInitialSide(String someoneUsername, Side side, Map<Symbol,
       
           /**
            * Notifies other players that someone is choosing the secret objective. They should not know from
      -     * which objective he is choosing, so they are not passed
      +     * which objective he is choosing, so they are not passed.
            *
            * @param someoneUsername Player who is choosing
            */
      @@ -307,7 +419,12 @@ public void someoneDrewSecretObjective(String someoneUsername) {
                   this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
               }
           }
      -
      +    
      +    /**
      +     * Changes the current player and updates last request's status to {@link RequestStatus#SUCCESSFUL}.
      +     * 
      +     * @param someoneUsername The player who chose the objective
      +     */
           public void someoneChoseSecretObjective(String someoneUsername) {
               if (this.username.equals(someoneUsername)) {
                   this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
      @@ -318,7 +435,7 @@ public void someoneChoseSecretObjective(String someoneUsername) {
       
           /**
            * Actually places a card on the player's board (so the Player tried to place a card and it was a
      -     * valid move)
      +     * valid move).
            *
            * @param someoneUsername    The player who made the move
            * @param coords             where he placed the card
      @@ -341,28 +458,24 @@ public void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coo
       
       
           /**
      -     * Handles the replacement of the last card drawn, and changes turn
      +     * Handles the replacement of the last card drawn, and changes turn.
            *
      -     * @param someoneUsername      Player who drew the card
      -     * @param source               From where he drew the card
      -     * @param card                 The card he drew
      -     * @param replacementCard      The replacement card, which will be null if the {@link DrawSource} is a
      -     *                             deck
      -     * @param replacementCardReign The replacement card's reign, which will be null if the
      -     *                             {@link DrawSource} is not a deck
      +     * @param someoneUsername Player who drew the card
      +     * @param source          From where he drew the card
      +     * @param card            The card he drew
      +     * @param replacementCard The replacement card, which will be null if the {@link DrawSource} is a
      +     *                        deck
      +     * @param deckTopReigns   Current deck top reigns
            */
           public void someoneDrewCard(String someoneUsername, DrawSource source, PlayableCard card, PlayableCard replacementCard,
      -                                Symbol replacementCardReign) {
      +                                Pair<Symbol, Symbol> deckTopReigns) {
               if (this.username.equals(someoneUsername)) {
                   this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
               }
      -        if (source.equals(DrawSource.GOLDS_DECK)) {
      -            this.decksTopReign = new Pair<Symbol, Symbol>(replacementCardReign, this.decksTopReign.second());
      -        } else if (source.equals(DrawSource.RESOURCES_DECK)) {
      -            this.decksTopReign = new Pair<Symbol, Symbol>(this.decksTopReign.first(), replacementCardReign);
      -        } else {
      +        if (!source.equals(DrawSource.GOLDS_DECK) && !source.equals(DrawSource.RESOURCES_DECK)) {
                   visiblePlayableCards.put(source, replacementCard);
               }
      +        this.decksTopReign = deckTopReigns;
       
               if (decksTopReign.first() == null && decksTopReign.second() == null && !this.lastTurn) {
                   this.lastTurn = true;
      @@ -374,15 +487,16 @@ public void someoneDrewCard(String someoneUsername, DrawSource source, PlayableC
           }
       
           /**
      -     * Notifies the player that this is the last turn he can play
      +     * Notifies the player that this is the last turn he can play.
            */
           public void notifyLastTurn() {
               this.lastTurn = true;
           }
       
           /**
      -     * Notifies the player that someone joined the lobby
      +     * Notifies the player that someone joined the lobby.
            *
      +     * @param joinedPlayers List of the players currently in the match
            * @param someoneUsername Player who joined
            */
           public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
      @@ -392,7 +506,7 @@ public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
           }
       
           /**
      -     * Notifies the player that someone quit the lobby
      +     * Notifies the player that someone quit the lobby.
            *
            * @param someoneUsername Player who quit
            */
      @@ -400,14 +514,14 @@ public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
       
       
           /**
      -     * Shows the player the match's leaderboard after the game ended
      +     * Shows the player the match's leaderboard after the game ended.
            *
            * @param ranking Ranking of players
            */
           public abstract void matchFinished(List<LeaderboardEntry> ranking);
       
           /**
      -     * Notifies that someone sent a broadcast text
      +     * Notifies that someone sent a broadcast text.
            *
            * @param someoneUsername Player who sent the text
            * @param text            Text he sent
      @@ -419,7 +533,7 @@ public void someoneSentBroadcastText(String someoneUsername, String text) {
           }
       
           /**
      -     * Notifies the player that someone sent him a private text
      +     * Notifies the player that someone sent him a private text.
            *
            * @param someoneUsername Player who sent the private text
            * @param text            Text he sent
      @@ -429,4 +543,10 @@ public void someoneSentPrivateText(String someoneUsername, String text) {
                   this.setLastRequestStatus(RequestStatus.SUCCESSFUL);
               }
           }
      +
      +    /**
      +     * Notify the client that the connection with the server
      +     * has been lost.
      +     */
      +    public abstract void notifyConnectionLost();
       }
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/LastRequest.java b/src/main/java/it/polimi/ingsw/client/frontend/LastRequest.java
      index febc20e4..051a3ab3 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/LastRequest.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/LastRequest.java
      @@ -3,16 +3,23 @@
       import it.polimi.ingsw.utils.RequestStatus;
       
       /**
      - * LastRequest
      + * Last request status. Used for synchronized methods
        */
      -
       public class LastRequest {
           private RequestStatus status;
       
      +    /**
      +     * Sets the status.
      +     * 
      +     * @param status The new status
      +     */
           public void setStatus(RequestStatus status) {
               this.status = status;
           }
      -
      +    
      +    /**
      +     * @return The last request's status.
      +     */
           public RequestStatus getStatus() {
               return this.status;
           }
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/MatchStatus.java b/src/main/java/it/polimi/ingsw/client/frontend/MatchStatus.java
      index 0e2eeff7..53f7b78d 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/MatchStatus.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/MatchStatus.java
      @@ -1,7 +1,16 @@
       package it.polimi.ingsw.client.frontend;
       
      +import it.polimi.ingsw.gamemodel.MatchState;
      +
      +/**
      + * Represents the current match macro-state from the client point of view.
      + * This is not supposed to substitute {@link MatchState}, but rather make it easier for clients
      + * to keep track of the current state of match, which is to say whether it's unused (LOBBY),
      + * in WaitState (WAIT_STATE) or being played (MATCH_STATE).
      + */
       public enum MatchStatus {
           LOBBY,
           WAIT_STATE,
      -    MATCH_STATE
      +    MATCH_STATE,
      +    FINAL_STATE
       }
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/GraphicalApplication.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/GraphicalApplication.java
      index 9896a7ca..dd55e971 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/GraphicalApplication.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/GraphicalApplication.java
      @@ -10,16 +10,31 @@
       import javafx.stage.Stage;
       import java.io.IOException;
       
      +/**
      + * Class from which the FXML application is run, so it's entry point for the user.
      + * Apart from making use of FXML instances and methods, it interacts massively with {@link GraphicalViewGUI}.
      + */
       public class GraphicalApplication extends Application {
           private GraphicalViewGUI view;
           private Stage primaryStage;
      +    // Window size
           public static double screenWidth = 1920.0;
           public static double screenHeight = 1020.0;
       
      +    /**
      +     * Launch the application
      +     * @param args args
      +     */
           public static void main(String[] args) {
               launch(args);
           }
       
      +    /**
      +     * Default method to start the FXML application, it can be called only from this class main(...).
      +     *
      +     * @param primaryStage The stage to be opened
      +     * @throws IOException If there has been an I/O error.
      +     */
           @Override
           public void start(Stage primaryStage) throws IOException {
               this.primaryStage = primaryStage;
      @@ -35,7 +50,7 @@ public void start(Stage primaryStage) throws IOException {
               Scene connectionScene = new Scene(root, screenWidth, screenHeight);
               // Show the window
       
      -        /*
      +        /* Disabled by default
               // Fullscreen
               primaryStage.setFullScreen(true);
               primaryStage.setMaximized(true);
      @@ -50,7 +65,6 @@ public void start(Stage primaryStage) throws IOException {
                       Platform.exit();
                       System.exit(0);
                   });
      -
           }
       
       
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/GraphicalViewGUI.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/GraphicalViewGUI.java
      index f91aead0..f43415a7 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/GraphicalViewGUI.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/GraphicalViewGUI.java
      @@ -1,27 +1,29 @@
       package it.polimi.ingsw.client.frontend.gui;
       
      +import java.io.IOException;
      +import java.rmi.RemoteException;
      +import java.util.HashMap;
      +import java.util.List;
      +import java.util.Map;
      +import it.polimi.ingsw.client.frontend.ClientBoard;
       import it.polimi.ingsw.client.frontend.GraphicalView;
       import it.polimi.ingsw.client.frontend.MatchStatus;
       import it.polimi.ingsw.client.frontend.ShownCard;
       import it.polimi.ingsw.client.frontend.gui.controllers.*;
      -import it.polimi.ingsw.controllers.PlayerController;
      +import it.polimi.ingsw.client.frontend.gui.nodes.CardView;
       import it.polimi.ingsw.gamemodel.*;
       import it.polimi.ingsw.utils.*;
       import javafx.application.Application;
       import javafx.application.Platform;
       import javafx.fxml.FXMLLoader;
      -import javafx.scene.Parent;
       import javafx.scene.Scene;
       import javafx.scene.layout.StackPane;
      -import javafx.scene.layout.VBox;
       import javafx.stage.Modality;
       import javafx.stage.Stage;
       
      -import java.io.IOException;
      -import java.util.HashMap;
      -import java.util.List;
      -import java.util.Map;
      -
      +/**
      + * JavaFX implementation of Codex Naturalis client
      + */
       public class GraphicalViewGUI extends GraphicalView {
           private final Stage stage;
           // Controllers
      @@ -40,6 +42,10 @@ public class GraphicalViewGUI extends GraphicalView {
           private List<AvailableMatch> lastAvailableMatches;
           private Integer maxPlayers;
       
      +    /**
      +     * Initialize on a given JavaFX stage
      +     * @param stage the main stage of the application
      +     */
           public GraphicalViewGUI(Stage stage) {
               this.stage = stage;
           }
      @@ -89,9 +95,27 @@ public void joinMatch(String matchName) {
       
           @Override
           protected void notifyMatchStarted() {
      +        this.setupMatch(false, false);
      +    }
      +
      +    @Override
      +    protected void notifyMatchResumed(boolean drawPhase) {
      +        this.setupMatch(true, drawPhase);
      +    }
      +
      +    /**
      +     * Set match scene and populate elements on match start
      +     * @param matchResumed if the match is resumed
      +     */
      +    private void setupMatch(boolean matchResumed, boolean drawPhase) {
               matchState = MatchStatus.MATCH_STATE;
               Platform.runLater(() -> {
                   try {
      +                if (waitingSceneController == null) {
      +                    waitingSceneController = new WaitingSceneController();
      +                    waitingSceneController.setGraphicalView(this);
      +                    waitingSceneController.setStage(stage);
      +                }
                       matchSceneController = waitingSceneController.showMatch();
                   } catch (IOException e) {
                       throw new RuntimeException(e);
      @@ -100,7 +124,6 @@ protected void notifyMatchStarted() {
                   matchSceneController.setObjectives(super.visibleObjectives);
                   // Set visible draw sources
                   super.visiblePlayableCards.forEach((drawSource, playableCard) -> {
      -                System.out.println(drawSource + ": " + playableCard.getId());
                       matchSceneController.setDrawSource(drawSource, playableCard, playableCard.getReign());
                   });
                   matchSceneController.setDrawSource(DrawSource.GOLDS_DECK, null, super.decksTopReign.first());
      @@ -131,9 +154,52 @@ protected void notifyMatchStarted() {
       
                   // By default, disable draw sources interactions
                   matchSceneController.enableDrawSourcesInteractions(false);
      +            if (matchResumed) this.setupResumedMatch(drawPhase);
               });
           }
       
      +    /**
      +     * Populate extra elements after match resumed
      +     */
      +    private void setupResumedMatch(boolean drawPhase) {
      +        playerTabControllers.forEach(((username, playerTabController) -> {
      +            ClientBoard playerBoard = clientBoards.get(username);
      +            playerTabController.setSecretObjective(playerBoard.getObjective());
      +
      +            // Place the initial card
      +            playerTabController.getBoard().addCard(new Pair<>(0, 0), (InitialCard) playerBoard.getPlaced().get(0).card(), playerBoard.getPlaced().get(0).side());
      +
      +            // Place all the other cards
      +            Map<Integer, ShownCard> placed = playerBoard.getPlaced();
      +            for (Integer turn : placed.keySet()) {
      +                if (turn > 0) {
      +                    playerTabController.getBoard().addCard(placed.get(turn).coords(), (PlayableCard) placed.get(turn).card(), placed.get(turn).side());
      +                }
      +            }
      +
      +            // Set points and available resources
      +            playerTabController.setPoints(playerBoard.getPoints());
      +            matchSceneController.plateauPane.setPoints(username, playerBoard.getPoints());
      +            playerTabController.setResources(playerBoard.getAvailableResources());
      +        }));
      +
      +        // Enable interactions if it is the current user turn
      +        this.changePlayer();
      +        if (currentPlayer.equals(username)) {
      +            if (!drawPhase) {
      +                this.makeMove();
      +                playerTabControllers.get(username).enablePlaceCardInteractions(true);
      +            } else {
      +                // Draw interactions
      +                // Set focus on the table
      +                matchSceneController.setFocusToTable();
      +                matchSceneController.setStateTitle("Draw a card");
      +                // Enable draw sources interactions
      +                matchSceneController.enableDrawSourcesInteractions(true);
      +            }
      +        }
      +    }
      +
           @Override
           public void giveInitialCard(InitialCard initialCard) {
               super.giveInitialCard(initialCard);
      @@ -167,7 +233,8 @@ public void someoneSetInitialSide(String someoneUsername, Side side, Map<Symbol,
                   PlayerTabController playerTabController = playerTabControllers.get(someoneUsername);
                   playerTabController.removePlayerChoiceContainer();
                   InitialCard card = super.clientBoards.get(someoneUsername).getInitialCard();
      -            playerTabController.getBoard().addCard(new Pair<>(0, 0), card, side);
      +            CardView initial = playerTabController.getBoard().addCard(new Pair<>(0, 0), card, side);
      +            initial.setToken(Color.values()[players.indexOf(someoneUsername)]);
               });
           }
       
      @@ -237,9 +304,12 @@ public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
           @Override
           public void someoneQuit(String someoneUsername) {
               if (matchState.equals(MatchStatus.WAIT_STATE)) {
      -            Platform.runLater(() -> {waitingSceneController.removePlayer(someoneUsername);});
      -        } else {
      -            notifyError(new Exception("Someone Quit"));
      +            Platform.runLater(() -> {
      +                waitingSceneController.removePlayer(someoneUsername);
      +                waitingSceneController.setCurrentPlayers(waitingSceneController.getCurrentPlayers()-1);
      +            });
      +        } else if (networkHandler.isConnected() && !matchState.equals(MatchStatus.FINAL_STATE)) {
      +            notifyError("Player Quit", "Match finished because " + someoneUsername + " quit");
               }
           }
       
      @@ -247,6 +317,7 @@ public void someoneQuit(String someoneUsername) {
           public void matchFinished(List<LeaderboardEntry> ranking) {
               Platform.runLater(() -> {
                   try {
      +                matchState = MatchStatus.FINAL_STATE;
                       rankingSceneController = matchSceneController.showRankingScene();
                       ranking.forEach((entry) -> {
                           if (entry.username().equals(this.username)) {
      @@ -307,12 +378,16 @@ public void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coo
       
           @Override
           public void someoneDrewCard(String someoneUsername, DrawSource source, PlayableCard card, PlayableCard replacementCard,
      -                                Symbol replacementCardReign) {
      -        super.someoneDrewCard(someoneUsername, source, card, replacementCard, replacementCardReign);
      +                                Pair<Symbol, Symbol> deckTopReigns) {
      +        super.someoneDrewCard(someoneUsername, source, card, replacementCard, deckTopReigns);
               Platform.runLater(() -> {
                   PlayerTabController tab = playerTabControllers.get(someoneUsername);
                   tab.setHandCards(clientBoards.get(someoneUsername).getHand());
      -            matchSceneController.setDrawSource(source, replacementCard, replacementCardReign);
      +            if (!source.equals(DrawSource.GOLDS_DECK) && !source.equals(DrawSource.RESOURCES_DECK)) {
      +                matchSceneController.setDrawSource(source, replacementCard, replacementCard.getReign());
      +            }
      +            matchSceneController.setDrawSource(DrawSource.GOLDS_DECK, null, deckTopReigns.first());
      +            matchSceneController.setDrawSource(DrawSource.RESOURCES_DECK, null, deckTopReigns.second());
       
                   // If the player that drew a card is this client, disable draw source interactions
                   if (someoneUsername.equals(this.username)) {
      @@ -326,8 +401,15 @@ public void someoneDrewCard(String someoneUsername, DrawSource source, PlayableC
       
           @Override
           public void notifyError(Exception exception) {
      -        System.out.println(exception.getMessage());
      +        this.notifyError(GuiUtil.getExceptionTitle(exception), exception.getMessage());
      +    }
       
      +    /**
      +     * Notify an error
      +     * @param title title of the error
      +     * @param description description of the error
      +     */
      +    public void notifyError(String title, String description) {
               Platform.runLater(() -> {
                   try {
                       // Load the error node from the fxml file
      @@ -341,7 +423,9 @@ public void notifyError(Exception exception) {
       
                       // Initialize attributes
                       GuiUtil.applyCSS(root, "/css/style.css");
      -                controller.setErrror(exception);
      +                controller.setTitle(title);
      +                controller.setText(description);
      +
                       dialog.setScene(errorScene);
                       dialog.setTitle("Error");
                       dialog.initOwner(this.stage);
      @@ -359,30 +443,68 @@ public void notifyError(Exception exception) {
       
           public void setUsername(String username) {
               this.username = username;
      -        networkView.setUsername(username);
      +        networkHandler.setUsername(username);
           }
       
      +    /**
      +     * Getter for the client username
      +     * @return client username
      +     */
           public String getUsername() {
               return username;
           }
       
      +    /**
      +     * Request available matches to the server
      +     */
           public void getAvailableMatches() {
               this.setLastRequestStatus(RequestStatus.PENDING);
      -        this.networkView.getAvailableMatches();
      +        this.networkHandler.getAvailableMatches();
           }
       
      +    @Override
           public void receiveAvailableMatches(List<AvailableMatch> availableMatches) {
               super.receiveAvailableMatches(availableMatches);
               lastAvailableMatches = availableMatches;
               Platform.runLater(() -> lobbySceneController.updateMatches(availableMatches));
           }
       
      +    /**
      +     * Set the lobby scene controller
      +     * @param lobbySceneController controller of the lobby scene
      +     */
           public void setLobbySceneController(LobbySceneController lobbySceneController) {
               this.lobbySceneController = lobbySceneController;
               this.getAvailableMatches();
           }
       
      +    /**
      +     * Main class to launch the applicaiton
      +     * @param args command line arguments
      +     */
           public static void main(String[] args) {
               Application.launch(GraphicalApplication.class, args);
           }
      -}
      \ No newline at end of file
      +
      +    @Override
      +    public void notifyConnectionLost() {
      +        notifyError(new RemoteException("Connection to the server lost"));
      +        RankingSceneController r = new RankingSceneController();
      +            Platform.runLater(() -> {
      +                try {
      +                    r.setStage(stage);
      +                    r.setGraphicalView(this);
      +                    r.showConnectionScene();
      +                } catch (IOException e) {
      +                    throw new RuntimeException(e);
      +                }
      +            });
      +    }
      +
      +    /**
      +     * Request disconnection from the network
      +     */
      +    public void disconnect() {
      +        networkHandler.disconnect();
      +    }
      +}
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ChatPaneController.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ChatPaneController.java
      index f6e83b12..99ed1e5e 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ChatPaneController.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ChatPaneController.java
      @@ -8,6 +8,7 @@
       import javafx.scene.control.TextField;
       import javafx.scene.image.Image;
       import javafx.scene.image.ImageView;
      +import javafx.scene.input.KeyCode;
       import javafx.scene.layout.HBox;
       import javafx.scene.layout.VBox;
       import javafx.scene.text.Text;
      @@ -16,7 +17,9 @@
       
       import java.util.*;
       
      -// TODO: to finish implementation
      +/**
      + * JavaFX controller for the chat pane
      + */
       public class ChatPaneController extends SceneController {
           @FXML
           private Button sendMessageBtn;
      @@ -59,19 +62,12 @@ public void initialize() {
       
               // Send message written in input box on send message button clicked
               sendMessageBtn.setOnMouseClicked(mouseEvent -> {
      -            String inputText = chatInputText.getText();
      -            String selectedChatName = chatSelector.getSelectionModel().getSelectedItem();
      -
      -            if (!inputText.isBlank()) {
      -                if (selectedChatName.equals("broadcast")) {
      -                    super.view.sendBroadcastText(inputText);
      -                } else {
      -                    super.view.sendPrivateText(selectedChatName, inputText);
      -                    unconfirmedPrivateMessagesReceivers.offer(selectedChatName);
      -                }
      +            this.submitMessage();
      +        });
      +        chatInputText.setOnKeyPressed(keyEvent -> {
      +            if (keyEvent.getCode() == KeyCode.ENTER)  {
      +                this.submitMessage();
                   }
      -
      -            chatInputText.clear();
               });
       
               // Switch to chat when a chatSelector item is clicked
      @@ -84,6 +80,25 @@ public void initialize() {
               });
           }
       
      +    /**
      +     * Submit a message written in the chat. Calls the network and
      +     * clears the input field
      +     */
      +    private void submitMessage() {
      +        String inputText = chatInputText.getText();
      +        String selectedChatName = chatSelector.getSelectionModel().getSelectedItem();
      +
      +        if (!inputText.isBlank()) {
      +            if (selectedChatName.equals("broadcast")) {
      +                super.view.sendBroadcastText(inputText);
      +            } else {
      +                super.view.sendPrivateText(selectedChatName, inputText);
      +                unconfirmedPrivateMessagesReceivers.offer(selectedChatName);
      +            }
      +        }
      +
      +        chatInputText.clear();
      +    }
           /**
            * Adds a player to the chat.
            *
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ConnectionSceneController.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ConnectionSceneController.java
      index 3fe6e9ee..f6031581 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ConnectionSceneController.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ConnectionSceneController.java
      @@ -1,9 +1,14 @@
       package it.polimi.ingsw.client.frontend.gui.controllers;
       
      +import java.io.IOException;
      +import java.rmi.RemoteException;
      +import java.util.ArrayList;
      +import java.util.List;
       import it.polimi.ingsw.client.frontend.gui.GraphicalApplication;
      -import it.polimi.ingsw.client.network.NetworkView;
      -import it.polimi.ingsw.client.network.NetworkViewRMI;
      -import it.polimi.ingsw.client.network.NetworkViewTCP;
      +import it.polimi.ingsw.client.frontend.gui.nodes.CardView;
      +import it.polimi.ingsw.client.network.NetworkHandler;
      +import it.polimi.ingsw.client.network.NetworkHandlerRMI;
      +import it.polimi.ingsw.client.network.NetworkHandlerTCP;
       import it.polimi.ingsw.gamemodel.Color;
       import it.polimi.ingsw.utils.AvailableMatch;
       import it.polimi.ingsw.utils.GuiUtil;
      @@ -17,11 +22,6 @@
       import javafx.scene.layout.StackPane;
       import javafx.scene.layout.VBox;
       
      -import java.io.IOException;
      -import java.rmi.RemoteException;
      -import java.util.ArrayList;
      -import java.util.List;
      -
       /**
        * Controller for the connection scene
        */
      @@ -56,19 +56,19 @@ private void connect() {
               if (debuggingKeys()) {
                   return;
               }
      -        NetworkView networkHandler = null;
      +        NetworkHandler networkHandler = null;
               if (TCPButton.isSelected()) {
                   try {
      -                networkHandler = new NetworkViewTCP(view, serverAddress.getText(), Integer.valueOf(serverPort.getText()));
      -                view.setNetworkInterface(networkHandler);
      +                networkHandler = new NetworkHandlerTCP(view, serverAddress.getText(), Integer.valueOf(serverPort.getText()));
      +                view.setNetworkHandler(networkHandler);
                       showLobby();
                   } catch (Exception e) {
                       view.notifyError(new RemoteException("Cannot connect to the server!"));
                   }
               } else {
                   try {
      -                networkHandler = new NetworkViewRMI(view, serverAddress.getText(), Integer.parseInt(serverPort.getText()));
      -                view.setNetworkInterface(networkHandler);
      +                networkHandler = new NetworkHandlerRMI(view, serverAddress.getText(), Integer.parseInt(serverPort.getText()));
      +                view.setNetworkHandler(networkHandler);
                       showLobby();
                   } catch (Exception e) {
                       view.notifyError(e);
      @@ -130,11 +130,12 @@ private boolean debuggingKeys() {
                       controller.addPlayerTab("Oingo", Color.RED);
                       PlayerTabController controller1 = controller.addPlayerTab("Boingo", Color.BLUE);
                       controller1.setCurrentPlayer(true);
      +                CardView cardView = new CardView();
                       ChatPaneController chatPaneController = controller.getChatPane();
                       chatPaneController.addPlayer("Oingo");
      -                chatPaneController.receiveBroadcastMessage("Oingo", "JOfasdfasdf");
      -                chatPaneController.receiveBroadcastMessage("Oingo", "JOdfafasdfasdf");
      -                chatPaneController.receiveBroadcastMessage("Oingo", "dfsiooisfd 8fdsd");
      +                controller.setPlateauPoints("Boingo", 3);
      +                controller.setPlateauPoints("Oingo", 3);
      +
                   } catch (Exception e) {
                       throw new RuntimeException(e);
                   }
      @@ -148,6 +149,10 @@ private boolean debuggingKeys() {
                       GuiUtil.applyCSS(root, "/css/style.css");
                       LobbySceneController controller = (LobbySceneController) root.getProperties().get("Controller");
                       List<AvailableMatch> matches = new ArrayList<>();
      +                matches.add(new AvailableMatch("New", 3, 2, true));
      +                matches.add(new AvailableMatch("New2", 3, 3, false));
      +                matches.add(new AvailableMatch("New3", 0, 3, false));
      +                controller.updateMatches(matches);
                       Scene lobbyScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
                       stage.setScene(lobbyScene);
       
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ErrorSceneController.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ErrorSceneController.java
      index 4c4a0214..d0a44fa3 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ErrorSceneController.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/ErrorSceneController.java
      @@ -7,7 +7,11 @@
       
       import java.io.IOException;
       
      +/**
      + * Controller of the error scene window
      + */
       public class ErrorSceneController extends SceneController {
      +    // Window dimensions
           public static double windowWidth = 500;
           public static double windowHeight = 200;
           public Text errorTitle;
      @@ -20,10 +24,26 @@ public void initialize() throws IOException {
       
           }
       
      +    /**
      +     * Set the text of the error that is shown in the bottom
      +     * @param text text of the error
      +     */
           public void setText(String text) {
               errorText.setText(text);
           }
       
      +    /**
      +     * Set the title of the error that is shown on the top
      +     * @param title text of the title
      +     */
      +    public void setTitle(String title) {
      +        errorTitle.setText(title);
      +    }
      +
      +    /**
      +     * Show an error from an exception
      +     * @param e exception
      +     */
           public void setErrror(Exception e) {
               errorTitle.setText(GuiUtil.getExceptionTitle(e));
               errorText.setText(e.getMessage());
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/LobbySceneController.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/LobbySceneController.java
      index 3df002fd..8bc3f4c1 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/LobbySceneController.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/LobbySceneController.java
      @@ -2,6 +2,7 @@
       
       import it.polimi.ingsw.client.frontend.gui.GraphicalApplication;
       import it.polimi.ingsw.exceptions.WrongInputFormatException;
      +import it.polimi.ingsw.gamemodel.Color;
       import it.polimi.ingsw.utils.AvailableMatch;
       import it.polimi.ingsw.utils.GuiUtil;
       import javafx.fxml.FXML;
      @@ -9,6 +10,7 @@
       import javafx.scene.Scene;
       import javafx.scene.control.*;
       import javafx.scene.layout.*;
      +import javafx.scene.shape.Circle;
       
       import java.io.IOException;
       import java.util.List;
      @@ -65,6 +67,11 @@ public void initializePostController() {
               matchNumberContainer.getChildren().forEach((button) -> {((RadioButton) button).setToggleGroup(matchNumberToggle);});
           }
       
      +    /**
      +     * Show the wait scene
      +     * @return the wait scene controller
      +     * @throws IOException in case of file error
      +     */
           public WaitingSceneController showWaitScene() throws IOException {
               StackPane root = loadScene("/fxml/waiting.fxml");
               GuiUtil.applyCSS(root, "/css/match.css");
      @@ -92,7 +99,7 @@ public void updateMatches(List<AvailableMatch> matchList) {
                   matchContainer.getChildren().add(emptyLabel);
               }
               for (AvailableMatch m : matchList) {
      -            addMatchCard(m.name(), m.currentPlayers(), m.maxPlayers());
      +            addMatchCard(m.name(), m.currentPlayers(), m.maxPlayers(), m.isRejoinable());
               }
           }
       
      @@ -101,15 +108,26 @@ public void updateMatches(List<AvailableMatch> matchList) {
            * @param name name of the match
            * @param players current amount of players
            * @param maxPlayers maximum number of players allowed in the match
      +     * @param isRejoinable if the match is rejoinable
            */
      -    public void addMatchCard(String name, int players, int maxPlayers) {
      +    public void addMatchCard(String name, int players, int maxPlayers, boolean isRejoinable) {
      +        Color c;
      +        if (isRejoinable) {
      +            c = Color.YELLOW;
      +        } else if (maxPlayers == players) {
      +            c = Color.RED;
      +        } else {
      +            c = Color.GREEN;
      +        }
      +
      +
               HBox matchCard = new HBox();
               matchCard.getStyleClass().add("lobby-card");
               matchCard.getStyleClass().add("lobby-card-" + matchContainer.getChildren().size()%2);
               matchCard.setAlignment(Pos.CENTER);
       
               RadioButton button = new RadioButton();
      -        button.setDisable(players == maxPlayers);
      +        button.setDisable(players == maxPlayers && !isRejoinable);
               button.setAlignment(Pos.CENTER);
               button.getStyleClass().add("radio");
               button.getStyleClass().add("lobby-radio");
      @@ -127,10 +145,20 @@ public void addMatchCard(String name, int players, int maxPlayers) {
               HBox.setHgrow(spacer, Priority.ALWAYS);
               matchCard.getChildren().add(spacer);
       
      +
      +        // Match status indicator
      +        Circle status = new Circle();
      +        spacer = new Pane();
      +        spacer.setPrefWidth(3);
      +        status.setFill(javafx.scene.paint.Color.web(GuiUtil.getHexFromColor(c)));
      +        status.setRadius(16);
      +        // Players label
               Label playerLabel = new Label(players + "/" + maxPlayers);
               playerLabel.setAlignment(Pos.CENTER);
               playerLabel.getStyleClass().add("lobby-title");
               matchCard.getChildren().add(playerLabel);
      +        matchCard.getChildren().add(spacer);
      +        matchCard.getChildren().add(status);
       
               Pane spacer2 = new Pane();
               spacer2.setPrefWidth(5);
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/MatchSceneController.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/MatchSceneController.java
      index 85ea6db1..19a746f6 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/MatchSceneController.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/MatchSceneController.java
      @@ -24,6 +24,9 @@
       import java.util.HashMap;
       import java.util.Map;
       
      +/**
      + * JavaFX controller of the match scene
      + */
       public class MatchSceneController extends SceneController {
           public Tab tableTab;
           public Label stateTitle;
      @@ -67,6 +70,13 @@ public void initializePostController() throws IOException {
               matchPane.getChildren().add(chatPane);
           }
       
      +    /**
      +     * Add the tab of the given player
      +     * @param username username of the player
      +     * @param color color of the player
      +     * @return controller of the created player tab
      +     * @throws IOException if there are file errors
      +     */
           public PlayerTabController addPlayerTab(String username, Color color) throws IOException {
               // Load the tab
               FXMLLoader loader = GuiUtil.getLoader("/fxml/player_tab.fxml");
      @@ -124,6 +134,11 @@ public void setPlateauPoints(String username, int points) {
               this.plateauPane.setPoints(username, points);
           }
       
      +    /**
      +     * Show the ranking scene on match end
      +     * @return ranking scene controller
      +     * @throws IOException on file errors
      +     */
           public RankingSceneController showRankingScene() throws IOException {
               StackPane root = loadScene("/fxml/ranking.fxml");
               Scene rankingScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
      @@ -132,6 +147,10 @@ public RankingSceneController showRankingScene() throws IOException {
               return (RankingSceneController) root.getProperties().get("Controller");
           }
       
      +    /**
      +     * Get the chat pane controller
      +     * @return the chat pane controller
      +     */
           public ChatPaneController getChatPane() {
               return (ChatPaneController) chatPane.getProperties().get("Controller");
           }
      @@ -165,6 +184,10 @@ public void enableDrawSourcesInteractions(boolean enable) {
               fourthVisible.setDisable(!enable);
           }
       
      +    /**
      +     * Set the current state title to express an action while playing
      +     * @param text title
      +     */
           public void setStateTitle(String text) {
               stateTitle.setText(text);
           }
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController.java
      index 3a5749b0..89b5cdea 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/PlayerTabController.java
      @@ -28,6 +28,9 @@
       import java.util.List;
       import java.util.Map;
       
      +/**
      + * Controller of the player tab
      + */
       public class PlayerTabController extends SceneController {
           public HBox handCards;
           @FXML
      @@ -58,11 +61,6 @@ public void initialize() {
               setResources(res);
           }
       
      -    @Override
      -    public void initializePostController() {
      -
      -    }
      -
           /**
            * Set the displayed resources
            *
      @@ -94,6 +92,10 @@ public void placeCard(Pair<Integer, Integer> coords, PlayableCard card, Side sid
               playerBoard.addCard(coords, card, side);
           }
       
      +    /**
      +     * Set the amount of points that the player has
      +     * @param points amount of points
      +     */
           public void setPoints(int points) {
               pointsCounter.setText("Points: " + points);
           }
      @@ -114,6 +116,7 @@ private void initializeHandCard(CardView card) {
                   content.putString("");
                   dragboard.setContent(content);
                   // Set the card as image of the dragboard
      +            card.setArc(0);
                   dragboard.setDragView(card.snapshot(null, null));
                   dragboard.setDragViewOffsetX(CardView.cardWidth / 2);
                   dragboard.setDragViewOffsetY(CardView.cardHeight / 2);
      @@ -124,6 +127,7 @@ private void initializeHandCard(CardView card) {
               });
               card.setOnDragDone(event -> {
                   this.removeDragAreas();
      +            card.setArc(20);
                   card.setVisible(true);
                   card.setCursor(Cursor.DEFAULT);
                   event.consume();
      @@ -133,6 +137,13 @@ private void initializeHandCard(CardView card) {
                       Side side = (Side) card.getProperties().get("Side");
                       Side newSide = side.equals(Side.BACK) ? Side.FRONT : Side.BACK;
                       card.setCard((PlayableCard) card.getProperties().get("Card"), newSide);
      +            } else if (clickEvent.getButton() == MouseButton.MIDDLE) {
      +                // Compatibility with Hyprland
      +                if (this.temporaryDragAreas.size() > 0) {
      +                    this.removeDragAreas();
      +                } else {
      +                    this.createDragArea((PlayableCard) card.getProperties().get("Card"), (Side) card.getProperties().get("Side"));
      +                }
                   }
               });
           }
      @@ -193,6 +204,14 @@ private void showDragArea(Pair<Integer, Integer> pcoords, PlayableCard card, Sid
                   view.playCard(pcoords, card, side);
                   event.consume();
               });
      +        dragArea.setOnMouseClicked(event -> {
      +            if (event.getButton().equals(MouseButton.PRIMARY)) {
      +                this.removeDragAreas();
      +                // Play the card
      +                view.playCard(pcoords, card, side);
      +                event.consume();
      +            }
      +        });
       
               // When you enter the area change style
               dragArea.setOnDragEntered(event -> {
      @@ -252,7 +271,6 @@ public void giveInitialCard(InitialCard card) {
               CardView front = new CardView(card, Side.FRONT);
               CardView back = new CardView(card, Side.BACK);
               createCardChoiceContainer(front, back);
      -        // TODO define what to do on mouse click
               front.setCursor(Cursor.HAND);
               front.setOnMouseClicked((e) -> {
                   view.chooseInitialCardSide(Side.FRONT);
      @@ -274,6 +292,9 @@ public void someoneDrewInitialCard(InitialCard card) {
               createCardChoiceContainer(front, back);
           }
       
      +    /**
      +     * Remove the container that asks for initials card, objective cards..
      +     */
           public void removePlayerChoiceContainer() {
               rootPane.getChildren().remove(actionContainer);
               stateTitle.setText("");
      @@ -300,11 +321,19 @@ private void createCardChoiceContainer(CardView front, CardView back) {
               StackPane.setAlignment(actionContainer, Pos.CENTER);
           }
       
      +    /**
      +     * Set the player username
      +     * @param username username of the player
      +     */
           public void setUsername(String username) {
               this.username = username;
               playerTab.getProperties().put("Username", username);
           }
       
      +    /**
      +     * Get the Board Pane of the player
      +     * @return the board pane
      +     */
           public BoardPane getBoard() {
               return playerBoard;
           }
      @@ -326,6 +355,10 @@ public void setSecretObjective(Objective objective) {
               rootPane.getChildren().add(secretObjective);
           }
       
      +    /**
      +     * Set state title, usually used to tell the player what to do
      +     * @param title text of the title
      +     */
           public void setStateTitle(String title) {
               this.stateTitle.setText(title);
           }
      @@ -343,6 +376,10 @@ public void setHandCards(List<PlayableCard> cards) {
               }
           }
       
      +    /**
      +     * Set if the player is the current one
      +     * @param current if the player is current
      +     */
           public void setCurrentPlayer(boolean current) {
               if (current) {
                   playerTab.getStyleClass().add("player-tab");
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/RankingSceneController.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/RankingSceneController.java
      index 9f490cb6..9c1600bb 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/RankingSceneController.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/RankingSceneController.java
      @@ -1,24 +1,42 @@
       package it.polimi.ingsw.client.frontend.gui.controllers;
       
      +import it.polimi.ingsw.client.frontend.gui.GraphicalApplication;
      +import it.polimi.ingsw.client.frontend.gui.GraphicalViewGUI;
      +import it.polimi.ingsw.utils.GuiUtil;
       import it.polimi.ingsw.utils.LeaderboardEntry;
       import javafx.geometry.Pos;
      +import javafx.scene.Scene;
      +import javafx.scene.control.Button;
       import javafx.scene.control.Label;
       import javafx.scene.layout.StackPane;
       import javafx.scene.layout.VBox;
       
       import java.io.IOException;
       
      +/**
      + * JavaFX Controller of the ranking scene, shows the leaderboard after the match is finished
      + */
       public class RankingSceneController extends SceneController {
       
           public VBox leaderboardContainer;
           public static double tableSize = 700;
           public Label victoryLabel;
      +    public Button playAgainButton;
       
           @Override
           public void initialize() throws IOException {
       
           }
       
      +    @Override
      +    public void initializePostController() {
      +        playAgainButton.setOnAction(event -> {
      +            try {
      +                showConnectionScene();
      +            } catch (IOException e) {}
      +        });
      +    }
      +
           /**
            * Add an entry to the graphical leaderboard
            * @param entry the entry
      @@ -62,4 +80,18 @@ public void setVictory(boolean victory) {
               }
           }
       
      +    /**
      +     * Show the connection scene
      +     * @throws IOException in case of file errors
      +     */
      +    public void showConnectionScene() throws IOException {
      +        view.disconnect();
      +        view = new GraphicalViewGUI(stage);
      +        StackPane root = this.loadScene("/fxml/connection.fxml");
      +        // Add stylesheet
      +        GuiUtil.applyCSS(root, "/css/style.css");
      +        // Create the connection scene
      +        Scene connectionScene = new Scene(root, GraphicalApplication.screenWidth, GraphicalApplication.screenHeight);
      +        stage.setScene(connectionScene);
      +    }
       }
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/SceneController.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/SceneController.java
      index a7168276..eeea7d58 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/SceneController.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/SceneController.java
      @@ -8,6 +8,9 @@
       
       import java.io.IOException;
       
      +/**
      + * JavaFX controller of a scene
      + */
       public abstract class SceneController {
           protected GraphicalViewGUI view;
           protected Stage stage;
      @@ -19,12 +22,24 @@ public abstract class SceneController {
           public void initializePostController() throws IOException{
           }
       
      +    /**
      +     * This method is run when the controller is initialized
      +     * @throws IOException if there is a file error
      +     */
           public abstract void initialize() throws IOException;
       
      +    /**
      +     * Set the graphical view for the controller
      +     * @param view graphical view
      +     */
           public void setGraphicalView(GraphicalViewGUI view) {
               this.view = view;
           }
       
      +    /**
      +     * Set the main stage the controller is in
      +     * @param stage JavaFX stage
      +     */
           public void setStage(Stage stage) {
               this.stage = stage;
           }
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/WaitingSceneController.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/WaitingSceneController.java
      index 932c6fdf..eb1f02d4 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/WaitingSceneController.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/controllers/WaitingSceneController.java
      @@ -10,6 +10,10 @@
       import java.io.IOException;
       import java.util.HashMap;
       
      +/**
      + * JavaFX controller for the waiting scene. It shows all the current players
      + * waiting for the match to start
      + */
       public class WaitingSceneController extends SceneController {
       
           public Label matchName;
      @@ -63,9 +67,19 @@ public void setMaxPlayers(int players) {
           public void setCurrentPlayers(int players) {
               this.players = players;
               updateLabel();
      +    }
       
      +    /**
      +     * Get the amount of current players
      +     * @return the amount of current players in the match
      +     */
      +    public int getCurrentPlayers() {
      +        return players;
           }
       
      +    /**
      +     * Update the players count, match name and max players
      +     */
           public void updateLabel() {
               matchName.setText(name + " " + players + "/" + maxPlayers);
           }
      @@ -80,6 +94,11 @@ public void removePlayer(String username) {
               }
           }
       
      +    /**
      +     * Show the match scene when the match is started
      +     * @return the match scene controller
      +     * @throws IOException if there was a file error
      +     */
           public MatchSceneController showMatch() throws IOException {
               VBox root = loadScene("/fxml/match.fxml");
               GuiUtil.applyCSS(root, "/css/match.css");
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/BoardPane.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/BoardPane.java
      index bd5f7f77..f8665bea 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/BoardPane.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/BoardPane.java
      @@ -14,13 +14,21 @@
       import java.util.ArrayList;
       import java.util.List;
       
      -
      +/**
      + * Game board, manages card display
      + */
       public class BoardPane extends Pane {
      +    // Card dimensions
           public static double cardWidth = CardView.cardWidth;
           public static double cardHeight = CardView.cardHeight;
           public static double cardBorderW = 44.8;
           public static double cardBorderH = 52.6;
      +    // Currently placed cards
           public List<Pair<Integer, Integer>> takenSpots = new ArrayList<>();
      +
      +    /**
      +     * Constructor of BoardPane
      +     */
           public BoardPane() {
               super();
           }
      @@ -43,12 +51,14 @@ public void addCard(Pair<Integer, Integer> position, PlayableCard card, Side sid
            * @param position relative coordinates of the card
            * @param card card to add
            * @param side side of the card to add
      +     * @return the added CardView
            */
      -    public void addCard(Pair<Integer, Integer> position, InitialCard card, Side side) {
      +    public CardView addCard(Pair<Integer, Integer> position, InitialCard card, Side side) {
               CardView c = new CardView(card, side);
               displayCard(position, c);
               takenSpots.add(position);
               c.getProperties().put("gameCoords", position);
      +        return c;
           }
       
           /**
      @@ -69,8 +79,8 @@ private void displayCard(Pair<Integer, Integer> position, CardView c) {
            * @return converted coordinates
            */
           public Pair<Double, Double> convertCoordinates(Pair<Integer, Integer> coords) {
      -        double boardWidth = super.getWidth();
      -        double boardHeight = super.getHeight();
      +        double boardWidth = super.getPrefWidth();
      +        double boardHeight = super.getPrefHeight();
               double w = boardWidth/2 + (coords.first() * (cardWidth - cardBorderW));
               double h = boardHeight/2 - (coords.second() * (cardHeight - cardBorderH));
               return new Pair<>(w, h);
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/CardView.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/CardView.java
      index 7ccfc9c3..75da97ec 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/CardView.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/CardView.java
      @@ -3,7 +3,9 @@
       
       import it.polimi.ingsw.gamemodel.*;
       import it.polimi.ingsw.utils.GuiUtil;
      +import it.polimi.ingsw.utils.Pair;
       import javafx.scene.image.Image;
      +import javafx.scene.image.ImageView;
       import javafx.scene.input.ClipboardContent;
       import javafx.scene.input.Dragboard;
       import javafx.scene.input.TransferMode;
      @@ -12,22 +14,34 @@
       import javafx.scene.paint.ImagePattern;
       import javafx.scene.shape.Rectangle;
       
      +import javax.xml.crypto.dom.DOMCryptoContext;
       import java.util.HashMap;
      +import java.util.Map;
       
       public class CardView extends Pane {
      +    // Card dimensions
           public static double cardWidth = 199;
           public static double cardHeight = 132;
           public static double cardBorderW = 44.8;
           public static double cardBorderH = 52.6;
      +
      +    /** Pawn dimensions (at center of the initial card) */
      +    public static double tokenRadius = 28;
      +
      +    /** Path to what to show when a card is missing */
           public static String noCardPath = "/images/no_resource2.png";
      +    // Card corners
           public Pane topLeftCorner;
           public Pane topRightCorner;
           public Pane bottomLeftCorner;
           public Pane bottomRightCorner;
      -    public double startX;
      -    public double startY;
      +
           private Image image;
      +    private Rectangle cardRectangle;
       
      +    /**
      +     * Initialize an empty CardView
      +     */
           public CardView() {
               super();
               String imagePath = noCardPath;
      @@ -35,6 +49,12 @@ public CardView() {
               this.getProperties().put("Side", null);
               this.addProperties(imagePath);
           }
      +
      +    /**
      +     * Initialize a CardView of an Initial Card
      +     * @param card initial card
      +     * @param side side to show
      +     */
           public CardView(InitialCard card, Side side) {
               super();
               String imagePath = GuiUtil.getImagePath(card, side);
      @@ -43,6 +63,11 @@ public CardView(InitialCard card, Side side) {
               this.addProperties(imagePath);
           }
       
      +    /**
      +     * Initialize a CardView of a Playable Card
      +     * @param card playable card
      +     * @param side side to show
      +     */
           public CardView(PlayableCard card, Side side) {
               super();
               String imagePath = GuiUtil.getImagePath(card, side);
      @@ -51,6 +76,11 @@ public CardView(PlayableCard card, Side side) {
               this.addProperties(imagePath);
           }
       
      +    /**
      +     * Initialize a CardView of an Objective Card
      +     * @param card objective
      +     * @param side side to show
      +     */
           public CardView(Objective card, Side side) {
               super();
               String imagePath = GuiUtil.getImagePath(card, side);
      @@ -137,17 +167,25 @@ private void addProperties(String imagePath) {
               super.setMaxHeight(cardHeight);
               super.setMaxWidth(cardWidth);
               Rectangle rect = new Rectangle(cardWidth, cardHeight);
      -        rect.setArcHeight(20);
      -        rect.setArcWidth(20);
               image = new Image(imagePath);
               ImagePattern pattern = new ImagePattern(
                       image
               );
               rect.setFill(pattern);
      +        cardRectangle = rect;
      +        setArc(20);
               super.getChildren().add(rect);
               super.getStyleClass().add("game-card");
               addCorners();
      +    }
       
      +    /**
      +     * Set arcHeight and arcWidth of the card
      +     * @param arc arc width and height
      +     */
      +    public void setArc(double arc) {
      +        cardRectangle.setArcHeight(arc);
      +        cardRectangle.setArcWidth(arc);
           }
       
       
      @@ -180,4 +218,34 @@ private void setCornerProperties(Pane corner, double x, double y) {
               super.getChildren().add(corner);
           }
       
      +    /**
      +     * Display token of a color on the initial card
      +     * @param color color of the token
      +     */
      +    public void setToken(Color color) {
      +        double tokenY = 64;
      +        Map<Side, Pair<Double, Double>> coords = new HashMap<>();
      +        coords.put(Side.FRONT, new Pair<>(78.0, 121.0));
      +        coords.put(Side.BACK, new Pair<>(62.0, 137.0));
      +
      +        Side side = (Side)super.getProperties().get("Side");
      +
      +        ImageView token = new ImageView(new Image(GuiUtil.getPawnImagePath(color)));
      +        token.setFitWidth(tokenRadius);
      +        token.setFitHeight(tokenRadius);
      +
      +        token.setLayoutX(coords.get(side).first() - tokenRadius/2);
      +        token.setLayoutY(tokenY - tokenRadius / 2);
      +
      +        if (color.equals(Color.RED)) {
      +            ImageView blackToken = new ImageView(GuiUtil.getBlackPawnImagePath());
      +            blackToken.setFitWidth(tokenRadius);
      +            blackToken.setFitHeight(tokenRadius);
      +            blackToken.setLayoutX(coords.get(side).second() - tokenRadius/2);
      +            blackToken.setLayoutY(tokenY - tokenRadius/2);
      +            super.getChildren().add(blackToken);
      +        }
      +        super.getChildren().add(token);
      +    }
      +
       }
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/PlateauPane.java b/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/PlateauPane.java
      index a1fa775a..af993e29 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/PlateauPane.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/gui/nodes/PlateauPane.java
      @@ -10,6 +10,9 @@
       
       import java.util.HashMap;
       
      +/**
      + * JavaFX node, Pane showing all the player pawns and points
      + */
       public class PlateauPane extends Pane {
           public static double pawnSize = 64;
           public static double positionOffset = -6;
      @@ -17,6 +20,9 @@ public class PlateauPane extends Pane {
           HashMap<String, ImageView> players;
           HashMap<String, Integer> points;
       
      +    /**
      +     * Constructor of the node
      +     */
           public PlateauPane() {
               players = new HashMap<>();
               positions = new HashMap<>();
      @@ -51,17 +57,6 @@ public PlateauPane() {
               positions.put(27, new Pair<>(342.0, 141.0));
               positions.put(28, new Pair<>(342.0, 225.0));
               positions.put(29, new Pair<>(199.0, 158.0));
      -        // TODO Remove testing method
      -        this.setOnMousePressed((e) -> {
      -            for (String p : this.points.keySet()) {
      -                if (e.getButton() == MouseButton.PRIMARY) {
      -                    this.setPoints(p, this.points.get(p) + 1);
      -                } else if (e.getButton() == MouseButton.SECONDARY) {
      -                    this.setPoints(p, this.points.get(p) - 1);
      -                }
      -                return;
      -            }
      -        });
           }
       
           /**
      @@ -76,7 +71,6 @@ public void setColor(String player, Color color) {
               img.setFitHeight(pawnSize);
               players.put(player, img);
               setPoints(player, 0);
      -        this.getChildren().add(img);
           }
       
           /**
      @@ -89,14 +83,20 @@ public void setPoints(String player, int points) {
               if (points > 29) {
                   return;
               }
      -        Pair<Double, Double> position = convertCoords(positions.get(points));
      -        // Calculate offset because of players in the same position
      -        int offset = this.playersAtPosition(points);
      -        this.points.put(player, points);
      +        if (!this.points.containsKey(player) || this.points.get(player) != points) {
      +            Pair<Double, Double> position = convertCoords(positions.get(points));
      +            // Calculate offset because of players in the same position
      +            int offset = this.playersAtPosition(points);
      +            this.points.put(player, points);
       
      -        ImageView playerPawn = players.get(player);
      -        playerPawn.setLayoutX(position.first());
      -        playerPawn.setLayoutY(position.second() + offset * positionOffset);
      +            ImageView playerPawn = players.get(player);
      +            playerPawn.setLayoutX(position.first());
      +            playerPawn.setLayoutY(position.second() + offset * positionOffset);
      +
      +            if (this.getChildren().contains(playerPawn))
      +                this.getChildren().remove(playerPawn);
      +            this.getChildren().add(playerPawn);
      +        }
           }
       
           /**
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/tui/BoardPosition.java b/src/main/java/it/polimi/ingsw/client/frontend/tui/BoardPosition.java
      index 4f949693..04d40bb6 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/tui/BoardPosition.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/tui/BoardPosition.java
      @@ -4,6 +4,13 @@
       import it.polimi.ingsw.gamemodel.Corner;
       
       /**
      - * BoardPosition
      + * Represents a position on the board, used to find valid positions and display anchor numbers when
      + * a player must choose where to place the card.
      + *
      + * @param isValid Whether the position is a valid one or not
      + * @param link The anchor point for a valid position
      + *
      + * @see ValidPositions
        */
      -public record BoardPosition(boolean isValid, Optional<Corner> link) { }
      +public record BoardPosition(boolean isValid, Optional<Corner> link) {
      +}
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/tui/GraphicalViewTUI.java b/src/main/java/it/polimi/ingsw/client/frontend/tui/GraphicalViewTUI.java
      index 7ae358ad..e4007a11 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/tui/GraphicalViewTUI.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/tui/GraphicalViewTUI.java
      @@ -7,8 +7,8 @@
       import it.polimi.ingsw.client.frontend.ClientBoard;
       import it.polimi.ingsw.client.frontend.GraphicalView;
       import it.polimi.ingsw.client.frontend.ShownCard;
      -import it.polimi.ingsw.client.network.NetworkViewRMI;
      -import it.polimi.ingsw.client.network.NetworkViewTCP;
      +import it.polimi.ingsw.client.network.NetworkHandlerRMI;
      +import it.polimi.ingsw.client.network.NetworkHandlerTCP;
       import it.polimi.ingsw.exceptions.WrongInputFormatException;
       import it.polimi.ingsw.gamemodel.*;
       import it.polimi.ingsw.utils.AvailableMatch;
      @@ -17,7 +17,7 @@
       import it.polimi.ingsw.utils.RequestStatus;
       
       /**
      - * Class that handles client game loop from TUI
      + * Class that handles client game loop from TUI.
        */
       public class GraphicalViewTUI extends GraphicalView {
           private final TuiPrinter printer;
      @@ -27,13 +27,23 @@ public class GraphicalViewTUI extends GraphicalView {
           private final PlayerControls playerControls;
           private final InputHandler inputHandler;
           private final ValidPositions validPositions;
      -
      -    private final static String playerControlPrompt = "Type command, or 'help' for a list of available commands.";
      +    private final static List<String> helpMessage = List.of(
      +            "players,     p -> show list of players",
      +            "write,       w -> write message (add :username to send private text)",
      +            "chat,        c -> show chat",
      +            "board,       b -> show your board (or specify a number to show corresponding player's board)",
      +            "objectives,  o -> show secret and common objectives",
      +            "hand,        h -> show your hand");
       
           private List<String> chat;
      -
           private List<String> messages;
      +    private final static String playerControlPrompt =
      +            "Type command, or 'help' for a list of available commands.";
       
      +
      +    /**
      +     * Class constructor. Starts the interface and creates all auxiliary objects.
      +     */
           public GraphicalViewTUI() {
               super();
               this.ongoing = true;
      @@ -50,11 +60,15 @@ public GraphicalViewTUI() {
               }
       
               this.inputHandler = new InputHandler(this.printer);
      +
           }
       
      +    /**
      +     * Actually starts the interface, then handles the pre-match.
      +     */
           private void startInterface() {
               this.printer.clearTerminal();
      -        this.setNetworkView();
      +        this.setNetworkHandler();
               this.printer.clearTerminal();
               this.setMatch();
               new Thread(this::startPlayerControls).start();
      @@ -63,6 +77,11 @@ private void startInterface() {
           ///////////////////////
           // AUXILIARY METHODS //
           ///////////////////////
      +    /**
      +     * Sets the last request's status, eventually notifying all threads of the server's response.
      +     * 
      +     * @param status The last request's status
      +     */
           @Override
           public void setLastRequestStatus(RequestStatus status) {
               synchronized (this.lastRequest) {
      @@ -73,6 +92,13 @@ public void setLastRequestStatus(RequestStatus status) {
               }
           }
       
      +
      +    /**
      +     * Waits for the server response after any action was performed. Until the server does not send
      +     * a response (or an error), the thread is stopped.
      +     * 
      +     * @return Whether the last action was successful or not
      +     */
           private boolean getServerResponse() {
               this.printer.printCenteredMessage("Waiting for server...", 1);
               try {
      @@ -88,19 +114,30 @@ private boolean getServerResponse() {
       
           }
       
      -    private synchronized String printHand(ClientBoard board) {
      +
      +    /**
      +     * Shows the player's board and hand.
      +     * 
      +     * @param board the player's board
      +     */
      +    private synchronized void showHand(ClientBoard board) {
               this.printer.printPlayerBoard(this.username, board);
               this.printer.printHandAtBottom(board.getHand());
      -
      -        this.inputHandler.setPrompt("What card do you want to play?");
      -        return this.inputHandler.askUser();
           }
       
      +    /**
      +     * Asks the user which card he wants to play.
      +     * 
      +     * @param board The player's board
      +     * 
      +     * @return The chosen card
      +     */
           private PlayableCard chooseCardFromHand(ClientBoard board) {
               List<PlayableCard> hand = board.getHand();
       
               this.inputHandler.setPrompt("Choose card to play (1, 2, 3):");
      -        String userIn = this.printHand(board);
      +        this.showHand(board);
      +        String userIn = this.inputHandler.askUser();
       
               PlayableCard card = null;
               Integer maxValue = hand.size();
      @@ -109,21 +146,33 @@ private PlayableCard chooseCardFromHand(ClientBoard board) {
                       Integer index = Integer.parseInt(userIn) - 1;
                       if (index >= 0 && index < maxValue) {
                           card = hand.get(index);
      +                } else {
      +                    throw new NumberFormatException("Number not in range!");
                       }
                   } catch (NumberFormatException e) {
                       this.inputHandler.setPrompt("Not a valid number! try again");
      -                userIn = this.printHand(board);
      +                this.showHand(board);
      +                userIn = this.inputHandler.askUser();
                   }
               }
       
               return card;
           }
       
      +
      +    /**
      +     * Asks the user which side he wants to play the chosen card.
      +     * 
      +     * @param card The card to be placed on the board
      +     * 
      +     * @return The chosen side
      +     */
           private Side chooseCardSide(PlayableCard card) {
               this.printer.clearTerminal();
               this.printer.printPlayableFrontAndBack(card, 0);
       
      -        this.inputHandler.setPrompt("What side do you want to play the card on? (defaults to front)");
      +        this.inputHandler
      +                .setPrompt("What side do you want to play the card on? (defaults to front)");
               String userIn = this.inputHandler.askUser();
               return switch (userIn) {
                   case "b", "back" -> Side.BACK;
      @@ -131,8 +180,17 @@ private Side chooseCardSide(PlayableCard card) {
               };
           }
       
      +
      +    /**
      +     * Asks the user where he wants to play the chosen card.
      +     * 
      +     * @param board The current player's board
      +     * 
      +     * @return The chosen coordinates
      +     */
           private Pair<Integer, Integer> chooseCoords(ClientBoard board) {
      -        Map<Pair<Integer, Integer>, Pair<Integer, Corner>> valids = this.validPositions.getValidPlaces();
      +        Map<Pair<Integer, Integer>, Pair<Integer, Corner>> valids =
      +                this.validPositions.getValidPlaces();
       
               Pair<Integer, Integer> coord = null;
       
      @@ -156,13 +214,15 @@ private Pair<Integer, Integer> chooseCoords(ClientBoard board) {
                       this.inputHandler.setPrompt("Not a valid number! try again");
                   }
               }
      -
               return coord;
           }
       
      +
      +    /**
      +     * Gets the player's input while it's not his turn, and then performs the corresponding action.
      +     */
           private void parsePlayerControl() {
               ClientBoard board = this.clientBoards.get(this.username);
      -        ClientBoard currentPlayerBoard = this.clientBoards.get(this.currentPlayer);
               String userIn, command, argument, player;
       
               userIn = this.inputHandler.getNextLine();
      @@ -178,13 +238,14 @@ private void parsePlayerControl() {
               }
       
               switch (command) {
      -            case "o":
      -                this.printer.printObjectives(username, board.getColor(), board.getObjective(), this.visibleObjectives);
      +            case "o", "objectives":
      +                this.printer.printObjectives(username, board.getColor(), board.getObjective(),
      +                        this.visibleObjectives);
                       break;
      -            case "h":
      +            case "h", "hand":
                       this.printer.printHand(this.username, board.getColor(), board.getHand());
                       break;
      -            case "b":
      +            case "b", "board":
                       switch (argument) {
                           case "1":
                               player = this.players.get(0);
      @@ -208,43 +269,53 @@ private void parsePlayerControl() {
                               break;
       
                           default:
      -                        this.printer.printPlayerBoard(this.username, this.clientBoards.get(this.username));
      +                        this.printer.printPlayerBoard(this.username,
      +                                this.clientBoards.get(this.username));
                               break;
                       }
                       break;
      -            case "c":
      +            case "c", "chat":
                       this.printer.printChat(this.chat);
                       break;
      -            case "w":
      +            case "w", "write":
                       if (!argument.equals("")) {
                           if (argument.charAt(0) == ':') {
                               splitIndex = argument.indexOf(" ");
                               if (splitIndex != -1) {
                                   String text = argument.substring(splitIndex + 1);
      +                            String recipient = argument.substring(1, splitIndex);
                                   if (!argument.equals("")) {
      -                                this.sendPrivateText(argument.substring(1, splitIndex), text);
      +                                this.sendPrivateText(recipient, text);
      +                            }
      +                            if (!this.getServerResponse()) {
      +                                this.messages.add(this.lastError);
      +                            } else {
      +                                this.chat.add("(to: " + recipient + "): " + text);
                                   }
                               }
                           } else {
                               this.sendBroadcastText(argument);
      +                        if (!this.getServerResponse()) {
      +                            this.messages.add(this.lastError);
      +                        } else {
      +                            this.chat.add("(you): " + argument);
      +                        }
                           }
       
      -                    if (!this.getServerResponse()) {
      -                        this.messages.add(this.lastError);
      -                    }
                           this.printer.clearTerminal();
                       }
                       break;
      -            case "p":
      +            case "p", "players":
                       this.printer.printSimpleList(this.players, false, true);
                       break;
       
      -            // TBA
                   case "help":
      +                this.printer.printSimpleList(helpMessage, false, false);
                       break;
       
                   default:
      -                this.printer.printPlayerBoard(this.currentPlayer, currentPlayerBoard);
      +                this.printer.printCenteredMessage("Not a known command: '" + command
      +                        + "'. Type 'help' to show a help message", 0);
                       break;
               }
       
      @@ -252,6 +323,22 @@ private void parsePlayerControl() {
               this.inputHandler.showPrompt();
           }
       
      +
      +    /**
      +     * Enables the player to use custom commands while it's not his turn.
      +     */
      +    private void enablePlayerControls() {
      +        this.inputHandler.setPrompt(playerControlPrompt);
      +        this.inputHandler.showPrompt();
      +        this.playerControls.enable();
      +    }
      +
      +
      +    /**
      +     * Starts the handling of player controls. If enables, polls for user input and as soon as there
      +     * is something calls {@link GraphicalViewTUI#parsePlayerControl()}. If disabled, stops the
      +     * thread
      +     */
           private void startPlayerControls() {
               while (this.ongoing) {
                   synchronized (this.playerControls) {
      @@ -278,11 +365,13 @@ private void startPlayerControls() {
               }
           }
       
      -
           ////////////////////////
           // PRE MATCH METHODS //
           ///////////////////////
      -    private void setNetworkView() {
      +    /**
      +     * Sets the network view, asking the player how he wants to connect (host, port, RMI vs TCP).
      +     */
      +    private void setNetworkHandler() {
               String userIn, IPAddr;
               Integer port = null;
       
      @@ -299,30 +388,35 @@ private void setNetworkView() {
               }
       
               this.inputHandler.setPrompt("Choose connection type (1 for TCP, 2 for RMI)");
      -        this.networkView = null;
      -        while (this.networkView == null) {
      +        this.networkHandler = null;
      +        while (this.networkHandler == null) {
                   userIn = this.inputHandler.askUser();
                   try {
                       switch (userIn) {
                           case "1", "tcp", "TCP":
      -                        this.setNetworkInterface(new NetworkViewTCP(this, IPAddr, port));
      +                        this.setNetworkHandler(new NetworkHandlerTCP(this, IPAddr, port));
                               break;
                           case "2", "rmi", "RMI":
      -                        this.setNetworkInterface(new NetworkViewRMI(this, IPAddr, port));
      +                        this.setNetworkHandler(new NetworkHandlerRMI(this, IPAddr, port));
                               break;
                           default:
      -                        this.inputHandler.setPrompt("Not a valid connection type! Choose connection type (1 for TCP, 2 for RMI)");
      +                        this.inputHandler.setPrompt(
      +                                "Not a valid connection type! Choose connection type (1 for TCP, 2 for RMI)");
                               break;
                       }
                   } catch (Exception e) {
                       this.printer.clearTerminal();
                       this.printer.printMessage("Could not connect! Try again");
      -                this.setNetworkView();
      +                this.setNetworkHandler();
                       return;
                   }
               }
           }
       
      +
      +    /**
      +     * Asks the player to choose a username.
      +     */
           private void chooseUsername() {
               String userIn = "";
               this.inputHandler.setPrompt("Choose username:");
      @@ -333,9 +427,13 @@ private void chooseUsername() {
               super.setUsername(userIn);
           }
       
      +
      +    /**
      +     * Asks the server for a list of available matches and waits for it.
      +     */
           private void getAvailableMatches() {
               this.lastRequest.setStatus(RequestStatus.PENDING);
      -        this.networkView.getAvailableMatches();
      +        this.networkHandler.getAvailableMatches();
       
               if (!this.getServerResponse()) {
                   this.printer.clearTerminal();
      @@ -345,6 +443,12 @@ private void getAvailableMatches() {
               }
           }
       
      +
      +    /**
      +     * Tries to create a new match, asking the player for match name and max players.
      +     * 
      +     * @throws WrongInputFormatException if the max number of players was not specified
      +     */
           private void createMatch() throws WrongInputFormatException {
               String userIn = this.inputHandler.askUser();
               Integer splitIndex = userIn.indexOf(" ");
      @@ -363,6 +467,15 @@ private void createMatch() throws WrongInputFormatException {
               super.createMatch(matchName, maxPlayers);
           }
       
      +
      +    /**
      +     * Tries to join a match, showing the player a list of matches and their relative index, and
      +     * asking him which he wants to join.
      +     * 
      +     * @param joinables List of matches the player can join
      +     * 
      +     * @throws WrongInputFormatException if the player did not specify a valid index
      +     */
           private void joinMatch(List<AvailableMatch> joinables) throws WrongInputFormatException {
               String userIn = this.inputHandler.askUser();
               Integer matchIndex;
      @@ -379,6 +492,13 @@ private void joinMatch(List<AvailableMatch> joinables) throws WrongInputFormatEx
               super.joinMatch(joinables.get(matchIndex).name());
           }
       
      +
      +    /**
      +     * Tries to set the match, either creating it or joining an already existing one.
      +     * 
      +     * @see GraphicalViewTUI#joinMatch(List)
      +     * @see GraphicalViewTUI#createMatch()
      +     */
           private void setMatch() {
               List<AvailableMatch> joinables = new ArrayList<>(), notJoinables = new ArrayList<>();
               this.chooseUsername();
      @@ -389,7 +509,7 @@ private void setMatch() {
               String joinMatchPrompt = "Type the number corresponding to the match you want to join.";
       
               this.availableMatches.forEach(match -> {
      -            if (match.currentPlayers() < match.maxPlayers()) {
      +            if (match.currentPlayers() < match.maxPlayers() || match.isRejoinable()) {
                       joinables.add(match);
                   } else {
                       notJoinables.add(match);
      @@ -409,7 +529,8 @@ private void setMatch() {
                           if (joinables.isEmpty())
                               joinMatchPrompt = "No matches available. " + joinMatchPrompt;
       
      -                    this.inputHandler.setPrompt("Do you want to join a match or (c)reate one? (defaults to join)");
      +                    this.inputHandler.setPrompt(
      +                            "Do you want to join a match or (c)reate one? (defaults to join)");
                           String userIn = this.inputHandler.askUser();
                           this.printer.printMatchesLobby(joinables, notJoinables, 0);
                           switch (userIn) {
      @@ -427,7 +548,7 @@ private void setMatch() {
                           }
                       }
                   } catch (WrongInputFormatException e) {
      -                this.inputHandler.setPrompt(e.getMessage() + "! try again.");
      +                this.inputHandler.setPrompt(e.getMessage() + "! Try again.");
                   }
               }
       
      @@ -440,6 +561,13 @@ private void setMatch() {
       
           }
       
      +
      +    /**
      +     * Show the list of players in the match.
      +     * 
      +     * @param someoneUsername Last player who joined the match
      +     * @param joinedPlayers List of all the other players
      +     */
           @Override
           public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
               super.someoneJoined(someoneUsername, joinedPlayers);
      @@ -455,6 +583,11 @@ public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
           ///////////////////
           // MATCH METHODS //
           ///////////////////
      +    /**
      +     * Asks the user which side he wants to play the initial card.
      +     * 
      +     * @param initialCard The initial card he drew
      +     */
           @Override
           public void giveInitialCard(InitialCard initialCard) {
               super.giveInitialCard(initialCard);
      @@ -478,20 +611,17 @@ public void giveInitialCard(InitialCard initialCard) {
                   this.giveInitialCard(initialCard);
               } else {
                   this.printer.clearTerminal();
      -            this.validPositions.addCard(new ShownCard(initialCard, side, new Pair<Integer, Integer>(0, 0)));
      +            this.validPositions
      +                    .addCard(new ShownCard(initialCard, side, new Pair<Integer, Integer>(0, 0)));
               }
           }
       
      -    @Override
      -    public void someoneSetInitialSide(String someoneUsername, Side side, Map<Symbol, Integer> availableResources) {
      -        this.printer.clearTerminal();
      -        if (this.username.equals(someoneUsername)) {
      -            this.printer.printPlayerBoard(this.username, this.clientBoards.get(this.username));
      -            this.printer.printMessage("Correctly played card! waiting for others to choose theirs");
      -        }
      -        super.someoneSetInitialSide(someoneUsername, side, availableResources);
      -    }
       
      +    /**
      +     * Asks the user which secret objective he wants to keep between the random two given to him.
      +     * 
      +     * @param secretObjectives the pair of objectives the player has to choose from
      +     */
           @Override
           public void giveSecretObjectives(Pair<Objective, Objective> secretObjectives) {
               super.giveSecretObjectives(secretObjectives);
      @@ -516,13 +646,24 @@ public void giveSecretObjectives(Pair<Objective, Objective> secretObjectives) {
               }
           }
       
      +
      +    /**
      +     * Adds to the list of player with objectives the last player who chose his secret objective.
      +     * This is used to determine whether the player currently playing has already chosen secret
      +     * objective (and so should play a regular turn) or not.
      +     * 
      +     * @param someoneUsername the username of the last player who chose secret objective
      +     */
           @Override
           public void someoneChoseSecretObjective(String someoneUsername) {
               super.someoneChoseSecretObjective(someoneUsername);
               this.playersWithObjective.add(someoneUsername);
           }
       
      -    // gets called only on others, never on current player
      +
      +    /**
      +     * Notifies all players (but the current one) that someone is playing their turn.
      +     */
           @Override
           public void changePlayer() {
               this.printer.clearTerminal();
      @@ -530,20 +671,25 @@ public void changePlayer() {
       
               new Thread(() -> {
                   if (board.getPlaced().isEmpty()) { // choosing initial side
      -                this.printer.printCenteredMessage(this.currentPlayer + " is choosing initial side!", 0);
      +                this.printer.printCenteredMessage(this.currentPlayer + " is choosing initial side!",
      +                        0);
                       this.printer.printPrompt("");
      -            } else if (!this.playersWithObjective.contains(this.currentPlayer)) { // choosing objective
      -                this.printer.printCenteredMessage(this.currentPlayer + " is choosing secret objective!", 0);
      +            } else if (!this.playersWithObjective.contains(this.currentPlayer)) { // choosing
      +                                                                                  // objective
      +                this.printer.printCenteredMessage(
      +                        this.currentPlayer + " is choosing secret objective!", 0);
                       this.printer.printPrompt("");
                   } else {
      -                this.inputHandler.setPrompt(playerControlPrompt);
      -                this.inputHandler.showPrompt();
      -                this.playerControls.enable();
      +                this.enablePlayerControls();
                   }
               }).start();
           }
       
      -    // TO BE CHECKED: does the last turn message appear?
      +
      +    /**
      +     * Ask a player to choose a card to play, the side on which the card should be played, and the
      +     * coordinates in which the card should be played; finally trying to actually play the card.
      +     */
           @Override
           public void makeMove() {
               this.playerControls.disable();
      @@ -588,87 +734,168 @@ public void makeMove() {
               }
           }
       
      +
      +    /**
      +     * Asks the player from where he wants to draw.
      +     * 
      +     * @param availableResources All the possible draw sources
      +     */
      +    private void makeUserDraw(Map<Symbol, Integer> availableResources) {
      +        this.printer.clearTerminal();
      +        DrawSource source = null;
      +        this.printer.printAvailableResources(availableResources, 0);
      +        String userIn;
      +        this.inputHandler.setPrompt("Choose a draw source: ");
      +        while (source == null) {
      +            this.printer.printDrawingScreen(decksTopReign, visiblePlayableCards);
      +
      +            this.inputHandler.setPrompt("Choose draw source:");
      +            userIn = this.inputHandler.askUser();
      +            switch (userIn) {
      +                case "G", "g":
      +                    source = DrawSource.GOLDS_DECK;
      +                    break;
      +                case "R", "r":
      +                    source = DrawSource.RESOURCES_DECK;
      +                    break;
      +                case "1":
      +                    source = DrawSource.FIRST_VISIBLE;
      +                    break;
      +                case "2":
      +                    source = DrawSource.SECOND_VISIBLE;
      +                    break;
      +                case "3":
      +                    source = DrawSource.THIRD_VISIBLE;
      +                    break;
      +                case "4":
      +                    source = DrawSource.FOURTH_VISIBLE;
      +                    break;
      +                default:
      +                    this.inputHandler.setPrompt("Not a valid source! Try again.");
      +                    break;
      +            }
      +        }
      +        super.drawCard(source);
      +        if (!getServerResponse()) {
      +            this.makeUserDraw(availableResources);
      +            return;
      +        }
      +    }
      +
      +
      +    /**
      +     * Notifies all players that someone played a card, and updates the relative player's board.
      +     * 
      +     * @param someoneUsername The player that played the card
      +     * @param coords The chosen coordinates
      +     * @param card The chosen played card
      +     * @param side The chosen side
      +     * @param points The points of that player
      +     * @param availableResources The resources of that player
      +     */
           @Override
      -    public void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coords, PlayableCard card, Side side, int points,
      -            Map<Symbol, Integer> availableResources) {
      +    public void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coords,
      +            PlayableCard card, Side side, int points, Map<Symbol, Integer> availableResources) {
               super.someonePlayedCard(someoneUsername, coords, card, side, points, availableResources);
       
               if (this.username.equals(someoneUsername)) {
      -            this.printer.clearTerminal();
      -            DrawSource source = null;
      -            this.printer.printAvailableResources(availableResources, 0);
      -            String userIn;
      -            this.inputHandler.setPrompt("Choose a draw source: ");
      -            while (source == null) {
      -                this.printer.printDrawingScreen(decksTopReign, visiblePlayableCards);
      -
      -                this.inputHandler.setPrompt("Choose draw source:");
      -                userIn = this.inputHandler.askUser();
      -                switch (userIn) {
      -                    case "G", "g":
      -                        source = DrawSource.GOLDS_DECK;
      -                        break;
      -                    case "R", "r":
      -                        source = DrawSource.RESOURCES_DECK;
      -                        break;
      -                    case "1":
      -                        source = DrawSource.FIRST_VISIBLE;
      -                        break;
      -                    case "2":
      -                        source = DrawSource.SECOND_VISIBLE;
      -                        break;
      -                    case "3":
      -                        source = DrawSource.THIRD_VISIBLE;
      -                        break;
      -                    case "4":
      -                        source = DrawSource.FOURTH_VISIBLE;
      -                        break;
      -                    default:
      -                        this.inputHandler.setPrompt("Not a valid source! Try again.");
      -                        break;
      -                }
      -            }
      -
      -            super.drawCard(source);
      -            if (!getServerResponse()) {
      -                this.someonePlayedCard(someoneUsername, coords, card, side, points, availableResources);
      -                return;
      -            }
      +            this.makeUserDraw(availableResources);
               }
           }
       
      +
      +    /**
      +     * Notifies everyone else that a player left.
      +     * 
      +     * @param someoneUsername Player's username
      +     */
           @Override
           public void someoneQuit(String someoneUsername) {
               this.printer.printCenteredMessage(someoneUsername + " quit!", 0);
           }
       
      +
      +    /**
      +     * Shows whether the current player won or lost.
      +     * 
      +     * @param ranking Match ranking
      +     */
           @Override
           public void matchFinished(List<LeaderboardEntry> ranking) {
               this.printer.clearTerminal();
      -        ranking.forEach(entry -> {
      -            if (this.username.equals(entry.username())) {
      -                this.printer.printEndScreen(entry.winner());
      -            }
      -        });
               this.ongoing = false;
      +        this.printer.printEndScreen(ranking, this.username);
           }
       
      +
      +    /**
      +     * Sets the last error message to what the server responded.
      +     * 
      +     * @param exception The thrown exception
      +     */
           @Override
           public void notifyError(Exception exception) {
               super.notifyError(exception);
               this.lastError = exception.getMessage();
      +        if (this.lastError == null) {
      +            this.lastError = exception.getClass().getName();
      +        }
           }
       
      +
      +    /**
      +     * Notifies that the match has started.
      +     */
           @Override
           protected void notifyMatchStarted() {}
       
      +
      +    /**
      +     * Notifies that the player correctly rejoined a match, and makes him play his turn.
      +     * 
      +     * @param drawPhase whether the player should draw or play
      +     */
      +    @Override
      +    protected void notifyMatchResumed(boolean drawPhase) {
      +        new Thread(() -> {
      +
      +            this.clientBoards.get(this.username).getPlaced()
      +                    .forEach((turn, shownCard) -> this.validPositions.addCard(
      +                            new ShownCard(shownCard.card(), shownCard.side(), shownCard.coords())));
      +
      +            // we resume match only if the game was in progress, so all players chose secret
      +            // objectives
      +            this.players.forEach(this.playersWithObjective::add);
      +
      +            this.printer.clearTerminal();
      +            if (this.username.equals(this.currentPlayer)) {
      +                if (drawPhase) {
      +                    this.makeUserDraw(this.clientBoards.get(this.username).getAvailableResources());
      +                    // new Thread(() ->
      +                    // this.makeUserDraw(this.clientBoards.get(this.username).getAvailableResources())).start();;
      +                } else {
      +                    // new Thread(this::makeMove).start();
      +                    this.makeMove();
      +                }
      +            } else {
      +                this.enablePlayerControls();
      +            }
      +
      +        }).start();
      +    }
      +
      +
      +    /**
      +     * Adds to the chat a broadcast text.
      +     * 
      +     * @param someoneUsername The player who sent the broadcast
      +     * @param text The sent text
      +     */
           @Override
           public void someoneSentPrivateText(String someoneUsername, String text) {
               super.someoneSentPrivateText(someoneUsername, text);
       
      -        if (this.username.equals(someoneUsername)) {
      -            this.chat.add("(to: " + someoneUsername + "): " + text);
      -        } else {
      +        if (!this.username.equals(someoneUsername)) {
                   this.chat.add("(" + someoneUsername + "): " + text);
                   this.messages.add(someoneUsername + " sent a private text!");
                   this.printer.printMessages(this.messages);
      @@ -676,13 +903,18 @@ public void someoneSentPrivateText(String someoneUsername, String text) {
               }
           }
       
      +
      +    /**
      +     * Adds to the chat a private text.
      +     * 
      +     * @param someoneUsername The player who sent the private text
      +     * @param text The sent text
      +     */
           @Override
           public void someoneSentBroadcastText(String someoneUsername, String text) {
               super.someoneSentBroadcastText(someoneUsername, text);
       
      -        if (this.username.equals(someoneUsername)) {
      -            this.chat.add("[me]: " + text);
      -        } else {
      +        if (!this.username.equals(someoneUsername)) {
                   this.chat.add("[" + someoneUsername + "]: " + text);
                   this.messages.add(someoneUsername + " sent a text!");
                   this.printer.printMessages(this.messages);
      @@ -690,6 +922,22 @@ public void someoneSentBroadcastText(String someoneUsername, String text) {
               }
           }
       
      +    /**
      +     * Notifies that there has been a connection error. We only care about server crashes, but it
      +     * could be anything
      +     */
      +    @Override
      +    public void notifyConnectionLost() {
      +        this.printer.clearTerminal();
      +        this.printer.printCenteredMessage("Connection Lost!", 0);
      +        System.exit(1);
      +    }
      +
      +
      +    /**
      +     * Launch the TUI client
      +     * @param args command line arguments
      +     */
           public static void main(String[] args) {
               GraphicalViewTUI tui = new GraphicalViewTUI();
               tui.startInterface();
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/tui/InputHandler.java b/src/main/java/it/polimi/ingsw/client/frontend/tui/InputHandler.java
      index 69af6037..f1076ffe 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/tui/InputHandler.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/tui/InputHandler.java
      @@ -4,31 +4,56 @@
       import java.util.Scanner;
       
       /**
      - * InputHandler
      + * Class that handles the prompt and gets the user input
        */
      -
       public class InputHandler {
           private final TuiPrinter printer;
           private final Scanner scanner;
           private String prompt;
       
      +
      +    /**
      +     * Class constructor.
      +     * 
      +     * @param printer The actual printer
      +     */
           public InputHandler(TuiPrinter printer) {
               this.printer = printer;
               this.scanner = new Scanner(System.in);
           }
       
      +
      +    /**
      +     * Sets the current prompt, without displaying it.
      +     * 
      +     * @param prompt The new value
      +     */
           public void setPrompt(String prompt) {
               this.prompt = prompt;
           }
       
      +
      +    /**
      +     * Gets the next user input.
      +     * 
      +     * @return The next user input
      +     */
           public String getNextLine() {
               return this.scanner.nextLine();
           }
       
      +
      +    /**
      +     * Shows the current prompt.
      +     */
           public void showPrompt() {
               this.printer.printPrompt(this.prompt);
           }
       
      +
      +    /**
      +     * Flushes the stdin, so that every input from the user before showing the prompt gets discarded.
      +     */
           private void clearStdin() {
               try {
                   System.in.read(new byte[System.in.available()]);
      @@ -37,6 +62,12 @@ private void clearStdin() {
               }
           }
       
      +    
      +    /**
      +     * Flushes stdin, prints prompt and then gets the user input.
      +     * 
      +     * @return The user input
      +     */
           public String askUser() {
               this.clearStdin();
               this.printer.printPrompt(this.prompt);
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/tui/PlayerControls.java b/src/main/java/it/polimi/ingsw/client/frontend/tui/PlayerControls.java
      index b2c0ddc1..cbf15e7a 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/tui/PlayerControls.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/tui/PlayerControls.java
      @@ -1,25 +1,40 @@
       package it.polimi.ingsw.client.frontend.tui;
       
       /**
      - * PlayerControls
      + * Class used to synchronyze methods that should be ran only during other player's turns.
        */
      -
       public class PlayerControls {
           private boolean enabled;
       
      +    
      +    /**
      +     * Class constructor. Starts disabled.
      +     */
           public PlayerControls() {
               this.enabled = false;
           }
       
      +    
      +    /**
      +     * @return Whether the player's custom controls are enabled or not.
      +     */
           public boolean isEnabled() {
               return this.enabled;
           }
       
      +    
      +    /**
      +     * Enables player's custom controls, and notifies all threads synchronized on this object.
      +     */
           public synchronized void enable() {
               this.enabled = true;
               this.notifyAll();
           }
       
      +    
      +    /**
      +     * Disables the player's controls.
      +     */
           public void disable() {
               this.enabled = false;
           }
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/tui/TuiPrinter.java b/src/main/java/it/polimi/ingsw/client/frontend/tui/TuiPrinter.java
      index 5c9f53ed..c1c394e6 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/tui/TuiPrinter.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/tui/TuiPrinter.java
      @@ -2,66 +2,79 @@
       
       import java.io.IOException;
       import java.util.ArrayList;
      -import java.util.Collections;
      -import java.util.HashMap;
      -import java.util.HashSet;
       import java.util.List;
       import java.util.Map;
      -import java.util.Set;
      -
       import org.jline.terminal.Terminal;
       import it.polimi.ingsw.client.frontend.ClientBoard;
       import it.polimi.ingsw.client.frontend.ShownCard;
       import it.polimi.ingsw.exceptions.CardException;
      -import it.polimi.ingsw.exceptions.InvalidResourceException;
       import it.polimi.ingsw.gamemodel.*;
       import it.polimi.ingsw.utils.AvailableMatch;
      +import it.polimi.ingsw.utils.LeaderboardEntry;
       import it.polimi.ingsw.utils.Pair;
       import it.polimi.ingsw.utils.TUICardParser;
       
       /**
      - * Class that handles the actual printing to the terminal
      + * Class that handles the actual printing to the terminal.
        */
       public class TuiPrinter {
           private final Terminal terminal;
           private final TUICardParser parser;
           private final Integer infoLineOffset;
           private static final Integer cardRows = 6, cardCols = 18, cornerRows = 3, cornerCols = 5;
      -    private final Map<Pair<String, String>, String> commandList;
       
      +    /**
      +     * Class constructor, it creates auxiliary objects to communicate with the terminal and the card
      +     * parser.
      +     * 
      +     * @throws IOException
      +     */
           public TuiPrinter() throws IOException {
               this.terminal = org.jline.terminal.TerminalBuilder.terminal();
               this.parser = new TUICardParser();
               this.infoLineOffset = 2;
      -        this.commandList = new HashMap<>();
      -
      -        // TODO remove them?
      -        // list of available commands
      -        commandList.put(new Pair<>("quit", "q"), "exit the match");
      -        commandList.put(new Pair<>("place", "p"), "place a card in the chosen coordinates"); // review
      -        commandList.put(new Pair<>("list", "l"), "print player list");
      -        commandList.put(new Pair<>("chat view", "cv"), "view the latest messages of the chat");
      -        commandList.put(new Pair<>("chat send", "cs"), "send a message in the chat");
      -        commandList.put(new Pair<>("show", "s"), "show the board of the chosen player");
      -        commandList.put(new Pair<>("hand", "h"), "show the hand of the chosen player");
      -        commandList.put(new Pair<>("help", "-h"), "show the list of all available commands");
      -        commandList.put(new Pair<>("objective", "o"), "show the objectives of the current player");
      -    }
       
      -    //! PRIVATE METHODS //
      +    }
       
      -    private Pair<Integer, Integer> sumCoords(Pair<Integer, Integer> op1, Pair<Integer, Integer> op2) {
      +    // ! PRIVATE METHODS //
      +    /**
      +     * Sums two coordinates.
      +     * 
      +     * @param op1 The first coordinate
      +     * @param op2 The second coordinate
      +     * 
      +     * @return A new coordinate containing the sum of the two
      +     */
      +    private Pair<Integer, Integer> sumCoords(Pair<Integer, Integer> op1,
      +            Pair<Integer, Integer> op2) {
               return new Pair<>(op1.first() + op2.first(), op1.second() + op2.second());
           }
       
      +    /**
      +     * @return The terminal's height (rows).
      +     */
           private Integer getHeight() {
               return this.terminal.getHeight();
           }
       
      +    /**
      +     * @return The terminal's width (columns).
      +     */
           private Integer getWidth() {
               return this.terminal.getWidth();
           }
       
      +
      +    /**
      +     * Sets the string's position on the terminal. This is done via an escape sequence, that anchors
      +     * the text in the specified row and column.
      +     * 
      +     * @param x The x coordinate (column)
      +     * @param y The y coordinate (row)
      +     * 
      +     * @return The escape sequence to be inserted in the string, in order for it to be anchored in
      +     *         the right spot
      +     */
           private String setPosition(Integer x, Integer y) {
               return "\033[" + y + ";" + x + "H";
           }
      @@ -69,13 +82,23 @@ private String setPosition(Integer x, Integer y) {
           private Pair<Integer, Integer> getAbsoluteCoords(Pair<Integer, Integer> coords) {
               int termRows = this.getHeight(), termCols = this.getWidth();
       
      -        Pair<Integer, Integer> coordOffset = new Pair<Integer, Integer>((termCols - cardCols) / 2, (termRows - cardRows) / 2);
      +        Pair<Integer, Integer> coordOffset =
      +                new Pair<Integer, Integer>((termCols - cardCols) / 2, (termRows - cardRows) / 2);
               Pair<Integer, Integer> coordUpdated =
      -                new Pair<Integer, Integer>(coords.first() * (cardCols - cornerCols), -coords.second() * (cardRows - cornerRows));
      +                new Pair<Integer, Integer>(coords.first() * (cardCols - cornerCols),
      +                        -coords.second() * (cardRows - cornerRows));
       
               return this.sumCoords(coordOffset, coordUpdated);
           }
       
      +    /**
      +     * Prints the colored username of a player.
      +     * 
      +     * @param username The player's username
      +     * @param color The color associated to the player
      +     * 
      +     * @return A string with the necessary escape sequences to show a colored username
      +     */
           private String parseUsername(String username, Color color) {
               String c = switch (color) {
                   case Color.RED -> "\033[031m";
      @@ -88,16 +111,31 @@ private String parseUsername(String username, Color color) {
               return c + username + "\033[0m";
           }
       
      +    /**
      +     * Shows a card on the terminal
      +     * 
      +     * @param card Record containing the card and its coordinates
      +     */
           public void printCard(ShownCard card) {
               try {
                   if (card.coords().equals(new Pair<>(0, 0)))
      -                System.out.println(parser.parseCard(card.card(), getAbsoluteCoords(card.coords()), null, card.side() == Side.FRONT));
      +                System.out.println(parser.parseCard(card.card(), getAbsoluteCoords(card.coords()),
      +                        null, card.side() == Side.FRONT));
                   else
      -                System.out.println(parser.parseCard(card.card(), getAbsoluteCoords(card.coords()), card.coords(), card.side() == Side.FRONT));
      +                System.out.println(parser.parseCard(card.card(), getAbsoluteCoords(card.coords()),
      +                        card.coords(), card.side() == Side.FRONT));
                   System.out.println("\033[0m");
      -        } catch (CardException e) { }
      +        } catch (CardException e) {
      +        }
           }
       
      +    /**
      +     * Prints the user points and username.
      +     * 
      +     * @param username The player's username
      +     * @param color The player's associated color
      +     * @param points The player's point
      +     */
           private void printPoints(String username, Color color, Integer points) {
               int oldOffset = this.getHeight() - infoLineOffset;
               int termCols = this.getWidth();
      @@ -105,7 +143,7 @@ private void printPoints(String username, Color color, Integer points) {
               String out = this.parseUsername(username, color) + "'s points: " + points;
               System.out.println(this.setPosition((termCols - out.length()) / 4, oldOffset) + out);
           }
      -    
      +
           private int getDimStart(int max, int dim) {
               if (dim >= max)
                   return 1;
      @@ -116,144 +154,123 @@ private int getDimStart(int max, int dim) {
               return left / 2; // starting coord
           }
       
      +
      +    /**
      +     * Prints the "welcome" string.
      +     * 
      +     * @param x The starting x coordinate
      +     * @param y The starting y coordinate
      +     */
           private void printWelcome(int x, int y) {
               List<String> welcomeString = new ArrayList<>();
       
               String prefix = setPosition(x, y);
      -        welcomeString.add(prefix + "  _       __           __                                               __          ");
      +        welcomeString.add(prefix
      +                + "  _       __           __                                               __          ");
               prefix = setPosition(x, ++y);
      -        welcomeString.add(prefix + " | |     / /  ___     / /  _____   ____     ____ ___     ___           / /_   ____  ");
      +        welcomeString.add(prefix
      +                + " | |     / /  ___     / /  _____   ____     ____ ___     ___           / /_   ____  ");
               prefix = setPosition(x, ++y);
      -        welcomeString.add(prefix + " | | /| / /  / _ \\   / /  / ___/  / __ \\   / __  __ \\   / _ \\         / __/  / __ \\ ");
      +        welcomeString.add(prefix
      +                + " | | /| / /  / _ \\   / /  / ___/  / __ \\   / __  __ \\   / _ \\         / __/  / __ \\ ");
               prefix = setPosition(x, ++y);
      -        welcomeString.add(prefix + " | |/ |/ /  /  __/  / /  / /__   / /_/ /  / / / / / /  /  __/        / /_   / /_/ / ");
      +        welcomeString.add(prefix
      +                + " | |/ |/ /  /  __/  / /  / /__   / /_/ /  / / / / / /  /  __/        / /_   / /_/ / ");
               prefix = setPosition(x, ++y);
      -        welcomeString.add(prefix + " |__/|__/   \\___/  /_/   \\___/   \\____/  /_/ /_/ /_/   \\___/         \\__/   \\____/  ");
      +        welcomeString.add(prefix
      +                + " |__/|__/   \\___/  /_/   \\___/   \\____/  /_/ /_/ /_/   \\___/         \\__/   \\____/  ");
       
               for (int i = 0; i < welcomeString.size(); i++)
                   System.out.println(welcomeString.get(i));
           }
       
      -/* 
      -    private void printTitleDeprecated(int x, int y) {
      -        String white = "\033[0m", yellow = parser.getRightColor(Symbol.INKWELL);
      +    /**
      +     * Prints either the small or big title.
      +     * 
      +     * @param x The starting x coordinate
      +     * @param y The starting y coordinate
      +     * @param isLittle Whether the title should be small or big
      +     */
      +    private void printTitle(int x, int y, boolean isLittle) {
      +        if (isLittle)
      +            printLittleTitle(x, y);
      +        else
      +            printBigTitle(x, y);
      +    }
      +
      +    /**
      +     * Prints the big title.
      +     * 
      +     * @param x The starting x coordinate
      +     * @param y The starting y coordinate
      +     */
      +    private void printBigTitle(int x, int y) {
      +        String white = "\033[0m", yellow = parser.getRightColor(Symbol.INKWELL), bold = "\033[1m";
               List<String> titleString = new ArrayList<>();
      -        String prefix = setPosition(x, y);
       
      +        String prefix = setPosition(x, y);
               titleString.add(prefix
      -                + "   _____                                                                                                                                                                                       _____   ");
      +                + "  _____                                                                                                                                                                                                     _____  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "  ( ___ )-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------( ___ )  " );
      +                + " ( ___ )---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------( ___ ) ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |                                                                                                                                                                                       |   |   ");
      +                + "  |   |                                                                                                                                                                                                     |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |                                                                                                                                                                                       |   |   ");
      +                + "  |   |                                                                                                                                                                                                     |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |             ,gggg,                                                         ,ggg, ,ggggggg,                                                                                            |   |   ");
      +                + "  |   |                                                                                                                                                                                                     |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |           ,88'''Y8b,                     8I                               dP''Y8,8P'''''Y8b                I8                                       ,dPYb,                            |   |   ");
      +                + "  |   |           ...                         ..                                             ...     ...                      s                                                  ..    .       .x+=:.       |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |          d8'     'Y8                     8I                               Yb, '8dP'     '88                I8                                       IP''Yb                            |   |   ");
      +                + "  |   |        xH88''~ .x8X                 dF                                            .=*8888n..'%888:                   :8                                            x .d88'    @88>    z'    ^%      |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |         d8'   8b  d8                     8I                                ''  88'       88             88888888                                    I8  8I  gg                        |   |   ");
      +                + "  |   |      :8888   .f'8888Hf        u.   '88bu.                    uL   ..             X    |8888f '8888                  .88       x.    .        .u    .                5888R     %8P        .   <k     |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |        ,8I    'Y88P'                     8I                                    88        88                I8                                       I8  8'  ''                        |   |   ");
      +                + "  |   |     :8888>  X8L  ^'''   ...ue888b  '*88888bu        .u     .@88b  @88R           88x. '8888X  8888>        u       :888ooo  .@88k  z88u    .d88B :@8c        u      '888R      .       .@8Ned8'     |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |        I8'             ,ggggg,     ,gggg,8I   ,ggg,      ,gg,   ,gg            88        88    ,gggg,gg    I8    gg      gg   ,gggggg,    ,gggg,gg  I8 dP   gg     ,g,                |   |   ");
      +                + "  |   |     X8888  X888h        888R Y888r   ^'*8888N    ud8888.  ''Y888k/'*P           '8888k 8888X  ''*8h.    us888u.  -*8888888 ~'8888 ^8888   ='8888f8888r    us888u.    888R    .@88u   .@^%8888'      |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |        d8             dP'  'Y8ggg dP'  'Y8I  i8' '8i    d8''8b,dP'             88        88   dP'  'Y8I    I8    I8      8I     iP'''8I   dP'  'Y8I  I8dP    88    ,8'8,              |   |   ");
      +                + "  |   |     88888  |88888.      888R I888>  beWE '888L :888'8888.    Y888L               '8888 X888X .xH8    .@88 '8888'   8888      8888  888R     4888>'88'  .@88 '8888'   888R   ''888E' x88:  ')8b.     |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |        Y8,           i8'    ,8I  i8'    ,8I  I8, ,8I   dP   ,88'               88        88  i8'    ,8I   ,I8,   I8,    ,8I   ,8'   8I  i8'    ,8I  I8P     88   ,8'  Yb              |   |   ");
      +                + "  |   |     88888   %88888      888R I888>  888E  888E d888 '88%'     8888                 '8' X888|:888X    9888  9888    8888      8888  888R     4888> '    9888  9888    888R     888E  8888N=*8888     |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |        'Yba,,_____, ,d8,   ,d8' ,d8,   ,d8b, 'YbadP' ,dP  ,dP'Y8,              88        Y8,,d8,   ,d8b, ,d88b, ,d8b,  ,d8b,,dP     Y8,,d8,   ,d8b,,d8b,_ _,88,_,8'    8)             |   |   ");
      +                + "  |   |     88888 '> '8888>     888R I888>  888E  888E 8888.+'        '888N               =~'  X888 X888X    9888  9888    8888      8888  888R     4888>      9888  9888    888R     888E   %8'    R88     |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |          ''Y8888888 P'Y8888P'  PP'Y8888P''Y8888P'Y8888'  dP'   'Y888          888        'Y8P'Y8888P''Y888P''Y888P''Y88P''Y88P      'Y8P'Y8888P''Y88P''Y888P''Y8P'  'Y8P8PP           |   |   ");
      +                + "  |   |     '8888L %  |888   | u8888cJ888   888E  888F 8888L       .u./'888&               :h. X8*' |888X    9888  9888   .8888Lu=   8888 ,888B .  .d888L .+   9888  9888    888R     888E    @8Wou 9%      |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |                                                                                                                                                                                       |   |   ");
      +                + "  |   |      '8888  '-*''   /   '*888*P'   .888N..888  '8888c. .+ d888' Y888*'            X888xX'   '8888..: 9888  9888   ^%888*    '8888Y 8888'   ^'8888*'    9888  9888   .888B .   888&  .888888P'       |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |   |                                                                                                                                                                                       |   |   ");
      +                + "  |   |        '888.      :'      'Y'       ''888*''    '88888%   ' 'Y   Y'             :~'888f     '*888*'  '888*''888'    'Y'      'Y'   'YP        'Y'      '888*''888'  ^*888%    R888' '   ^'F         |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "   |___|                                                                                                                                                                                       |___|   ");
      +                + "  |   |          '''***~''                     ''         'YP'                              ''        '''     ^Y'   ^Y'                                         ^Y'   ^Y'     '%       ''                   |   |  ");
               prefix = setPosition(x, ++y);
               titleString.add(prefix
      -                + "  (_____)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(_____)  ");
      -
      -        System.out.println(yellow);
      -        for (int i = 0; i < titleString.size(); i++)
      -            System.out.println(titleString.get(i));
      -        System.out.println(white);
      -    }
      -*/
      -
      -    private void printTitle(int x, int y, boolean isLittle){
      -        if (isLittle)
      -            printLittleTitle(x, y);
      -        else
      -            printBigTitle(x, y);
      -    }
      -
      -    private void printBigTitle(int x, int y) {
      -        String white = "\033[0m", yellow = parser.getRightColor(Symbol.INKWELL), bold = "\033[1m";
      -        List<String> titleString = new ArrayList<>();
      -
      -        String prefix = setPosition(x, y);
      -        titleString.add(prefix + "  _____                                                                                                                                                                                                     _____  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + " ( ___ )---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------( ___ ) ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |                                                                                                                                                                                                     |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |                                                                                                                                                                                                     |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |                                                                                                                                                                                                     |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |           ...                         ..                                             ...     ...                      s                                                  ..    .       .x+=:.       |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |        xH88''~ .x8X                 dF                                            .=*8888n..'%888:                   :8                                            x .d88'    @88>    z'    ^%      |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |      :8888   .f'8888Hf        u.   '88bu.                    uL   ..             X    |8888f '8888                  .88       x.    .        .u    .                5888R     %8P        .   <k     |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |     :8888>  X8L  ^'''   ...ue888b  '*88888bu        .u     .@88b  @88R           88x. '8888X  8888>        u       :888ooo  .@88k  z88u    .d88B :@8c        u      '888R      .       .@8Ned8'     |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |     X8888  X888h        888R Y888r   ^'*8888N    ud8888.  ''Y888k/'*P           '8888k 8888X  ''*8h.    us888u.  -*8888888 ~'8888 ^8888   ='8888f8888r    us888u.    888R    .@88u   .@^%8888'      |   |  ");
      +                + "  |   |                                                                                                                                                                                                     |   |  ");
               prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |     88888  |88888.      888R I888>  beWE '888L :888'8888.    Y888L               '8888 X888X .xH8    .@88 '8888'   8888      8888  888R     4888>'88'  .@88 '8888'   888R   ''888E' x88:  ')8b.     |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |     88888   %88888      888R I888>  888E  888E d888 '88%'     8888                 '8' X888|:888X    9888  9888    8888      8888  888R     4888> '    9888  9888    888R     888E  8888N=*8888     |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |     88888 '> '8888>     888R I888>  888E  888E 8888.+'        '888N               =~'  X888 X888X    9888  9888    8888      8888  888R     4888>      9888  9888    888R     888E   %8'    R88     |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |     '8888L %  |888   | u8888cJ888   888E  888F 8888L       .u./'888&               :h. X8*' |888X    9888  9888   .8888Lu=   8888 ,888B .  .d888L .+   9888  9888    888R     888E    @8Wou 9%      |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |      '8888  '-*''   /   '*888*P'   .888N..888  '8888c. .+ d888' Y888*'            X888xX'   '8888..: 9888  9888   ^%888*    '8888Y 8888'   ^'8888*'    9888  9888   .888B .   888&  .888888P'       |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |        '888.      :'      'Y'       ''888*''    '88888%   ' 'Y   Y'             :~'888f     '*888*'  '888*''888'    'Y'      'Y'   'YP        'Y'      '888*''888'  ^*888%    R888' '   ^'F         |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |          '''***~''                     ''         'YP'                              ''        '''     ^Y'   ^Y'                                         ^Y'   ^Y'     '%       ''                   |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |                                                                                                                                                                                                     |   |  ");
      -        prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |   |                                                                                                                                                                                                     |   |  ");
      +        titleString.add(prefix
      +                + "  |   |                                                                                                                                                                                                     |   |  ");
               prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  |___|                                                                                                                                                                                                     |___|  ");
      +        titleString.add(prefix
      +                + "  |___|                                                                                                                                                                                                     |___|  ");
               prefix = setPosition(x, ++y);
      -        titleString.add(prefix + " (_____)---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(_____) ");
      +        titleString.add(prefix
      +                + " (_____)---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(_____) ");
       
               System.out.println(bold + yellow);
               for (int i = 0; i < titleString.size(); i++)
      @@ -261,20 +278,31 @@ private void printBigTitle(int x, int y) {
               System.out.println(white);
           }
       
      -    private void printLittleTitle(int x, int y){
      +    /**
      +     * Prints the small title.
      +     * 
      +     * @param x The starting x coordinate
      +     * @param y The starting y coordinate
      +     */
      +    private void printLittleTitle(int x, int y) {
               String white = "\033[0m", yellow = parser.getRightColor(Symbol.INKWELL), bold = "\033[1m";
               List<String> titleString = new ArrayList<>();
      -        
      +
               String prefix = setPosition(x, y);
      -        titleString.add(prefix + "    ______                __                         _   __            __                               __   _         ");
      +        titleString.add(prefix
      +                + "    ______                __                         _   __            __                               __   _         ");
               prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "   / ____/  ____     ____/ /  ___     _  __         / | / /  ____ _   / /_   __  __   _____   ____ _   / /  (_)  _____ ");
      +        titleString.add(prefix
      +                + "   / ____/  ____     ____/ /  ___     _  __         / | / /  ____ _   / /_   __  __   _____   ____ _   / /  (_)  _____ ");
               prefix = setPosition(x, ++y);
      -        titleString.add(prefix + "  / /      / __ \\   / __  /  / _ \\   | |/_/        /  |/ /  / __  /  / __/  / / / /  / ___/  / __  /  / /  / /  / ___/ ");
      +        titleString.add(prefix
      +                + "  / /      / __ \\   / __  /  / _ \\   | |/_/        /  |/ /  / __  /  / __/  / / / /  / ___/  / __  /  / /  / /  / ___/ ");
               prefix = setPosition(x, ++y);
      -        titleString.add(prefix + " / /___   / /_/ /  / /_/ /  /  __/  _>  <         / /|  /  / /_/ /  / /_   / /_/ /  / /     / /_/ /  / /  / /  (__  )  ");
      +        titleString.add(prefix
      +                + " / /___   / /_/ /  / /_/ /  /  __/  _>  <         / /|  /  / /_/ /  / /_   / /_/ /  / /     / /_/ /  / /  / /  (__  )  ");
               prefix = setPosition(x, ++y);
      -        titleString.add(prefix + " \\____/   \\____/   \\__,_/   \\___/  /_/|_|        /_/ |_/   \\__,_/   \\__/   \\__,_/  /_/      \\__,_/  /_/  /_/  /____/   ");
      +        titleString.add(prefix
      +                + " \\____/   \\____/   \\__,_/   \\___/  /_/|_|        /_/ |_/   \\__,_/   \\__/   \\__,_/  /_/      \\__,_/  /_/  /_/  /____/   ");
       
               System.out.println(bold + yellow);
               for (int i = 0; i < titleString.size(); i++)
      @@ -282,61 +310,19 @@ private void printLittleTitle(int x, int y){
               System.out.println(white);
           }
       
      -    private void printYouWinScreen(int x, int y){
      -        List<String> winString = new ArrayList<>();
      -
      -        String prefix = setPosition(x, y);
      -        winString.add(prefix + " '7MMF'   '7MF''7MMF' .g8'''bgd MMP''MM''YMM   .g8''8q. '7MM'''Mq.'YMM'   'MM' ");
      -        prefix = setPosition(x, ++y);
      -        winString.add(prefix + "   'MA     ,V    MM .dP'     'M P'   MM   '7 .dP'    'YM. MM   'MM. VMA   ,V   ");
      -        prefix = setPosition(x, ++y);
      -        winString.add(prefix + "    VM:   ,V     MM dM'       '      MM      dM'      'MM MM   ,M9   VMA ,V    ");
      -        prefix = setPosition(x, ++y);
      -        winString.add(prefix + "     MM.  M'     MM MM               MM      MM        MM MMmmdM9     VMMP     ");
      -        prefix = setPosition(x, ++y);
      -        winString.add(prefix + "     'MM A'      MM MM.              MM      MM.      ,MP MM  YM.      MM      ");
      -        prefix = setPosition(x, ++y);
      -        winString.add(prefix + "      :MM;       MM 'Mb.     ,'      MM      'Mb.    ,dP' MM   'Mb.    MM      ");
      -        prefix = setPosition(x, ++y);
      -        winString.add(prefix + "       VF      .JMML. ''bmmmd'     .JMML.      ''bmmd'' .JMML. .JMM. .JMML.    ");
      -
      -        for (int i = 0; i < winString.size(); i++)
      -            System.out.println(winString.get(i));
      -    }
      -
      -    private void printYouLoseScreen(int x, int y){
      -        List<String> loseString = new ArrayList<>();
      -
      -        String prefix = setPosition(x, y);
      -        loseString.add(prefix + " @@@ @@@   @@@@@@   @@@  @@@     @@@        @@@@@@    @@@@@@   @@@@@@@ ");
      -        prefix = setPosition(x, ++y);
      -        loseString.add(prefix + " @@@ @@@  @@@@@@@@  @@@  @@@     @@@       @@@@@@@@  @@@@@@@   @@@@@@@ ");
      -        prefix = setPosition(x, ++y);
      -        loseString.add(prefix + " @@ì ì@@  @@ì  @@@  @@ì  @@@     @@ì       @@ì  @@@  ì@@       @@ì     ");
      -        prefix = setPosition(x, ++y);
      -        loseString.add(prefix + " ì@ì @ìì  ì@ì  @ì@  ì@ì  @ì@     ì@ì       ì@ì  @ì@  ì@ì       ì@ì     ");
      -        prefix = setPosition(x, ++y);
      -        loseString.add(prefix + "  ì@ì@ì   @ì@  ì@ì  @ì@  ì@ì     @ìì       @ì@  ì@ì  ìì@@ìì    @ììì:ì  ");
      -        prefix = setPosition(x, ++y);
      -        loseString.add(prefix + "   @ììì   ì@ì  ììì  ì@ì  ììì     ììì       ì@ì  ììì   ìì@ììì   ììììì:  ");
      -        prefix = setPosition(x, ++y);
      -        loseString.add(prefix + "   ìì:    ìì:  ììì  ìì:  ììì     ìì:       ìì:  ììì       ì:ì  ìì:     ");
      -        prefix = setPosition(x, ++y);
      -        loseString.add(prefix + "   :ì:    :ì:  ì:ì  :ì:  ì:ì      :ì:      :ì:  ì:ì      ì:ì   :ì:     ");
      -        prefix = setPosition(x, ++y);
      -        loseString.add(prefix + "    ::    ::::: ::  ::::: ::     :: ::::   ::::: ::  :::: ::   :: :::: ");
      -        prefix = setPosition(x, ++y);
      -        loseString.add(prefix + "    :      : :  :    : :  :      : :: : :   : :  :   :: : :    : :: :: ");
      -
      -        for (int i = 0; i < loseString.size(); i++)
      -            System.out.println(loseString.get(i));
      -    }
       
      -    private void printDeck(Pair<Integer, Integer> coord, Symbol reign, DrawSource deckType){
      +    /**
      +     * Shows a deck and its "shadow", used to clearify what draw sources are decks.
      +     * 
      +     * @param coord The coordinates where the deck should be printed
      +     * @param reign The deck's top card's reign
      +     * @param deckType Whether the deck is resource or gold
      +     */
      +    private void printDeck(Pair<Integer, Integer> coord, Symbol reign, DrawSource deckType) {
               if (reign == null)
                   return;
               String bianco = "\033[0m";
      -        int xx = 8, yy = 7+1;
      +        int xx = 8, yy = 7 + 1;
       
               List<String> underCover = new ArrayList<>();
               int x = coord.first(), y = coord.second();
      @@ -364,14 +350,21 @@ private void printDeck(Pair<Integer, Integer> coord, Symbol reign, DrawSource de
               System.out.println(topDeckCar);
       
               if (deckType == DrawSource.GOLDS_DECK)
      -            System.out.println(setPosition(x+xx, y-1-1) + getCardIndex(deckType));
      +            System.out.println(setPosition(x + xx, y - 1 - 1) + getCardIndex(deckType));
               if (deckType == DrawSource.RESOURCES_DECK)
      -            System.out.println(setPosition(x+xx, y+yy+1) + getCardIndex(deckType));
      +            System.out.println(setPosition(x + xx, y + yy + 1) + getCardIndex(deckType));
       
           }
       
      -    private void printDeckVisibleCard(Pair<Integer, Integer> coord, Map<DrawSource, PlayableCard> visiblePlayableCards){
      -        String bianco = "\033[0m";
      +    /**
      +     * Prints the visible cards from which it's possible to draw.
      +     * 
      +     * @param coord The coordinates from where the printing should be started
      +     * @param visiblePlayableCards The drawable cards
      +     */
      +    private void printVisibleCards(Pair<Integer, Integer> coord,
      +            Map<DrawSource, PlayableCard> visiblePlayableCards) {
      +        String white = "\033[0m";
       
               // obtain card obj
               PlayableCard firstG = visiblePlayableCards.get(DrawSource.FIRST_VISIBLE),
      @@ -383,8 +376,7 @@ private void printDeckVisibleCard(Pair<Integer, Integer> coord, Map<DrawSource,
               int x = coord.first(), y = coord.second();
               int xOffset = 18 + 2, yOffset = 6 + 2;
               Pair<Integer, Integer> firstCoord = new Pair<>(x, y),
      -                secondCoord = new Pair<>(x + xOffset, y),
      -                thirdCoord = new Pair<>(x, y + yOffset),
      +                secondCoord = new Pair<>(x + xOffset, y), thirdCoord = new Pair<>(x, y + yOffset),
                       fourthCoord = new Pair<>(x + xOffset, y + yOffset);
       
               // obtain card as string (if it exists)
      @@ -395,29 +387,36 @@ private void printDeckVisibleCard(Pair<Integer, Integer> coord, Map<DrawSource,
                   String fourthToPrint;
                   int xx = 8, yy = 6;
       
      -            if (firstG != null){
      +            if (firstG != null) {
                       firstToPrint = this.parser.parseCard(firstG, firstCoord, null, true);
                       System.out.println(firstToPrint);
      -                System.out.println(setPosition(firstCoord.first()+xx, firstCoord.second()-1-2) + getCardIndex(DrawSource.FIRST_VISIBLE));
      -                System.out.println(bianco);
      +                System.out.println(setPosition(firstCoord.first() + xx, firstCoord.second() - 1 - 2)
      +                        + getCardIndex(DrawSource.FIRST_VISIBLE));
      +                System.out.println(white);
                   }
      -            if (secondG != null){
      +            if (secondG != null) {
                       secondToPrint = this.parser.parseCard(secondG, secondCoord, null, true);
                       System.out.println(secondToPrint);
      -                System.out.println(setPosition(secondCoord.first()+xx, secondCoord.second()-1-2) + getCardIndex(DrawSource.SECOND_VISIBLE));
      -                System.out.println(bianco);
      +                System.out
      +                        .println(setPosition(secondCoord.first() + xx, secondCoord.second() - 1 - 2)
      +                                + getCardIndex(DrawSource.SECOND_VISIBLE));
      +                System.out.println(white);
                   }
      -            if (thirdR != null){
      +            if (thirdR != null) {
                       thirdToPrint = this.parser.parseCard(thirdR, thirdCoord, null, true);
                       System.out.println(thirdToPrint);
      -                System.out.println(setPosition(thirdCoord.first()+xx, thirdCoord.second()+yy+1+1) + getCardIndex(DrawSource.THIRD_VISIBLE));
      -                System.out.println(bianco);
      +                System.out.println(
      +                        setPosition(thirdCoord.first() + xx, thirdCoord.second() + yy + 1 + 1)
      +                                + getCardIndex(DrawSource.THIRD_VISIBLE));
      +                System.out.println(white);
                   }
      -            if (fourthR != null){
      +            if (fourthR != null) {
                       fourthToPrint = this.parser.parseCard(fourthR, fourthCoord, null, true);
                       System.out.println(fourthToPrint);
      -                System.out.println(setPosition(fourthCoord.first()+xx, fourthCoord.second()+yy+1+1) + getCardIndex(DrawSource.FOURTH_VISIBLE));
      -                System.out.println(bianco);
      +                System.out.println(
      +                        setPosition(fourthCoord.first() + xx, fourthCoord.second() + yy + 1 + 1)
      +                                + getCardIndex(DrawSource.FOURTH_VISIBLE));
      +                System.out.println(white);
                   }
       
               } catch (CardException e) {
      @@ -426,8 +425,16 @@ private void printDeckVisibleCard(Pair<Integer, Integer> coord, Map<DrawSource,
       
           }
       
      -    private char getCardIndex(DrawSource drawSource){
      -        return switch (drawSource){
      +    /**
      +     * Returns the index representing a draw source, in order to make easier for the user to choose
      +     * the draw source.
      +     * 
      +     * @param drawSource The draw source
      +     * 
      +     * @return The corresponding index
      +     */
      +    private char getCardIndex(DrawSource drawSource) {
      +        return switch (drawSource) {
                   case FIRST_VISIBLE -> '1';
                   case SECOND_VISIBLE -> '2';
                   case THIRD_VISIBLE -> '3';
      @@ -438,7 +445,15 @@ private char getCardIndex(DrawSource drawSource){
               };
           }
       
      -    private String repeatChar(char c, int times){
      +    /**
      +     * Prints a character a given amount of times.
      +     * 
      +     * @param c The char
      +     * @param times The times the char should be repeated
      +     * 
      +     * @return String obtained concatenating the char
      +     */
      +    private String repeatChar(char c, int times) {
       
               StringBuilder s = new StringBuilder();
               for (int i = 0; i < times; i++)
      @@ -446,23 +461,27 @@ private String repeatChar(char c, int times){
               return s.toString();
           }
       
      -    private void boxBuilder(int totalWidth, StringBuffer upperBorder, StringBuffer middleBorder, StringBuffer lowerBorder){
      -        // int yCoord = (heightOffset > 0) ? heightOffset : 1;
      -        // int maxWidth = 43+2;
      +    /**
      +     * Creates a box, used for centered messages
      +     * 
      +     * @param totalWidth The width (column) of the content
      +     * @param upperBorder The upper border
      +     * @param middleBorder The vertical border
      +     * @param lowerBorder The lower border
      +     */
      +    private void boxBuilder(int totalWidth, StringBuffer upperBorder, StringBuffer middleBorder,
      +            StringBuffer lowerBorder) {
               int lineWidth = totalWidth - 2;
      -        // int textWidth = totalWidth - 4;
      -        // int xCoord = getDimStart(getWidth(), totalWidth); 
      -        // String prefix = setPosition(xCoord, yCoord);
      -            
      +
               // define the border template
               upperBorder.append("╔");
               upperBorder.append(repeatChar('═', lineWidth));
               upperBorder.append("╗");
      -        
      +
               middleBorder.append("╠");
               middleBorder.append(repeatChar('═', lineWidth));
               middleBorder.append("╣");
      -        
      +
               lowerBorder.append("╚");
               lowerBorder.append(repeatChar('═', lineWidth));
               lowerBorder.append("╝");
      @@ -470,25 +489,43 @@ private void boxBuilder(int totalWidth, StringBuffer upperBorder, StringBuffer m
       
           private int getMaxElemLen(List<String> stringList) {
               int max = 0;
      -        for (String s : stringList){
      +        for (String s : stringList) {
                   if (s.length() > max)
                       max = s.length();
               }
               return max;
           }
       
      -    // absolute coords
      +
      +    /**
      +     * Parses a certain coordinate to another, representing where a link number should be printed.
      +     * 
      +     * @param coord The anchor card's coordinate
      +     * @param corner The anchor card's corner
      +     * 
      +     * @return The number's coordinates
      +     */
           private Pair<Integer, Integer> getNumberCoords(Pair<Integer, Integer> coord, Corner corner) {
               return switch (corner) {
                   case Corner.TOP_LEFT -> new Pair<>(coord.first() - 2, coord.second() - 1);
      -            case Corner.TOP_RIGHT -> new Pair<>(coord.first() + cardCols + 1, coord.second()-1);
      +            case Corner.TOP_RIGHT -> new Pair<>(coord.first() + cardCols + 1, coord.second() - 1);
                   case Corner.BOTTOM_LEFT -> new Pair<>(coord.first() - 2, coord.second() + cardRows);
      -            case Corner.BOTTOM_RIGHT -> new Pair<>(coord.first() + cardCols + 1, coord.second() + cardRows);
      +            case Corner.BOTTOM_RIGHT -> new Pair<>(coord.first() + cardCols + 1,
      +                    coord.second() + cardRows);
                   default -> null;
               };
           }
       
      -    // relative coords
      +
      +    /**
      +     * Parses a certain coordinate to another, representing the coordinates of a hypotetical card
      +     * that could be linked to the anchor's card.
      +     * 
      +     * @param coord The anchor card's coordinates
      +     * @param corner The anchor card's corner
      +     * 
      +     * @return The hypotetical linked card
      +     */
           private Pair<Integer, Integer> getLinkedCoords(Pair<Integer, Integer> coord, Corner corner) {
               return switch (corner) {
                   case Corner.TOP_LEFT -> new Pair<>(coord.first() + 1, coord.second() - 1);
      @@ -499,31 +536,33 @@ private Pair<Integer, Integer> getLinkedCoords(Pair<Integer, Integer> coord, Cor
               };
           }
       
      -    //! PUBLIC METHODS //
      +    // ! PUBLIC METHODS //
       
           /**
      -     * Clears the terminal
      +     * Clears the terminal.
            */
           public void clearTerminal() {
               System.out.println("\033[2J");
           }
       
           /**
      -     * Prints the command prompt
      +     * Prints the command prompt.
            */
           public void printPrompt(String customMessage) {
               int termRows = this.getHeight();
               if (customMessage == "") {
                   System.out.print(this.setPosition(1, termRows - infoLineOffset + 1));
               } else {
      -            System.out.print(this.setPosition(1, termRows - infoLineOffset + 1) + customMessage + " ");
      +            System.out.print(
      +                    this.setPosition(1, termRows - infoLineOffset + 1) + customMessage + " ");
               }
               System.out.flush();
           }
       
      -    
      +
           /**
      -     * Prints a list of Strings to the terminal, first element of first line, last element on last line
      +     * Prints a list of Strings to the terminal, first element of first line, last element on last
      +     * line.
            * 
            * @param messages List of messages to display
            */
      @@ -531,14 +570,15 @@ public void printMessages(List<String> messages) {
               int termRows = this.getHeight();
               Integer offset = 0;
               for (String string : messages) {
      -            System.out.println(this.setPosition(1, termRows - infoLineOffset - offset ) + string);
      +            System.out.println(this.setPosition(1, termRows - infoLineOffset - offset) + string);
                   offset++;
               }
           }
       
      -    
      +
           /**
      -     * Prints a list of Strings to the terminal, first element on last line, last element of first line
      +     * Prints a list of Strings to the terminal, first element on last line, last element of first
      +     * line.
            * 
            * @param message List of messages to display
            */
      @@ -547,13 +587,14 @@ public void printListReverse(List<String> message) {
               Integer offset = 0;
               int size = message.size();
               for (String string : message) {
      -            System.out.println(this.setPosition(1, termRows - infoLineOffset - size + offset + 1) + string);
      +            System.out.println(
      +                    this.setPosition(1, termRows - infoLineOffset - size + offset + 1) + string);
                   offset++;
               }
           }
       
           /**
      -     * Prints a message in the line above the prompt
      +     * Prints a message in the line above the prompt.
            *
            * @param string The message to print
            */
      @@ -563,38 +604,37 @@ public void printMessage(String string) {
           }
       
           /**
      -     * Prints all the players' available resources (from the board)
      +     * Prints all the players' available resources (from the board).
      +     *
            * @param availableResources map from the type of resource (Symbol) to its quantity (Integer)
            * @param verticalOffset offset lines from the top (default is 1)
            */
      -    public void printAvailableResources(Map<Symbol, Integer> availableResources, Integer verticalOffset) {
      -        // ! strettamente connessa a (private) printPoints per visibilità        
      -
      -        // int termRows = this.getHeight(); 
      -        // int vertCoord = (verticalOffset != 1) ? 1 : verticalOffset; 
      +    public void printAvailableResources(Map<Symbol, Integer> availableResources,
      +            Integer verticalOffset) {
               int vertCoord = this.getHeight() - this.infoLineOffset;
               int termCols = this.getWidth();
               String out = "";
               String spaces = "    ";
      -        Integer len = availableResources.keySet().size() * (5 + spaces.length()); // icon, space, :, space, number
      -        List<Symbol> toPrint =
      -                List.of(Symbol.PLANT, Symbol.INSECT, Symbol.FUNGUS, Symbol.ANIMAL, Symbol.PARCHMENT, Symbol.FEATHER, Symbol.INKWELL);
      +        Integer len = availableResources.keySet().size() * (5 + spaces.length()); // icon, space, :,
      +                                                                                  // space, number
      +        List<Symbol> toPrint = List.of(Symbol.PLANT, Symbol.INSECT, Symbol.FUNGUS, Symbol.ANIMAL,
      +                Symbol.PARCHMENT, Symbol.FEATHER, Symbol.INKWELL);
       
               for (Symbol resource : toPrint) {
      -            out += parser.getRightColor(resource) + parser.getRightIcon(resource) + ": " + availableResources.get(resource) + spaces;
      +            out += parser.getRightColor(resource) + parser.getRightIcon(resource) + ": "
      +                    + availableResources.get(resource) + spaces;
               }
       
               System.out.println(this.setPosition((termCols - len) / 2, vertCoord) + out + "\033[0m");
           }
       
           /**
      -     * Prints the whole board, including username, points and resources
      +     * Prints the whole board, including username, points and resources.
            *
            * @param username The username to print
            * @param board the board to be printed
            */
           public void printPlayerBoard(String username, ClientBoard board) {
      -        // this.clearTerminal();
               if (board == null) {
                   this.printMessage("No such player exists!");
                   return;
      @@ -603,12 +643,13 @@ public void printPlayerBoard(String username, ClientBoard board) {
               for (Integer turn : placed.keySet()) {
                   this.printCard(placed.get(turn));
               }
      -        this.printAvailableResources(board.getAvailableResources(), this.getHeight() - infoLineOffset);
      +        this.printAvailableResources(board.getAvailableResources(),
      +                this.getHeight() - infoLineOffset);
               this.printPoints(username, board.getColor(), board.getPoints());
           }
       
           /**
      -     * Prints the hand of the player, which includes the 3 available-to-play cards
      +     * Prints the hand of the player, which includes the 3 available-to-play cards.
            *
            * @param username username of the player
            * @param color color of the player's token
      @@ -622,7 +663,9 @@ public void printHand(String username, Color color, List<PlayableCard> hand) {
               Integer last = (termCols - (handSize) * (cardCols)) / 2 - spaces * (handSize - 1) / 2;
               for (PlayableCard card : hand) {
                   try {
      -                System.out.println(parser.parseCard(card, new Pair<Integer, Integer>(last, 2), null, true) + "\033[0m");
      +                System.out.println(
      +                        parser.parseCard(card, new Pair<Integer, Integer>(last, 2), null, true)
      +                                + "\033[0m");
                       last += cardCols + spaces;
                   } catch (Exception e) {
                       e.printStackTrace();
      @@ -631,17 +674,16 @@ public void printHand(String username, Color color, List<PlayableCard> hand) {
           }
       
           /**
      -     * Prints the objectives, both common and secret, of a given player
      +     * Prints the objectives, both common and secret, of a given player.
            *
            * @param username username of the player
            * @param color color of the player's token
            * @param secret secret objective (as ID)
            * @param visibles array of common objectives (as IDs)
            */
      -    public void printObjectives(String username, Color color, Objective secret, Pair<Objective, Objective> visibles) {
      +    public void printObjectives(String username, Color color, Objective secret,
      +            Pair<Objective, Objective> visibles) {
               int termCols = this.getWidth();
      -        // Integer visiblesSize = 2;
      -        // Integer spaces = 4;
               Integer strlen;
       
               strlen = ("Your secret objective").length();
      @@ -650,19 +692,23 @@ public void printObjectives(String username, Color color, Objective secret, Pair
               System.out.println(this.setPosition(last, 1) + username);
       
               last = (termCols - cardCols) / 2;
      -        System.out.println(parser.parseObjective(secret, new Pair<Integer, Integer>(last, 2)) + "\033[0m");
      +        System.out.println(
      +                parser.parseObjective(secret, new Pair<Integer, Integer>(last, 2)) + "\033[0m");
       
               int verticalSpaceAlreadyUsedForSecretObjective = (7) + 1 + 1;
      -        printObjectivePair("Common objectives:", visibles, verticalSpaceAlreadyUsedForSecretObjective);
      +        printObjectivePair("Common objectives:", visibles,
      +                verticalSpaceAlreadyUsedForSecretObjective);
       
           }
       
           /**
      -     * Prints a pair of objectives, with a brief description above them
      +     * Prints a pair of objectives, with a brief description above them.
      +     * 
            * @param pairObjectives pair of objectives
            * @param heightOffset offset lines from the top (default is 1)
            */
      -    public void printObjectivePair(String message, Pair<Objective, Objective> pairObjectives, int heightOffset){
      +    public void printObjectivePair(String message, Pair<Objective, Objective> pairObjectives,
      +            int heightOffset) {
               int yOffset = (heightOffset <= 0) ? 1 : heightOffset;
       
               // common objectives STRING
      @@ -675,7 +721,8 @@ public void printObjectivePair(String message, Pair<Objective, Objective> pairOb
               xCoord = getDimStart(this.getWidth(), (2 * cardWidth) + spaceBetweenSides);
       
               Pair<Integer, Integer> obj1Coord = new Pair<>(xCoord, yOffset);
      -        Pair<Integer, Integer> obj2Coord = new Pair<>(xCoord + cardWidth + spaceBetweenSides, yOffset);
      +        Pair<Integer, Integer> obj2Coord =
      +                new Pair<>(xCoord + cardWidth + spaceBetweenSides, yOffset);
               String obj1 = this.parser.parseObjective(pairObjectives.first(), obj1Coord);
               String obj2 = this.parser.parseObjective(pairObjectives.second(), obj2Coord);
       
      @@ -683,99 +730,107 @@ public void printObjectivePair(String message, Pair<Objective, Objective> pairOb
           }
       
           /**
      -     * Prints the message history of the most recent messages
      +     * Prints the message history of the most recent messages.
            *
            * @param chat chat object, as a list of strings
            */
           public void printChat(List<String> chat) {
      -        
               printSimpleList(chat, false, false);
      -        // int rows = this.getHeight() - infoLineOffset + 1;
      -        // int start = chat.size() - rows;
      -        // if (start < 0) {
      -        //     start = 0;
      -        // }
      -        // for (int i = start; i < chat.size(); i++) {
      -        //     System.out.println(this.setPosition(1, i - start) + chat.get(i));            
      -        // }
           }
       
           /**
      -     * Prints a list of available commands
      -     */
      -    public void printHelp() {
      -        // String prefix = "Command used to";
      -        String prefix = "";
      -        int maxLen = this.getHeight() - infoLineOffset + 1;
      -        int y = maxLen - this.commandList.size();
      -
      -        for (Pair<String, String> command : this.commandList.keySet()) {
      -            System.out.printf("%s%-15s %2s: %s %s", this.setPosition(1, y), command.first(), command.second(), prefix, this.commandList.get(command));
      -            y++;
      -
      -        }
      -    }
      -
      -    /**
      -     * Prints the welcome screen in the middle of the tui view
      +     * Prints the welcome screen in the middle of the tui view.
            */
           public void printWelcomeScreen() {
      -        
      -        // get title and welcome sizes 
      -        int welcomeHeight = 5, welcomeWidth = 88+2; // width must be even (pari)
      +
      +        // get title and welcome sizes
      +        int welcomeHeight = 5, welcomeWidth = 88 + 2; // width must be even (pari)
               int spaceBetween = 3;
      -        int titleHeight = 21, titleWidth = 210+2; // width must be even (pari)
      +        int titleHeight = 21, titleWidth = 210 + 2; // width must be even (pari)
               int verticalOffset = -10;
      -        
      -        boolean isLittle = (this.terminal.getWidth() < titleWidth || this.terminal.getHeight() < welcomeHeight - verticalOffset + titleHeight) ? true : false;
      -        if (isLittle){
      +
      +        boolean isLittle = (this.terminal.getWidth() < titleWidth
      +                || this.terminal.getHeight() < welcomeHeight - verticalOffset + titleHeight) ? true
      +                        : false;
      +        if (isLittle) {
                   titleHeight = 5;
                   titleWidth = 118 + 2;
                   verticalOffset = -1;
               }
      -        
      -        // get coordinates 
      -        int welcomeStartY = getDimStart(this.getHeight(), welcomeHeight + spaceBetween + titleHeight);
      +
      +        // get coordinates
      +        int welcomeStartY =
      +                getDimStart(this.getHeight(), welcomeHeight + spaceBetween + titleHeight);
               int titleStartY = welcomeStartY + welcomeHeight + spaceBetween;
       
               int welcomeStartX = getDimStart(this.getWidth(), welcomeWidth);
               int titleStartX = getDimStart(this.getWidth(), titleWidth);
      -        
      -        // print welcome and title 
      +
      +        // print welcome and title
               printWelcome(welcomeStartX, welcomeStartY + verticalOffset);
               printTitle(titleStartX, titleStartY + verticalOffset, isLittle);
           }
       
           /**
      -     * Prints the end screen (win/lose) in the middle of the tui view
      -     * @param isVictorious whether the player won or not
      +     * Prints the game's ranking.
      +     * 
      +     * @param ranking The Leaderboard
      +     * @param username The player's username, used to highlight your rank
            */
      -    public void printEndScreen(Boolean isVictorious){
      -        int maxHeight = this.getHeight() - this.infoLineOffset;
      +    public synchronized void printEndScreen(List<LeaderboardEntry> ranking, String username) {
               int maxWidth = this.getWidth() - 2;
       
      -        int msgHeight, msgWidth;
      -        int x, y;
      -        int verticalOffset = -10;
      -        if (isVictorious){
      -            msgHeight = 7;
      -            msgWidth = 78+2; // width must be even (pari)
      -            x = getDimStart(maxWidth, msgWidth);
      -            y = getDimStart(maxHeight, msgHeight);
      -            printYouWinScreen(x, y + verticalOffset);
      +        this.clearTerminal();
      +        List<String> winning = new ArrayList<String>();
      +        List<String> losing = new ArrayList<String>();
      +        for (LeaderboardEntry leaderboardEntry : ranking) {
      +            String user = leaderboardEntry.username();
      +            if (user.equals(username)) {
      +                String color;
      +                if (leaderboardEntry.winner()) {
      +                    color = "\033[31m";
      +                } else {
      +                    color = "\033[33m";
      +                }
      +
      +                user = color + "YOU" + "\033[0m";
      +            }
      +            String entry = user + " (" + leaderboardEntry.points() + ")";
      +            if (leaderboardEntry.winner()) {
      +                winning.add(entry);
      +            } else {
      +                losing.add(entry);
      +            }
      +        }
       
      -        } else {
      -            msgHeight = 10;
      -            msgWidth = 70+2; // width must be even (pari)
      -            x = getDimStart(maxWidth, msgWidth);
      -            y = getDimStart(maxHeight, msgHeight);
      -            printYouLoseScreen(x, y + verticalOffset);
      +        String winningTitle = winning.size() == 1 ? "Winner: " : "Draw:";
      +        String losingTitle = "Losers:";
      +
      +        final int startPos = (maxWidth - winningTitle.length()) / 2;
      +        System.out.println(this.setPosition(startPos, 2) + winningTitle);
      +        int i = 0;
      +        final int base = 3;
      +        for (String winner : winning) {
      +            System.out.println(this.setPosition(startPos, base + i) + winner);
      +            i++;
      +        }
       
      +        if (losing.size() > 0) {
      +            i++;
      +            System.out.println(this.setPosition(startPos, base + i) + losingTitle);
      +            i++;
      +            for (String loser : losing) {
      +                System.out.println(this.setPosition(startPos, base + i) + loser);
      +                i++;
      +            }
               }
      +
      +        System.out.println(this.setPosition(0, this.getHeight()) + " ");
      +        System.exit(0);
           }
       
           /**
      -     * Prints the specified initial card front and back in the middle of the screen
      +     * Prints the specified initial card front and back in the middle of the screen.
            * 
            * @param initialCard initial card to print
            * @param heightOffset offset lines from the top (default is 1)
      @@ -788,47 +843,48 @@ public void printInitialSideBySide(InitialCard initialCard, int heightOffset) {
               int width = getDimStart(this.getWidth(), (2 * cardWidth) + spaceBetweenSides);
       
               Pair<Integer, Integer> faceupCoord = new Pair<>(width, offset);
      -        Pair<Integer, Integer> facedownCoord = new Pair<>(width + cardWidth + spaceBetweenSides, offset);
      +        Pair<Integer, Integer> facedownCoord =
      +                new Pair<>(width + cardWidth + spaceBetweenSides, offset);
       
               try {
                   faceup = this.parser.parseCard(initialCard, faceupCoord, null, true);
                   facedown = this.parser.parseCard(initialCard, facedownCoord, null, false);
                   System.out.println(faceup + facedown);
               } catch (CardException e) {
      -            // TODO: handle exception ?
               }
           }
       
           /**
      -     * Prints the specified initial card front and back in the middle of the screen
      +     * Prints the specified initial card front and back in the middle of the screen.
            * 
            * @param playableCard gold/resource card to print
            * @param heightOffset offset lines from the top. For default (y-centered) must be 0
            */
      -    public void printPlayableFrontAndBack(PlayableCard playableCard, int heightOffset){
      -        int yCoord = (heightOffset > 0) ? heightOffset : getDimStart(getHeight()-1, 6);
      +    public void printPlayableFrontAndBack(PlayableCard playableCard, int heightOffset) {
      +        int yCoord = (heightOffset > 0) ? heightOffset : getDimStart(getHeight() - 1, 6);
               int cardWidth = 18, spaceBetweenSides = 4;
               int xCoord = getDimStart(getWidth(), cardWidth + spaceBetweenSides + cardWidth);
       
               String faceUp, faceDown, bianco = "\033[0m";
               Pair<Integer, Integer> faceupCoord = new Pair<>(xCoord, yCoord);
      -        Pair<Integer, Integer> facedownCoord = new Pair<>(xCoord + cardWidth + spaceBetweenSides, yCoord);
      +        Pair<Integer, Integer> facedownCoord =
      +                new Pair<>(xCoord + cardWidth + spaceBetweenSides, yCoord);
       
               try {
      -           faceUp = this.parser.parseCard(playableCard, faceupCoord, null, true);
      -           faceDown = this.parser.parseCard(playableCard, facedownCoord, null, false);
      -           System.out.println(faceUp + faceDown + bianco);
      -        } catch (Exception e) {
      -            // TODO: handle exception ?
      +            faceUp = this.parser.parseCard(playableCard, faceupCoord, null, true);
      +            faceDown = this.parser.parseCard(playableCard, facedownCoord, null, false);
      +            System.out.println(faceUp + faceDown + bianco);
      +        } catch (CardException e) {
               }
           }
       
           /**
      -     * Prints a one-line message in the center of the screen
      +     * Prints a one-line message in the center of the screen.
      +     *
            * @param message message to display
            * @param heightOffset offset lines from the top. For default (y-centered) must be 0
            */
      -    public void printCenteredMessage(String message, int heightOffset){
      +    public void printCenteredMessage(String message, int heightOffset) {
               int maxWidth = message.length();
               if (maxWidth > getWidth() - 4)
                   return;
      @@ -841,17 +897,17 @@ public void printCenteredMessage(String message, int heightOffset){
               String prefix = setPosition(xCoord, yCoord);
       
               // define the border template
      -        StringBuffer upperBorder    = new StringBuffer("╔");
      -        upperBorder.append(repeatChar('═', maxWidth+2));
      +        StringBuffer upperBorder = new StringBuffer("╔");
      +        upperBorder.append(repeatChar('═', maxWidth + 2));
               upperBorder.append("╗");
      -        StringBuffer center  = new StringBuffer("║ ");
      +        StringBuffer center = new StringBuffer("║ ");
               center.append(style + message + resetStyle);
               center.append(" ║");
      -        StringBuffer lowerBorder    = new StringBuffer("╚");
      -        lowerBorder.append(repeatChar('═', maxWidth+2));
      +        StringBuffer lowerBorder = new StringBuffer("╚");
      +        lowerBorder.append(repeatChar('═', maxWidth + 2));
               lowerBorder.append("╝");
       
      -        // print 
      +        // print
               System.out.println(prefix + upperBorder.toString());
               prefix = setPosition(xCoord, ++yCoord);
               System.out.println(prefix + center.toString());
      @@ -861,11 +917,14 @@ public void printCenteredMessage(String message, int heightOffset){
           }
       
           /**
      -     * Prints the drawing screen, containing the 2 decks and the 4 visible cards. Unavailable resources are not displayed.
      +     * Prints the drawing screen, containing the 2 decks and the 4 visible cards. Unavailable
      +     * resources are not displayed.
      +     *
            * @param decksTopReign pair of the 2 top-deck cards
            * @param visiblePlayableCards map of visible cards
            */
      -    public void printDrawingScreen(Pair<Symbol, Symbol> decksTopReign, Map<DrawSource, PlayableCard> visiblePlayableCards) {
      +    public void printDrawingScreen(Pair<Symbol, Symbol> decksTopReign,
      +            Map<DrawSource, PlayableCard> visiblePlayableCards) {
               // int maxHeight = this.getHeight() - this.infoLineOffset;
               int deckHeight = 6 + 2, deckWidth = 18 + 1; // width must be even (pari)
               int xSpaceBetween = 12, ySpaceBetween = 0;
      @@ -877,22 +936,26 @@ public void printDrawingScreen(Pair<Symbol, Symbol> decksTopReign, Map<DrawSourc
               int cardsStartY = deckStartY;
       
               printDeck(new Pair<>(deckStartX, deckStartY), decksTopReign.first(), DrawSource.GOLDS_DECK);
      -        printDeck(new Pair<>(deckStartX, deckStartY + deckHeight + ySpaceBetween), decksTopReign.second(), DrawSource.RESOURCES_DECK);
      -        printDeckVisibleCard(new Pair<>(cardsStartX, cardsStartY), visiblePlayableCards);
      +        printDeck(new Pair<>(deckStartX, deckStartY + deckHeight + ySpaceBetween),
      +                decksTopReign.second(), DrawSource.RESOURCES_DECK);
      +        printVisibleCards(new Pair<>(cardsStartX, cardsStartY), visiblePlayableCards);
           }
       
           /**
      -     * Prints the list of matches (joinable or not) in the center of the screen. It can print a maximum of 99 matches.
      +     * Prints the list of matches (joinable or not) in the center of the screen. It can print a
      +     * maximum of 99 matches.
      +     *
            * @param joinableMatches list of available matches
            * @param unavailableMatches list of not joinable matches
            * @param heightOffset offset lines from the top (default is 1)
            */
      -    public void printMatchesLobby(List<AvailableMatch> joinableMatches, List<AvailableMatch> unavailableMatches, int heightOffset){
      +    public void printMatchesLobby(List<AvailableMatch> joinableMatches,
      +            List<AvailableMatch> unavailableMatches, int heightOffset) {
               int yCoord = (heightOffset > 0) ? heightOffset : 1;
               int maxWidth = 45;
      -        int xCoord = getDimStart(getWidth(), maxWidth); 
      +        int xCoord = getDimStart(getWidth(), maxWidth);
               String prefix = setPosition(xCoord, yCoord);
      -            
      +
               // define the border template
               StringBuffer upperBorder = new StringBuffer();
               StringBuffer middleBorder = new StringBuffer();
      @@ -902,28 +965,44 @@ public void printMatchesLobby(List<AvailableMatch> joinableMatches, List<Availab
               // print upper and middle border
               System.out.println(prefix + upperBorder.toString());
               prefix = setPosition(xCoord, ++yCoord);
      -        System.out.println(prefix + "║      \033[1mMatches                        Slots\033[0m ║");            // manually adjust according to maxWidth
      +        System.out.println(prefix + "║      \033[1mMatches                        Slots\033[0m ║"); // manually
      +                                                                                                    // adjust
      +                                                                                                    // according
      +                                                                                                    // to
      +                                                                                                    // maxWidth
               prefix = setPosition(xCoord, ++yCoord);
               System.out.println(prefix + middleBorder.toString());
               prefix = setPosition(xCoord, ++yCoord);
      -        
      +
       
               // print list of joinable matches
      -        String white = "\033[0m", green = "\033[32m";
      +        String white = "\033[0m", green = "\033[32m", yellow = "\033[33m";
               int matchIndex = 1;
      -        for (AvailableMatch m1 : joinableMatches){
      +        for (AvailableMatch m1 : joinableMatches) {
      +
      +            if (joinableMatches.get(matchIndex - 1).isRejoinable()) {
      +                System.out.printf("%s║ %s[%02d] %-31s    %s  ║", prefix, yellow, matchIndex,
      +                        m1.name().toString(), white); // manually adjust according to maxWidth
      +            } else {
      +                System.out.printf("%s║ %s[%02d] %-31s %s/%s%s  ║", prefix, green, matchIndex,
      +                        m1.name().toString(), m1.currentPlayers().toString(),
      +                        m1.maxPlayers().toString(), white); // manually adjust according to maxWidth
      +            }
       
      -            // color = (match.maxPlayers() == match.currentPlayers()) ? "\033[31m" : "\033[35m";
      -            System.out.printf("%s║ [%02d] %s%-31s %s/%s%s  ║", prefix, matchIndex, green, m1.name().toString(), m1.currentPlayers().toString(), m1.maxPlayers().toString(), white);     // manually adjust according to maxWidth
                   prefix = setPosition(xCoord, ++yCoord);
                   matchIndex++;
               }
       
               // print list of unavailable matches
               String red = "\033[31m";
      -        for (AvailableMatch m2 : unavailableMatches){
      -
      -            System.out.printf("%s║ [--] %s%-31s %s/%s%s  ║", prefix, red, m2.name().toString(), m2.currentPlayers().toString(), m2.maxPlayers().toString(), white);     // manually adjust according to maxWidth
      +        for (AvailableMatch m2 : unavailableMatches) {
      +
      +            System.out.printf("%s║ [--] %s%-31s %s/%s%s  ║", prefix, red, m2.name().toString(),
      +                    m2.currentPlayers().toString(), m2.maxPlayers().toString(), white); // manually
      +                                                                                        // adjust
      +                                                                                        // according
      +                                                                                        // to
      +                                                                                        // maxWidth
                   prefix = setPosition(xCoord, ++yCoord);
               }
       
      @@ -932,42 +1011,48 @@ public void printMatchesLobby(List<AvailableMatch> joinableMatches, List<Availab
           }
       
           /**
      -     * Prints the scoreboard at the end of the match
      +     * Prints the scoreboard at the end of the match.
      +     *
            * @param playerToPoints map from player name as string, to total points as integer
            * @param heightOffset offset lines from the top (default is 1)
            */
      -    public void printScoreboard(Map<String, Integer> playerToPoints, int heightOffset){
      +    public void printScoreboard(Map<String, Integer> playerToPoints, int heightOffset) {
               int yCoord = (heightOffset > 0) ? heightOffset : 1;
      -        int maxWidth = 38+2;
      -        int xCoord = getDimStart(getWidth(), maxWidth); 
      +        int maxWidth = 38 + 2;
      +        int xCoord = getDimStart(getWidth(), maxWidth);
               String prefix = setPosition(xCoord, yCoord);
      -        
      -        // ? order the players by points
      -        // ? bold + color for the current player?
      -        
      +
               // define the border template
      -        StringBuffer upperBorder    = new StringBuffer("╔");
      -        upperBorder.append(repeatChar('═', maxWidth-2));
      +        StringBuffer upperBorder = new StringBuffer("╔");
      +        upperBorder.append(repeatChar('═', maxWidth - 2));
               upperBorder.append("╗");
      -        StringBuffer middleBorder  = new StringBuffer("╠");
      -        middleBorder.append(repeatChar('═', maxWidth-2));
      +        StringBuffer middleBorder = new StringBuffer("╠");
      +        middleBorder.append(repeatChar('═', maxWidth - 2));
               middleBorder.append("╣");
      -        StringBuffer lowerBorder    = new StringBuffer("╚");
      -        lowerBorder.append(repeatChar('═', maxWidth-2));
      +        StringBuffer lowerBorder = new StringBuffer("╚");
      +        lowerBorder.append(repeatChar('═', maxWidth - 2));
               lowerBorder.append("╝");
       
               // print upper and middle border
               System.out.println(prefix + upperBorder.toString());
               prefix = setPosition(xCoord, ++yCoord);
      -        System.out.println(prefix + "║ \033[1mPlayer                         Score\033[0m ║");            // manually adjust according to maxWidth
      +        System.out.println(prefix + "║ \033[1mPlayer                         Score\033[0m ║"); // manually
      +                                                                                               // adjust
      +                                                                                               // according
      +                                                                                               // to
      +                                                                                               // maxWidth
               prefix = setPosition(xCoord, ++yCoord);
               System.out.println(prefix + middleBorder.toString());
               prefix = setPosition(xCoord, ++yCoord);
      -        
      +
               // print list of players
      -        for (String s : playerToPoints.keySet()){
      -            System.out.printf("%s║ %-31s%4s  ║", prefix, s, playerToPoints.get(s).toString());     // manually adjust according to maxWidth
      -            prefix = setPosition(xCoord, ++yCoord);    
      +        for (String s : playerToPoints.keySet()) {
      +            System.out.printf("%s║ %-31s%4s  ║", prefix, s, playerToPoints.get(s).toString()); // manually
      +                                                                                               // adjust
      +                                                                                               // according
      +                                                                                               // to
      +                                                                                               // maxWidth
      +            prefix = setPosition(xCoord, ++yCoord);
               }
       
               // print lower border
      @@ -975,7 +1060,8 @@ public void printScoreboard(Map<String, Integer> playerToPoints, int heightOffse
           }
       
           /**
      -     * Prints the hand of the player at the bottom of the screen
      +     * Prints the hand of the player at the bottom of the screen.
      +     *
            * @param hand list of the 3 playable cards (hand)
            */
           public void printHandAtBottom(List<PlayableCard> hand) {
      @@ -984,11 +1070,13 @@ public void printHandAtBottom(List<PlayableCard> hand) {
               Integer spaces = 4;
       
               Integer last = (termCols - (handSize) * (cardCols)) / 2 - spaces * (handSize - 1) / 2;
      -        Integer row = this.getHeight()-TuiPrinter.cardRows-3;
      +        Integer row = this.getHeight() - TuiPrinter.cardRows - 3;
       
               for (PlayableCard card : hand) {
                   try {
      -                System.out.println(parser.parseCard(card, new Pair<Integer, Integer>(last, row), null, true) + "\033[0m");
      +                System.out.println(
      +                        parser.parseCard(card, new Pair<Integer, Integer>(last, row), null, true)
      +                                + "\033[0m");
                       last += cardCols + spaces;
                   } catch (Exception e) {
                       e.printStackTrace();
      @@ -997,16 +1085,18 @@ public void printHandAtBottom(List<PlayableCard> hand) {
           }
       
           /**
      -     * Prints a list of strings
      +     * Prints a list of strings with a box around them.
      +     *
            * @param stringList list of strings
            * @param msg message to display
            * @param textColor color of the players' name (red or green)
            * @param isCentered if the list has to be centered in the tui or not
            */
      -    public void printStringsBoxed(List<String> stringList, String msg, Color textColor, Boolean isCentered) {
      -        int maxWidth = 40;  //leave it even
      -        int xCoord = getDimStart(getWidth(), maxWidth); 
      -        int yCoord = (isCentered) ? getDimStart(terminal.getHeight(), stringList.size()+4) : 1;
      +    public void printStringsBoxed(List<String> stringList, String msg, Color textColor,
      +            Boolean isCentered) {
      +        int maxWidth = 40; // leave it even
      +        int xCoord = getDimStart(getWidth(), maxWidth);
      +        int yCoord = (isCentered) ? getDimStart(terminal.getHeight(), stringList.size() + 4) : 1;
               String bold = "\033[1m", reset = "\033[0m", color;
               switch (textColor) {
                   case RED:
      @@ -1016,7 +1106,7 @@ public void printStringsBoxed(List<String> stringList, String msg, Color textCol
                       color = "\033[32m";
                       break;
                   default:
      -                color = reset; 
      +                color = reset;
                       break;
               }
       
      @@ -1030,25 +1120,25 @@ public void printStringsBoxed(List<String> stringList, String msg, Color textCol
               // String msg = "Connected Players";
               StringBuffer title = new StringBuffer();
               title.append("║").append(bold);
      -        if (msg.length() % 2 != 0){
      +        if (msg.length() % 2 != 0) {
                   title.append(repeatChar(' ', (maxWidth - msg.length() - 2) / 2));
                   title.append(msg);
                   title.append(repeatChar(' ', ((maxWidth - msg.length() - 2) / 2) + 1));
      -    
      +
               } else {
                   title.append(repeatChar(' ', (maxWidth - msg.length() - 2) / 2));
                   title.append(msg);
      -            title.append(repeatChar(' ', (maxWidth - msg.length() - 2) / 2));    
      +            title.append(repeatChar(' ', (maxWidth - msg.length() - 2) / 2));
               }
               title.append("║").append(reset);
      -        
      +
               // define players' lines
               List<String> playerList = new ArrayList<>();
               for (String s : stringList) {
       
                   StringBuffer player = new StringBuffer();
                   player.append("║").append(color);
      -            if (s.length() % 2 != 0){
      +            if (s.length() % 2 != 0) {
                       player.append(repeatChar(' ', (maxWidth - s.length() - 2) / 2));
                       player.append(s);
                       player.append(repeatChar(' ', ((maxWidth - s.length() - 2) / 2) + 1));
      @@ -1076,42 +1166,45 @@ public void printStringsBoxed(List<String> stringList, String msg, Color textCol
                   prefix = setPosition(xCoord, ++yCoord);
               }
               System.out.println(prefix + lowerBorder);
      -        
      +
           }
      -    
      +
           /**
      -     * Prints a list, simple or numbered, either in the center or in the bottom left of the tui
      +     * Prints a list, simple or numbered, either in the center or in the bottom left of the tui.
      +     *
            * @param stringList list of strings
            * @param isCentered if you want it centered or not
            * @param isNumbered if you want it numbered or not
            */
      -    public void printSimpleList(List<String> stringList, Boolean isCentered, Boolean isNumbered){
      +    public void printSimpleList(List<String> stringList, Boolean isCentered, Boolean isNumbered) {
               // coords with case
      -        int xCoord = (isCentered) ? getDimStart(getWidth(), getMaxElemLen(stringList)) : 1; 
      -        int yCoord = (isCentered) ? (terminal.getHeight() - stringList.size()) : (this.getHeight() - infoLineOffset + 1 - stringList.size());
      +        int xCoord = (isCentered) ? getDimStart(getWidth(), getMaxElemLen(stringList)) : 1;
      +        int yCoord = (isCentered) ? (terminal.getHeight() - stringList.size())
      +                : (this.getHeight() - infoLineOffset + 1 - stringList.size());
               int index = 0;
      -        if (yCoord <= 0){
      -            index = -yCoord+2;
      +        if (yCoord <= 0) {
      +            index = -yCoord + 2;
                   yCoord = 1;
               }
      -    
      +
               // printing phase
               int i = 1;
               String prefix = setPosition(xCoord, yCoord);
      -        for (; index < stringList.size(); index++){
      +        for (; index < stringList.size(); index++) {
                   if (isNumbered)
                       System.out.println(prefix + String.valueOf(i++) + ") " + stringList.get(index));
                   else
                       System.out.println(prefix + stringList.get(index));
      -            
      +
                   prefix = setPosition(xCoord, ++yCoord);
               }
           }
      -    
      +
           /**
      -     * Prints indexes for available spots, during the placing card phase
      -     * @param validPlaces map FROM board's coordinates where the hypotetic card would be TO a pair, 
      -     * consisting of a number (the index) and the corner where future card would be linked 
      +     * Prints indexes for available spots, during the placing card phase.
      +     *
      +     * @param validPlaces map FROM board's coordinates where the hypotetic card would be TO a pair,
      +     *        consisting of a number (the index) and the corner where future card would be linked
            */
           public void printValidPlaces(Map<Pair<Integer, Integer>, Pair<Integer, Corner>> validPlaces) {
               Corner link;
      @@ -1122,9 +1215,10 @@ public void printValidPlaces(Map<Pair<Integer, Integer>, Pair<Integer, Corner>>
                   linkedCard = this.getLinkedCoords(coord, link);
                   abs = this.getNumberCoords(this.getAbsoluteCoords(linkedCard), link);
       
      -            System.out.print(this.setPosition(abs.first(), abs.second()) + validPlaces.get(coord).first());
      +            System.out.print(
      +                    this.setPosition(abs.first(), abs.second()) + validPlaces.get(coord).first());
                   System.out.flush();
               }
           }
      -    
      +
       }
      diff --git a/src/main/java/it/polimi/ingsw/client/frontend/tui/ValidPositions.java b/src/main/java/it/polimi/ingsw/client/frontend/tui/ValidPositions.java
      index e4ff9f1a..836acc9a 100644
      --- a/src/main/java/it/polimi/ingsw/client/frontend/tui/ValidPositions.java
      +++ b/src/main/java/it/polimi/ingsw/client/frontend/tui/ValidPositions.java
      @@ -11,23 +11,42 @@
       import it.polimi.ingsw.utils.Pair;
       
       /**
      - * ValidPositions
      + * Valid positions of a board, ie all the points a new card can be linked to
        */
      -
       public class ValidPositions {
           private final Map<Pair<Integer, Integer>, BoardPosition> coordinates;
           private static final Map<Corner, Pair<Integer, Integer>> offsets =
                   Map.of(Corner.TOP_LEFT, new Pair<Integer, Integer>(-1, 1), Corner.TOP_RIGHT, new Pair<Integer, Integer>(1, 1),
                           Corner.BOTTOM_LEFT, new Pair<Integer, Integer>(-1, -1), Corner.BOTTOM_RIGHT, new Pair<Integer, Integer>(1, -1));
       
      +    
      +    /**
      +     * Class constructor.
      +     */
           public ValidPositions() {
               this.coordinates = new HashMap<>();
           }
      -
      +    
      +    /**
      +     * Sums two coordinates.
      +     * 
      +     * @param coord First coordinate
      +     * @param offset Second coordinate
      +     * 
      +     * @return The sum of the two coordinates
      +     */
           private Pair<Integer, Integer> offsetCoord(Pair<Integer, Integer> coord, Pair<Integer, Integer> offset) {
               return new Pair<Integer, Integer>(coord.first() + offset.first(), coord.second() + offset.second());
           }
       
      +    
      +    /**
      +     * Checks if a coordinate is a valid link point.
      +     * 
      +     * @param coord The coordinate to check
      +     * 
      +     * @return whether the coordinate is a valid link point or not
      +     */
           public boolean isValid(Pair<Integer, Integer> coord) {
               if (this.coordinates.get(coord) == null) {
                   return false;
      @@ -36,6 +55,11 @@ public boolean isValid(Pair<Integer, Integer> coord) {
               return this.coordinates.get(coord).isValid();
           }
       
      +    /**
      +     * Gets all the valid linking points.
      +     * 
      +     * @return A map from coordinate to anchor's corner and linking point's index
      +     */
           public Map<Pair<Integer, Integer>, Pair<Integer, Corner>> getValidPlaces() {
               Map<Pair<Integer, Integer>, Pair<Integer, Corner>> valids = new HashMap<>();
               int pos = 1;
      @@ -48,7 +72,12 @@ public Map<Pair<Integer, Integer>, Pair<Integer, Corner>> getValidPlaces() {
       
               return valids;
           }
      -
      +    
      +    /**
      +     * Adds a card, updating all the valid linking points.
      +     * 
      +     * @param card The added card
      +     */
           public void addCard(ShownCard card) {
               CardFace cardFace = card.card().getSide(card.side());
               Pair<Integer, Integer> coord = card.coords();
      diff --git a/src/main/java/it/polimi/ingsw/client/network/NetworkHandler.java b/src/main/java/it/polimi/ingsw/client/network/NetworkHandler.java
      new file mode 100644
      index 00000000..a730f9b7
      --- /dev/null
      +++ b/src/main/java/it/polimi/ingsw/client/network/NetworkHandler.java
      @@ -0,0 +1,376 @@
      +package it.polimi.ingsw.client.network;
      +
      +import it.polimi.ingsw.client.frontend.GraphicalView;
      +import it.polimi.ingsw.controllers.PlayerController;
      +import it.polimi.ingsw.gamemodel.*;
      +import it.polimi.ingsw.server.Server;
      +import it.polimi.ingsw.utils.AvailableMatch;
      +import it.polimi.ingsw.utils.LeaderboardEntry;
      +import it.polimi.ingsw.utils.Pair;
      +
      +import java.util.List;
      +import java.util.Map;
      +import java.util.concurrent.Executors;
      +import java.util.concurrent.ScheduledExecutorService;
      +import java.util.concurrent.TimeUnit;
      +
      +/**
      + * Class used by a generic client to receive from and transmit to a remote {@link Server} instance and a
      + * remote {@link PlayerController} instance.
      + * It represents an abstract layer, being implemented by: {@link NetworkHandlerRMI} and {@link NetworkHandlerTCP}.
      + */
      +public abstract class NetworkHandler implements RemoteViewInterface {
      +    protected final GraphicalView graphicalView;
      +    protected String username;
      +    protected final String ipAddress;
      +    protected final int port;
      +    protected boolean connected = false;
      +
      +    /**
      +     * Initialize the instance all its internal attributes.
      +     *
      +     * @param graphicalView The GraphicalView to be subscribed to this NetworkHandler instance
      +     * @param ipAddress     The server IP address
      +     * @param port          The server port
      +     */
      +    public NetworkHandler(GraphicalView graphicalView, String ipAddress, int port) {
      +        this.graphicalView = graphicalView;
      +        this.ipAddress = ipAddress;
      +        this.port = port;
      +    }
      +
      +    /**
      +     * Periodically check the connection status
      +     */
      +    public void startConnectionCheck() {
      +        // Create a thread pool of 1 thread
      +        ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
      +
      +        Runnable pingServer = () -> {
      +            if (!connected) {
      +                // If the connection lost is already acknowledged, shutdown the executor
      +                executor.shutdown();
      +            } else {
      +                if (!ping()) {
      +                    // If there is a connection error, notify the client and shutdown the executor
      +                    disconnect();
      +                    graphicalView.notifyConnectionLost();
      +                    executor.shutdown();
      +                }
      +            }
      +        };
      +
      +        // Check every two second for connectivity
      +        executor.scheduleAtFixedRate(pingServer, 0, 2, TimeUnit.SECONDS);
      +    }
      +
      +    /**
      +     * Sets the player's username.
      +     *
      +     * @param username The player's username
      +     */
      +    public void setUsername(String username) {
      +        this.username = username;
      +    }
      +
      +    /**
      +     * Asks the server to send a list of {@link AvailableMatch}
      +     */
      +    public abstract void getAvailableMatches();
      +
      +    /**
      +     * Checks for connectivity.
      +     *
      +     * @return The status of the connection, true if active, false otherwise
      +     */
      +    public abstract boolean ping();
      +
      +    /**
      +     * Asks to create a match.
      +     *
      +     * @param matchName  The match name
      +     * @param maxPlayers The match maximum number of players
      +     */
      +    public abstract void createMatch(String matchName, Integer maxPlayers);
      +
      +    /**
      +     * Asks to join a match.
      +     *
      +     * @param matchName the match's name
      +     */
      +    public abstract void joinMatch(String matchName);
      +
      +    /**
      +     * Draws an initial card for the player.
      +     */
      +    public abstract void drawInitialCard();
      +
      +    /**
      +     * Communicates the chosen initial card side.
      +     *
      +     * @param side The side on which play the initial card drawn using {@link #drawInitialCard()}
      +     */
      +    public abstract void chooseInitialCardSide(Side side);
      +
      +    /**
      +     * Draws two secret objectives.
      +     */
      +    public abstract void drawSecretObjectives();
      +
      +    /**
      +     * Communicates the chosen secret objective.
      +     *
      +     * @param objective The chosen objective
      +     */
      +    public abstract void chooseSecretObjective(Objective objective);
      +
      +    /**
      +     * Plays a card.
      +     *
      +     * @param coords The coordinates on which to place the card
      +     * @param card   The PlayableCard to play
      +     * @param side   The side on which to play the chosen card
      +     */
      +    public abstract void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side);
      +
      +    /**
      +     * Draws a card.
      +     *
      +     * @param source The drawing source to draw the card from
      +     */
      +    public abstract void drawCard(DrawSource source);
      +
      +    /**
      +     * Getter for the connection status.
      +     *
      +     * @return True if connected, false otherwise
      +     */
      +    public boolean isConnected() {
      +        return connected;
      +    }
      +
      +    /**
      +     * Sends a message to all the match players
      +     *
      +     * @param text The content of the message
      +     */
      +    public abstract void sendBroadcastText(String text);
      +
      +    /**
      +     * Sends a private message to a match player
      +     *
      +     * @param recipient The recipient username
      +     * @param text      The content of the message
      +     */
      +    public abstract void sendPrivateText(String recipient, String text);
      +
      +    /**
      +     * Disconnects from the server.
      +     */
      +    public abstract void disconnect();
      +
      +    /**
      +     * Receives the currently available matches.
      +     *
      +     * @param availableMatches The available matches
      +     */
      +    public void receiveAvailableMatches(List<AvailableMatch> availableMatches) {
      +        graphicalView.receiveAvailableMatches(availableMatches);
      +    }
      +
      +    /**
      +     * Notifies that the match has just started.
      +     * Furthermore, gives to the receiving object all the information (parameters) needed to show to the current match
      +     * state.
      +     *
      +     * @param playersUsernamesAndPawns Map that matches each pawn color to the corresponding player's username
      +     * @param playersHands             Map that matches each player's username to the corresponding List of cards in the hand
      +     * @param visibleObjectives        Pair of objectives visible to all players
      +     * @param visiblePlayableCards     Map having as values the visible common cards (the keys are just indexes).
      +     * @param decksTopReigns           Pair of reign symbols representing the two visible reigns symbols on top of the two decks;
      +     *                                 the first one is the gold deck one, the second one the resource deck one
      +     */
      +    @Override
      +    public void matchStarted(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
      +                             Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
      +                             Pair<Symbol, Symbol> decksTopReigns) {
      +        graphicalView.matchStarted(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReigns);
      +    }
      +
      +    /**
      +     * Notifies that the match has resumed.
      +     * Furthermore, gives to the receiving object all the information (parameters) needed to show to the current match
      +     * state.
      +     *
      +     * @param playersUsernamesAndPawns Map that matches each pawn color to the corresponding player's username
      +     * @param playersHands             Map that matches each player's username to the corresponding List of cards in the hand
      +     * @param visibleObjectives        Pair of objectives visible to all players
      +     * @param visiblePlayableCards     Map having as values the visible common cards (the keys are just indexes).
      +     * @param decksTopReigns           Pair of reign symbols representing the two visible reigns symbols on top of the two decks;
      +     *                                 the first one is the gold deck one, the second one the resource deck one
      +     * @param secretObjective          Secret objective of the current player
      +     * @param availableResources       Available resources of all the players
      +     * @param placedCards              Placed cards of all the players
      +     * @param playerPoints             Points of all the players
      +     * @param currentPlayer            The current player
      +     * @param drawPhase                If the match is resumed in draw phase
      +     */
      +    @Override
      +    public void matchResumed(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
      +                             Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
      +                             Pair<Symbol, Symbol> decksTopReigns, Objective secretObjective, Map<String, Map<Symbol, Integer>> availableResources,
      +                             Map<String, Map<Pair<Integer, Integer>, PlacedCard>> placedCards, Map<String, Integer> playerPoints,
      +                             String currentPlayer, boolean drawPhase) {
      +        graphicalView.resumeMatch(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReigns, secretObjective, availableResources, placedCards, playerPoints, currentPlayer, drawPhase);
      +    }
      +
      +    /**
      +     * Gives to the receiving graphical view (the client) its initial card.
      +     *
      +     * @param initialCard The initial card to be given
      +     */
      +    @Override
      +    public void giveInitialCard(InitialCard initialCard) {
      +        graphicalView.giveInitialCard(initialCard);
      +    }
      +
      +    /**
      +     * Gives to the remote object a pair of secret objectives to show them in the view and to choose one from them.
      +     *
      +     * @param secretObjectives Pair of secret objectives to give
      +     */
      +    @Override
      +    public void giveSecretObjectives(Pair<Objective, Objective> secretObjectives) {
      +        graphicalView.giveSecretObjectives(secretObjectives);
      +    }
      +
      +    /**
      +     * Notifies that someone (it may or may not be the receiving View instance) has drawn its initial card.
      +     *
      +     * @param someoneUsername The username of the player who has drawn the card
      +     * @param card            The card drawn
      +     */
      +    @Override
      +    public void someoneDrewInitialCard(String someoneUsername, InitialCard card) {
      +        graphicalView.someoneDrewInitialCard(someoneUsername, card);
      +    }
      +
      +    /**
      +     * Notifies that someone (it may or may not be the receiving View instance) has decided (then set) its initial card side.
      +     *
      +     * @param someoneUsername    The username of the player who has set the initial card side
      +     * @param side               The chosen side
      +     * @param availableResources The current available resources of the player having someoneUsername as username
      +     */
      +    @Override
      +    public void someoneSetInitialSide(String someoneUsername, Side side, Map<Symbol, Integer> availableResources) {
      +        graphicalView.someoneSetInitialSide(someoneUsername, side, availableResources);
      +    }
      +
      +    /**
      +     * Notifies that someone (it may or may not be the receiving View instance) has drawn a pair of secret objectives.
      +     * Mind that the objectives are not passed as arguments, since they are secret to all players but the one receiving
      +     * them. The one meant to receive them receives this message too but obtain the objectives through the
      +     * giveSecretObjective() method.
      +     *
      +     * @param someoneUsername The username of the player who has drawn the card
      +     */
      +    @Override
      +    public void someoneDrewSecretObjective(String someoneUsername) {
      +        graphicalView.someoneDrewSecretObjective(someoneUsername);
      +    }
      +
      +    /**
      +     * Notifies that someone (it may or may not be the receiving View instance) has chosen theirs secret objective.
      +     *
      +     * @param someoneUsername The username of the player who has chosen theirs secret objective
      +     */
      +    @Override
      +    public void someoneChoseSecretObjective(String someoneUsername) {
      +        graphicalView.someoneChoseSecretObjective(someoneUsername);
      +    }
      +
      +    /**
      +     * Notifies that someone (it may or may not be the receiving View instance) has played a card.
      +     *
      +     * @param someoneUsername    The username of the player who has played a card
      +     * @param coords             The coordinates where the card has been placed as a Pair of int
      +     * @param card               The card that has been played
      +     * @param side               The side on which the card has been played
      +     * @param points             The points of the player who played a card
      +     * @param availableResources The current available resources of the player who played a card
      +     */
      +    @Override
      +    public void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coords, PlayableCard card, Side side, int points,
      +                                  Map<Symbol, Integer> availableResources) {
      +        graphicalView.someonePlayedCard(someoneUsername, coords, card, side, points, availableResources);
      +    }
      +
      +    /**
      +     * Notifies that someone (it may or may not be the receiving View instance) has drawn a card.
      +     *
      +     * @param someoneUsername The username of the player who has played a card
      +     * @param source          The DrawSource from which the card has been drawn
      +     * @param card            The card that has been drawn
      +     * @param replacementCard The card that replaced the drawn one
      +     * @param deckTopReigns   The decks top reigns
      +     */
      +    @Override
      +    public void someoneDrewCard(String someoneUsername, DrawSource source, PlayableCard card, PlayableCard replacementCard,
      +                                Pair<Symbol, Symbol> deckTopReigns) {
      +        graphicalView.someoneDrewCard(someoneUsername, source, card, replacementCard, deckTopReigns);
      +    }
      +
      +    /**
      +     * Notifies that a player has joined the match.
      +     *
      +     * @param someoneUsername The username of the player who has joined
      +     * @param joinedPlayers   The players currently in the match
      +     */
      +    @Override
      +    public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
      +        graphicalView.someoneJoined(someoneUsername, joinedPlayers);
      +    }
      +
      +    /**
      +     * Notifies that a player has quit from the match.
      +     *
      +     * @param someoneUsername The username of the player who has quit
      +     */
      +    @Override
      +    public void someoneQuit(String someoneUsername) {
      +        graphicalView.someoneQuit(someoneUsername);
      +    }
      +
      +    /**
      +     * Notifies that the match has just finished.
      +     *
      +     * @param ranking The match final ranking
      +     */
      +    @Override
      +    public void matchFinished(List<LeaderboardEntry> ranking) {
      +        graphicalView.matchFinished(ranking);
      +    }
      +
      +    /**
      +     * Notifies that a new message in the global chat is sent
      +     *
      +     * @param someoneUsername Username of the user that sent the message
      +     * @param text            Content of the message
      +     */
      +    @Override
      +    public void someoneSentBroadcastText(String someoneUsername, String text) {
      +        graphicalView.someoneSentBroadcastText(someoneUsername, text);
      +    }
      +
      +    /**
      +     * Notifies that a new private message is sent in private chat to the current user
      +     *
      +     * @param someoneUsername Username of the user that sent the message
      +     * @param text            Content of the message
      +     */
      +    @Override
      +    public void someoneSentPrivateText(String someoneUsername, String text) {
      +        graphicalView.someoneSentPrivateText(someoneUsername, text);
      +    }
      +}
      diff --git a/src/main/java/it/polimi/ingsw/client/network/NetworkViewRMI.java b/src/main/java/it/polimi/ingsw/client/network/NetworkHandlerRMI.java
      similarity index 57%
      rename from src/main/java/it/polimi/ingsw/client/network/NetworkViewRMI.java
      rename to src/main/java/it/polimi/ingsw/client/network/NetworkHandlerRMI.java
      index 53282b66..47b1d93a 100644
      --- a/src/main/java/it/polimi/ingsw/client/network/NetworkViewRMI.java
      +++ b/src/main/java/it/polimi/ingsw/client/network/NetworkHandlerRMI.java
      @@ -1,33 +1,50 @@
       package it.polimi.ingsw.client.network;
       
      +import java.rmi.NotBoundException;
      +import java.rmi.RemoteException;
      +import java.rmi.registry.LocateRegistry;
      +import java.rmi.registry.Registry;
      +import java.rmi.server.UnicastRemoteObject;
      +import java.util.List;
       import it.polimi.ingsw.client.frontend.GraphicalView;
      +import it.polimi.ingsw.controllers.PlayerController;
      +import it.polimi.ingsw.controllers.PlayerControllerRMI;
       import it.polimi.ingsw.controllers.PlayerControllerRMIInterface;
       import it.polimi.ingsw.gamemodel.DrawSource;
       import it.polimi.ingsw.gamemodel.Objective;
       import it.polimi.ingsw.gamemodel.PlayableCard;
       import it.polimi.ingsw.gamemodel.Side;
      +import it.polimi.ingsw.server.Server;
       import it.polimi.ingsw.server.ServerRMIInterface;
       import it.polimi.ingsw.utils.AvailableMatch;
       import it.polimi.ingsw.utils.Pair;
       
      -import java.rmi.NotBoundException;
      -import java.rmi.RemoteException;
      -import java.rmi.registry.LocateRegistry;
      -import java.rmi.registry.Registry;
      -import java.rmi.server.UnicastRemoteObject;
      -import java.util.List;
      -
      -public class NetworkViewRMI extends NetworkView {
      +/**
      + * Class used by a generic client to receive from and transmit to a remote {@link Server} instance and a
      + * remote {@link PlayerControllerRMI} instance using the RMI protocol.
      + */
      +public class NetworkHandlerRMI extends NetworkHandler {
           private final ServerRMIInterface server;
           private PlayerControllerRMIInterface controller;
      -
      -    public NetworkViewRMI(GraphicalView graphicalView, String ipAddress, int port) throws RemoteException {
      +    private boolean exported = false;
      +
      +    /**
      +     * Initialize the instance all its internal attributes.
      +     *
      +     * @param graphicalView The GraphicalView to be subscribed to this NetworkHandler instance
      +     * @param ipAddress     The server IP address
      +     * @param port          The server port
      +     * @throws RemoteException If the remote server is considered not reachable any more and cannot return as usual
      +     */
      +    public NetworkHandlerRMI(GraphicalView graphicalView, String ipAddress, int port) throws RemoteException {
               super(graphicalView, ipAddress, port);
       
               // Try to get a remote Server instance from the network
               Registry registry = LocateRegistry.getRegistry(ipAddress, port);
               try {
                   this.server = (ServerRMIInterface) registry.lookup("CodexNaturalisRMIServer");
      +            connected = true;
      +            this.startConnectionCheck();
               } catch (NotBoundException e) {
                   // If the registry exists but the lookup string isn't found, exit the application since it's
                   // a programmatic error (it regards the code, not the app life cycle)
      @@ -35,6 +52,9 @@ public NetworkViewRMI(GraphicalView graphicalView, String ipAddress, int port) t
               }
           }
       
      +    /**
      +     * Asks the server to send a list of {@link AvailableMatch}.
      +     */
           @Override
           public void getAvailableMatches() {
               try {
      @@ -45,19 +65,33 @@ public void getAvailableMatches() {
               }
           }
       
      +    /**
      +     * Asks to join a match.
      +     *
      +     * @param matchName the match's name
      +     */
           @Override
           public void joinMatch(String matchName) {
               try {
                   controller = server.joinMatch(matchName, this.username);
       
      -            UnicastRemoteObject.exportObject(this, 0);
      -
      +            // Export the object only if it was not previously exported
      +            if (!exported) {
      +                UnicastRemoteObject.exportObject(this, 0);
      +                exported = true;
      +            }
                   controller.registerView(this);
               } catch (Exception e) {
                   this.graphicalView.notifyError(e);
               }
           }
       
      +    /**
      +     * Asks to create a match.
      +     *
      +     * @param matchName  The match name
      +     * @param maxPlayers The match maximum number of players
      +     */
           @Override
           public void createMatch(String matchName, Integer maxPlayers) {
               try {
      @@ -68,6 +102,9 @@ public void createMatch(String matchName, Integer maxPlayers) {
               }
           }
       
      +    /**
      +     * Draws an initial card for the player.
      +     */
           @Override
           public void drawInitialCard() {
               try {
      @@ -77,6 +114,11 @@ public void drawInitialCard() {
               }
           }
       
      +    /**
      +     * Communicates the chosen initial card side.
      +     *
      +     * @param side The side on which play the initial card drawn using {@link #drawInitialCard()}
      +     */
           @Override
           public void chooseInitialCardSide(Side side) {
               try {
      @@ -86,6 +128,9 @@ public void chooseInitialCardSide(Side side) {
               }
           }
       
      +    /**
      +     * Draws two secret objectives.
      +     */
           @Override
           public void drawSecretObjectives() {
               try {
      @@ -95,6 +140,11 @@ public void drawSecretObjectives() {
               }
           }
       
      +    /**
      +     * Communicates the chosen secret objective.
      +     *
      +     * @param objective The chosen objective
      +     */
           @Override
           public void chooseSecretObjective(Objective objective) {
               try {
      @@ -104,6 +154,13 @@ public void chooseSecretObjective(Objective objective) {
               }
           }
       
      +    /**
      +     * Plays a card.
      +     *
      +     * @param coords The coordinates on which to place the card
      +     * @param card   The PlayableCard to play
      +     * @param side   The side on which to play the chosen card
      +     */
           @Override
           public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) {
               try {
      @@ -113,6 +170,11 @@ public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side
               }
           }
       
      +    /**
      +     * Draws a card.
      +     *
      +     * @param source The drawing source to draw the card from
      +     */
           @Override
           public void drawCard(DrawSource source) {
               try {
      @@ -122,6 +184,11 @@ public void drawCard(DrawSource source) {
               }
           }
       
      +    /**
      +     * Sends a message to all the match players
      +     *
      +     * @param text The content of the message
      +     */
           @Override
           public void sendBroadcastText(String text) {
               try {
      @@ -131,6 +198,12 @@ public void sendBroadcastText(String text) {
               }
           }
       
      +    /**
      +     * Sends a private message to a match player
      +     *
      +     * @param recipient The recipient username
      +     * @param text The content of the message
      +     */
           @Override
           public void sendPrivateText(String recipient, String text) {
               try {
      @@ -139,4 +212,26 @@ public void sendPrivateText(String recipient, String text) {
                   this.graphicalView.notifyError(e);
               }
           }
      +
      +    /**
      +     * Disconnects from the server.
      +     */
      +    @Override
      +    public void disconnect() {
      +        connected = false;
      +    }
      +
      +    /**
      +     * Checks for connectivity.
      +     *
      +     * @return The status of the connection, true if active, false otherwise
      +     */
      +    @Override
      +    public boolean ping() {
      +        try {
      +            return server.ping();
      +        } catch (RemoteException e) {
      +            return false;
      +        }
      +    }
       }
      diff --git a/src/main/java/it/polimi/ingsw/client/network/NetworkHandlerTCP.java b/src/main/java/it/polimi/ingsw/client/network/NetworkHandlerTCP.java
      new file mode 100644
      index 00000000..bfcce008
      --- /dev/null
      +++ b/src/main/java/it/polimi/ingsw/client/network/NetworkHandlerTCP.java
      @@ -0,0 +1,219 @@
      +package it.polimi.ingsw.client.network;
      +
      +import java.io.IOException;
      +import java.net.Socket;
      +import java.rmi.RemoteException;
      +import it.polimi.ingsw.client.frontend.GraphicalView;
      +import it.polimi.ingsw.controllers.PlayerControllerTCP;
      +import it.polimi.ingsw.gamemodel.DrawSource;
      +import it.polimi.ingsw.gamemodel.Objective;
      +import it.polimi.ingsw.gamemodel.PlayableCard;
      +import it.polimi.ingsw.gamemodel.Side;
      +import it.polimi.ingsw.network.messages.Message;
      +import it.polimi.ingsw.network.messages.actions.*;
      +import it.polimi.ingsw.network.tcp.ClientReceiver;
      +import it.polimi.ingsw.network.tcp.IOHandler;
      +import it.polimi.ingsw.server.Server;
      +import it.polimi.ingsw.utils.AvailableMatch;
      +import it.polimi.ingsw.utils.Pair;
      +
      +/**
      + * Class used by a generic client to receive from and transmit to a remote {@link Server} instance
      + * and a remote {@link PlayerControllerTCP} instance using the TCP protocol.
      + */
      +public class NetworkHandlerTCP extends NetworkHandler {
      +    private final IOHandler io;
      +    private final Socket socket;
      +
      +    /**
      +     * Initialize the instance all its internal attributes.
      +     *
      +     * @param graphicalView The GraphicalView to be subscribed to this NetworkHandler instance
      +     * @param ipAddress The server IP address
      +     * @param port The server port
      +     * @throws RemoteException If the remote server is considered not reachable any more and cannot
      +     *         return as usual
      +     */
      +    public NetworkHandlerTCP(GraphicalView graphicalView, String ipAddress, Integer port)
      +            throws IOException {
      +        super(graphicalView, ipAddress, port);
      +        this.socket = new Socket(ipAddress, port);
      +        this.io = new IOHandler(socket);
      +        new Thread(new ClientReceiver(this, socket)).start();
      +        connected = true;
      +        super.startConnectionCheck();
      +    }
      +
      +    /**
      +     * Notifies the view about a remote error.
      +     *
      +     * @param exception The exception thrown remotely
      +     */
      +    public void notifyError(Exception exception) {
      +        this.graphicalView.notifyError(exception);
      +    }
      +
      +    /**
      +     * Gets the player's username.
      +     *
      +     * @return The player's username
      +     */
      +    public String getUsername() {
      +        return this.username;
      +    }
      +
      +    /**
      +     * Gets the I/O handler.
      +     *
      +     * @return The I/O handler
      +     */
      +    public IOHandler getIO() {
      +        return this.io;
      +    }
      +
      +    /**
      +     * Asks the server to send a list of {@link AvailableMatch}.
      +     */
      +    @Override
      +    public void getAvailableMatches() {
      +        this.sendMessage(new GetAvailableMatchesMessage(this.username));
      +    }
      +
      +    /**
      +     * Asks to create a match.
      +     *
      +     * @param matchName The match name
      +     * @param maxPlayers The match maximum number of players
      +     */
      +    @Override
      +    public void createMatch(String matchName, Integer maxPlayers) {
      +        this.sendMessage(new CreateMatchMessage(this.username, matchName, maxPlayers));
      +    }
      +
      +    /**
      +     * Asks to join a match.
      +     *
      +     * @param matchName the match's name
      +     */
      +    @Override
      +    public void joinMatch(String matchName) {
      +        this.sendMessage(new JoinMatchMessage(this.username, matchName));
      +    }
      +
      +    /**
      +     * Draws an initial card for the player.
      +     */
      +    @Override
      +    public void drawInitialCard() {
      +        this.sendMessage(new DrawInitialCardMessage(this.username));
      +    }
      +
      +    /**
      +     * Communicates the chosen initial card side.
      +     *
      +     * @param side The side on which play the initial card drawn using {@link #drawInitialCard()}
      +     */
      +    @Override
      +    public void chooseInitialCardSide(Side side) {
      +        this.sendMessage(new ChooseInitialCardSideMessage(this.username, side));
      +    }
      +
      +    /**
      +     * Draws two secret objectives.
      +     */
      +    @Override
      +    public void drawSecretObjectives() {
      +        this.sendMessage(new DrawSecretObjectivesMessage(this.username));
      +    }
      +
      +    /**
      +     * Communicates the chosen secret objective.
      +     *
      +     * @param objective The chosen objective
      +     */
      +    @Override
      +    public void chooseSecretObjective(Objective objective) {
      +        this.sendMessage(new ChooseSecretObjectiveMessage(this.username, objective.getID()));
      +    }
      +
      +    /**
      +     * Plays a card.
      +     *
      +     * @param coords The coordinates on which to place the card
      +     * @param card The PlayableCard to play
      +     * @param side The side on which to play the chosen card
      +     */
      +    @Override
      +    public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) {
      +        this.sendMessage(new PlayCardMessage(this.username, coords, card.getId(), side));
      +    }
      +
      +    /**
      +     * Draws a card.
      +     *
      +     * @param source The drawing source to draw the card from
      +     */
      +    @Override
      +    public void drawCard(DrawSource source) {
      +        this.sendMessage(new DrawCardMessage(this.username, source));
      +    }
      +
      +    /**
      +     * Sends a message to all the match players
      +     *
      +     * @param text The content of the message
      +     */
      +    @Override
      +    public void sendBroadcastText(String text) {
      +        this.sendMessage(new SendBroadcastTextMessage(this.username, text));
      +    }
      +
      +    /**
      +     * Sends a private message to a match player
      +     *
      +     * @param recipient The recipient username
      +     * @param text The content of the message
      +     */
      +    @Override
      +    public void sendPrivateText(String recipient, String text) {
      +        this.sendMessage(new SendPrivateTextMessage(this.username, recipient, text));
      +    }
      +
      +    /**
      +     * Disconnects from the server.
      +     */
      +    @Override
      +    public void disconnect() {
      +        connected = false;
      +    }
      +
      +    /**
      +     * Checks for connectivity.
      +     *
      +     * @return The status of the connection, true if active, false otherwise
      +     */
      +    @Override
      +    public boolean ping() {
      +        try {
      +            io.writeMsg("ping");
      +            return true;
      +        } catch (IOException e) {
      +            return false;
      +        }
      +    }
      +
      +
      +    /**
      +     * Utility to send a message to the socket's output stream. If there was an error, it means the
      +     * connection crashed, and so tries to disconnect the player
      +     * 
      +     * @param msg The message to send
      +     */
      +    private void sendMessage(Message msg) {
      +        try {
      +            this.io.writeMsg(msg);
      +        } catch (IOException e) {
      +            this.disconnect();
      +        }
      +    }
      +}
      diff --git a/src/main/java/it/polimi/ingsw/client/network/NetworkView.java b/src/main/java/it/polimi/ingsw/client/network/NetworkView.java
      deleted file mode 100644
      index 05cf2337..00000000
      --- a/src/main/java/it/polimi/ingsw/client/network/NetworkView.java
      +++ /dev/null
      @@ -1,183 +0,0 @@
      -package it.polimi.ingsw.client.network;
      -
      -import it.polimi.ingsw.client.frontend.GraphicalView;
      -import it.polimi.ingsw.gamemodel.*;
      -import it.polimi.ingsw.utils.AvailableMatch;
      -import it.polimi.ingsw.utils.LeaderboardEntry;
      -import it.polimi.ingsw.utils.Pair;
      -
      -import java.util.List;
      -import java.util.Map;
      -
      -public abstract class NetworkView implements RemoteViewInterface {
      -    protected GraphicalView graphicalView;
      -    protected String username;
      -    protected String ipAddress;
      -    protected int port;
      -
      -    /**
      -     * Initialize the instance all its internal attributes.
      -     *
      -     * @param graphicalView The GraphicalView to be subscribed to this NetworkView instance
      -     * @param ipAddress     The server IP address
      -     * @param port          The server port
      -     */
      -    public NetworkView(GraphicalView graphicalView, String ipAddress, int port) {
      -        this.graphicalView = graphicalView;
      -        this.ipAddress = ipAddress;
      -        this.port = port;
      -    }
      -
      -    /**
      -     * Sets the player's username.
      -     *
      -     * @param username The player's username
      -     */
      -    public void setUsername(String username) {
      -        this.username = username;
      -    }
      -
      -    /**
      -     * Asks the server to send a list of {@link AvailableMatch}
      -     */
      -    public abstract void getAvailableMatches();
      -
      -    // Action Methods
      -
      -    /**
      -     * Asks to create a match.
      -     *
      -     * @param matchName  The match name
      -     * @param maxPlayers The match maximum number of players
      -     */
      -    public abstract void createMatch(String matchName, Integer maxPlayers);
      -
      -    /**
      -     * Asks to join a match.
      -     *
      -     * @param matchName the match's name
      -     */
      -    public abstract void joinMatch(String matchName);
      -
      -    /**
      -     * Draws an initial card for the player.
      -     */
      -    public abstract void drawInitialCard();
      -
      -    /**
      -     * Communicates the chosen initial card side.
      -     *
      -     * @param side The side on which play the initial card drawn using {@link #drawInitialCard()}
      -     */
      -    public abstract void chooseInitialCardSide(Side side);
      -
      -    /**
      -     * Draws two secret objectives.
      -     */
      -    public abstract void drawSecretObjectives();
      -
      -    /**
      -     * Communicates the chosen secret objective.
      -     *
      -     * @param objective The chosen objective
      -     */
      -    public abstract void chooseSecretObjective(Objective objective);
      -
      -    /**
      -     * Plays a card.
      -     *
      -     * @param coords The coordinates on which to place the card
      -     * @param card   The PlayableCard to play
      -     * @param side   The side on which to play the chosen card
      -     */
      -    public abstract void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side);
      -
      -    /**
      -     * Draws a card.
      -     *
      -     * @param source The drawing source to draw the card from
      -     */
      -    public abstract void drawCard(DrawSource source);
      -
      -    public void receiveAvailableMatches(List<AvailableMatch> availableMatches) {
      -        graphicalView.receiveAvailableMatches(availableMatches);
      -    }
      -
      -    @Override
      -    public void matchStarted(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
      -                             Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
      -                             Pair<Symbol, Symbol> decksTopReigns) {
      -        graphicalView.matchStarted(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReigns);
      -    }
      -
      -    @Override
      -    public void giveInitialCard(InitialCard initialCard) {
      -        graphicalView.giveInitialCard(initialCard);
      -    }
      -
      -    @Override
      -    public void giveSecretObjectives(Pair<Objective, Objective> secretObjectives) {
      -        graphicalView.giveSecretObjectives(secretObjectives);
      -    }
      -
      -    @Override
      -    public void someoneDrewInitialCard(String someoneUsername, InitialCard card) {
      -        graphicalView.someoneDrewInitialCard(someoneUsername, card);
      -    }
      -
      -    @Override
      -    public void someoneSetInitialSide(String someoneUsername, Side side, Map<Symbol, Integer> availableResources) {
      -        graphicalView.someoneSetInitialSide(someoneUsername, side, availableResources);
      -    }
      -
      -    @Override
      -    public void someoneDrewSecretObjective(String someoneUsername) {
      -        graphicalView.someoneDrewSecretObjective(someoneUsername);
      -    }
      -
      -    @Override
      -    public void someoneChoseSecretObjective(String someoneUsername) {
      -        graphicalView.someoneChoseSecretObjective(someoneUsername);
      -    }
      -
      -    @Override
      -    public void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coords, PlayableCard card, Side side, int points,
      -                                  Map<Symbol, Integer> availableResources) {
      -        graphicalView.someonePlayedCard(someoneUsername, coords, card, side, points, availableResources);
      -    }
      -
      -    @Override
      -    public void someoneDrewCard(String someoneUsername, DrawSource source, PlayableCard card, PlayableCard replacementCard,
      -                                Symbol replacementCardReign) {
      -        graphicalView.someoneDrewCard(someoneUsername, source, card, replacementCard, replacementCardReign);
      -    }
      -
      -    @Override
      -    public void someoneJoined(String someoneUsername, List<String> joinedPlayers) {
      -        graphicalView.someoneJoined(someoneUsername, joinedPlayers);
      -    }
      -
      -    @Override
      -    public void someoneQuit(String someoneUsername) {
      -        graphicalView.someoneQuit(someoneUsername);
      -    }
      -
      -    @Override
      -    public void matchFinished(List<LeaderboardEntry> ranking) {
      -        graphicalView.matchFinished(ranking);
      -    }
      -
      -    @Override
      -    public void someoneSentBroadcastText(String someoneUsername, String text) {
      -        graphicalView.someoneSentBroadcastText(someoneUsername, text);
      -    }
      -
      -    @Override
      -    public void someoneSentPrivateText(String someoneUsername, String text) {
      -        graphicalView.someoneSentPrivateText(someoneUsername, text);
      -    }
      -
      -    public abstract void sendBroadcastText(String text);
      -
      -    public abstract void sendPrivateText(String recipient, String text);
      -}
      diff --git a/src/main/java/it/polimi/ingsw/client/network/NetworkViewTCP.java b/src/main/java/it/polimi/ingsw/client/network/NetworkViewTCP.java
      deleted file mode 100644
      index 37b29e8c..00000000
      --- a/src/main/java/it/polimi/ingsw/client/network/NetworkViewTCP.java
      +++ /dev/null
      @@ -1,101 +0,0 @@
      -package it.polimi.ingsw.client.network;
      -
      -import it.polimi.ingsw.client.frontend.GraphicalView;
      -import it.polimi.ingsw.gamemodel.DrawSource;
      -import it.polimi.ingsw.gamemodel.Objective;
      -import it.polimi.ingsw.gamemodel.PlayableCard;
      -import it.polimi.ingsw.gamemodel.Side;
      -import it.polimi.ingsw.network.messages.Message;
      -import it.polimi.ingsw.network.messages.actions.*;
      -import it.polimi.ingsw.network.tcp.ClientReceiver;
      -import it.polimi.ingsw.network.tcp.IOHandler;
      -import it.polimi.ingsw.utils.Pair;
      -
      -import java.io.IOException;
      -import java.net.Socket;
      -
      -public class NetworkViewTCP extends NetworkView {
      -    private final IOHandler io;
      -
      -    public NetworkViewTCP(GraphicalView graphicalView, String address, Integer port) throws IOException {
      -        super(graphicalView, address, port);
      -        Socket socket = new Socket(address, port);
      -        this.io = new IOHandler(socket);
      -        new Thread(new ClientReceiver(this, socket)).start();
      -    }
      -
      -    public void notifyError(Exception exception) {
      -        this.graphicalView.notifyError(exception);
      -    }
      -
      -    public String getUsername() {
      -        return this.username;
      -    }
      -
      -    public IOHandler getIO() {
      -        return this.io;
      -    }
      -
      -    private void sendMessage(Message msg) {
      -        try {
      -            this.io.writeMsg(msg);
      -        } catch (IOException e) {
      -            // TODO: handle IO
      -        }
      -    }
      -
      -    @Override
      -    public void getAvailableMatches() {
      -        this.sendMessage(new GetAvailableMatchesMessage(this.username));
      -    }
      -
      -    @Override
      -    public void createMatch(String matchName, Integer maxPlayers) {
      -        this.sendMessage(new CreateMatchMessage(this.username, matchName, maxPlayers));
      -    }
      -
      -    @Override
      -    public void joinMatch(String matchName) {
      -        this.sendMessage(new JoinMatchMessage(this.username, matchName));
      -    }
      -
      -    @Override
      -    public void drawInitialCard() {
      -        this.sendMessage(new DrawInitialCardMessage(this.username));
      -    }
      -
      -    @Override
      -    public void chooseInitialCardSide(Side side) {
      -        this.sendMessage(new ChooseInitialCardSideMessage(this.username, side));
      -    }
      -
      -    @Override
      -    public void drawSecretObjectives() {
      -        this.sendMessage(new DrawSecretObjectivesMessage(this.username));
      -    }
      -
      -    @Override
      -    public void chooseSecretObjective(Objective objective) {
      -        this.sendMessage(new ChooseSecretObjectiveMessage(this.username, objective.getID()));
      -    }
      -
      -    @Override
      -    public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) {
      -        this.sendMessage(new PlayCardMessage(this.username, coords, card.getId(), side));
      -    }
      -
      -    @Override
      -    public void drawCard(DrawSource source) {
      -        this.sendMessage(new DrawCardMessage(this.username, source));
      -    }
      -
      -    @Override
      -    public void sendBroadcastText(String text) {
      -        this.sendMessage(new SendBroadcastTextMessage(this.username, text));
      -    }
      -
      -    @Override
      -    public void sendPrivateText(String recipient, String text) {
      -        this.sendMessage(new SendPrivateTextMessage(this.username, recipient, text));
      -    }
      -}
      diff --git a/src/main/java/it/polimi/ingsw/client/network/RemoteViewInterface.java b/src/main/java/it/polimi/ingsw/client/network/RemoteViewInterface.java
      index 75580d83..2eb4cd74 100644
      --- a/src/main/java/it/polimi/ingsw/client/network/RemoteViewInterface.java
      +++ b/src/main/java/it/polimi/ingsw/client/network/RemoteViewInterface.java
      @@ -31,18 +31,48 @@ public interface RemoteViewInterface extends Remote {
            * @param visiblePlayableCards     Map having as values the visible common cards (the keys are just indexes).
            * @param decksTopReigns           Pair of reign symbols representing the two visible reigns symbols on top of the two decks;
            *                                 the first one is the gold deck one, the second one the resource deck one
      -     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
      +     * @throws RemoteException If the remote object is considered not to be reachable anymore and cannot return as usual
            */
           void matchStarted(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands, Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards, Pair<Symbol, Symbol> decksTopReigns) throws RemoteException;
       
      +    /**
      +     * Notifies that the match has resumed.
      +     * Furthermore, gives to the receiving object all the information (parameters) needed to restore to the current match
      +     * state.
      +     *
      +     * @param playersUsernamesAndPawns Map that matches each pawn color to the corresponding player's username
      +     * @param playersHands             Map that matches each player's username to the corresponding List of cards in the hand
      +     * @param visibleObjectives        Pair of objectives visible to all players
      +     * @param visiblePlayableCards     Map having as values the visible common cards (the keys are just indexes).
      +     * @param decksTopReigns           Pair of reign symbols representing the two visible reigns symbols on top of the two decks;
      +     *                                 the first one is the gold deck one, the second one the resource deck one
      +     * @param secretObjective          Secret objective of the current player
      +     * @param availableResources       Available resources of all the players
      +     * @param placedCards              Placed cards of all the players
      +     * @param playerPoints             Points of all the players
      +     * @param currentPlayer            The current player
      +     * @param drawPhase                If the match is resumed in draw phase
      +     * @throws RemoteException If the remote object is considered not to be reachable anymore and cannot return as usual
      +     */
      +    void matchResumed(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands,
      +                      Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards,
      +                      Pair<Symbol, Symbol> decksTopReigns, Objective secretObjective, Map<String, Map<Symbol, Integer>> availableResources,
      +                      Map<String, Map<Pair<Integer, Integer>, PlacedCard>> placedCards, Map<String, Integer> playerPoints, String currentPlayer, boolean drawPhase) throws RemoteException;
       
           /**
      -     * Gives the graphical view a list of available matches
      +     * Gives to the receiving graphical view (the client) a list of the currently available matches.
            *
      -     * @param availableMatchs The available matches
      +     * @param availableMatches The available matches
      +     * @throws RemoteException If the remote object is considered not to be reachable anymore and cannot return as usual
            */
      -    void receiveAvailableMatches(List<AvailableMatch> availableMatchs) throws RemoteException;
      +    void receiveAvailableMatches(List<AvailableMatch> availableMatches) throws RemoteException;
       
      +    /**
      +     * Gives to the receiving graphical view (the client) its initial card.
      +     *
      +     * @param initialCard The initial card to be given
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
      +     */
           void giveInitialCard(InitialCard initialCard) throws RemoteException;
       
           /**
      @@ -65,8 +95,9 @@ public interface RemoteViewInterface extends Remote {
           /**
            * Notifies that someone (it may or may not be the receiving View instance) has decided (then set) its initial card side.
            *
      -     * @param someoneUsername The username of the player who has set side
      +     * @param someoneUsername The username of the player who has set the initial card side
            * @param side            The chosen side
      +     * @param availableResources The current available resources of the player having someoneUsername as username
            * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void someoneSetInitialSide(String someoneUsername, Side side, Map<Symbol, Integer> availableResources) throws RemoteException;
      @@ -97,9 +128,12 @@ public interface RemoteViewInterface extends Remote {
            * @param coords          The coordinates where the card has been placed as a Pair of int
            * @param card            The card that has been played
            * @param side            The side on which the card has been played
      +     * @param points          The points of the player who played a card
      +     * @param availableResources The current available resources of the player who played a card
            * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
      -    void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coords, PlayableCard card, Side side, int points, Map<Symbol, Integer> availableResources) throws RemoteException;
      +    void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coords, PlayableCard card, Side side,
      +                           int points, Map<Symbol, Integer> availableResources) throws RemoteException;
       
           /**
            * Notifies that someone (it may or may not be the receiving View instance) has drawn a card.
      @@ -107,25 +141,33 @@ public interface RemoteViewInterface extends Remote {
            * @param someoneUsername The username of the player who has played a card
            * @param source          The DrawSource from which the card has been drawn
            * @param card            The card that has been drawn
      +     * @param replacementCard The card that replaced the drawn one
      +     * @param deckTopReigns   The decks top reigns
            * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
      -    void someoneDrewCard(String someoneUsername, DrawSource source, PlayableCard card, PlayableCard replacementCard, Symbol replacementCardReign) throws RemoteException;
      +    void someoneDrewCard(String someoneUsername, DrawSource source, PlayableCard card, PlayableCard replacementCard, Pair<Symbol, Symbol> deckTopReigns) throws RemoteException;
       
           /**
      -     * @param someoneUsername
      -     * @throws RemoteException
      +     * Notifies that a player has joined the match.
      +     *
      +     * @param someoneUsername The username of the player who has joined
      +     * @param joinedPlayers The players currently in the match
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void someoneJoined(String someoneUsername, List<String> joinedPlayers) throws RemoteException;
       
           /**
      -     * @param someoneUsername
      -     * @throws RemoteException
      +     * Notifies that a player has quit from the match.
      +     *
      +     * @param someoneUsername The username of the player who has quit
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void someoneQuit(String someoneUsername) throws RemoteException;
       
           /**
      -     * Notifies that the match has just started.
      +     * Notifies that the match has just finished.
            *
      +     * @param ranking The match final ranking
            * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void matchFinished(List<LeaderboardEntry> ranking) throws RemoteException;
      @@ -135,6 +177,7 @@ public interface RemoteViewInterface extends Remote {
            *
            * @param someoneUsername Username of the user that sent the message
            * @param text            Content of the message
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void someoneSentBroadcastText(String someoneUsername, String text) throws RemoteException;
       
      @@ -143,6 +186,7 @@ public interface RemoteViewInterface extends Remote {
            *
            * @param someoneUsername Username of the user that sent the message
            * @param text            Content of the message
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void someoneSentPrivateText(String someoneUsername, String text) throws RemoteException;
       
      diff --git a/src/main/java/it/polimi/ingsw/controllers/PlayerController.java b/src/main/java/it/polimi/ingsw/controllers/PlayerController.java
      index 8f6b5279..0f27b50d 100644
      --- a/src/main/java/it/polimi/ingsw/controllers/PlayerController.java
      +++ b/src/main/java/it/polimi/ingsw/controllers/PlayerController.java
      @@ -2,10 +2,14 @@
       
       import it.polimi.ingsw.exceptions.AlreadyUsedUsernameException;
       import it.polimi.ingsw.exceptions.ChosenMatchException;
      +import it.polimi.ingsw.exceptions.WrongNameException;
       import it.polimi.ingsw.exceptions.WrongStateException;
       import it.polimi.ingsw.gamemodel.Match;
       import it.polimi.ingsw.gamemodel.MatchObserver;
       import it.polimi.ingsw.gamemodel.Player;
      +import it.polimi.ingsw.utils.GuiUtil;
      +
      +import java.util.Optional;
       
       /**
        * Controller for a match player, the only agent needing a view and so a controller in this
      @@ -19,7 +23,7 @@
        */
       public abstract sealed class PlayerController implements MatchObserver permits PlayerControllerRMI, PlayerControllerTCP {
           protected Player player;
      -    protected Match match;
      +    protected final Match match;
       
           /**
            * Instantiates the internal Player with the given username and sets the internal Match reference to
      @@ -45,22 +49,52 @@ public Player getPlayer() {
       
           /**
            * Tries to effectively join a match, adding himself to the list of observers and the corresponding
      -     * player to the match, if the username is valid
      +     * player to the match, if the username is valid.
            *
      -     * @throws AlreadyUsedUsernameException if the username is already taken
      -     * @throws WrongStateException          if the match currently does not accept new players
      +     * @throws AlreadyUsedUsernameException If the username is already taken
      +     * @throws WrongStateException          If the match currently does not accept new players
      +     * @throws ChosenMatchException         If the chosen match is not valid
      +     * @throws WrongNameException           If the chosen username is not acceptable due to alphabetical restrictions
      +     * @throws IllegalArgumentException     If the player is already in the match or too many players would be in the match
            */
      -    public void sendJoined() throws IllegalArgumentException, AlreadyUsedUsernameException, WrongStateException, ChosenMatchException {
      +    public void sendJoined() throws IllegalArgumentException, AlreadyUsedUsernameException, WrongStateException, ChosenMatchException, WrongNameException {
      +        if (!GuiUtil.isValidName(this.player.getUsername())) {
      +            throw new WrongNameException("The match name must be alphanumeric with maximum 32 characters");
      +        }
               if (match == null) {
                   throw new ChosenMatchException("The specified match does not exist");
               }
       
               try {
      -            match.subscribeObserver(this);
      -            this.match.addPlayer(this.player);
      +            synchronized (match) {
      +                if (!match.isRejoinable()) {
      +                    match.subscribeObserver(this);
      +                    match.addPlayer(this.player);
      +                } else {
      +                    // Rejoin a match
      +                    // Get the player with the same username and not already connected
      +                    Optional<Player> playerOptional = match.getPlayers().stream()
      +                            .filter((p) -> p.getUsername().equals(player.getUsername()))
      +                            .filter((p) -> !p.isConnected())
      +                            .findFirst();
      +                    if (playerOptional.isPresent()) {
      +                        player = playerOptional.get();
      +                        player.setConnected(true);
      +                        match.subscribeObserver(this);
      +                        this.matchResumed();
      +                    } else {
      +                        throw new WrongStateException("There is no disconnected player with this username");
      +                    }
      +                }
      +            }
               } catch (AlreadyUsedUsernameException | IllegalArgumentException e) {
                   match.unsubscribeObserver(this);
                   throw e;
               }
           }
      +
      +    /**
      +     * Notifies the view that match has resumed after a server crash.
      +     */
      +    public abstract void matchResumed();
       }
      diff --git a/src/main/java/it/polimi/ingsw/controllers/PlayerControllerRMI.java b/src/main/java/it/polimi/ingsw/controllers/PlayerControllerRMI.java
      index 8662632b..57043bd9 100644
      --- a/src/main/java/it/polimi/ingsw/controllers/PlayerControllerRMI.java
      +++ b/src/main/java/it/polimi/ingsw/controllers/PlayerControllerRMI.java
      @@ -35,6 +35,52 @@ public PlayerControllerRMI(String username, Match match) throws AlreadyUsedUsern
               super(username, match);
           }
       
      +    /**
      +     * Notifies the view that match has resumed after a server crash.
      +     */
      +    @Override
      +    public void matchResumed() {
      +        if (view == null) {
      +            onUnregisteredView();
      +        } else {
      +            // Get visible objectives, visible playable cards and visible decks top reigns
      +            Pair<Objective, Objective> visibleObjectives = match.getVisibleObjectives();
      +            Map<DrawSource, PlayableCard> visiblePlayableCards = match.getVisiblePlayableCards();
      +            Pair<Symbol, Symbol> decksTopReigns = match.getDecksTopReigns();
      +
      +            // Create a map that matches each pawn colour to the corresponding player's username
      +            Map<String, Color> playersUsernamesAndPawns = new HashMap<>();
      +
      +            // Create a map that matches each player's username to the corresponding list of cards in the hand
      +            Map<String, List<PlayableCard>> playersHands = new HashMap<>();
      +
      +            // Create a map that matches each player's username to the corresponding available resources
      +            Map<String, Map<Symbol, Integer>> availableResources = new HashMap<>();
      +
      +            // Create a map that matches each player's username to the corresponding points
      +            Map<String, Integer> playerPoints = new HashMap<>();
      +
      +            // Create a map that matches each player's username to the corresponding board
      +            Map<String, Map<Pair<Integer, Integer>, PlacedCard>> playerBoards = new HashMap<>();
      +
      +            // Fill the maps with proper values
      +            for (Player p : match.getPlayers()) {
      +                playersUsernamesAndPawns.put(p.getUsername(), p.getPawnColor());
      +                playersHands.put(p.getUsername(), p.getBoard().getCurrentHand());
      +                availableResources.put(p.getUsername(), p.getBoard().getAvailableResources());
      +                playerPoints.put(p.getUsername(), p.getPoints());
      +                playerBoards.put(p.getUsername(), p.getBoard().getPlacedCards());
      +            }
      +
      +            try {
      +                view.matchResumed(playersUsernamesAndPawns, playersHands, visibleObjectives, visiblePlayableCards, decksTopReigns,
      +                        player.getSecretObjective(), availableResources, playerBoards, playerPoints, match.getCurrentPlayer().getUsername(), match.getCurrentState().getClass().equals(AfterMoveState.class));
      +            } catch (RemoteException e) {
      +                onConnectionError();
      +            }
      +        }
      +    }
      +
           /**
            * Sets the internal View attribute to the given argument; if it has already been called, it won't
            * do anything, since it's call is allowed once per PlayerController object.
      @@ -45,7 +91,7 @@ public PlayerControllerRMI(String username, Match match) throws AlreadyUsedUsern
            * @param view The View to save in the PlayerController internal state
            */
           @Override
      -    public void registerView(RemoteViewInterface view) throws RemoteException, ChosenMatchException, WrongStateException, AlreadyUsedUsernameException {
      +    public void registerView(RemoteViewInterface view) throws RemoteException, ChosenMatchException, WrongStateException, AlreadyUsedUsernameException, WrongNameException {
               if (this.view == null) {
                   this.view = view;
       
      @@ -387,14 +433,10 @@ public void someoneDrewCard(Player someone, DrawSource source, PlayableCard card
               } else {
                   try {
                       PlayableCard rep = null;
      -                Symbol repReign = null;
      -                if (replacementCard != null) {
      -                    repReign = replacementCard.getReign();
      -                }
                       if (!source.equals(DrawSource.GOLDS_DECK) && !source.equals(DrawSource.RESOURCES_DECK)) {
                           rep = replacementCard;
                       }
      -                view.someoneDrewCard(someone.getUsername(), source, card, rep, repReign);
      +                view.someoneDrewCard(someone.getUsername(), source, card, rep, match.getDecksTopReigns());
                   } catch (RemoteException e) {
                       onConnectionError();
                   }
      @@ -444,8 +486,15 @@ public void someoneSentPrivateText(Player someone, Player recipient, String text
               }
           }
       
      -    private LeaderboardEntry createLeaderboardEntry(Player p, Boolean b) {
      -        return new LeaderboardEntry(p.getUsername(), p.getPoints(), b);
      +    /**
      +     * Creates a {@link LeaderboardEntry} instance from the given parameters.
      +     *
      +     * @param player The player of the {@link LeaderboardEntry}
      +     * @param winner True if the player is the winner
      +     * @return The new {@link LeaderboardEntry} instance
      +     */
      +    private LeaderboardEntry createLeaderboardEntry(Player player, Boolean winner) {
      +        return new LeaderboardEntry(player.getUsername(), player.getPoints(), winner);
           }
       
           /**
      @@ -466,6 +515,11 @@ public void matchFinished() {
               }
           }
       
      +    /**
      +     * Getter for the view associated to this instance.
      +     *
      +     * @return The {@link RemoteViewInterface} of this instance
      +     */
           public RemoteViewInterface getView() {
               return view;
           }
      @@ -476,9 +530,11 @@ public RemoteViewInterface getView() {
           private void onConnectionError() {
               match.unsubscribeObserver(this);
               match.removePlayer(player);
      -        System.err.println("There has been a connection error with player: " + player.getUsername());
           }
       
      +    /**
      +     * Prints an error in stderr when this instance is being used without a view attached to it.
      +     */
           private void onUnregisteredView() {
               System.err.println("The PlayerControllerRMI of player " + player.getUsername() + " hasn't got a corresponding view");
           }
      diff --git a/src/main/java/it/polimi/ingsw/controllers/PlayerControllerRMIInterface.java b/src/main/java/it/polimi/ingsw/controllers/PlayerControllerRMIInterface.java
      index b77424e0..5433c76c 100644
      --- a/src/main/java/it/polimi/ingsw/controllers/PlayerControllerRMIInterface.java
      +++ b/src/main/java/it/polimi/ingsw/controllers/PlayerControllerRMIInterface.java
      @@ -25,14 +25,20 @@ public interface PlayerControllerRMIInterface extends Remote {
            * instance.
            *
            * @param view The View to save in the PlayerController internal state
      +     * @throws AlreadyUsedUsernameException If the player username is already taken
      +     * @throws WrongNameException If the player username doesn't meet the alphanumerical criteria
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
      +     * @throws ChosenMatchException If there's an error with the chosen match
      +     * @throws WrongStateException If the current match state doesn't allow registering a view
            */
      -    void registerView(RemoteViewInterface view) throws RemoteException, ChosenMatchException, WrongStateException, AlreadyUsedUsernameException;
      +    void registerView(RemoteViewInterface view) throws RemoteException, ChosenMatchException, WrongStateException, AlreadyUsedUsernameException, WrongNameException;
       
           /**
            * Draws an initial card for the player.
            *
            * @throws WrongStateException If the current match state doesn't allow drawing an initial card
            * @throws WrongTurnException  If the current turn it's not the one of this player
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void drawInitialCard() throws RemoteException, WrongStateException, WrongTurnException;
       
      @@ -42,6 +48,7 @@ public interface PlayerControllerRMIInterface extends Remote {
            * @param side The side on which play the initial card drawn using {@link #drawInitialCard()}
            * @throws WrongStateException If the current match state doesn't allow setting the initial card side
            * @throws WrongTurnException  If the current turn it's not the one of this player
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void chooseInitialCardSide(Side side) throws RemoteException, WrongStateException, WrongTurnException;
       
      @@ -50,6 +57,7 @@ public interface PlayerControllerRMIInterface extends Remote {
            *
            * @throws WrongStateException If the current match state doesn't allow drawing secret objectives
            * @throws WrongTurnException  If the current turn it's not the one of this player
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void drawSecretObjectives() throws RemoteException, WrongStateException, WrongTurnException;
       
      @@ -60,6 +68,7 @@ public interface PlayerControllerRMIInterface extends Remote {
            * @throws WrongStateException  If the current match state doesn't allow choosing a secret objective
            * @throws WrongTurnException   If the current turn it's not the one of this player
            * @throws WrongChoiceException If the chosen objective is not one of the two drawn ones using {@link #drawSecretObjectives()}
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void chooseSecretObjective(Objective objective) throws RemoteException, WrongStateException, WrongTurnException, WrongChoiceException;
       
      @@ -72,6 +81,7 @@ public interface PlayerControllerRMIInterface extends Remote {
            * @throws WrongStateException  If the current match state doesn't allow playing cards
            * @throws WrongTurnException   If the current turn it's not the one of this player
            * @throws WrongChoiceException If the chosen card is not one of those in the player's current hand
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) throws RemoteException, WrongStateException, WrongTurnException, WrongChoiceException;
       
      @@ -83,18 +93,24 @@ public interface PlayerControllerRMIInterface extends Remote {
            * @throws WrongStateException  If the current match state doesn't allow drawing cards
            * @throws WrongTurnException   If the current turn it's not the one of this player
            * @throws WrongChoiceException If the chosen DrawSource doesn't have any card left (i.e. it's empty)
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
           void drawCard(DrawSource source) throws RemoteException, HandException, WrongStateException, WrongTurnException, WrongChoiceException;
       
           /**
      -     * @param text
      -     * @throws RemoteException
      +     * Sends a text to all the players in the match.
      +     *
      +     * @param text The text to be sent
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
      -    public void sendBroadcastText(String text) throws RemoteException;
      +    void sendBroadcastText(String text) throws RemoteException;
       
           /**
      -     * @param recipient
      -     * @param text
      +     * Sends a text just to a specific player in the match.
      +     *
      +     * @param recipient The username of the recipient
      +     * @param text      The text to be sent to the recipient
      +     * @throws RemoteException If the remote object is considered not to be reachable any more and cannot return as usual
            */
      -    public void sendPrivateText(String recipient, String text) throws RemoteException;
      +    void sendPrivateText(String recipient, String text) throws RemoteException;
       }
      diff --git a/src/main/java/it/polimi/ingsw/controllers/PlayerControllerTCP.java b/src/main/java/it/polimi/ingsw/controllers/PlayerControllerTCP.java
      index c87debb3..b75fe69c 100644
      --- a/src/main/java/it/polimi/ingsw/controllers/PlayerControllerTCP.java
      +++ b/src/main/java/it/polimi/ingsw/controllers/PlayerControllerTCP.java
      @@ -1,5 +1,9 @@
       package it.polimi.ingsw.controllers;
       
      +import java.util.HashMap;
      +import java.util.List;
      +import java.util.Map;
      +import java.util.stream.Collectors;
       import it.polimi.ingsw.exceptions.HandException;
       import it.polimi.ingsw.exceptions.WrongChoiceException;
       import it.polimi.ingsw.exceptions.WrongStateException;
      @@ -10,21 +14,34 @@
       import it.polimi.ingsw.network.messages.responses.*;
       import it.polimi.ingsw.network.tcp.IOHandler;
       import it.polimi.ingsw.utils.Pair;
      +import it.polimi.ingsw.utils.PlacedCardRecord;
       
      -import java.util.Map;
      -
      +/**
      + * Subclass of {@link PlayerController} that implements its abstract methods through TCP
      + * interactions.
      + */
       public final class PlayerControllerTCP extends PlayerController {
      -    private IOHandler io;
      +    private final IOHandler io;
       
      +    /**
      +     * Instantiates the internal Player with the given username and sets the internal Match
      +     * reference to the given one, add the new Player instance to the match and subscribe this class
      +     * instance to the match observers.
      +     *
      +     * @param username The username of the new player of the Match
      +     * @param match The match to which this PlayerClass must pertain
      +     * @param io The I/O handler to be attached to this instance
      +     */
           public PlayerControllerTCP(String username, Match match, IOHandler io) {
               super(username, match);
      -        try {
      -            this.io = io;
      -        } catch (Exception e) {
      -            e.printStackTrace();
      -        }
      +        this.io = io;
           }
       
      +    /**
      +     * Utility method to send a message object over the network.
      +     *
      +     * @param msg The message object to be sent
      +     */
           private void sendMessage(Message msg) {
               try {
                   this.io.writeMsg(msg);
      @@ -33,80 +50,212 @@ private void sendMessage(Message msg) {
               }
           }
       
      +    /**
      +     * Utility method called when there's a connection error, it removes the player from the match.
      +     */
           private void connectionError() {
               match.removePlayer(player);
               match.unsubscribeObserver(this);
           }
       
      -    private ErrorMessage createErrorMessage(Exception e) {
      -        return new ErrorMessage(e.getMessage(), e.getClass().getName());
      +    /**
      +     * Utility method to create an {@link ErrorMessage} object from an exception.
      +     *
      +     * @param exception The exception
      +     * @return The nex ErrorMessage instance
      +     */
      +    private ErrorMessage createErrorMessage(Exception exception) {
      +        return new ErrorMessage(exception.getMessage(), exception.getClass().getName());
           }
       
      +    /**
      +     * Notifies that the match has just started. Note that is supposed to be called by the match.
      +     */
           @Override
           public void matchStarted() {
      -        this.sendMessage(new MatchStartedMessage(match.getVisibleObjectives(), match.getVisiblePlayableCards(),
      -                match.getDecksTopReigns(), match.getPlayers()));
      +        this.sendMessage(new MatchStartedMessage(match.getVisibleObjectives(),
      +                match.getVisiblePlayableCards(), match.getDecksTopReigns(), match.getPlayers()));
           }
       
      +    /**
      +     * Notifies that someone has joined the match. Note that this method is supposed to be called by
      +     * a match, moreover the match calls this method on all the MatchObservers instance subscribed
      +     * to itself, then even the MatchObserver causing this event gets notified. If and only if the
      +     * PlayerController receiving this method call is the one linked to given `someone`, it notifies
      +     * the view about the current lobby information.
      +     *
      +     * @param someone The Player instance that has joined
      +     */
           @Override
           public void someoneJoined(Player someone) {
      -        this.sendMessage(new SomeoneJoinedMessage(someone.getUsername(), match.getPlayers(), match.getMaxPlayers()));
      +        this.sendMessage(new SomeoneJoinedMessage(someone.getUsername(), match.getPlayers(),
      +                match.getMaxPlayers()));
           }
       
      +    /**
      +     * Notifies that someone has quit from the match. Note that Match calls this method on all
      +     * MatchObservers instance subscribed to itself, then even the MatchObserver causing this event
      +     * gets notified.
      +     *
      +     * @param someone The Player instance that has quit
      +     */
           @Override
           public void someoneQuit(Player someone) {
      -        this.sendMessage(new SomeoneQuitMessage(someone.getUsername(), match.getPlayers().size(), match.isFinished()));
      +        this.sendMessage(new SomeoneQuitMessage(someone.getUsername(), match.getPlayers().size(),
      +                match.isFinished()));
           }
       
      +    /**
      +     * Notifies that someone has drawn its initial card. Note that this method is supposed to be
      +     * called by a match, moreover the match calls this method on all the MatchObservers instance
      +     * subscribed to itself, then even the MatchObserver causing this event gets notified. If and
      +     * only if the PlayerController receiving this method call is the one linked to given `someone`,
      +     * it notifies the view that it received an initial card.
      +     *
      +     * @param someone The player instance that has drawn the card
      +     * @param card The initial card that has been drawn
      +     */
           @Override
           public void someoneDrewInitialCard(Player someone, InitialCard card) {
               this.sendMessage(new SomeoneDrewInitialCardMessage(someone.getUsername(), card.getId()));
           }
       
      +    /**
      +     * Notifies that someone has chosen its initial card side. Note that this method is supposed to
      +     * be called by a match, moreover the match calls this method on all the MatchObservers instance
      +     * subscribed to itself, then even the MatchObserver causing this event gets notified.
      +     *
      +     * @param someone The player instance that has chosen the side
      +     * @param side The chosen initial card side
      +     */
           @Override
      -    public void someoneSetInitialSide(Player someone, Side side, Map<Symbol, Integer> availableResources) {
      -        this.sendMessage(new SomeoneSetInitialSideMessage(someone.getUsername(), side, availableResources));
      +    public void someoneSetInitialSide(Player someone, Side side,
      +            Map<Symbol, Integer> availableResources) {
      +        this.sendMessage(
      +                new SomeoneSetInitialSideMessage(someone.getUsername(), side, availableResources));
           }
       
      +    /**
      +     * Notifies that someone has drawn two secret objectives. Note that this method is supposed to
      +     * be called by a match, moreover the match calls this method on all the MatchObservers instance
      +     * subscribed to itself, then even the MatchObserver causing this event gets notified. If and
      +     * only if the PlayerController receiving this method call is the one linked to given `someone`,
      +     * it notifies the view about the proposed objectives, the other views will just receive a
      +     * notification about the player's username.
      +     *
      +     * @param someone The player instance that has drawn the objectives
      +     * @param objectives The two proposed objectives
      +     */
           @Override
           public void someoneDrewSecretObjective(Player someone, Pair<Objective, Objective> objectives) {
      -        Pair<Integer, Integer> IDs = new Pair<Integer, Integer>(objectives.first().getID(),
      -                objectives.second().getID());
      +        Pair<Integer, Integer> IDs =
      +                new Pair<>(objectives.first().getID(), objectives.second().getID());
               this.sendMessage(new SomeoneDrewSecretObjectivesMessage(someone.getUsername(), IDs));
           }
       
      +    /**
      +     * Notifies that someone has chosen the secret objective. Note that this method is supposed to
      +     * be called by a match, moreover the match calls this method on all the MatchObservers instance
      +     * subscribed to itself, then even the MatchObserver causing this event gets notified. The view
      +     * will just receive `someone` username, no the objective.
      +     *
      +     * @param someone The player instance that has chosen the secret objective
      +     * @param objective The chosen secret objective
      +     */
           @Override
           public void someoneChoseSecretObjective(Player someone, Objective objective) {
               Integer objectiveID = null;
               if (someone.equals(player))
                   objectiveID = objective.getID();
      -        this.sendMessage(new SomeoneChoseSecretObjectiveMessage(someone.getUsername(), objectiveID));
      +        this.sendMessage(
      +                new SomeoneChoseSecretObjectiveMessage(someone.getUsername(), objectiveID));
           }
       
      +    /**
      +     * Notifies that someone has played a card. Note that this method is supposed to be called by a
      +     * match, moreover the match calls this method on all the MatchObservers instance subscribed to
      +     * itself, then even the MatchObserver causing this event gets notified.
      +     *
      +     * @param someone The Player instance that has played a card
      +     * @param coords The coordinates on which the card has been placed
      +     * @param card The PlayableCard that has been played
      +     * @param side The side on which the card has been placed
      +     */
           @Override
      -    public void someonePlayedCard(Player someone, Pair<Integer, Integer> coords, PlayableCard card, Side side) {
      -        this.sendMessage(
      -                new SomeonePlayedCardMessage(someone.getUsername(), coords, card.getId(), side, someone.getPoints(), someone.getBoard().getAvailableResources()));
      +    public void someonePlayedCard(Player someone, Pair<Integer, Integer> coords, PlayableCard card,
      +            Side side) {
      +        this.sendMessage(new SomeonePlayedCardMessage(someone.getUsername(), coords, card.getId(),
      +                side, someone.getPoints(), someone.getBoard().getAvailableResources()));
           }
       
      +    /**
      +     * Notifies that someone has drawn a card. The replacement card is the one that has taken the
      +     * place of the drawn one, it's needed since observers have to know the reign of the new card on
      +     * top of the decks. Note that this method is supposed to be called by a match, moreover the
      +     * match calls this method on all the MatchObservers instance subscribed to itself, then even
      +     * the MatchObserver causing this event gets notified.
      +     *
      +     * @param someone The Player instance that has drawn a card
      +     * @param source The drawing source from which the card has been drawn
      +     * @param card The card that has been drawn
      +     * @param replacementCard The card that has replaced the drawn card, null if the draw source is
      +     *        a deck
      +     */
           @Override
      -    public void someoneDrewCard(Player someone, DrawSource source, PlayableCard card, PlayableCard replacementCard) {
      +    public void someoneDrewCard(Player someone, DrawSource source, PlayableCard card,
      +            PlayableCard replacementCard) {
               Integer repId = null;
      -        Symbol repReign = null;
               if (replacementCard != null) {
                   repId = replacementCard.getId();
      -            repReign = replacementCard.getReign();
               }
               this.sendMessage(new SomeoneDrewCardMessage(someone.getUsername(), source, card.getId(),
      -                repId, repReign));
      +                repId, match.getDecksTopReigns()));
      +    }
      +
      +    /**
      +     * Notifies that someone sent a message in the public chat.
      +     *
      +     * @param someone The player that send the message
      +     * @param text Content of the message
      +     */
      +    @Override
      +    public void someoneSentBroadcastText(Player someone, String text) {
      +        Message msg = new SomeoneSentBroadcastTextMessage(someone.getUsername(), text);
      +        this.sendMessage(msg);
           }
       
      +    /**
      +     * Notifies that someone sent a private message to another user. If the recipient is the current
      +     * player, then the view is notified, otherwise the message is ignored.
      +     *
      +     * @param someone The player that sent the message
      +     * @param recipient The recipient of the message
      +     * @param text Content of the message
      +     */
      +    @Override
      +    public void someoneSentPrivateText(Player someone, Player recipient, String text) {
      +        if (recipient.getUsername().equals(this.player.getUsername())
      +                || someone.getUsername().equals(this.player.getUsername())) {
      +            Message msg = new SomeoneSentPrivateTextMessage(someone.getUsername(),
      +                    recipient.getUsername(), text);
      +            this.sendMessage(msg);
      +        }
      +    }
      +
      +    /**
      +     * Notifies that the match has just finished.
      +     */
           @Override
           public void matchFinished() {
               this.sendMessage(new MatchFinishedMessage(match.getPlayersFinalRanking()));
           }
       
       
      +    /**
      +     * Tries to get the player initial card, unless there was a {@link WrongTurnException} or a
      +     * {@link WrongStateException}, in which case a new {@link ErrorMessage} is sent with the
      +     * exception content
      +     */
           public void drawInitialCard() {
               try {
                   this.player.drawInitialCard();
      @@ -116,6 +265,13 @@ public void drawInitialCard() {
           }
       
       
      +    /**
      +     * Tries to set the player's initial card's side, unless there was a {@link WrongTurnException}
      +     * or a {@link WrongStateException}, in which case a new {@link ErrorMessage} is sent with the
      +     * exception content
      +     *
      +     * @param side The chosen card
      +     */
           public void chooseInitialCardSide(Side side) {
               try {
                   this.player.chooseInitialCardSide(side);
      @@ -124,6 +280,11 @@ public void chooseInitialCardSide(Side side) {
               }
           }
       
      +    /**
      +     * Tries to get the player's secret objectives pair (from which he will have to choose one),
      +     * unless there was a {@link WrongTurnException} or a {@link WrongStateException}, in which case
      +     * a new {@link ErrorMessage} is sent with the exception content
      +     */
           public void drawSecretObjectives() {
               try {
                   this.player.drawSecretObjectives();
      @@ -132,6 +293,13 @@ public void drawSecretObjectives() {
               }
           }
       
      +    /**
      +     * Tries to set the player's secret objective, unless there was a {@link WrongTurnException} or
      +     * a {@link WrongStateException}, in which case a new {@link ErrorMessage} is sent with the
      +     * exception content
      +     *
      +     * @param objective The chosen objective
      +     */
           public void chooseSecretObjective(Objective objective) {
               try {
                   this.player.chooseSecretObjective(objective);
      @@ -140,6 +308,14 @@ public void chooseSecretObjective(Objective objective) {
               }
           }
       
      +    /**
      +     * Tries to place a card on the player's board, unless there was a {@link WrongStateException},
      +     * in which case a new {@link ErrorMessage} is sent with the exception content
      +     *
      +     * @param coords The chosen coordinates
      +     * @param card The chosen card
      +     * @param side The chosen side
      +     */
           public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) {
               try {
                   this.player.playCard(coords, card, side);
      @@ -148,32 +324,36 @@ public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side
               }
           }
       
      +    /**
      +     * Tries to draw a card, unless there was a {@link WrongStateException}, in which case a new
      +     * {@link ErrorMessage} is sent with the exception content
      +     *
      +     * @param source The chosen source
      +     */
           public void drawCard(DrawSource source) {
               try {
                   this.player.drawCard(source);
      -        } catch (HandException | WrongTurnException | WrongStateException | WrongChoiceException e) {
      +        } catch (HandException | WrongTurnException | WrongStateException
      +                | WrongChoiceException e) {
                   this.sendMessage(this.createErrorMessage(e));
               }
           }
       
      -    @Override
      -    public void someoneSentBroadcastText(Player someone, String text) {
      -        Message msg = new SomeoneSentBroadcastTextMessage(someone.getUsername(), text);
      -        this.sendMessage(msg);
      -    }
      -
      -    @Override
      -    public void someoneSentPrivateText(Player someone, Player recipient, String text) {
      -        if (recipient.getUsername().equals(this.player.getUsername()) || someone.getUsername().equals(this.player.getUsername())) {
      -            Message msg = new SomeoneSentPrivateTextMessage(someone.getUsername(), recipient.getUsername(), text);
      -            this.sendMessage(msg);
      -        }
      -    }
      -
      +    /**
      +     * Sends a broadcast in the chat.
      +     *
      +     * @param text Text of the message
      +     */
           public void sendBroadcastText(String text) {
               this.player.sendBroadcastText(text);
           }
       
      +    /**
      +     * Sends a private message in the chat.
      +     *
      +     * @param recipientUsername username of the recipient
      +     * @param text text of the message
      +     */
           public void sendPrivateText(String recipientUsername, String text) {
               Player recipient = null;
               for (Player player : this.match.getPlayers()) {
      @@ -189,4 +369,58 @@ public void sendPrivateText(String recipientUsername, String text) {
               }
           }
       
      +    /**
      +     * Notifies the view that match has resumed after a server crash.
      +     */
      +    @Override
      +    public void matchResumed() {
      +        Map<String, Color> playersUsernamesAndPawns = new HashMap<>();
      +        Map<String, List<Integer>> playersHands = new HashMap<>();
      +        Pair<Integer, Integer> visibleObjectives;
      +        Map<DrawSource, Integer> visiblePlayableCards = new HashMap<>();
      +        Pair<Symbol, Symbol> decksTopReigns;
      +        Integer secretObjective;
      +        Map<String, Map<Symbol, Integer>> availableResources = new HashMap<>();
      +        Map<String, Map<Integer, PlacedCardRecord>> placedCards = new HashMap<>();
      +        Map<String, Integer> playerPoints = new HashMap<>();
      +        String currentPlayer;
      +        boolean drawPhase;
      +
      +        this.match.getPlayers().forEach(player -> {
      +            String username = player.getUsername();
      +            Board board = player.getBoard();
      +            playersUsernamesAndPawns.put(username, player.getPawnColor());
      +            playersHands.put(username,
      +                    board.getCurrentHand().stream().map(Card::getId).collect(Collectors.toList()));
      +            availableResources.put(username, board.getAvailableResources());
      +
      +            Map<Integer, PlacedCardRecord> placed = new HashMap<>();
      +            board.getPlacedCards()
      +                    .forEach((coords, placedCard) -> placed.put(placedCard.getTurn(),
      +                            new PlacedCardRecord(placedCard.getCard().getId(), coords.first(),
      +                                    coords.second(), placedCard.getPlayedSide())));
      +
      +            placedCards.put(username, placed);
      +            playerPoints.put(username, player.getPoints());
      +        });
      +
      +        Pair<Objective, Objective> visibleObjectivesValue = this.match.getVisibleObjectives();
      +        // Get a Set of Entry, which contains key and value, and create a new Hashmap with key and
      +        // value.ID
      +        visibleObjectives = new Pair<>(visibleObjectivesValue.first().getID(),
      +                visibleObjectivesValue.second().getID());
      +        visiblePlayableCards = this.match.getVisiblePlayableCards().entrySet().stream()
      +                .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().getId()));
      +        decksTopReigns = this.match.getDecksTopReigns();
      +        secretObjective = this.player.getSecretObjective().getID();
      +        currentPlayer = this.match.getCurrentPlayer().getUsername();
      +        drawPhase = this.match.getCurrentState().getClass().equals(AfterMoveState.class);
      +
      +
      +        Message msg = new MatchResumedMessage(playersUsernamesAndPawns, playersHands,
      +                visibleObjectives, visiblePlayableCards, decksTopReigns, secretObjective,
      +                availableResources, placedCards, playerPoints, currentPlayer, drawPhase);
      +
      +        this.sendMessage(msg);
      +    }
       }
      diff --git a/src/main/java/it/polimi/ingsw/exceptions/WrongNameException.java b/src/main/java/it/polimi/ingsw/exceptions/WrongNameException.java
      new file mode 100644
      index 00000000..baff8c33
      --- /dev/null
      +++ b/src/main/java/it/polimi/ingsw/exceptions/WrongNameException.java
      @@ -0,0 +1,7 @@
      +package it.polimi.ingsw.exceptions;
      +
      +public class WrongNameException extends Exception{
      +    public WrongNameException(String message) {
      +        super(message);
      +    }
      +}
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/AfterDrawState.java b/src/main/java/it/polimi/ingsw/gamemodel/AfterDrawState.java
      index e4a63d88..5d606302 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/AfterDrawState.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/AfterDrawState.java
      @@ -1,11 +1,27 @@
       package it.polimi.ingsw.gamemodel;
       
      -public class AfterDrawState extends MatchState {
      +import java.io.Serial;
      +import java.io.Serializable;
       
      +/**
      + * Subclass of {@link MatchState}. This is the state in which the match recognize if it's finished or it has to continue.
      + */
      +public class AfterDrawState extends MatchState implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
      +    /**
      +     * Initializes this instance.
      +     *
      +     * @param match The match in this state
      +     */
           public AfterDrawState(Match match) {
               super(match);
           }
       
      +    /**
      +     * If the match isn't finished, transitions to {@link NextTurnState}, otherwise to {@link FinalState}.
      +     */
           @Override
           public void transition() {
               MatchState nextState;
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/AfterMoveState.java b/src/main/java/it/polimi/ingsw/gamemodel/AfterMoveState.java
      index e561cbea..172c35fb 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/AfterMoveState.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/AfterMoveState.java
      @@ -1,16 +1,35 @@
       package it.polimi.ingsw.gamemodel;
       
      -public class AfterMoveState extends MatchState {
      +import java.io.Serial;
      +import java.io.Serializable;
       
      +/**
      + * Subclass of {@link MatchState}. This is the state in which the match allows a player to draw a card.
      + */
      +public class AfterMoveState extends MatchState implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
      +    /**
      +     * Initializes this instance.
      +     *
      +     * @param match The match in this state
      +     */
           public AfterMoveState(Match match) {
               super(match);
           }
       
      +    /**
      +     * This method call is allowed by this class instances.
      +     */
           @Override
           public void drawCard() {
       
           }
       
      +    /**
      +     * Transitions to {@link AfterDrawState}.
      +     */
           @Override
           public void transition() {
               MatchState nextState = new AfterDrawState(match);
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/Board.java b/src/main/java/it/polimi/ingsw/gamemodel/Board.java
      index a573d9af..f2608c08 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/Board.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/Board.java
      @@ -4,6 +4,8 @@
       import it.polimi.ingsw.exceptions.HandException;
       import it.polimi.ingsw.utils.Pair;
       
      +import java.io.Serial;
      +import java.io.Serializable;
       import java.util.ArrayList;
       import java.util.HashMap;
       import java.util.List;
      @@ -12,7 +14,10 @@
       /**
        * Board is the class that contains all the information relative to a {@link Player}'s status
        */
      -public class Board {
      +public class Board implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
           private final List<PlayableCard> currentHand;
           private final Map<Pair<Integer, Integer>, PlacedCard> placed;
           private final Map<Symbol, Integer> availableResources;
      @@ -151,11 +156,12 @@ protected int placeCard(Pair<Integer, Integer> coord, PlayableCard card, Side si
                       availableResources.put(s, availableResources.get(s) + 1);
                   }
               }
      -
      -        switch (card) {
      -            case GoldCard gold -> points = gold.calculatePoints(this, coord);
      -            case ResourceCard resource -> points = resource.getPoints();
      -            default -> throw new CardException("Unknown card type: " + card.getClass() + "!");
      +        if (side.equals(Side.FRONT)) {
      +            switch (card) {
      +                case GoldCard gold -> points = gold.calculatePoints(this, coord);
      +                case ResourceCard resource -> points = resource.getPoints();
      +                default -> throw new CardException("Unknown card type: " + card.getClass() + "!");
      +            }
               }
       
               return points;
      @@ -189,7 +195,6 @@ public PlacementOutcome verifyCardPlacement(Pair<Integer, Integer> coord, Card c
               if (placed.containsKey(coord)) {
                   return PlacementOutcome.INVALID_COORDS;
               }
      -        // TODO: To test again
               if (card instanceof GoldCard gold && side == Side.FRONT) {
                   if (gold.getRequirement().timesMet(this) == 0)
                       return PlacementOutcome.INVALID_ENOUGH_RESOURCES;
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/Card.java b/src/main/java/it/polimi/ingsw/gamemodel/Card.java
      index b3818b94..9f0117dc 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/Card.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/Card.java
      @@ -16,6 +16,9 @@ public abstract class Card implements Serializable {
           protected CardFace back;
           protected Integer id;
       
      +    /**
      +     * Empty constructor used for deserialization.
      +     */
           public Card() {
       
           }
      @@ -34,6 +37,10 @@ public CardFace getSide(Side side) {
               };
           }
       
      +    
      +    /**
      +     * @return The card ID
      +     */
           public Integer getId() {
               return this.id;
           }
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/CardFace.java b/src/main/java/it/polimi/ingsw/gamemodel/CardFace.java
      index 9583159a..dafec773 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/CardFace.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/CardFace.java
      @@ -1,10 +1,9 @@
       package it.polimi.ingsw.gamemodel;
       
      -import it.polimi.ingsw.exceptions.CardException;
      -
       import java.io.Serial;
       import java.io.Serializable;
       import java.util.Set;
      +import it.polimi.ingsw.exceptions.CardException;
       
       /**
        * Topological definition of a card's side
      @@ -19,6 +18,16 @@ public class CardFace implements Serializable {
           private Symbol bottomRight;
           private Set<Symbol> center;
       
      +    
      +    /**
      +     * Class constructor.
      +     * 
      +     * @param topLeft Top left corner
      +     * @param topRight Top right corner
      +     * @param bottomLeft Bottom left corner
      +     * @param bottomRight Bottom right corner
      +     * @param center Center of the card
      +     */
           public CardFace(Symbol topLeft, Symbol topRight, Symbol bottomLeft, Symbol bottomRight, Set<Symbol> center) {
               this.topLeft = topLeft;
               this.topRight = topRight;
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/ChooseInitialSideState.java b/src/main/java/it/polimi/ingsw/gamemodel/ChooseInitialSideState.java
      index 368d701a..7e9cb6d6 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/ChooseInitialSideState.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/ChooseInitialSideState.java
      @@ -1,16 +1,36 @@
       package it.polimi.ingsw.gamemodel;
       
      -public class ChooseInitialSideState extends MatchState {
      +import java.io.Serial;
      +import java.io.Serializable;
       
      +/**
      + * Subclass of {@link MatchState}. This is the state in which the match is giving an initial card to a player and
      + * waiting him to choose its side.
      + */
      +public class ChooseInitialSideState extends MatchState implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
      +    /**
      +     * Initializes this instance.
      +     *
      +     * @param match The match in this state
      +     */
           public ChooseInitialSideState(Match match) {
               super(match);
           }
       
      +    /**
      +     * This method call is allowed by this class instances.
      +     */
           @Override
           public void chooseInitialSide() {
       
           }
       
      +    /**
      +     * Transitions to {@link NextTurnState}
      +     */
           @Override
           public void transition() {
               Player lastPlayer = match.getPlayers().getLast();
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/ChooseSecretObjectiveState.java b/src/main/java/it/polimi/ingsw/gamemodel/ChooseSecretObjectiveState.java
      index 97872638..c771c53f 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/ChooseSecretObjectiveState.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/ChooseSecretObjectiveState.java
      @@ -1,16 +1,36 @@
       package it.polimi.ingsw.gamemodel;
       
      -public class ChooseSecretObjectiveState extends MatchState {
      +import java.io.Serial;
      +import java.io.Serializable;
       
      +/**
      + * Subclass of {@link MatchState}. This is the state in which the match is giving two secret objectives to a player and
      + * waiting him to choose one of them.
      + */
      +public class ChooseSecretObjectiveState extends MatchState implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
      +    /**
      +     * Initializes this instance.
      +     *
      +     * @param match The match in this state
      +     */
           public ChooseSecretObjectiveState(Match match) {
               super(match);
           }
       
      +    /**
      +     * This method call is allowed by this class instances.
      +     */
           @Override
           public void chooseSecretObjective() {
       
           }
       
      +    /**
      +     * Transitions to {@link NextTurnState}
      +     */
           @Override
           public void transition() {
               Player lastPlayer = match.getPlayers().getLast();
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/Color.java b/src/main/java/it/polimi/ingsw/gamemodel/Color.java
      index 471a1123..a83e059c 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/Color.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/Color.java
      @@ -1,6 +1,8 @@
       package it.polimi.ingsw.gamemodel;
       
      -
      +/**
      + * Represents pawns colors.
      + */
       public enum Color {
           RED,
           BLUE,
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/FinalState.java b/src/main/java/it/polimi/ingsw/gamemodel/FinalState.java
      index e042a124..30d6989f 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/FinalState.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/FinalState.java
      @@ -1,15 +1,40 @@
       package it.polimi.ingsw.gamemodel;
       
      -public class FinalState extends MatchState {
      +import java.io.Serial;
      +import java.io.Serializable;
       
      +/**
      + * Subclass of {@link MatchState}. This is the state in which the match is when it's finished, so players are
      + * allowed to leave.
      + */
      +public class FinalState extends MatchState implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
      +    /**
      +     * Initializes this instance.
      +     *
      +     * @param match The match in this state
      +     */
           public FinalState(Match match) {
               super(match);
       
               match.decideWinner();
           }
       
      +    /**
      +     * This method call is allowed by this class instances.
      +     */
      +    @Override
      +    public void removePlayer() {
      +        // No more transition
      +    }
      +
      +    /**
      +     * This call doesn't have any effect, apart from logging it to stderr.
      +     */
           @Override
           public void transition() {
      -        System.err.println("ERROR: State transition tried in the final state!");
      +        System.err.println("Transition tried in final state");
           }
       }
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/GameDeck.java b/src/main/java/it/polimi/ingsw/gamemodel/GameDeck.java
      index e27049e0..a5ce0a36 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/GameDeck.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/GameDeck.java
      @@ -1,5 +1,7 @@
       package it.polimi.ingsw.gamemodel;
       
      +import java.io.Serial;
      +import java.io.Serializable;
       import java.util.ArrayList;
       import java.util.Collections;
       import java.util.List;
      @@ -10,7 +12,10 @@
        *
        * @param <T> the type of deck, which can be a {@link ResourceCard}, {@link GoldCard}, {@link InitialCard} or {@link Objective}
        */
      -public class GameDeck<T> {
      +public class GameDeck<T> implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
           private List<T> cardsList;
       
           /**
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/Match.java b/src/main/java/it/polimi/ingsw/gamemodel/Match.java
      index d67d5c0d..95fb1e37 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/Match.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/Match.java
      @@ -1,5 +1,7 @@
       package it.polimi.ingsw.gamemodel;
       
      +import java.io.Serial;
      +import java.io.Serializable;
       import java.util.*;
       import java.util.concurrent.ExecutorService;
       import java.util.concurrent.Executors;
      @@ -15,7 +17,10 @@
        * Few methods are called by the current player of the match, used to trigger a change in the match and so notify that
        * an event occurred, such as nextPlayer(...).
        */
      -public class Match {
      +public class Match implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
           private final List<Player> players;
           private final int maxPlayers;
           private Player currentPlayer;
      @@ -51,7 +56,7 @@ public class Match {
           private List<Pair<Player, Boolean>> playersFinalRanking;
       
           // List of observers
      -    private final List<MatchObserver> observers;
      +    private transient List<MatchObserver> observers;
       
           /**
            * Initializes main Match attributes and allocate the attribute players List, assuming no parameter is null.
      @@ -70,7 +75,6 @@ public Match(int maxPlayers, GameDeck<InitialCard> initialsDeck, GameDeck<Resour
               this.goldsDeck = goldsDeck;
               this.objectivesDeck = objectivesDeck;
               this.currentState = new WaitState(this);
      -        this.observers = new ArrayList<>();
       
               if (goldsDeck.getSize() < maxPlayers + 2)
                   throw new IllegalArgumentException("goldsDeck does not have enough cards");
      @@ -80,7 +84,6 @@ else if (initialsDeck.getSize() < maxPlayers)
                   throw new IllegalArgumentException("initialDeck does not have enough cards");
               else if (objectivesDeck.getSize() < 6)
                   throw new IllegalArgumentException("objectivesDeck does not have enough cards");
      -        // TODO: handle this exception!!!
               else if (maxPlayers < 2 || maxPlayers > 4)
                   throw new IllegalArgumentException("The players must be at least 2 or maximum 4");
       
      @@ -93,15 +96,13 @@ else if (maxPlayers < 2 || maxPlayers > 4)
            * Note: Called by the Controller when a player joins the match.
            *
            * @param player player to be added to the match
      -     * @throws IllegalArgumentException if the player is already in the match or too many players would be in the match
            * @throws WrongStateException      if called while in a state that doesn't allow adding players
      +     * @throws AlreadyUsedUsernameException if there is already a player in the match that has the same username
            */
      -    public void addPlayer(Player player) throws IllegalArgumentException, WrongStateException, AlreadyUsedUsernameException {
      +    public void addPlayer(Player player) throws WrongStateException, AlreadyUsedUsernameException {
               synchronized (this) {
                   List<String> playersUsernames = getPlayers().stream().map(Player::getUsername).toList();
       
      -            if (players.contains(player))
      -                throw new IllegalArgumentException("Duplicated player in a match");
                   if (playersUsernames.contains(player.getUsername()))
                       throw new AlreadyUsedUsernameException("The chosen username is already in use");
       
      @@ -120,11 +121,11 @@ public void addPlayer(Player player) throws IllegalArgumentException, WrongState
            */
           public void removePlayer(Player player) {
               synchronized (this) {
      -            currentState.removePlayer();
                   if (players.contains(player)) {
                       players.remove(player);
      +                // If in a state different from the wait state, end the match
      +                currentState.removePlayer();
                       notifyObservers(observer -> observer.someoneQuit(player));
      -                currentState.transition();
                   }
               }
           }
      @@ -740,6 +741,9 @@ public int getMaxPlayers() {
            * @param observer The observer to be notified from now on when an event occurs
            */
           public void subscribeObserver(MatchObserver observer) {
      +        if (observers == null) {
      +            observers = new ArrayList<>();
      +        }
               observers.add(observer);
           }
       
      @@ -791,7 +795,7 @@ protected void sendPrivateText(Player sender, Player recipient, String text) {
            * @param observerCallable The "method" to be called on each observer of the match
            */
           private void notifyObservers(MatchObserverCallable observerCallable) {
      -        if(observers.isEmpty())
      +        if(observers == null || observers.isEmpty())
                   return;
       
               ExecutorService executor = Executors.newFixedThreadPool(observers.size());
      @@ -801,4 +805,13 @@ private void notifyObservers(MatchObserverCallable observerCallable) {
       
               executor.shutdown();
           }
      +
      +    /**
      +     * If the match is rejoinable (not every player is connected)
      +     * @return if the match is rejoinable
      +     */
      +    public synchronized boolean isRejoinable() {
      +        return players.stream().anyMatch((p) -> !p.isConnected()) && isStarted();
      +    }
      +
       }
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/MatchObserver.java b/src/main/java/it/polimi/ingsw/gamemodel/MatchObserver.java
      index 7b09d37c..85a861ce 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/MatchObserver.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/MatchObserver.java
      @@ -1,8 +1,9 @@
       package it.polimi.ingsw.gamemodel;
       
      -import java.util.Map;
       import it.polimi.ingsw.utils.Pair;
       
      +import java.util.Map;
      +
       /**
        * Interface to be implemented by any class that wants to be an observer of {@link Match}, so wants to be able to
        * get notified when an event occurs in a match (to which it's subscribed).
      @@ -46,8 +47,9 @@ public interface MatchObserver {
            * Note that Match calls this method on all MatchObservers instance subscribed to itself, then
            * even the MatchObserver causing this event gets notified.
            *
      -     * @param someone The player instance that has chosen the side
      -     * @param side    The chosen initial card side
      +     * @param someone            The player instance that has chosen the side
      +     * @param side               The chosen initial card side
      +     * @param availableResources The resources available at the moment to the player that set its initial card side
            */
           void someoneSetInitialSide(Player someone, Side side, Map<Symbol, Integer> availableResources);
       
      @@ -97,8 +99,21 @@ public interface MatchObserver {
            */
           void someoneDrewCard(Player someone, DrawSource source, PlayableCard card, PlayableCard replacementCard);
       
      +    /**
      +     * Notifies that someone has sent a broadcast message.
      +     *
      +     * @param someone The sender username
      +     * @param text    The message content
      +     */
           void someoneSentBroadcastText(Player someone, String text);
       
      +    /**
      +     * Notifies that someone has sent a private message to this player.
      +     *
      +     * @param someone   The sender username
      +     * @param recipient The recipient username
      +     * @param text      The message content
      +     */
           void someoneSentPrivateText(Player someone, Player recipient, String text);
       
           /**
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/MatchObserverCallable.java b/src/main/java/it/polimi/ingsw/gamemodel/MatchObserverCallable.java
      index a317157b..32855107 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/MatchObserverCallable.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/MatchObserverCallable.java
      @@ -1,6 +1,14 @@
       package it.polimi.ingsw.gamemodel;
       
      +/**
      + * Functional interface used to represents a method call ({@link #call(MatchObserver)}) on a {@link MatchObserver}.
      + */
       @FunctionalInterface
       public interface MatchObserverCallable {
      +    /**
      +     * Generic method call on a {@link MatchObserver}.
      +     *
      +     * @param matchObserver The match observer on which to call a method
      +     */
           void call(MatchObserver matchObserver);
       }
      \ No newline at end of file
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/MatchState.java b/src/main/java/it/polimi/ingsw/gamemodel/MatchState.java
      index 799af98e..52559a16 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/MatchState.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/MatchState.java
      @@ -2,6 +2,9 @@
       
       import it.polimi.ingsw.exceptions.WrongStateException;
       
      +import java.io.Serial;
      +import java.io.Serializable;
      +
       /**
        * Represents an appendix of {@link Match}.
        * Match fully delegates to this class, through composition, the role of keeping track of the current game state: it
      @@ -11,8 +14,18 @@
        * that specific subclass; if not overridden, the MatchState version of the method will be called and thus an exception
        * will be thrown.
        */
      -public abstract class MatchState {
      -    Match match;
      +public abstract class MatchState implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
      +    protected Match match;
      +
      +    /**
      +     * Empty constructor needed for deserialization.
      +     */
      +    public MatchState() {
      +
      +    }
       
           protected MatchState(Match match) {
               this.match = match;
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/NextTurnState.java b/src/main/java/it/polimi/ingsw/gamemodel/NextTurnState.java
      index 72baba77..17f1b407 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/NextTurnState.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/NextTurnState.java
      @@ -2,31 +2,68 @@
       
       import it.polimi.ingsw.exceptions.WrongStateException;
       
      -public class NextTurnState extends MatchState {
      +import java.io.Serial;
      +import java.io.Serializable;
       
      +/**
      + * Subclass of {@link MatchState}. This is the state in which the match decides whether it must give initial cards, give
      + * secret objectives, or wait for someone to play a card, according to the current match flow.
      + */
      +public class NextTurnState extends MatchState implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
      +    /**
      +     * Initializes this instance.
      +     *
      +     * @param match The match in this state
      +     */
           public NextTurnState(Match match) {
               super(match);
               match.nextPlayer();
           }
       
      +    /**
      +     * This method call is allowed by this class instances if and only if the match hasn't started yet
      +     * and the initial card side choosing has already finished.
      +     *
      +     * @throws WrongStateException If called when the match has already started or the initial card side choosing
      +     *                             hasn't finished yet.
      +     */
           @Override
           public void proposeSecretObjectives() throws WrongStateException {
               if (match.isStarted() || !match.isInitialTurnFinished())
                   throw new WrongStateException("proposeSecretObjectives called after the match was started");
           }
       
      +    /**
      +     * This method call is allowed by this class instances if and only if the match has already started.
      +     * @throws WrongStateException If called when the match hasn't started yet
      +     */
           @Override
           public void makeMove() throws WrongStateException {
               if (!match.isStarted())
                   throw new WrongStateException("makeMove called when match was not started yet");
           }
       
      +    /**
      +     * This method call is allowed by this class instances if and only if the initial card side choosing
      +     * hasn't finished yet.
      +     * @throws WrongStateException If called when the initial card side choosing has already finished.
      +     */
           @Override
           public void drawInitialCard() throws WrongStateException {
               if (match.isInitialTurnFinished())
                   throw new WrongStateException("drawInitialCard called after the initial turn was finished");
           }
       
      +    /**
      +     * Transitions to:
      +     *  - {@link AfterMoveState} if the match has already started;
      +     *  - {@link ChooseInitialSideState} if the initial card side choosing hasn't finished yet;
      +     *  - {@link ChooseSecretObjectiveState} if the match hasn't started yet and the initial card side choosing has
      +     *    already finished;
      +     */
           @Override
           public void transition() {
               MatchState nextState;
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/Objective.java b/src/main/java/it/polimi/ingsw/gamemodel/Objective.java
      index 97f4b63b..c5c207e5 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/Objective.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/Objective.java
      @@ -48,6 +48,9 @@ public Requirement getReq() {
               return this.req;
           }
       
      +    /**
      +     * @return the id of the objective card
      +     */
           public Integer getID() {
               return this.id;
           }
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/PlacedCard.java b/src/main/java/it/polimi/ingsw/gamemodel/PlacedCard.java
      index 37840bfc..b5eedf30 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/PlacedCard.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/PlacedCard.java
      @@ -1,9 +1,15 @@
       package it.polimi.ingsw.gamemodel;
       
      +import java.io.Serial;
      +import java.io.Serializable;
      +
       /**
        * This class handles the card already placed on the board, since we need to remember which card covers which
        */
      -public class PlacedCard {
      +public class PlacedCard implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
           private Card card;
           private int turn;
           private Side playedSide;
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/Player.java b/src/main/java/it/polimi/ingsw/gamemodel/Player.java
      index acd5d779..894c6465 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/Player.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/Player.java
      @@ -6,19 +6,28 @@
       import it.polimi.ingsw.exceptions.WrongTurnException;
       import it.polimi.ingsw.utils.Pair;
       
      +import java.io.Serial;
      +import java.io.Serializable;
       import java.util.Objects;
       
       /**
        * Represents each in-game user, so acts also as a gateway receiving input by the Controller.
        * It's also responsible for the board's logic, which is a slice of the game logic.
        */
      -public class Player {
      +public class Player implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
           private final String username;
           private final Match match;
           private int points;
           private final Board board;
           private Color pawnColor;
           private Objective secretObjective;
      +    /**
      +     * If the player is connected
      +     */
      +    private boolean connected;
       
           /**
            * Initializes the main player's attributes.
      @@ -30,6 +39,7 @@ public Player(String username, Match match) {
               this.username = username;
               this.match = match;
       
      +        this.connected = true;
               //Initialize values
               board = new Board();
               points = 0;
      @@ -38,7 +48,7 @@ public Player(String username, Match match) {
           /**
            * Initializes the current instance from a copy reference
            *
      -     * @param player
      +     * @param player The player to make a copy of
            */
           public Player(Player player) {
               this.username = player.username;
      @@ -69,6 +79,10 @@ public int hashCode() {
            * @param coords x and y position in which the card is played (where 0, 0 is the initial card)
            * @param card   the card to be placed
            * @param side   whether the card should be placed on the front or on the back
      +     * @throws WrongChoiceException If the chosen card cannot be player (placement not allowed, or not enough resources,
      +     *                              or card not in the player's hand)
      +     * @throws WrongStateException  If a card cannot be played in this match state
      +     * @throws WrongTurnException   If it's the turn of this player.
            */
           public void playCard(Pair<Integer, Integer> coords, PlayableCard card, Side side) throws WrongTurnException, WrongStateException, WrongChoiceException {
               synchronized (match) {
      @@ -135,6 +149,7 @@ public void chooseInitialCardSide(Side side) throws WrongTurnException, WrongSta
            * @throws WrongTurnException   if called by the player when it's not its turn
            * @throws WrongChoiceException if called on a drawing source which is empty (e.g. empty deck)
            * @throws WrongStateException  if called during the wrong match state
      +     * @throws HandException if the player already has three cards in their hand
            */
           public void drawCard(DrawSource source) throws HandException, WrongStateException, WrongChoiceException, WrongTurnException {
               synchronized (match) {
      @@ -218,7 +233,7 @@ protected void setColor(Color color) {
            *
            * @see #chooseSecretObjective(Objective)
            */
      -    protected Objective getSecretObjective() {
      +    public Objective getSecretObjective() {
               return secretObjective;
           }
       
      @@ -237,4 +252,16 @@ protected void addPoints(int points) {
           public String getUsername() {
               return username;
           }
      +
      +    public boolean isConnected() {
      +        synchronized (match) {
      +            return connected;
      +        }
      +    }
      +
      +    public void setConnected(boolean connected) {
      +        synchronized (match) {
      +            this.connected = connected;
      +        }
      +    }
       }
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/Requirement.java b/src/main/java/it/polimi/ingsw/gamemodel/Requirement.java
      index 59bd4e11..4b1bdfd1 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/Requirement.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/Requirement.java
      @@ -3,7 +3,7 @@
       import java.io.Serial;
       import java.io.Serializable;
       
      -/*
      +/**
        * A condition must be met in order to play a golden card and to get points from the objectives. Those requirements are both represented by this class
        */
       public abstract class Requirement implements Serializable {
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/ResourceCard.java b/src/main/java/it/polimi/ingsw/gamemodel/ResourceCard.java
      index 9ac28074..cba04f04 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/ResourceCard.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/ResourceCard.java
      @@ -5,8 +5,8 @@
       import java.io.Serial;
       import java.io.Serializable;
       
      -/*
      - * Card that does not require any conditions to be played
      +/**
      + * Card that does not require any conditions to be played.
        */
       public final class ResourceCard extends PlayableCard implements Serializable {
           @Serial
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/Side.java b/src/main/java/it/polimi/ingsw/gamemodel/Side.java
      index 99a09053..ba75b6d6 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/Side.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/Side.java
      @@ -1,7 +1,7 @@
       package it.polimi.ingsw.gamemodel;
       
       /**
      - * Used to know which of the two faces of a card we want to use
      + * Represents a card side.
        */
       public enum Side {
           FRONT("front"),
      @@ -12,15 +12,21 @@ public enum Side {
           Side(String string) {
               this.string = string;
           }
      -
      +    
           @Override
           public String toString() {
               return this.string;
           }
       
      -    public Side fromString(String cmp) {
      +    /**
      +     * Return a instance of this enum from its corresponding string representation.
      +     *
      +     * @param sideString The side represented as a string
      +     * @return The side instance
      +     */
      +    public Side fromString(String sideString) {
               for (Side side : Side.values()) {
      -            if (side.toString().equals(cmp)) {
      +            if (side.toString().equals(sideString)) {
                       return side;
                   }
               }
      diff --git a/src/main/java/it/polimi/ingsw/gamemodel/WaitState.java b/src/main/java/it/polimi/ingsw/gamemodel/WaitState.java
      index 20095c43..752806f5 100644
      --- a/src/main/java/it/polimi/ingsw/gamemodel/WaitState.java
      +++ b/src/main/java/it/polimi/ingsw/gamemodel/WaitState.java
      @@ -1,30 +1,55 @@
       package it.polimi.ingsw.gamemodel;
       
      -public class WaitState extends MatchState {
      +import java.io.Serial;
      +import java.io.Serializable;
       
      +/**
      + * Subclass of {@link MatchState}. This is the state in which the match is when accepting new players or them leaving,
      + * that is to say: before the match is full and so it starts.
      + */
      +public class WaitState extends MatchState implements Serializable {
      +    @Serial
      +    private static final long serialVersionUID = 1L;
      +
      +    /**
      +     * Initializes this instance.
      +     *
      +     * @param match The match in this state
      +     */
           public WaitState(Match match) {
               super(match);
           }
       
      +    /**
      +     * Transitions to {@link NextTurnState}.
      +     */
           @Override
           public void transition() {
      -        if (match.isFull()) {
      -            match.setupDecks();
      -            match.setupPlayers();
      -            match.setupBoards();
      +        synchronized (match) {
      +            if (match.isFull()) {
      +                match.setupDecks();
      +                match.setupPlayers();
      +                match.setupBoards();
       
      -            MatchState nextState = new NextTurnState(match);
      -            match.setState(nextState);
      +                MatchState nextState = new NextTurnState(match);
      +                match.setState(nextState);
       
      -            // Notify observers
      -            match.notifyMatchStart();
      +                // Notify observers
      +                match.notifyMatchStart();
      +            }
               }
           }
       
      +    /**
      +     * This method call is allowed by this class instances.
      +     */
           @Override
           public void removePlayer() {
           }
       
      +    /**
      +     * This method call is allowed by this class instances.
      +     */
           @Override
           public void addPlayer() {
           }
      diff --git a/src/main/java/it/polimi/ingsw/network/messages/actions/ActionMessage.java b/src/main/java/it/polimi/ingsw/network/messages/actions/ActionMessage.java
      index 7649adca..cc8f0ad2 100644
      --- a/src/main/java/it/polimi/ingsw/network/messages/actions/ActionMessage.java
      +++ b/src/main/java/it/polimi/ingsw/network/messages/actions/ActionMessage.java
      @@ -12,6 +12,12 @@ public sealed abstract class ActionMessage extends Message permits ChooseInitial
           private String action;
           private String username;
       
      +    
      +    /**
      +     * Class constructor.
      +     * 
      +     * @param username The player who wants to perform the action
      +     */
           public ActionMessage(String username) {
               super();
               this.action = this.getClass().getSimpleName().replace("Message", "");
      diff --git a/src/main/java/it/polimi/ingsw/network/messages/actions/ChooseInitialCardSideMessage.java b/src/main/java/it/polimi/ingsw/network/messages/actions/ChooseInitialCardSideMessage.java
      index d51edd7b..25be563b 100644
      --- a/src/main/java/it/polimi/ingsw/network/messages/actions/ChooseInitialCardSideMessage.java
      +++ b/src/main/java/it/polimi/ingsw/network/messages/actions/ChooseInitialCardSideMessage.java
      @@ -16,6 +16,13 @@ public Side getSide() {
               return side;
           }
       
      +    
      +    /**
      +     * Class constructor.
      +     * 
      +     * @param username The username of the player that wants to choose the initial card side
      +     * @param side The chosen card side
      +     */
           public ChooseInitialCardSideMessage(String username, Side side) {
               super(username);
               this.side = side;
      diff --git a/src/main/java/it/polimi/ingsw/network/messages/actions/ChooseSecretObjectiveMessage.java b/src/main/java/it/polimi/ingsw/network/messages/actions/ChooseSecretObjectiveMessage.java
      index a51a912e..80e09509 100644
      --- a/src/main/java/it/polimi/ingsw/network/messages/actions/ChooseSecretObjectiveMessage.java
      +++ b/src/main/java/it/polimi/ingsw/network/messages/actions/ChooseSecretObjectiveMessage.java
      @@ -14,6 +14,13 @@ public Integer getObjectiveID() {
               return objectiveID;
           }
       
      +    
      +    /**
      +     * Class constructor.
      +     * 
      +     * @param username The username of the player that wants to choose secret objective
      +     * @param objectiveID The chosen objective's ID
      +     */
           public ChooseSecretObjectiveMessage(String username, Integer objectiveID) {
               super(username);
               this.objectiveID = objectiveID;
      diff --git a/src/main/java/it/polimi/ingsw/network/messages/actions/SendPrivateTextMessage.java b/src/main/java/it/polimi/ingsw/network/messages/actions/SendPrivateTextMessage.java
      index 175a3a4e..8c4613dc 100644
      --- a/src/main/java/it/polimi/ingsw/network/messages/actions/SendPrivateTextMessage.java
      +++ b/src/main/java/it/polimi/ingsw/network/messages/actions/SendPrivateTextMessage.java
      @@ -4,17 +4,17 @@
        * SendPrivateTextMessage
        */
       public final class SendPrivateTextMessage extends ActionMessage {
      -    private final String recpient;
      +    private final String recipient;
           private final String text;
       
      -    public SendPrivateTextMessage(String username, String recpient, String text) {
      +    public SendPrivateTextMessage(String username, String recipient, String text) {
               super(username);
      -        this.recpient = recpient;
      +        this.recipient = recipient;
               this.text = text;
           }
       
      -    public String getRecpient() {
      -        return recpient;
      +    public String getRecipient() {
      +        return recipient;
           }
       
           public String getText() {
      diff --git a/src/main/java/it/polimi/ingsw/network/messages/errors/ErrorMessage.java b/src/main/java/it/polimi/ingsw/network/messages/errors/ErrorMessage.java
      index 57fc6666..12fbacd8 100644
      --- a/src/main/java/it/polimi/ingsw/network/messages/errors/ErrorMessage.java
      +++ b/src/main/java/it/polimi/ingsw/network/messages/errors/ErrorMessage.java
      @@ -14,10 +14,18 @@ public ErrorMessage(String message, String error) {
               this.error = error;
           }
       
      +    /**
      +     * Getter for the error code of the message
      +     * @return error code of the message
      +     */
           public String getError() {
               return error;
           }
       
      +    /**
      +     * Getter for the message in human language
      +     * @return the mesage
      +     */
           public String getMessage() {
               return message;
           }
      diff --git a/src/main/java/it/polimi/ingsw/network/messages/responses/AvailableMatchesMessage.java b/src/main/java/it/polimi/ingsw/network/messages/responses/AvailableMatchesMessage.java
      index d5ee03a6..7f40a83b 100644
      --- a/src/main/java/it/polimi/ingsw/network/messages/responses/AvailableMatchesMessage.java
      +++ b/src/main/java/it/polimi/ingsw/network/messages/responses/AvailableMatchesMessage.java
      @@ -13,6 +13,12 @@ public final class AvailableMatchesMessage extends ResponseMessage {
       
           private final List<AvailableMatch> matches;
       
      +    
      +    /**
      +     * Class constructor.
      +     * 
      +     * @param availableMatches The available matches present on server
      +     */
           public AvailableMatchesMessage(Map<String, Match> availableMatches) {
               super(null);
               matches = new ArrayList<>();
      @@ -30,6 +36,6 @@ public List<AvailableMatch> getMatches() {
           }
       
           private final AvailableMatch encodeMatch(String name, Match match) {
      -        return new AvailableMatch(name, match.getMaxPlayers(), match.getPlayers().size());
      +        return new AvailableMatch(name, match.getMaxPlayers(), match.getPlayers().size(), match.isRejoinable());
           }
       }
      diff --git a/src/main/java/it/polimi/ingsw/network/messages/responses/MatchResumedMessage.java b/src/main/java/it/polimi/ingsw/network/messages/responses/MatchResumedMessage.java
      new file mode 100644
      index 00000000..dd0ac33c
      --- /dev/null
      +++ b/src/main/java/it/polimi/ingsw/network/messages/responses/MatchResumedMessage.java
      @@ -0,0 +1,125 @@
      +package it.polimi.ingsw.network.messages.responses;
      +
      +import java.util.List;
      +import java.util.Map;
      +import it.polimi.ingsw.gamemodel.Color;
      +import it.polimi.ingsw.gamemodel.DrawSource;
      +import it.polimi.ingsw.gamemodel.Symbol;
      +import it.polimi.ingsw.utils.Pair;
      +import it.polimi.ingsw.utils.PlacedCardRecord;
      +
      +/**
      + * This response is sent to the user who just rejoined a match. All the parameters refer to the
      + * status of the match before the server crashed
      + */
      +public final class MatchResumedMessage extends ResponseMessage {
      +    private final Map<String, Color> playersUsernamesAndPawns;
      +    private final Map<String, List<Integer>> playersHands;
      +    private final Pair<Integer, Integer> visibleObjectives;
      +    private final Map<DrawSource, Integer> visiblePlayableCards;
      +    private final Pair<Symbol, Symbol> decksTopReigns;
      +    private final Integer secretObjective;
      +    private final Map<String, Map<Symbol, Integer>> availableResources;
      +    private final Map<String, Map<Integer, PlacedCardRecord>> placedCards;
      +    private final Map<String, Integer> playerPoints;
      +    private final String currentPlayer;
      +    private final boolean drawPhase;
      +
      +    public MatchResumedMessage(Map<String, Color> playersUsernamesAndPawns,
      +            Map<String, List<Integer>> playersHands, Pair<Integer, Integer> visibleObjectives,
      +            Map<DrawSource, Integer> visiblePlayableCards, Pair<Symbol, Symbol> decksTopReigns,
      +            Integer secretObjective, Map<String, Map<Symbol, Integer>> availableResources,
      +            Map<String, Map<Integer, PlacedCardRecord>> placedCards,
      +            Map<String, Integer> playerPoints, String currentPlayer, boolean drawPhase) {
      +        super(null);
      +        this.playersUsernamesAndPawns = playersUsernamesAndPawns;
      +        this.playersHands = playersHands;
      +        this.visibleObjectives = visibleObjectives;
      +        this.visiblePlayableCards = visiblePlayableCards;
      +        this.decksTopReigns = decksTopReigns;
      +        this.secretObjective = secretObjective;
      +        this.availableResources = availableResources;
      +        this.placedCards = placedCards;
      +        this.playerPoints = playerPoints;
      +        this.currentPlayer = currentPlayer;
      +        this.drawPhase = drawPhase;
      +    }
      +
      +
      +    /**
      +     * @return A map from players' username to pawn color
      +     */
      +    public Map<String, Color> getPlayersUsernamesAndPawns() {
      +        return playersUsernamesAndPawns;
      +    }
      +
      +    /**
      +     * @return A map from players' username to their hand
      +     */
      +    public Map<String, List<Integer>> getPlayersHands() {
      +        return playersHands;
      +    }
      +
      +    /**
      +     * @return The two visible objectives common to every player
      +     */
      +    public Pair<Integer, Integer> getVisibleObjectives() {
      +        return visibleObjectives;
      +    }
      +
      +    /**
      +     * @return The four drawable cards visible to everyone
      +     */
      +    public Map<DrawSource, Integer> getVisiblePlayableCards() {
      +        return visiblePlayableCards;
      +    }
      +
      +    /**
      +     * @return The reign of the two decks (resource and gold)
      +     */
      +    public Pair<Symbol, Symbol> getDecksTopReigns() {
      +        return decksTopReigns;
      +    }
      +
      +    /**
      +     * @return The secret objective ID of the player
      +     */
      +    public Integer getSecretObjective() {
      +        return secretObjective;
      +    }
      +
      +    /**
      +     * @return A map from players' username to their available resources
      +     */
      +    public Map<String, Map<Symbol, Integer>> getAvailableResources() {
      +        return availableResources;
      +    }
      +
      +    /**
      +     * @return A map from players' username to their board
      +     */
      +    public Map<String, Map<Integer, PlacedCardRecord>> getPlacedCards() {
      +        return placedCards;
      +    }
      +
      +    /**
      +     * @return A map from players' username to their points
      +     */
      +    public Map<String, Integer> getPlayerPoints() {
      +        return playerPoints;
      +    }
      +
      +    /**
      +     * @return Username of the player currently playing his turn
      +     */
      +    public String getCurrentPlayer() {
      +        return currentPlayer;
      +    }
      +
      +    /**
      +     * @return Whether the current player should play or draw a card
      +     */
      +    public boolean isDrawPhase() {
      +        return drawPhase;
      +    }
      +}
      diff --git a/src/main/java/it/polimi/ingsw/network/messages/responses/ResponseMessage.java b/src/main/java/it/polimi/ingsw/network/messages/responses/ResponseMessage.java
      index de336dcd..c119b29f 100644
      --- a/src/main/java/it/polimi/ingsw/network/messages/responses/ResponseMessage.java
      +++ b/src/main/java/it/polimi/ingsw/network/messages/responses/ResponseMessage.java
      @@ -9,7 +9,7 @@
       public sealed class ResponseMessage extends Message permits AvailableMatchesMessage, MatchFinishedMessage, MatchStartedMessage,
               SomeoneJoinedMessage, SomeoneQuitMessage, SomeoneChoseSecretObjectiveMessage, SomeoneDrewCardMessage, SomeoneDrewInitialCardMessage,
               SomeoneDrewSecretObjectivesMessage, SomeonePlayedCardMessage, SomeoneSetInitialSideMessage,
      -        SomeoneSentBroadcastTextMessage, SomeoneSentPrivateTextMessage {
      +        SomeoneSentBroadcastTextMessage, SomeoneSentPrivateTextMessage, MatchResumedMessage {
           private final String username;
           private final String response = this.getClass().getSimpleName().replace("Message", "");
       
      diff --git a/src/main/java/it/polimi/ingsw/network/messages/responses/SomeoneDrewCardMessage.java b/src/main/java/it/polimi/ingsw/network/messages/responses/SomeoneDrewCardMessage.java
      index 4998101b..4928c893 100644
      --- a/src/main/java/it/polimi/ingsw/network/messages/responses/SomeoneDrewCardMessage.java
      +++ b/src/main/java/it/polimi/ingsw/network/messages/responses/SomeoneDrewCardMessage.java
      @@ -2,6 +2,9 @@
       
       import it.polimi.ingsw.gamemodel.DrawSource;
       import it.polimi.ingsw.gamemodel.Symbol;
      +import it.polimi.ingsw.utils.Pair;
      +
      +import javax.swing.plaf.synth.SynthButtonUI;
       
       /**
        * This response is sent to each user in the match when a user draws a card.
      @@ -10,7 +13,7 @@ public final class SomeoneDrewCardMessage extends ResponseMessage {
           private final DrawSource drawSource;
           private final Integer cardID;
           private final Integer replacementCardID;
      -    private final Symbol replacementCardReign;
      +    private final Pair<Symbol, Symbol> deckTopReigns;
       
           /**
            * @return Source from which the card is drawn.
      @@ -36,15 +39,15 @@ public Integer getReplacementCardID() {
           /**
            * @return Reign of the replaced card
            */
      -    public Symbol getReplacementCardReign() {
      -        return replacementCardReign;
      +    public Pair<Symbol, Symbol> getDeckTopReigns() {
      +        return deckTopReigns;
           }
       
      -    public SomeoneDrewCardMessage(String username, DrawSource source, Integer cardID, Integer replacementCardID, Symbol replacementCardSymbol) {
      +    public SomeoneDrewCardMessage(String username, DrawSource source, Integer cardID, Integer replacementCardID, Pair<Symbol, Symbol> deckTopReigns) {
               super(username);
               this.drawSource = source;
               this.cardID = cardID;
      -        this.replacementCardReign = replacementCardSymbol;
      +        this.deckTopReigns = deckTopReigns;
               if (!source.equals(DrawSource.GOLDS_DECK) && !source.equals(DrawSource.RESOURCES_DECK)) {
                   this.replacementCardID = replacementCardID;
               } else {
      diff --git a/src/main/java/it/polimi/ingsw/network/tcp/ClientListener.java b/src/main/java/it/polimi/ingsw/network/tcp/ClientListener.java
      index 4e2c8ff3..3e82e19e 100644
      --- a/src/main/java/it/polimi/ingsw/network/tcp/ClientListener.java
      +++ b/src/main/java/it/polimi/ingsw/network/tcp/ClientListener.java
      @@ -1,9 +1,14 @@
       package it.polimi.ingsw.network.tcp;
       
      +import java.io.IOException;
      +import java.net.Socket;
      +import java.util.HashMap;
      +import java.util.Map;
       import com.google.gson.JsonParseException;
       import it.polimi.ingsw.controllers.PlayerControllerTCP;
       import it.polimi.ingsw.exceptions.AlreadyUsedUsernameException;
       import it.polimi.ingsw.exceptions.ChosenMatchException;
      +import it.polimi.ingsw.exceptions.WrongNameException;
       import it.polimi.ingsw.exceptions.WrongStateException;
       import it.polimi.ingsw.gamemodel.*;
       import it.polimi.ingsw.network.messages.actions.*;
      @@ -15,11 +20,6 @@
       import it.polimi.ingsw.utils.MessageJsonParser;
       import it.polimi.ingsw.utils.Pair;
       
      -import java.io.IOException;
      -import java.net.Socket;
      -import java.util.HashMap;
      -import java.util.Map;
      -
       /*
        * actual connection procedure: - socket accepted - socket asks for available matches, giving its
        * name to server - when received, it communicates which match it wants to join - only then a
      @@ -29,12 +29,15 @@
       
       /**
        * Every time a socket gets accepted by the TCP server, a new ClientListener will be created with
      - * it, and it will: - Acquire the client's username - Make the client (which is still not a
      - * {@link Player}) choose/create a {@link Match} to join - Create its {@link PlayerControllerTCP},
      - * which will also make him join such {@link Match} - Listen for any message received and, execute
      - * the corresponding action
      - * <p>
      - * Note that this will just require the action to be executed, but its {@link PlayerControllerTCP}
      + * it, and it will:
      + * <ul>
      + * <li>Acquire the client's username
      + * <li>Make the client (which is still not a {@link Player}) choose/create a {@link Match} to join
      + * <li>Create its {@link PlayerControllerTCP}, which will also make him join such {@link Match}
      + * <li>Listen for any message received and, execute the corresponding action.
      + * </ul>
      + * 
      + * Note that this will just require the action to be executed, but it's {@link PlayerControllerTCP}
        * that actually calls the {@link Player} methods
        */
       public class ClientListener extends Thread {
      @@ -48,8 +51,8 @@ public class ClientListener extends Thread {
           private Map<Integer, PlayableCard> playableCards;
       
           /**
      -     * Class constructor. Needs to have a reference to the server instance since it needs to handle the
      -     * match assignment
      +     * Class constructor. Needs to have a reference to the server instance since it needs to handle
      +     * the match assignment
            *
            * @param socket the socket that required a connection
            * @param server the instance of {@link Server} that's running
      @@ -78,7 +81,7 @@ public ClientListener(Socket socket, Server server) {
           /**
            * Sends error message with custom text
            *
      -     * @param prompt    the text to be shown
      +     * @param prompt the text to be shown
            * @param exception the exception type
            */
           private void sendError(String prompt, Exception exception) {
      @@ -110,13 +113,15 @@ private void setPlayerController() {
                           switch (msg) {
                               case GetAvailableMatchesMessage getAvailableMatchesMessage:
                                   username = getAvailableMatchesMessage.getUsername();
      -                            availableMatches = new AvailableMatchesMessage(this.server.getJoinableMatchesMap());
      +                            availableMatches = new AvailableMatchesMessage(
      +                                    this.server.getJoinableMatchesMap());
                                   this.io.writeMsg(availableMatches);
                                   break;
       
                               case CreateMatchMessage createMatchMessage:
                                   username = createMatchMessage.getUsername();
      -                            this.server.createMatch(createMatchMessage.getMatchName(), createMatchMessage.getMaxPlayers());
      +                            this.server.createMatch(createMatchMessage.getMatchName(),
      +                                    createMatchMessage.getMaxPlayers());
                                   match = this.server.getMatch(createMatchMessage.getMatchName());
       
                                   this.createPlayerController(username, match);
      @@ -137,8 +142,8 @@ private void setPlayerController() {
                       }
                   } catch (JsonParseException | ClassNotFoundException e) {
                       // message is not correctly formatted, ignore
      -            } catch (ChosenMatchException | WrongStateException | AlreadyUsedUsernameException |
      -                     IllegalArgumentException e) {
      +            } catch (ChosenMatchException | WrongStateException | AlreadyUsedUsernameException
      +                    | IllegalArgumentException | WrongNameException e) {
                       this.sendError(e.getMessage(), e);
                   } catch (IOException e) {
                       this.close(match);
      @@ -152,56 +157,67 @@ private void setPlayerController() {
            * Tries to actually create the player controller with the acquired information
            *
            * @param username The chosen username
      -     * @param match    The match to join
      +     * @param match The match to join
            * @throws AlreadyUsedUsernameException If the match already contains the chosen username
      -     * @throws WrongStateException          If the match currently does not accept new players
      -     * @throws ChosenMatchException         If the match does not exist or is not valid
      +     * @throws WrongStateException If the match currently does not accept new players
      +     * @throws ChosenMatchException If the match does not exist or is not valid
            */
           private void createPlayerController(String username, Match match)
      -            throws AlreadyUsedUsernameException, IllegalArgumentException, WrongStateException, ChosenMatchException {
      +            throws AlreadyUsedUsernameException, IllegalArgumentException, WrongStateException,
      +            ChosenMatchException, WrongNameException {
               this.playerController = new PlayerControllerTCP(username, match, this.io);
               this.playerController.sendJoined();
           }
       
           /**
      -     * This parses the message received from socket's input stream and executes the request such message
      -     * carried. If the message is not one of the expected types, it will just be ignored
      +     * This parses the message received from socket's input stream and executes the request such
      +     * message carried. If the message is not one of the expected types, it will just be ignored
      +     *
      +     * @param msg The received message (received as a string)
            *
            * @see ActionMessage
            */
           private void executeRequest(String msg) {
      -        ActionMessage message = (ActionMessage) parser.toMessage(msg);
      -        if (msg != null) {
      -            switch (message) {
      -                case ChooseSecretObjectiveMessage actionMsg:
      -                    this.playerController.chooseSecretObjective(this.objectives.get(actionMsg.getObjectiveID()));
      -                    break;
      -                case ChooseInitialCardSideMessage actionMsg:
      -                    this.playerController.chooseInitialCardSide(actionMsg.getSide());
      -                    break;
      -                case DrawCardMessage actionMsg:
      -                    this.playerController.drawCard(actionMsg.getSource());
      -                    break;
      -                case DrawInitialCardMessage actionMsg:
      -                    this.playerController.drawInitialCard();
      -                    break;
      -                case DrawSecretObjectivesMessage actionMsg:
      -                    this.playerController.drawSecretObjectives();
      -                    break;
      -                case SendBroadcastTextMessage actionMsg:
      -                    this.playerController.sendBroadcastText(actionMsg.getText());
      -                    break;
      -                case SendPrivateTextMessage actionMsg:
      -                    this.playerController.sendPrivateText(actionMsg.getRecpient(), actionMsg.getText());
      -                    break;
      -                case PlayCardMessage actionMsg:
      -                    Pair<Integer, Integer> coords = new Pair<>(actionMsg.getX(), actionMsg.getY());
      -                    PlayableCard card = this.playableCards.get(actionMsg.getCardID());
      -                    this.playerController.playCard(coords, card, actionMsg.getSide());
      -                    break;
      -                default:
      -                    break;
      +        try {
      +
      +            ActionMessage message = (ActionMessage) parser.toMessage(msg);
      +            if (msg != null) {
      +                switch (message) {
      +                    case ChooseSecretObjectiveMessage actionMsg:
      +                        this.playerController.chooseSecretObjective(
      +                                this.objectives.get(actionMsg.getObjectiveID()));
      +                        break;
      +                    case ChooseInitialCardSideMessage actionMsg:
      +                        this.playerController.chooseInitialCardSide(actionMsg.getSide());
      +                        break;
      +                    case DrawCardMessage actionMsg:
      +                        this.playerController.drawCard(actionMsg.getSource());
      +                        break;
      +                    case DrawInitialCardMessage actionMsg:
      +                        this.playerController.drawInitialCard();
      +                        break;
      +                    case DrawSecretObjectivesMessage actionMsg:
      +                        this.playerController.drawSecretObjectives();
      +                        break;
      +                    case SendBroadcastTextMessage actionMsg:
      +                        this.playerController.sendBroadcastText(actionMsg.getText());
      +                        break;
      +                    case SendPrivateTextMessage actionMsg:
      +                        this.playerController.sendPrivateText(actionMsg.getRecipient(),
      +                                actionMsg.getText());
      +                        break;
      +                    case PlayCardMessage actionMsg:
      +                        Pair<Integer, Integer> coords =
      +                                new Pair<>(actionMsg.getX(), actionMsg.getY());
      +                        PlayableCard card = this.playableCards.get(actionMsg.getCardID());
      +                        this.playerController.playCard(coords, card, actionMsg.getSide());
      +                        break;
      +                    default:
      +                        break;
      +                }
                   }
      +        } catch (JsonParseException e) {
      +            // Nothing to do here: it was either a ping or a wrongly formatted message
               }
       
           }
      @@ -229,20 +245,19 @@ public void listen() {
            * This will close socket and input/output handlers, if not null
            */
           private void close(Match match) {
      -        match.removePlayer(this.playerController.getPlayer());
               try {
      +            match.removePlayer(this.playerController.getPlayer());
                   if (this.socket != null && !this.socket.isClosed()) {
                       this.io.close();
                       this.socket.close();
                   }
      -        } catch (IOException e) {
      -            e.printStackTrace();
      +        } catch (IOException | NullPointerException e) {
               }
           }
       
           /**
      -     * Since the class extends {@link Thread} it needs to implement {@link Thread#run()}. Specifically,
      -     * this will just run {@link ClientListener#listen()}
      +     * Since the class extends {@link Thread} it needs to implement {@link Thread#run()}.
      +     * Specifically, this will just run {@link ClientListener#listen()}
            */
           @Override
           public void run() {
      diff --git a/src/main/java/it/polimi/ingsw/network/tcp/ClientReceiver.java b/src/main/java/it/polimi/ingsw/network/tcp/ClientReceiver.java
      index eaa3f041..64e3e0df 100644
      --- a/src/main/java/it/polimi/ingsw/network/tcp/ClientReceiver.java
      +++ b/src/main/java/it/polimi/ingsw/network/tcp/ClientReceiver.java
      @@ -6,19 +6,20 @@
       import java.util.List;
       import java.util.Map;
       import java.util.stream.Collectors;
      -import it.polimi.ingsw.client.network.NetworkViewTCP;
      +import it.polimi.ingsw.client.frontend.GraphicalView;
      +import it.polimi.ingsw.client.network.NetworkHandlerTCP;
       import it.polimi.ingsw.gamemodel.*;
       import it.polimi.ingsw.network.messages.errors.ErrorMessage;
       import it.polimi.ingsw.network.messages.responses.*;
       import it.polimi.ingsw.utils.CardsManager;
       import it.polimi.ingsw.utils.Pair;
      +import it.polimi.ingsw.utils.PlacedCardRecord;
       
       /**
      - * ClientSender
      + * Receives messages from server to client
        */
      -
       public class ClientReceiver implements Runnable {
      -    private NetworkViewTCP networkView;
      +    private NetworkHandlerTCP networkHandler;
           private Socket socket;
           private IOHandler io;
           private Map<Integer, InitialCard> initialCards;
      @@ -26,11 +27,20 @@ public class ClientReceiver implements Runnable {
           private Map<Integer, GoldCard> goldCards;
           private Map<Integer, Objective> objectives;
       
      -    public ClientReceiver(NetworkViewTCP networkView, Socket socket) throws IOException {
      -        this.networkView = networkView;
      +
      +    /**
      +     * Class constructor.
      +     * 
      +     * @param networkHandler The network view that should call the {@link GraphicalView} methods
      +     * @param socket The socket opened
      +     * 
      +     * @throws IOException If there was an error with the socket's streams
      +     */
      +    public ClientReceiver(NetworkHandlerTCP networkHandler, Socket socket) throws IOException {
      +        this.networkHandler = networkHandler;
               this.socket = socket;
               this.io = new IOHandler(socket);
      -        this.io = networkView.getIO();
      +        this.io = networkHandler.getIO();
       
               CardsManager cardsManager = CardsManager.getInstance();
               this.initialCards = cardsManager.getInitialCards();
      @@ -39,6 +49,14 @@ public ClientReceiver(NetworkViewTCP networkView, Socket socket) throws IOExcept
               this.objectives = cardsManager.getObjectives();
           }
       
      +
      +    /**
      +     * Get a playable card by its ID.
      +     * 
      +     * @param cardID The card ID
      +     * 
      +     * @return The playable card
      +     */
           private PlayableCard getPlayable(Integer cardID) {
               PlayableCard card = this.resourceCards.get(cardID);
               if (card == null) {
      @@ -47,75 +65,168 @@ private PlayableCard getPlayable(Integer cardID) {
               return card;
           }
       
      +    /**
      +     * Parses a map from coordinates to {@link PlacedCard} to a map from coordinates to
      +     * {@link PlacedCardRecord}.
      +     * 
      +     * @param board The map from coordinates to {@link PlacedCard}
      +     * 
      +     * @return The map from coordinates to {@link PlacedCardRecord}
      +     */
      +    private Map<Pair<Integer, Integer>, PlacedCard> getPlacedMap(
      +            Map<Integer, PlacedCardRecord> board) {
      +        Map<Pair<Integer, Integer>, PlacedCard> result = new HashMap<>();
      +
      +        board.forEach((turn, placedCardRecord) -> {
      +            if (placedCardRecord.x().equals(0) && placedCardRecord.y().equals(0)) {
      +                result.put(new Pair<Integer, Integer>(placedCardRecord.x(), placedCardRecord.y()),
      +                        new PlacedCard(this.initialCards.get(placedCardRecord.cardID()),
      +                                placedCardRecord.side(), turn));
      +            } else {
      +                result.put(new Pair<Integer, Integer>(placedCardRecord.x(), placedCardRecord.y()),
      +                        new PlacedCard(this.getPlayable(placedCardRecord.cardID()),
      +                                placedCardRecord.side(), turn));
      +            }
      +        });
      +
      +        return result;
      +    }
      +
      +
      +    /**
      +     * Parses the message and resumes the match.
      +     * 
      +     * @param msg The message containing the match status
      +     * 
      +     * @throws IOException if there was a problem with the socket stream
      +     */
      +    private void resumeMatch(MatchResumedMessage msg) throws IOException {
      +        Map<String, Color> playersUsernamesAndPawns = new HashMap<>();
      +        Map<String, List<PlayableCard>> playersHands = new HashMap<>();
      +        Pair<Objective, Objective> visibleObjectives;
      +        Map<DrawSource, PlayableCard> visiblePlayableCards = new HashMap<>();
      +        Pair<Symbol, Symbol> decksTopReigns;
      +        Objective secretObjective;
      +        Map<String, Map<Symbol, Integer>> availableResources = new HashMap<>();
      +        Map<String, Map<Pair<Integer, Integer>, PlacedCard>> placedCards = new HashMap<>();
      +        Map<String, Integer> playerPoints = new HashMap<>();
      +        String currentPlayer;
      +        boolean drawPhase;
      +
      +        playersUsernamesAndPawns = msg.getPlayersUsernamesAndPawns();
      +        playersHands = msg.getPlayersHands().entrySet().stream()
      +                .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().stream()
      +                        .map(cardID -> this.getPlayable(cardID)).collect(Collectors.toList())));
      +        Pair<Integer, Integer> visibleObjectivesID = msg.getVisibleObjectives();
      +        visibleObjectives =
      +                new Pair<Objective, Objective>(this.objectives.get(visibleObjectivesID.first()),
      +                        this.objectives.get(visibleObjectivesID.second()));
      +        visiblePlayableCards = msg.getVisiblePlayableCards().entrySet().stream().collect(
      +                Collectors.toMap(Map.Entry::getKey, entry -> this.getPlayable(entry.getValue())));
      +        decksTopReigns = msg.getDecksTopReigns();
      +        secretObjective = this.objectives.get(msg.getSecretObjective());
      +        availableResources = msg.getAvailableResources();
      +        msg.getPlacedCards()
      +                .forEach((player, board) -> placedCards.put(player, this.getPlacedMap(board)));
      +        playerPoints = msg.getPlayerPoints();
      +        currentPlayer = msg.getCurrentPlayer();
      +        drawPhase = msg.isDrawPhase();
      +
      +        this.networkHandler.matchResumed(playersUsernamesAndPawns, playersHands, visibleObjectives,
      +                visiblePlayableCards, decksTopReigns, secretObjective, availableResources,
      +                placedCards, playerPoints, currentPlayer, drawPhase);
      +    }
      +
      +    /**
      +     * Parses a message and calls the corresponding
      +     * {@link it.polimi.ingsw.client.network.NetworkHandler}'s view.
      +     * 
      +     * @param message The message to be parsed
      +     */
           private void parseMessage(String message) {
               try {
                   ResponseMessage response = (ResponseMessage) io.stringToMsg(message);
                   String username = response.getUsername();
                   switch (response) {
                       case AvailableMatchesMessage msg:
      -                    this.networkView.receiveAvailableMatches(msg.getMatches());
      +                    this.networkHandler.receiveAvailableMatches(msg.getMatches());
      +                    break;
      +                case MatchResumedMessage msg:
      +                    this.resumeMatch(msg);
                           break;
                       case MatchStartedMessage msg:
                           Map<String, List<PlayableCard>> hands = new HashMap<>();
      -                    msg.getPlayerHands().forEach((player, hand) -> hands.put(player,
      -                            List.of(hand).stream().map(card -> this.getPlayable(card)).collect(Collectors.toList())));
      +                    msg.getPlayerHands()
      +                            .forEach((player, hand) -> hands.put(player,
      +                                    List.of(hand).stream().map(card -> this.getPlayable(card))
      +                                            .collect(Collectors.toList())));
       
                           Pair<Objective, Objective> objectives = new Pair<Objective, Objective>(
      -                            this.objectives.get(msg.getVisibleObjectives()[0]), this.objectives.get(msg.getVisibleObjectives()[1]));
      +                            this.objectives.get(msg.getVisibleObjectives()[0]),
      +                            this.objectives.get(msg.getVisibleObjectives()[1]));
       
                           Map<DrawSource, PlayableCard> visibles = new HashMap<>();
      -                    msg.getVisibleCards().forEach((source, card) -> visibles.put(source, this.getPlayable(card)));
      +                    msg.getVisibleCards().forEach(
      +                            (source, card) -> visibles.put(source, this.getPlayable(card)));
       
      -                    Pair<Symbol, Symbol> decksTop = new Pair<Symbol, Symbol>(msg.getVisibleDeckReigns()[0], msg.getVisibleDeckReigns()[1]);
      +                    Pair<Symbol, Symbol> decksTop = new Pair<Symbol, Symbol>(
      +                            msg.getVisibleDeckReigns()[0], msg.getVisibleDeckReigns()[1]);
       
      -                    this.networkView.matchStarted(msg.getPlayerPawnColors(), hands, objectives, visibles, decksTop);
      +                    this.networkHandler.matchStarted(msg.getPlayerPawnColors(), hands, objectives,
      +                            visibles, decksTop);
                           break;
      -
                       case SomeoneDrewInitialCardMessage msg:
      -                    if (username.equals(this.networkView.getUsername())) {
      -                        this.networkView.giveInitialCard(this.initialCards.get(msg.getInitialCardID()));
      +                    if (username.equals(this.networkHandler.getUsername())) {
      +                        this.networkHandler
      +                                .giveInitialCard(this.initialCards.get(msg.getInitialCardID()));
                           } else {
      -                        this.networkView.someoneDrewInitialCard(username, this.initialCards.get(msg.getInitialCardID()));
      +                        this.networkHandler.someoneDrewInitialCard(username,
      +                                this.initialCards.get(msg.getInitialCardID()));
                           }
                           break;
                       case SomeoneDrewSecretObjectivesMessage msg:
      -                    if (username.equals(this.networkView.getUsername())) {
      +                    if (username.equals(this.networkHandler.getUsername())) {
                               Pair<Objective, Objective> objs =
      -                                new Pair<>(this.objectives.get(msg.getFirstID()), this.objectives.get(msg.getSecondID()));
      -                        this.networkView.giveSecretObjectives(objs);
      +                                new Pair<>(this.objectives.get(msg.getFirstID()),
      +                                        this.objectives.get(msg.getSecondID()));
      +                        this.networkHandler.giveSecretObjectives(objs);
                           } else {
      -                        this.networkView.someoneDrewSecretObjective(username);
      +                        this.networkHandler.someoneDrewSecretObjective(username);
                           }
                           break;
                       case SomeoneSetInitialSideMessage msg:
      -                    this.networkView.someoneSetInitialSide(username, msg.getSide(), msg.getAvailableResources());
      +                    this.networkHandler.someoneSetInitialSide(username, msg.getSide(),
      +                            msg.getAvailableResources());
                           break;
                       case SomeoneChoseSecretObjectiveMessage msg:
      -                    this.networkView.someoneChoseSecretObjective(username);
      +                    this.networkHandler.someoneChoseSecretObjective(username);
                           break;
                       case SomeonePlayedCardMessage msg:
      -                    Pair<Integer, Integer> coords = new Pair<Integer, Integer>(msg.getX(), msg.getY());
      -                    this.networkView.someonePlayedCard(username, coords, this.getPlayable(msg.getCardID()), msg.getSide(), msg.getPoints(),
      +                    Pair<Integer, Integer> coords =
      +                            new Pair<Integer, Integer>(msg.getX(), msg.getY());
      +                    this.networkHandler.someonePlayedCard(username, coords,
      +                            this.getPlayable(msg.getCardID()), msg.getSide(), msg.getPoints(),
                                   msg.getAvailableResources());
                           break;
                       case SomeoneDrewCardMessage msg:
      -                    this.networkView.someoneDrewCard(username, msg.getDrawSource(), this.getPlayable(msg.getCardID()),
      -                            this.getPlayable(msg.getReplacementCardID()), msg.getReplacementCardReign());
      +                    this.networkHandler.someoneDrewCard(username, msg.getDrawSource(),
      +                            this.getPlayable(msg.getCardID()),
      +                            this.getPlayable(msg.getReplacementCardID()), msg.getDeckTopReigns());
                           break;
                       case SomeoneJoinedMessage msg:
      -                    this.networkView.someoneJoined(username, msg.getJoinedPlayers());
      +                    this.networkHandler.someoneJoined(username, msg.getJoinedPlayers());
                           break;
                       case SomeoneQuitMessage msg:
      -                    this.networkView.someoneQuit(username);
      +                    this.networkHandler.someoneQuit(username);
                           break;
                       case MatchFinishedMessage msg:
      -                    this.networkView.matchFinished(msg.getRanking());
      +                    this.networkHandler.matchFinished(msg.getRanking());
                           break;
                       case SomeoneSentBroadcastTextMessage msg:
      -                    this.networkView.someoneSentBroadcastText(username, msg.getText());
      +                    this.networkHandler.someoneSentBroadcastText(username, msg.getText());
                           break;
                       case SomeoneSentPrivateTextMessage msg:
      -                    this.networkView.someoneSentPrivateText(username, msg.getText());
      +                    this.networkHandler.someoneSentPrivateText(username, msg.getText());
                           break;
                       default:
                           break;
      @@ -126,16 +237,26 @@ private void parseMessage(String message) {
       
           }
       
      +
      +    /**
      +     * Sends an error to the server.
      +     * 
      +     * @param message The error message
      +     */
           private void sendError(String message) {
               try {
      -            ErrorMessage msg = (ErrorMessage)this.io.stringToMsg(message);
      +            ErrorMessage msg = (ErrorMessage) this.io.stringToMsg(message);
                   Exception exception = new Exception(msg.getMessage());
      -            this.networkView.notifyError(exception);
      +            this.networkHandler.notifyError(exception);
               } catch (Exception e) {
                   // Nothing to do, received an invalid object
               }
           }
       
      +    
      +    /**
      +     * Receives answers from the server and tries to parse it (in a new thread)
      +     */
           @Override
           public void run() {
               String message;
      @@ -147,9 +268,7 @@ public void run() {
                           this.parseMessage(finalMessage);
                       }).start();
                   } catch (IOException | ClassNotFoundException e) {
      -                // TODO: something bad happened
                   }
               }
           }
      -
       }
      diff --git a/src/main/java/it/polimi/ingsw/network/tcp/IOHandler.java b/src/main/java/it/polimi/ingsw/network/tcp/IOHandler.java
      index 35b4dc47..d9c2a2c4 100644
      --- a/src/main/java/it/polimi/ingsw/network/tcp/IOHandler.java
      +++ b/src/main/java/it/polimi/ingsw/network/tcp/IOHandler.java
      @@ -7,7 +7,7 @@
       import it.polimi.ingsw.utils.MessageJsonParser;
       
       /**
      - * This class will handle all the IO operations for a certain socket
      + * This class will handle all the IO operations for a certain socket.
        *
        * @see ObjectInputStream
        * @see ObjectOutputStream
      @@ -23,7 +23,7 @@ public class IOHandler {
       
           /**
            * Class constructor. It takes a {@link Socket} as a parameter to open its
      -     * {@link ObjectOutputStream} and {@link ObjectInputStream}
      +     * {@link ObjectOutputStream} and {@link ObjectInputStream}.
            */
           public IOHandler(Socket socket) throws IOException {
       
      @@ -35,7 +35,7 @@ public IOHandler(Socket socket) throws IOException {
           }
       
           /**
      -     * Acquires a {@link Message} from the socket's input stream
      +     * Acquires a {@link Message} from the socket's input stream.
            *
            * @return the string representing the message
            * @throws IOException if the remote communication failed
      @@ -46,7 +46,7 @@ public String readMsg() throws IOException, ClassNotFoundException {
           }
       
           /**
      -     * Writes a {@link Message} to the socket's output stream
      +     * Writes a {@link Message} to the socket's output stream.
            *
            * @param msg The (parsed) message to write
            * @throws IOException if the remote communication failed
      @@ -58,7 +58,7 @@ public void writeMsg(String msg) throws IOException {
           }
       
           /**
      -     * Writes a {@link Message} to the socket's output stream
      +     * Writes a {@link Message} to the socket's output stream.
            *
            * @param msg The (not yet parsed) message to write
            * @throws IOException if the remote communication failed
      @@ -70,7 +70,7 @@ public void writeMsg(Message msg) throws IOException {
           }
       
           /**
      -     * Converts a {@link Message} to its corresponding Json
      +     * Converts a {@link Message} to its corresponding Json.
            *
            * @param msg The message to be parsed
            * @return the corresponding Json
      @@ -80,7 +80,7 @@ public String msgToString(Message msg) {
           }
       
           /**
      -     * Converts a Json string to its corresponding {@link Message}
      +     * Converts a Json string to its corresponding {@link Message}.
            *
            * @param msg The Json to be parsed
            * @return the corresponding object
      @@ -90,7 +90,7 @@ public Message stringToMsg(String msg) {
           }
       
           /**
      -     * Closes the input and output streams, if not null
      +     * Closes the input and output streams, if not null.
            *
            * @throws IOException if the streams could not be accessed
            */
      diff --git a/src/main/java/it/polimi/ingsw/server/MatchStatusObserver.java b/src/main/java/it/polimi/ingsw/server/MatchStatusObserver.java
      index 4007edfd..c40a58a9 100644
      --- a/src/main/java/it/polimi/ingsw/server/MatchStatusObserver.java
      +++ b/src/main/java/it/polimi/ingsw/server/MatchStatusObserver.java
      @@ -3,75 +3,148 @@
       import it.polimi.ingsw.gamemodel.*;
       import it.polimi.ingsw.utils.Pair;
       
      +import java.io.*;
       import java.util.Map;
       
      +/**
      + * Subclass of {@link MatchObserver} supposed to perform routine actions, which means actions that are to be
      + * performed when there's a state transition, BUT that are not related to a specific player.
      + * It's current main function is to serialize the match from which it receives notifications.
      + */
       public class MatchStatusObserver implements MatchObserver {
      -
           private final String matchName;
           private final Map<String, Match> matches;
       
      +    /**
      +     * Initializes this instance main attributes.
      +     *
      +     * @param matchName The match name to which this instance is attached and listens to.
      +     * @param matches All the matches of the server
      +     */
           public MatchStatusObserver(String matchName, Map<String, Match> matches) {
               this.matchName = matchName;
               this.matches = matches;
           }
       
      +    /**
      +     * Does nothing.
      +     */
           @Override
           public void matchStarted() {
      -
           }
       
      +    /**
      +     * Does nothing.
      +     */
           @Override
           public void someoneJoined(Player someone) {
      -
           }
       
      +    /**
      +     * Does nothing.
      +     */
           @Override
           public void someoneQuit(Player someone) {
      -
           }
       
      +    /**
      +     * Does nothing.
      +     */
           @Override
           public void someoneDrewInitialCard(Player someone, InitialCard card) {
      -
           }
       
      +    /**
      +     * Does nothing.
      +     */
           @Override
           public void someoneSetInitialSide(Player someone, Side side, Map<Symbol, Integer> availableResources) {
      -
           }
       
      +    /**
      +     * Does nothing.
      +     */
           @Override
           public void someoneDrewSecretObjective(Player someone, Pair<Objective, Objective> objectives) {
      -
           }
       
      +    /**
      +     * Does nothing.
      +     */
           @Override
           public void someoneChoseSecretObjective(Player someone, Objective objective) {
      -
           }
       
      +    /**
      +     * Serializes the match and saves it in the disk. This method parameters are not used.
      +     *
      +     * @param someone Not used by this method.
      +     * @param coords  Not used by this method.
      +     * @param card    Not used by this method.
      +     * @param side    Not used by this method.
      +     */
           @Override
           public void someonePlayedCard(Player someone, Pair<Integer, Integer> coords, PlayableCard card, Side side) {
      -
      +        serializeMatch();
           }
       
      +    /**
      +     * Serializes the match and saves it in the disk. This method parameters are not used.
      +     *
      +     * @param someone Not used by this method.
      +     * @param card    Not used by this method.
      +     */
           @Override
           public void someoneDrewCard(Player someone, DrawSource source, PlayableCard card, PlayableCard replacementCard) {
      -
      +        serializeMatch();
           }
       
      +    /**
      +     * Does nothing.
      +     */
           @Override
           public void someoneSentBroadcastText(Player someone, String text) {
      -
           }
       
      +    /**
      +     * Does nothing.
      +     */
           @Override
           public void someoneSentPrivateText(Player someone, Player recipient, String text) {
      -
           }
       
      +    /**
      +     * Removes this match serialization file from the disk and removes this match instance from the list of matches
      +     * available in the {@link Server}.
      +     */
           @Override
           public void matchFinished() {
               matches.remove(matchName);
      +        removeSerializedMatch();
      +    }
      +
      +    /**
      +     * Utility method that serializes the match and saves it in the disk.
      +     */
      +    private void serializeMatch() {
      +        try {
      +            FileOutputStream fileOut = new FileOutputStream(matchName + ".match");
      +            ObjectOutputStream out = new ObjectOutputStream(fileOut);
      +            Match m = matches.get(matchName);
      +            synchronized (m) {
      +                out.writeObject(m);
      +                out.close();
      +                fileOut.close();
      +            }
      +        } catch (IOException e) {
      +            System.err.println("The match \"" + matchName + "\" cannot be serialized due to I/O errors");
      +        }
      +    }
      +
      +    // Utility method that removes a serialized match from the disk.
      +    private void removeSerializedMatch() {
      +        File file = new File(matchName + ".match");
      +        file.delete();
           }
       }
      +
      diff --git a/src/main/java/it/polimi/ingsw/server/Server.java b/src/main/java/it/polimi/ingsw/server/Server.java
      index 4ff412e7..7dceff43 100644
      --- a/src/main/java/it/polimi/ingsw/server/Server.java
      +++ b/src/main/java/it/polimi/ingsw/server/Server.java
      @@ -1,27 +1,54 @@
       package it.polimi.ingsw.server;
       
      -import java.rmi.RemoteException;
      -import java.rmi.registry.LocateRegistry;
      -import java.rmi.registry.Registry;
      -import java.rmi.server.UnicastRemoteObject;
      -import java.util.*;
      -
      +import it.polimi.ingsw.client.network.NetworkHandler;
      +import it.polimi.ingsw.client.network.NetworkHandlerRMI;
      +import it.polimi.ingsw.controllers.PlayerController;
       import it.polimi.ingsw.controllers.PlayerControllerRMI;
       import it.polimi.ingsw.controllers.PlayerControllerRMIInterface;
       import it.polimi.ingsw.exceptions.AlreadyUsedUsernameException;
       import it.polimi.ingsw.exceptions.ChosenMatchException;
      +import it.polimi.ingsw.exceptions.WrongNameException;
       import it.polimi.ingsw.exceptions.WrongStateException;
       import it.polimi.ingsw.gamemodel.Match;
       import it.polimi.ingsw.network.tcp.TCPServer;
       import it.polimi.ingsw.utils.AvailableMatch;
       import it.polimi.ingsw.utils.DeckCreator;
      +import it.polimi.ingsw.utils.GuiUtil;
      +
      +import java.io.File;
      +import java.io.FileInputStream;
      +import java.io.IOException;
      +import java.io.ObjectInputStream;
      +import java.rmi.RemoteException;
      +import java.rmi.registry.LocateRegistry;
      +import java.rmi.registry.Registry;
      +import java.rmi.server.UnicastRemoteObject;
      +import java.util.ArrayList;
      +import java.util.HashMap;
      +import java.util.List;
      +import java.util.Map;
       
      +/**
      + * The server class of this application. It's appointed with managing remote interactions with clients
      + * ({@link NetworkHandler}) before the match starts, after that {@link PlayerController} will ensure the
      + * communication.
      + * To be specific, it stores all the {@link Match} instances available (not full) or being played at the moment,
      + * creates them when requested by clients and restores them from disk (since periodically serialized) after a
      + * Server crash.
      + */
       public class Server extends UnicastRemoteObject implements ServerRMIInterface {
           private final Map<String, Match> matches;
      -
           private final int portRMI;
           private final int portTCP;
       
      +    /**
      +     * Initializes this Server instance and its attributes.
      +     *
      +     * @param portRMI The RMI port to listen to
      +     * @param portTCP The TCP port to listen to
      +     * @throws RemoteException If this instance couldn't be exported on the public RMI registry, so there's been a
      +     *                         connection error
      +     */
           public Server(int portRMI, int portTCP) throws RemoteException {
               super();
       
      @@ -31,30 +58,52 @@ public Server(int portRMI, int portTCP) throws RemoteException {
               matches = new HashMap<>();
           }
       
      +    /**
      +     * Returns the available matches as {@link AvailableMatch} instances.
      +     * This method is called just by remote {@link NetworkHandlerRMI} instances.
      +     *
      +     * @return The list of Match which are not full yet.
      +     */
           @Override
           public List<AvailableMatch> getJoinableMatches() {
               // List of names of matches that are not full (then joinable)
               List<String> joinableMatches = matches.keySet().stream()
      -                                        .filter(name -> !matches.get(name).isFull())
      -                                        .toList();
      +                .filter(name -> !matches.get(name).isFull())
      +                .toList();
               List<AvailableMatch> result = new ArrayList<>();
       
      -        for (String name : joinableMatches) {
      +        for (String name : matches.keySet()) {
                   Match match = matches.get(name);
                   int maxPlayers = match.getMaxPlayers();
                   int currentPlayers = match.getPlayers().size();
       
      -            result.add(new AvailableMatch(name, maxPlayers, currentPlayers));
      +            result.add(new AvailableMatch(name, maxPlayers, currentPlayers, match.isRejoinable()));
               }
       
               return result;
           }
       
      +    /**
      +     * Lets the calling view join on a match with the given player username, if possible; gives back to the client
      +     * an instance of its PlayerControllerRMI, to start communicating through it with the match.
      +     * This method is called just by remote {@link NetworkHandlerRMI} instances.
      +     *
      +     * @param matchName The unique name of the match to join to
      +     * @param username  The chosen player username
      +     * @return An instance of PlayerControllerRMI, used exclusively by the calling view
      +     * @throws ChosenMatchException         If the chosen match is either already full or doesn't exist
      +     * @throws AlreadyUsedUsernameException If the given username is already taken
      +     * @throws WrongStateException          If the match is in a state during which doesn't allow players to join any more
      +     * @throws WrongNameException           If the name is not valid
      +     * @throws RemoteException              If the exportation of this object in the RMI registry failed
      +     */
           @Override
      -    public PlayerControllerRMIInterface joinMatch(String matchName, String username) throws RemoteException, ChosenMatchException, WrongStateException, AlreadyUsedUsernameException {
      +    public PlayerControllerRMIInterface joinMatch(String matchName, String username) throws ChosenMatchException, WrongStateException, AlreadyUsedUsernameException, WrongNameException, RemoteException {
      +        if (!GuiUtil.isValidName(username))
      +            throw new WrongNameException("The username must be alphanumeric with maximum 32 characters");
               if (!matches.containsKey(matchName))
                   throw new ChosenMatchException("The chosen match doesn't exist");
      -        if (matches.get(matchName).isFull())
      +        if (matches.get(matchName).isFull() && !matches.get(matchName).isRejoinable())
                   throw new ChosenMatchException("The chosen match is already full");
       
               Match chosenMatch = matches.get(matchName);
      @@ -65,8 +114,19 @@ public PlayerControllerRMIInterface joinMatch(String matchName, String username)
               return controller;
           }
       
      +    /**
      +     * Create a new blank match.
      +     *
      +     * @param matchName  The unique name to give to the new match
      +     * @param maxPlayers The maximum number of player allowed on the new match
      +     * @throws ChosenMatchException If the given match name is already taken
      +     * @throws WrongNameException   If the chosen player username doesn't meet the alphanumerical criteria
      +     */
           @Override
      -    public void createMatch(String matchName, int maxPlayers) throws RemoteException, ChosenMatchException {
      +    public void createMatch(String matchName, int maxPlayers) throws ChosenMatchException, WrongNameException {
      +        if (!GuiUtil.isValidName(matchName)) {
      +            throw new WrongNameException("The match name must be alphanumeric with maximum 32 characters");
      +        }
               synchronized (matches) {
                   if (matches.containsKey(matchName))
                       throw new ChosenMatchException("A match with the chosen name already exists");
      @@ -77,6 +137,21 @@ public void createMatch(String matchName, int maxPlayers) throws RemoteException
               }
           }
       
      +    /**
      +     * Pings the server in order to perceive if the connection is still alive and working.
      +     * Always return true, since the false is implicit in returning a {@link RemoteException}
      +     * when the connection is not working anymore.
      +     *
      +     * @return True if the connection is alive, false otherwise
      +     */
      +    @Override
      +    public boolean ping() {
      +        return true;
      +    }
      +
      +    /**
      +     * @return
      +     */
           public Map<String, Match> getJoinableMatchesMap() {
               synchronized (matches) {
                   HashMap<String, Match> result = new HashMap<>();
      @@ -87,34 +162,42 @@ public Map<String, Match> getJoinableMatchesMap() {
               }
           }
       
      +    /**
      +     * Gets a {@link Match} from those saved in the server.
      +     *
      +     * @param name The unique name of the match
      +     * @return The match instance
      +     */
           public Match getMatch(String name) {
               return matches.get(name);
           }
       
      -    public static Match getNewMatch(int maxPlayers) {
      -        DeckCreator creator = new DeckCreator();
      -        return new Match(maxPlayers, creator.createInitialDeck(), creator.createResourceDeck(), creator.createGoldDeck(),
      -                creator.createObjectiveDeck());
      -    }
      -
      +    /**
      +     * Start the RMI server.
      +     *
      +     * @throws RemoteException If the remote registry couldn't be exported or the communication with it failed.
      +     */
           public void startRMIServer() throws RemoteException {
               Registry registry = LocateRegistry.createRegistry(portRMI);
               registry.rebind("CodexNaturalisRMIServer", this);
           }
       
      +    /**
      +     * Starts the TCP server.
      +     */
           public void startTCPServer() {
               TCPServer tcpServer = new TCPServer(portTCP, this);
               new Thread(tcpServer::listen).start();
           }
       
      -    public static String promptAndInput(String message, Scanner scanner) {
      -        System.out.print(message);
      -        return scanner.nextLine();
      -    }
      -
           public static void main(String[] args) throws RemoteException {
      -        int portRMI, portTCP;
      +        int portRMI;
      +        int portTCP;
      +
      +        // If some arguments are missing, notify it to the user and exit
               if (args.length < 2) {
      +            System.err.println("Arguments missing, run the server executable with RMI port and TCP port arguments.");
      +            System.err.println("Defaulting to RMI 2222 and TCP 9999 ports...");
                   portRMI = 2222;
                   portTCP = 9999;
               } else {
      @@ -124,8 +207,50 @@ public static void main(String[] args) throws RemoteException {
       
               Server server = new Server(portRMI, portTCP);
       
      +        server.loadCrashedMatches();
               server.startRMIServer();
               server.startTCPServer();
           }
       
      +    /**
      +     * Utility method used to restore all the matches saved in the disk after the server crashed.
      +     */
      +    private void loadCrashedMatches() {
      +        // Look for *.match files in the current directory
      +        File dir = new File(".");
      +        File[] files = dir.listFiles((file, name) -> name.toLowerCase().endsWith(".match"));
      +        // If any file is found
      +        if (files != null) {
      +            for (File file : files) {
      +                try {
      +                    // Read each .match file from disk
      +                    FileInputStream fileIn = new FileInputStream(file);
      +                    ObjectInputStream in = new ObjectInputStream(fileIn);
      +
      +                    // Deserialize the .match file in a Match object
      +                    String matchName = file.getName().replaceAll("(?i)(.*)\\.match", "$1");
      +                    Match match = (Match) in.readObject();
      +                    matches.put(matchName, match);
      +                    match.getPlayers().forEach((p) -> p.setConnected(false));
      +                    match.subscribeObserver(new MatchStatusObserver(matchName, matches));
      +                    in.close();
      +                    fileIn.close();
      +                } catch (IOException | ClassNotFoundException e) {
      +                    System.err.println("A match couldn't be loaded from disk");
      +                }
      +            }
      +        }
      +    }
      +
      +    /**
      +     * Utility method to create a new blank match. It cannot be called remotely (e.g. by RMI)
      +     *
      +     * @param maxPlayers The maximum number of players allowed
      +     * @return The new match instance
      +     */
      +    private static Match getNewMatch(int maxPlayers) {
      +        DeckCreator creator = new DeckCreator();
      +        return new Match(maxPlayers, creator.createInitialDeck(), creator.createResourceDeck(), creator.createGoldDeck(),
      +                creator.createObjectiveDeck());
      +    }
       }
      diff --git a/src/main/java/it/polimi/ingsw/server/ServerRMIInterface.java b/src/main/java/it/polimi/ingsw/server/ServerRMIInterface.java
      index d16d5a86..1e8507bb 100644
      --- a/src/main/java/it/polimi/ingsw/server/ServerRMIInterface.java
      +++ b/src/main/java/it/polimi/ingsw/server/ServerRMIInterface.java
      @@ -1,14 +1,16 @@
       package it.polimi.ingsw.server;
       
      -import java.rmi.Remote;
      -import java.rmi.RemoteException;
      -import java.util.List;
       import it.polimi.ingsw.controllers.PlayerControllerRMIInterface;
       import it.polimi.ingsw.exceptions.AlreadyUsedUsernameException;
       import it.polimi.ingsw.exceptions.ChosenMatchException;
      +import it.polimi.ingsw.exceptions.WrongNameException;
       import it.polimi.ingsw.exceptions.WrongStateException;
       import it.polimi.ingsw.utils.AvailableMatch;
       
      +import java.rmi.Remote;
      +import java.rmi.RemoteException;
      +import java.util.List;
      +
       /**
        * RMI interface used to declare all and only the methods callable on a remote Server instance implementing this
        * interface by a client.
      @@ -17,7 +19,7 @@
        */
       public interface ServerRMIInterface extends Remote {
           /**
      -     * Returns the available matches (those not full yet) as {@link AvailableMatch} instances.
      +     * Returns the available matches as {@link AvailableMatch} instances.
            *
            * @return The list of Match which are not full yet.
            * @throws RemoteException If the remote server is considered not to be reachable any more and cannot return as usual
      @@ -35,8 +37,9 @@ public interface ServerRMIInterface extends Remote {
            * @throws ChosenMatchException         If the chosen match is either already full or doesn't exist
            * @throws AlreadyUsedUsernameException If the given username is already taken
            * @throws WrongStateException          If the match is in a state during which doesn't allow players to join any more
      +     * @throws WrongNameException           If the name is not valid
            */
      -    PlayerControllerRMIInterface joinMatch(String matchName, String username) throws RemoteException, ChosenMatchException, AlreadyUsedUsernameException, WrongStateException;
      +    PlayerControllerRMIInterface joinMatch(String matchName, String username) throws RemoteException, ChosenMatchException, AlreadyUsedUsernameException, WrongStateException, WrongNameException;
       
           /**
            * Lets the calling view create a new match.
      @@ -45,6 +48,15 @@ public interface ServerRMIInterface extends Remote {
            * @param maxPlayers The maximum number of player allowed on the new match
            * @throws RemoteException      If the remote server is considered not to be reachable any more and cannot return as usual
            * @throws ChosenMatchException If the given match name is already taken
      +     * @throws WrongNameException   If the chosen player username doesn't meet the alphanumerical criteria
      +     */
      +    void createMatch(String matchName, int maxPlayers) throws RemoteException, ChosenMatchException, WrongNameException;
      +
      +    /**
      +     * Pings the server in order to perceive if the connection is still alive and working.
      +     *
      +     * @throws RemoteException If the connection to this class instance is not alive anymore
      +     * @return True if the connection is alive, false otherwise
            */
      -    void createMatch(String matchName, int maxPlayers) throws RemoteException, ChosenMatchException;
      +    boolean ping() throws RemoteException;
       }
      diff --git a/src/main/java/it/polimi/ingsw/utils/AvailableMatch.java b/src/main/java/it/polimi/ingsw/utils/AvailableMatch.java
      index 43e55bea..403ad83e 100644
      --- a/src/main/java/it/polimi/ingsw/utils/AvailableMatch.java
      +++ b/src/main/java/it/polimi/ingsw/utils/AvailableMatch.java
      @@ -9,8 +9,9 @@
        * @param name The match name
        * @param maxPlayers The max number of players allowed in the match
        * @param currentPlayers The number of currently joined players
      + * @param isRejoinable Whether the match has been resumed after a server crash
        */
      -public record AvailableMatch(String name, Integer maxPlayers, Integer currentPlayers) implements Serializable {
      +public record AvailableMatch(String name, Integer maxPlayers, Integer currentPlayers, boolean isRejoinable) implements Serializable {
           @Serial
           private static final long serialVersionUID = 1L;
       }
      diff --git a/src/main/java/it/polimi/ingsw/utils/CardsManager.java b/src/main/java/it/polimi/ingsw/utils/CardsManager.java
      index b7a6463d..42bd2bc4 100644
      --- a/src/main/java/it/polimi/ingsw/utils/CardsManager.java
      +++ b/src/main/java/it/polimi/ingsw/utils/CardsManager.java
      @@ -5,6 +5,7 @@
       import it.polimi.ingsw.gamemodel.*;
       
       import java.io.FileReader;
      +import java.io.IOException;
       import java.lang.reflect.Type;
       import java.util.HashMap;
       import java.util.Map;
      @@ -28,7 +29,6 @@ public final class CardsManager {
            * Read from the JSON files, de-serialise the content in Map<Integer, XXX> objects, initialize the private attributes
            * with these values.
            */
      -    // TODO: Implement Requirement deserializer
           private CardsManager() {
               CardJsonParser parser = new CardJsonParser();
               Gson gson = parser.getCardBuilder();
      @@ -39,15 +39,23 @@ private CardsManager() {
               Type objectivesType = new TypeToken<Map<Integer, Objective>>() {}.getType();
       
               try {
      -            initialCards = gson.fromJson(new FileReader("src/main/resources/json/initial_card.json"), initialCardsType);
      -            goldCards = gson.fromJson(new FileReader("src/main/resources/json/gold_card.json"), goldCardsType);
      -            resourceCards = gson.fromJson(new FileReader("src/main/resources/json/resource_card.json"), resourceCardsType);
      -            objectives = gson.fromJson(new FileReader("src/main/resources/json/objective_card.json"), objectivesType);
      +            initialCards = gson.fromJson(getResource("/json/initial_card.json"), initialCardsType);
      +            goldCards = gson.fromJson(getResource("/json/gold_card.json"), goldCardsType);
      +            resourceCards = gson.fromJson(getResource("/json/resource_card.json"), resourceCardsType);
      +            objectives = gson.fromJson(getResource("/json/objective_card.json"), objectivesType);
               } catch (Exception e) {
                   throw new RuntimeException(e);
               }
           }
       
      +    private String getResource(String path) {
      +        try {
      +            return new String(this.getClass().getResourceAsStream(path).readAllBytes());
      +        } catch (IOException e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
           /**
            * Getter for the only possible instance available of this class, so used instead of a constructor.
            *
      @@ -93,6 +101,11 @@ public Map<Integer, Objective> getObjectives() {
               return objectives;
           }
       
      +    /**
      +     * Getter for the playable cards
      +     *
      +     * @return Map that matches an int ID to the corresponding playable card
      +     */
           public Map<Integer, PlayableCard> getPlayableCards() {
               Map<Integer, PlayableCard> playableCards = new HashMap<>();
               playableCards.putAll(goldCards);
      diff --git a/src/main/java/it/polimi/ingsw/utils/CardsSerializer.java b/src/main/java/it/polimi/ingsw/utils/CardsSerializer.java
      index e55c8887..b14d6771 100644
      --- a/src/main/java/it/polimi/ingsw/utils/CardsSerializer.java
      +++ b/src/main/java/it/polimi/ingsw/utils/CardsSerializer.java
      @@ -8,7 +8,15 @@
       import java.io.IOException;
       import java.util.*;
       
      +/**
      + * Serialize game cards into json
      + */
       public class CardsSerializer {
      +
      +    /**
      +     * Function that serializes the cards
      +     * @param args arguments
      +     */
           public static void main(String[] args) {
               // cards
               InitialCard initialCard;
      @@ -284,7 +292,7 @@ public static void main(String[] args) {
                   topLeft = Symbol.FUNGUS;
                   topRight = Symbol.INSECT;
                   bottomLeft = Symbol.PARCHMENT;
      -            bottomRight = Symbol.EMPTY_CORNER;
      +            bottomRight = Symbol.FULL_CORNER;
                   resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
                   resourceCardMap.put(resourceCard.getId(), resourceCard);
       
      @@ -468,7 +476,7 @@ public static void main(String[] args) {
                   topRight = Symbol.EMPTY_CORNER;
                   bottomLeft = Symbol.ANIMAL;
                   bottomRight = Symbol.FULL_CORNER;
      -            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, points);
      +            resourceCard = new ResourceCard(new CardFace(topLeft, topRight, bottomLeft, bottomRight, Collections.emptySet()), reign, 0);
                   resourceCardMap.put(resourceCard.getId(), resourceCard);
               } catch (InvalidResourceException e) {
                   throw new RuntimeException(e);
      diff --git a/src/main/java/it/polimi/ingsw/utils/ClientSender.java b/src/main/java/it/polimi/ingsw/utils/ClientSender.java
      deleted file mode 100644
      index e69de29b..00000000
      diff --git a/src/main/java/it/polimi/ingsw/utils/DeckCreator.java b/src/main/java/it/polimi/ingsw/utils/DeckCreator.java
      index 4beeaa6f..aed8c9cf 100644
      --- a/src/main/java/it/polimi/ingsw/utils/DeckCreator.java
      +++ b/src/main/java/it/polimi/ingsw/utils/DeckCreator.java
      @@ -10,6 +10,10 @@
        */
       public class DeckCreator {
       
      +    /**
      +     * Create the deck of initial cards
      +     * @return a gamedeck of initial cards
      +     */
           public GameDeck<InitialCard> createInitialDeck() {
               GameDeck<InitialCard> deck = new GameDeck<>();
               Map<Integer, InitialCard> cards = CardsManager.getInstance().getInitialCards();
      @@ -21,6 +25,10 @@ public GameDeck<InitialCard> createInitialDeck() {
               return deck;
           }
       
      +    /**
      +     * Create the deck of resource cards
      +     * @return a gamedeck of resource cards
      +     */
           public GameDeck<ResourceCard> createResourceDeck() {
               GameDeck<ResourceCard> deck = new GameDeck<>();
               Map<Integer, ResourceCard> cards = CardsManager.getInstance().getResourceCards();
      @@ -32,6 +40,10 @@ public GameDeck<ResourceCard> createResourceDeck() {
               return deck;
           }
       
      +    /**
      +     * Create the deck of gold cards
      +     * @return a gamedeck of gold cards
      +     */
           public GameDeck<GoldCard> createGoldDeck() {
               GameDeck<GoldCard> deck = new GameDeck<>();
               Map<Integer, GoldCard> cards = CardsManager.getInstance().getGoldCards();
      @@ -43,6 +55,10 @@ public GameDeck<GoldCard> createGoldDeck() {
               return deck;
           }
       
      +    /**
      +     * Create the deck of objective cards
      +     * @return a gamedeck of objective cards
      +     */
           public GameDeck<Objective> createObjectiveDeck() {
               GameDeck<Objective> deck = new GameDeck<>();
               Map<Integer, Objective> cards = CardsManager.getInstance().getObjectives();
      diff --git a/src/main/java/it/polimi/ingsw/utils/GuiUtil.java b/src/main/java/it/polimi/ingsw/utils/GuiUtil.java
      index b4cb3ced..8ac01e8a 100644
      --- a/src/main/java/it/polimi/ingsw/utils/GuiUtil.java
      +++ b/src/main/java/it/polimi/ingsw/utils/GuiUtil.java
      @@ -18,11 +18,28 @@ public class GuiUtil {
           public static String initialsPath = "/images/initial_cards";
           public static String pawnsPath = "/images/pawn_colors";
       
      +    /**
      +     * Get a node from the given FXML
      +     * @param path path of the fxml
      +     * @return the requested node
      +     * @param <T> type of the expected node
      +     * @throws IOException if there are errors reading the file
      +     */
           public static <T>T getFromFXML(String path) throws IOException {
               FXMLLoader loader = GuiUtil.getLoader(path);
               return loader.load();
           }
       
      +    /**
      +     * Check if the username/match name is valid
      +     * The name must be alphanumeric and between 1 and 32 characters
      +     * @param name string to check
      +     * @return if the name is valid
      +     */
      +    public static boolean isValidName(String name) {
      +        return name.matches("^[a-zA-Z0-9]{1,32}$");
      +    }
      +
           /**
            * Get the loader from the specified path
            * @param path file path of fxml
      @@ -41,6 +58,12 @@ public static void applyCSS(javafx.scene.Parent w, String path) {
               w.getStylesheets().addAll(GraphicalApplication.class.getResource(path).toExternalForm());
           }
       
      +    /**
      +     * Get the image path of a playable card
      +     * @param card card to get the image
      +     * @param side side of the card
      +     * @return the path as a string
      +     */
           public static String getImagePath(PlayableCard card, Side side) {
               if (side.equals(Side.FRONT)) {
                   return playableCardsPath + "/" + card.getId() + ".png";
      @@ -52,20 +75,42 @@ public static String getImagePath(PlayableCard card, Side side) {
               }
           }
       
      +    /**
      +     * Get the back of a resource card
      +     * @param symbol symbol of the resource card
      +     * @return the path as a string
      +     */
           public static String getResourcesBack(Symbol symbol) {
               String reign = symbol.toString().toUpperCase();
               return playableCardsPath + "/" + reign + "-resources-back.png";
           }
       
      +    /**
      +     * Get the back of a gold card
      +     * @param symbol symbol of the gold card
      +     * @return the path as a string
      +     */
           public static String getGoldsBack(Symbol symbol) {
               String reign = symbol.toString().toUpperCase();
               return playableCardsPath + "/" + reign + "-golds-back.png";
           }
       
      +    /**
      +     * Get the image path of an intial card
      +     * @param card card to get the image
      +     * @param side side of the card
      +     * @return the path as a string
      +     */
           public static String getImagePath(InitialCard card, Side side) {
               return initialsPath + "/" + side.toString() + "/" + card.getId() + ".png";
           }
       
      +    /**
      +     * Get the image path of an objective card
      +     * @param obj card to get the image
      +     * @param side side of the card
      +     * @return the path as a string
      +     */
           public static String getImagePath(Objective obj, Side side) {
               if (side.equals(Side.FRONT))
                   return objectivesPath + "/" + obj.getID() + ".png";
      @@ -73,10 +118,28 @@ public static String getImagePath(Objective obj, Side side) {
                   return objectivesPath + "/objectives-back.png";
           }
       
      +    /**
      +     * Get image path of a pawn
      +     * @param color color of the pawn
      +     * @return the path as a string
      +     */
           public static String getPawnImagePath(Color color) {
               return pawnsPath + "/" + color.toString().toLowerCase(Locale.ROOT) + "-pawn.png";
           }
       
      +    /**
      +     * Get image path of the black pawn
      +     * @return the path as a string
      +     */
      +    public static String getBlackPawnImagePath() {
      +        return pawnsPath + "/black-pawn.png";
      +    }
      +
      +    /**
      +     * Get the hex code of the given color
      +     * @param color color to convert
      +     * @return the hex code of color
      +     */
           public static String getHexFromColor(Color color) {
               return switch (color) {
                   case RED -> "#C00402";
      @@ -86,6 +149,11 @@ public static String getHexFromColor(Color color) {
               };
           }
       
      +    /**
      +     * Translate exception type into human-readable titles
      +     * @param e exception to translate
      +     * @return human-readable title
      +     */
           public static String getExceptionTitle(Exception e) {
               return switch (e) {
                   case WrongStateException ignored -> "Wrong turn!";
      diff --git a/src/main/java/it/polimi/ingsw/utils/MessageJsonParser.java b/src/main/java/it/polimi/ingsw/utils/MessageJsonParser.java
      index 5c798ee4..8b9c3746 100644
      --- a/src/main/java/it/polimi/ingsw/utils/MessageJsonParser.java
      +++ b/src/main/java/it/polimi/ingsw/utils/MessageJsonParser.java
      @@ -53,7 +53,6 @@ public Message deserialize(JsonElement json, Type typeOfT, JsonDeserializationCo
               }
       
               private Message convertError(String type, JsonObject messageObject, JsonDeserializationContext context) {
      -            //TODO better error handling
                   return context.deserialize(messageObject, ErrorMessage.class);
               }
       
      diff --git a/src/main/java/it/polimi/ingsw/utils/Pair.java b/src/main/java/it/polimi/ingsw/utils/Pair.java
      index 8f052bc5..f89743a1 100644
      --- a/src/main/java/it/polimi/ingsw/utils/Pair.java
      +++ b/src/main/java/it/polimi/ingsw/utils/Pair.java
      @@ -3,6 +3,14 @@
       import java.io.Serial;
       import java.io.Serializable;
       
      +/**
      + * Represents a pair of generic values.
      + *
      + * @param first The first value of the pair
      + * @param second The second value of the pair
      + * @param <T> The type of the first value
      + * @param <U> The type of the second value
      + */
       public record Pair<T, U>(T first, U second) implements Serializable {
           @Serial
           private static final long serialVersionUID = 1L;
      diff --git a/src/main/java/it/polimi/ingsw/utils/PlacedCardRecord.java b/src/main/java/it/polimi/ingsw/utils/PlacedCardRecord.java
      new file mode 100644
      index 00000000..0fa8cf4c
      --- /dev/null
      +++ b/src/main/java/it/polimi/ingsw/utils/PlacedCardRecord.java
      @@ -0,0 +1,14 @@
      +package it.polimi.ingsw.utils;
      +
      +import it.polimi.ingsw.gamemodel.Side;
      +
      +/**
      + * PlacedCardRecord
      + *
      + * @param cardID The card ID
      + * @param x The x coordinate
      + * @param y The y coordinate
      + * @param side The chosen side
      + */
      +public record PlacedCardRecord(Integer cardID, Integer x, Integer y, Side side) {
      +}
      diff --git a/src/main/java/it/polimi/ingsw/utils/RequestStatus.java b/src/main/java/it/polimi/ingsw/utils/RequestStatus.java
      index a95560b0..33aa5bca 100644
      --- a/src/main/java/it/polimi/ingsw/utils/RequestStatus.java
      +++ b/src/main/java/it/polimi/ingsw/utils/RequestStatus.java
      @@ -1,9 +1,11 @@
       package it.polimi.ingsw.utils;
       
      +import it.polimi.ingsw.controllers.PlayerController;
      +import it.polimi.ingsw.server.Server;
      +
       /**
      - * RequestStatus
      + * Represents the status of a remote request sent to a remove {@link Server} or {@link PlayerController}.
        */
      -
       public enum RequestStatus {
           PENDING,
           SUCCESSFUL,
      diff --git a/src/main/resources/css/match.css b/src/main/resources/css/match.css
      index 28877add..a5b229e6 100644
      --- a/src/main/resources/css/match.css
      +++ b/src/main/resources/css/match.css
      @@ -5,7 +5,6 @@
               -fx-background-image: url("../images/secondary-bgup.png");
               -fx-background-repeat: repeat;
               -fx-background-position: center center;
      -        -fx-background-size: fit;
               -fx-border-color: transparent transparent -fx-primary-border-color transparent;
               -fx-border-width: 0 0 5px 0;
       }
      diff --git a/src/main/resources/fxml/ranking.fxml b/src/main/resources/fxml/ranking.fxml
      index d23d915c..9c5c359c 100644
      --- a/src/main/resources/fxml/ranking.fxml
      +++ b/src/main/resources/fxml/ranking.fxml
      @@ -30,5 +30,7 @@
                       <Insets bottom="50.0" left="40.0" right="40.0" top="50.0"/>
                   </padding>
               </VBox>
      +        <Pane prefHeight="100" />
      +        <Button fx:id="playAgainButton" text="Play Again" styleClass="button"/>
           </VBox>
       </StackPane>
      diff --git a/src/main/resources/json/gold_card.json b/src/main/resources/json/gold_card.json
      index ce4d3cd2..761ee7e8 100644
      --- a/src/main/resources/json/gold_card.json
      +++ b/src/main/resources/json/gold_card.json
      @@ -3,8 +3,8 @@
           "multiplier": "CORNER_OBJ",
           "req": {
             "reqs": {
      -        "PLANT": 3,
      -        "ANIMAL": 1
      +        "ANIMAL": 1,
      +        "PLANT": 3
             }
           },
           "points": 2,
      @@ -519,8 +519,8 @@
           "multiplier": "PARCHMENT",
           "req": {
             "reqs": {
      -        "PLANT": 2,
      -        "FUNGUS": 1
      +        "FUNGUS": 1,
      +        "PLANT": 2
             }
           },
           "points": 1,
      @@ -575,8 +575,8 @@
           "multiplier": "FEATHER",
           "req": {
             "reqs": {
      -        "FUNGUS": 2,
      -        "ANIMAL": 1
      +        "ANIMAL": 1,
      +        "FUNGUS": 2
             }
           },
           "points": 1,
      @@ -603,8 +603,8 @@
           "multiplier": "FEATHER",
           "req": {
             "reqs": {
      -        "ANIMAL": 2,
      -        "FUNGUS": 1
      +        "FUNGUS": 1,
      +        "ANIMAL": 2
             }
           },
           "points": 1,
      @@ -631,8 +631,8 @@
           "multiplier": "FEATHER",
           "req": {
             "reqs": {
      -        "PLANT": 2,
      -        "INSECT": 1
      +        "INSECT": 1,
      +        "PLANT": 2
             }
           },
           "points": 1,
      @@ -687,8 +687,8 @@
           "multiplier": "INKWELL",
           "req": {
             "reqs": {
      -        "PLANT": 2,
      -        "ANIMAL": 1
      +        "ANIMAL": 1,
      +        "PLANT": 2
             }
           },
           "points": 1,
      @@ -855,8 +855,8 @@
           "multiplier": "CORNER_OBJ",
           "req": {
             "reqs": {
      -        "ANIMAL": 3,
      -        "FUNGUS": 1
      +        "FUNGUS": 1,
      +        "ANIMAL": 3
             }
           },
           "points": 2,
      @@ -883,8 +883,8 @@
           "multiplier": "CORNER_OBJ",
           "req": {
             "reqs": {
      -        "FUNGUS": 3,
      -        "ANIMAL": 1
      +        "ANIMAL": 1,
      +        "FUNGUS": 3
             }
           },
           "points": 2,
      @@ -1051,8 +1051,8 @@
           "multiplier": "CORNER_OBJ",
           "req": {
             "reqs": {
      -        "PLANT": 3,
      -        "INSECT": 1
      +        "INSECT": 1,
      +        "PLANT": 3
             }
           },
           "points": 2,
      @@ -1079,8 +1079,8 @@
           "multiplier": "CORNER_OBJ",
           "req": {
             "reqs": {
      -        "PLANT": 3,
      -        "FUNGUS": 1
      +        "FUNGUS": 1,
      +        "PLANT": 3
             }
           },
           "points": 2,
      diff --git a/src/main/resources/json/initial_card.json b/src/main/resources/json/initial_card.json
      index 4b368b8c..0af549f7 100644
      --- a/src/main/resources/json/initial_card.json
      +++ b/src/main/resources/json/initial_card.json
      @@ -13,9 +13,9 @@
             "bottomLeft": "EMPTY_CORNER",
             "bottomRight": "EMPTY_CORNER",
             "center": [
      +        "ANIMAL",
               "INSECT",
      -        "PLANT",
      -        "ANIMAL"
      +        "PLANT"
             ]
           },
           "id": 1
      @@ -53,8 +53,8 @@
             "bottomLeft": "FULL_CORNER",
             "bottomRight": "FULL_CORNER",
             "center": [
      -        "FUNGUS",
      -        "PLANT"
      +        "PLANT",
      +        "FUNGUS"
             ]
           },
           "id": 3
      @@ -92,8 +92,8 @@
             "bottomLeft": "FULL_CORNER",
             "bottomRight": "FULL_CORNER",
             "center": [
      -        "INSECT",
      -        "ANIMAL"
      +        "ANIMAL",
      +        "INSECT"
             ]
           },
           "id": 5
      @@ -112,9 +112,9 @@
             "bottomLeft": "EMPTY_CORNER",
             "bottomRight": "EMPTY_CORNER",
             "center": [
      -        "FUNGUS",
      +        "ANIMAL",
               "PLANT",
      -        "ANIMAL"
      +        "FUNGUS"
             ]
           },
           "id": 6
      diff --git a/src/main/resources/json/objective_card.json b/src/main/resources/json/objective_card.json
      index 2a7a8f69..896c08f9 100644
      --- a/src/main/resources/json/objective_card.json
      +++ b/src/main/resources/json/objective_card.json
      @@ -77,8 +77,8 @@
           "points": 2,
           "req": {
             "reqs": {
      -        "Pair[first\u003d2, second\u003d2]": "FUNGUS",
               "Pair[first\u003d0, second\u003d0]": "FUNGUS",
      +        "Pair[first\u003d2, second\u003d2]": "FUNGUS",
               "Pair[first\u003d1, second\u003d1]": "FUNGUS"
             }
           },
      @@ -88,8 +88,8 @@
           "points": 2,
           "req": {
             "reqs": {
      -        "Pair[first\u003d2, second\u003d2]": "ANIMAL",
               "Pair[first\u003d0, second\u003d0]": "ANIMAL",
      +        "Pair[first\u003d2, second\u003d2]": "ANIMAL",
               "Pair[first\u003d1, second\u003d1]": "ANIMAL"
             }
           },
      @@ -99,8 +99,8 @@
           "points": 2,
           "req": {
             "reqs": {
      -        "Pair[first\u003d0, second\u003d0]": "PLANT",
               "Pair[first\u003d1, second\u003d-1]": "PLANT",
      +        "Pair[first\u003d0, second\u003d0]": "PLANT",
               "Pair[first\u003d2, second\u003d-2]": "PLANT"
             }
           },
      @@ -110,8 +110,8 @@
           "points": 2,
           "req": {
             "reqs": {
      -        "Pair[first\u003d0, second\u003d0]": "INSECT",
               "Pair[first\u003d1, second\u003d-1]": "INSECT",
      +        "Pair[first\u003d0, second\u003d0]": "INSECT",
               "Pair[first\u003d2, second\u003d-2]": "INSECT"
             }
           },
      @@ -121,9 +121,9 @@
           "points": 3,
           "req": {
             "reqs": {
      -        "Pair[first\u003d1, second\u003d-2]": "INSECT",
      +        "Pair[first\u003d1, second\u003d-1]": "INSECT",
               "Pair[first\u003d0, second\u003d0]": "ANIMAL",
      -        "Pair[first\u003d1, second\u003d-1]": "INSECT"
      +        "Pair[first\u003d1, second\u003d-2]": "INSECT"
             }
           },
           "id": 13
      @@ -132,9 +132,9 @@
           "points": 3,
           "req": {
             "reqs": {
      -        "Pair[first\u003d-1, second\u003d-2]": "ANIMAL",
      +        "Pair[first\u003d0, second\u003d0]": "FUNGUS",
               "Pair[first\u003d-1, second\u003d-1]": "ANIMAL",
      -        "Pair[first\u003d0, second\u003d0]": "FUNGUS"
      +        "Pair[first\u003d-1, second\u003d-2]": "ANIMAL"
             }
           },
           "id": 14
      @@ -143,9 +143,9 @@
           "points": 3,
           "req": {
             "reqs": {
      -        "Pair[first\u003d0, second\u003d-1]": "FUNGUS",
      +        "Pair[first\u003d1, second\u003d-2]": "PLANT",
               "Pair[first\u003d0, second\u003d0]": "FUNGUS",
      -        "Pair[first\u003d1, second\u003d-2]": "PLANT"
      +        "Pair[first\u003d0, second\u003d-1]": "FUNGUS"
             }
           },
           "id": 15
      @@ -154,9 +154,9 @@
           "points": 3,
           "req": {
             "reqs": {
      -        "Pair[first\u003d-1, second\u003d-2]": "INSECT",
      +        "Pair[first\u003d0, second\u003d0]": "PLANT",
               "Pair[first\u003d0, second\u003d-1]": "PLANT",
      -        "Pair[first\u003d0, second\u003d0]": "PLANT"
      +        "Pair[first\u003d-1, second\u003d-2]": "INSECT"
             }
           },
           "id": 16
      diff --git a/src/main/resources/json/resource_card.json b/src/main/resources/json/resource_card.json
      index 8cc1c6f9..4cc25256 100644
      --- a/src/main/resources/json/resource_card.json
      +++ b/src/main/resources/json/resource_card.json
      @@ -363,7 +363,7 @@
             "topLeft": "FUNGUS",
             "topRight": "INSECT",
             "bottomLeft": "PARCHMENT",
      -      "bottomRight": "EMPTY_CORNER",
      +      "bottomRight": "FULL_CORNER",
             "center": []
           },
           "back": {
      @@ -819,7 +819,7 @@
           "id": 39
         },
         "40": {
      -    "points": 1,
      +    "points": 0,
           "reign": "ANIMAL",
           "front": {
             "topLeft": "ANIMAL",
      diff --git a/src/test/java/it/polimi/ingsw/client/frontend/tui/ValidPositionsTest.java b/src/test/java/it/polimi/ingsw/client/frontend/tui/ValidPositionsTest.java
      new file mode 100644
      index 00000000..ce9161da
      --- /dev/null
      +++ b/src/test/java/it/polimi/ingsw/client/frontend/tui/ValidPositionsTest.java
      @@ -0,0 +1,64 @@
      +package it.polimi.ingsw.client.frontend.tui;
      +
      +import static org.junit.Assert.assertFalse;
      +import static org.junit.Assert.assertTrue;
      +import java.util.Set;
      +import org.junit.Test;
      +import it.polimi.ingsw.client.frontend.ShownCard;
      +import it.polimi.ingsw.gamemodel.*;
      +import it.polimi.ingsw.utils.Pair;
      +
      +/**
      + * ValidPositionsTest
      + */
      +
      +public class ValidPositionsTest {
      +    private Pair<Integer, Integer> createCoords(Integer first, Integer second) {
      +        return new Pair<>(first, second);
      +    }
      +
      +    @Test
      +    public void testBasic() throws Exception {
      +        ValidPositions positions = new ValidPositions();
      +
      +        Card initial = new InitialCard(
      +            new CardFace(
      +                Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of()
      +            ),
      +            null
      +        );
      +
      +        Card emptyTR = new ResourceCard(
      +            new CardFace(
      +                Symbol.FULL_CORNER, 
      +                Symbol.EMPTY_CORNER, 
      +                Symbol.FULL_CORNER, 
      +                Symbol.FULL_CORNER,
      +                Set.of()
      +            ), Symbol.PLANT, 0);
      +
      +
      +        positions.addCard(new ShownCard(initial, Side.FRONT, createCoords(0, 0)));
      +        assertFalse("The cell in which a card is played should be not valid!", positions.isValid(createCoords(0, 0)));
      +
      +        assertTrue("TR not marked as valid!", positions.isValid(createCoords(1, 1)));
      +        assertTrue("BL not marked as valid!", positions.isValid(createCoords(-1, -1)));
      +        assertTrue("TL not marked as valid!", positions.isValid(createCoords(-1, 1)));
      +        assertTrue("BR not marked as valid!", positions.isValid(createCoords(1, -1)));
      +
      +        positions.addCard(new ShownCard(emptyTR, Side.FRONT, createCoords(1, 1)));
      +        assertFalse("The cell in which a card is played should be not valid!", positions.isValid(createCoords(1, 1)));
      +
      +        assertFalse("TR marked as valid with empty corner!", positions.isValid(createCoords(2, 2)));
      +        assertTrue("BL not marked as valid!", positions.isValid(createCoords(0, 2)));
      +        assertTrue("BR not marked as valid!", positions.isValid(createCoords(2, 0)));
      +
      +        positions.addCard(new ShownCard(emptyTR, Side.FRONT, createCoords(1, -1)));
      +        assertFalse("The cell in which a card is played should be not valid!", positions.isValid(createCoords(1, -1)));
      +
      +        assertFalse("TR marked as valid with empty corner!", positions.isValid(createCoords(2, 0)));
      +        assertTrue("BR marked as not valid with corner!", positions.isValid(createCoords(2, -2)));
      +        assertTrue("BL marked as not valid with corner!", positions.isValid(createCoords(0, -2)));
      +
      +    }
      +}
      diff --git a/src/test/java/it/polimi/ingsw/controllers/PlayerControllerRMITest.java b/src/test/java/it/polimi/ingsw/controllers/PlayerControllerRMITest.java
      new file mode 100644
      index 00000000..8ec95056
      --- /dev/null
      +++ b/src/test/java/it/polimi/ingsw/controllers/PlayerControllerRMITest.java
      @@ -0,0 +1,999 @@
      +package it.polimi.ingsw.controllers;
      +
      +import static org.junit.Assert.assertEquals;
      +import static org.junit.Assert.assertTrue;
      +import static org.junit.Assert.fail;
      +
      +import java.lang.reflect.Field;
      +import java.rmi.RemoteException;
      +import java.util.HashMap;
      +import java.util.List;
      +import java.util.Map;
      +import java.util.regex.PatternSyntaxException;
      +
      +import it.polimi.ingsw.exceptions.*;
      +import it.polimi.ingsw.gamemodel.*;
      +import it.polimi.ingsw.utils.AvailableMatch;
      +import it.polimi.ingsw.utils.LeaderboardEntry;
      +import org.junit.Test;
      +
      +import it.polimi.ingsw.client.network.RemoteViewInterface;
      +import it.polimi.ingsw.utils.Pair;
      +
      +public class PlayerControllerRMITest {
      +    private Match match;
      +    private PlayerControllerRMI player1;
      +    private PlayerControllerRMI player2;
      +    private TestView view1;
      +    private TestView view2;
      +
      +    @Test
      +    public void constructor() {
      +        this.initializeUnstartedMatch(2);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            player1.registerView(new TestView());
      +        } catch (AlreadyUsedUsernameException | WrongStateException | ChosenMatchException | RemoteException |
      +                 WrongNameException e) {
      +            fail("player1 init shouldn't throw exception: " + e.getMessage());
      +        }
      +
      +        try {
      +            player2 = new PlayerControllerRMI("player1", match);
      +            player2.registerView(new TestView());
      +            // An exception is supposed to be thrown here
      +            fail("player 2 init should have thrown AlreadyUsedUsernameException");
      +        } catch (AlreadyUsedUsernameException e) {
      +            // this exception should be thrown
      +        } catch (WrongStateException | ChosenMatchException | WrongNameException e) {
      +            fail("player2 initialization shouldn't thrown this specific exception exception: " + e.getMessage());
      +        } catch (RemoteException e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        try {
      +            // The given match is in NextTurnState, should be in WaitState
      +            initializeStartedMatch(2);
      +            player1 = new PlayerControllerRMI("player3", match);
      +            player1.registerView(new TestView());
      +            // An exception is supposed to be thrown here
      +            fail("player 3 init should have thrown WrongStateException");
      +        } catch (AlreadyUsedUsernameException | ChosenMatchException | RemoteException | WrongNameException e) {
      +            fail("player2 initialization shouldn't thrown this specific exception exception: " + e.getMessage());
      +        } catch (WrongStateException e) {
      +            // this exception should be thrown
      +        }
      +    }
      +
      +    @Test
      +    public void someoneJoined() {
      +        System.out.println(new Object(){}.getClass().getEnclosingMethod().getName());
      +
      +        this.initializeUnstartedMatch(3);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            view1 = new TestView();
      +
      +            Thread t = new Thread(() -> {
      +                synchronized (view1) {
      +                    try {
      +                        player1.registerView(view1);
      +                    } catch (Exception e) {
      +                        throw new RuntimeException(e);
      +                    }
      +                    view1.notifyAll();
      +                }
      +            });
      +
      +            String name = (String) view1.waitForCall("someoneJoined", t).get("name");
      +            assertEquals("someoneJoined: wrong args in view1", "player1", name);
      +            // Verify that adding player2 triggers player1.someoneJoined and it calls the view method someoneJoined
      +            player2 = new PlayerControllerRMI("player2", match);
      +            player2.registerView(new TestView());
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void someoneQuit() {
      +        System.out.println(new Object(){}.getClass().getEnclosingMethod().getName());
      +        this.initializeUnstartedMatch(3);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            view1 = new TestView();
      +            player1.registerView(view1);
      +            player2 = new PlayerControllerRMI("player2", match);
      +            player2.registerView(new TestView());
      +            // Verify that removing  player2 triggers player1.someoneQuit and it calls the view method someoneQuit
      +
      +            Thread th = new Thread(() -> {
      +                synchronized (view1) {
      +                    match.removePlayer(player2.getPlayer());
      +                }
      +            });
      +
      +            Map<String, Object> args = view1.waitForCall("someoneQuit", th);
      +            String name = (String) args.get("name");
      +            assertEquals("someoneQuit: wrong args in view1", "player2", name);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void someoneDrewInitialCard() {
      +        System.out.println(new Object(){}.getClass().getEnclosingMethod().getName());
      +        this.initializeUnstartedMatch(2);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            view1 = new TestView();
      +            player1.registerView(view1);
      +            player2 = new PlayerControllerRMI("player2", match);
      +            view2 = new TestView();
      +            player2.registerView(view2);
      +
      +            // Let the current player call drawInitialCard
      +            PlayerControllerRMI currentPlayer;
      +            PlayerControllerRMI otherPlayer;
      +
      +            if (match.getCurrentPlayer().equals(player1.getPlayer())) {
      +                currentPlayer = player1;
      +                otherPlayer = player2;
      +            } else {
      +                currentPlayer = player2;
      +                otherPlayer = player1;
      +            }
      +
      +            TestView currentPlayerView = (TestView) currentPlayer.getView();
      +            TestView otherPlayerView = (TestView) otherPlayer.getView();
      +            otherPlayerView.waitingCall = "someoneDrewCard";
      +            Thread th = new Thread(() -> {
      +                synchronized (currentPlayerView) {
      +                    try {
      +                        currentPlayer.drawInitialCard();
      +                    } catch (Exception e) {
      +                        throw new RuntimeException(e);
      +                    }
      +                }
      +            });
      +            otherPlayerView.waitingCall = "someoneDrewInitialCard";
      +            // Verify that current player PlayerControllerRMI called the method giveInitialCard on its view
      +            Map<String, Object> lastCall = currentPlayerView.waitForCall("giveInitialCard", th);
      +            InitialCard card = (InitialCard) lastCall.get("card");
      +            InitialCard drawnCard = (InitialCard) this.getPrivateAttribute(match, "currentGivenInitialCard");
      +
      +            assertEquals("someoneDrewInitialCard: wrong args in currentPlayerView", drawnCard, card);
      +
      +            // Verify that the other player PlayerControllerRMI called the method someoneDrewInitialCard on its view
      +            lastCall = otherPlayerView.waitForCall("someoneDrewInitialCard");
      +            card = (InitialCard) lastCall.get("card");
      +            String name = (String) lastCall.get("name");
      +
      +
      +            assertEquals("someoneDrewInitialCard: wrong card arg in otherPlayerView", drawnCard, card);
      +            assertEquals("someoneDrewInitialCard: wrong name arg in otherPlayerView", currentPlayer.getPlayer().getUsername(), name);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void someoneSetInitialSide() {
      +        System.out.println(new Object(){}.getClass().getEnclosingMethod().getName());
      +        this.initializeUnstartedMatch(2);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            view1 = new TestView();
      +            player1.registerView(view1);
      +            player2 = new PlayerControllerRMI("player2", match);
      +            view2 = new TestView();
      +            player2.registerView(view2);
      +
      +            PlayerControllerRMI currentPlayer;
      +            PlayerControllerRMI otherPlayer;
      +
      +            if (match.getCurrentPlayer().equals(player1.getPlayer())) {
      +                currentPlayer = player1;
      +                otherPlayer = player2;
      +            } else {
      +                currentPlayer = player2;
      +                otherPlayer = player1;
      +            }
      +
      +            TestView currentPlayerView = (TestView) currentPlayer.getView();
      +            TestView otherPlayerView = (TestView) otherPlayer.getView();
      +            currentPlayer.drawInitialCard();
      +
      +            Thread th = new Thread(() -> {
      +                synchronized (currentPlayerView) {
      +                    try {
      +                        currentPlayer.chooseInitialCardSide(Side.FRONT);
      +                    } catch (Exception e) {
      +                        throw new RuntimeException(e);
      +                    }
      +                }
      +            });
      +
      +            Map<String, Object> lastCall = otherPlayerView.waitForCall("someoneSetInitialSide", th);
      +            // Verify that current player PlayerControllerRMI called the method someoneSetInitialCard on its view
      +            Side side = (Side) lastCall.get("side");
      +            String name = (String) lastCall.get("name");
      +
      +            assertEquals("someoneSetInitialSide: wrong name arg in currentPlayerView", currentPlayer.getPlayer().getUsername(), name);
      +            assertEquals("someoneSetInitialSide: wrong side arg in currentPlayerView", Side.FRONT, side);
      +
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void someoneDrewSecretObjective() {
      +        System.out.println(new Object(){}.getClass().getEnclosingMethod().getName());
      +        this.initializeUnstartedMatch(2);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            view1 = new TestView();
      +            player1.registerView(view1);
      +            player2 = new PlayerControllerRMI("player2", match);
      +            view2 = new TestView();
      +            player2.registerView(view2);
      +
      +            // Let the current player call drawInitialCard
      +            PlayerControllerRMI currentPlayer;
      +            PlayerControllerRMI otherPlayer;
      +
      +            if (match.getCurrentPlayer().equals(player1.getPlayer())) {
      +                currentPlayer = player1;
      +                otherPlayer = player2;
      +            } else {
      +                currentPlayer = player2;
      +                otherPlayer = player1;
      +            }
      +
      +            TestView currentPlayerView = (TestView) currentPlayer.getView();
      +            TestView otherPlayerView = (TestView) otherPlayer.getView();
      +
      +            currentPlayer.drawInitialCard();
      +            currentPlayer.chooseInitialCardSide(Side.FRONT);
      +            otherPlayer.drawInitialCard();
      +            otherPlayer.chooseInitialCardSide(Side.FRONT);
      +
      +            Thread th = new Thread(() -> {
      +                synchronized (currentPlayerView) {
      +                    try {
      +                        currentPlayer.drawSecretObjectives();
      +                        currentPlayerView.notifyAll();
      +                    } catch (Exception e) {
      +                        throw new RuntimeException(e);
      +                    }
      +                }
      +            });
      +
      +            // Verify that current player PlayerControllerRMI called the method giveSecretObjectives on its view
      +            Map<String, Object> lastCall = currentPlayerView.waitForCall("giveSecretObjectives", th);
      +            Pair<Objective, Objective> objectives = (Pair<Objective, Objective>) lastCall.get("objectives");
      +            Pair<Objective, Objective> actualObjectives = (Pair<Objective, Objective>) this.getPrivateAttribute(match, "currentProposedObjectives");
      +
      +            assertEquals("someoneDrewSecretObjective: wrong arg in currentPlayerView", actualObjectives, objectives);
      +
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void someoneChoseSecretObjective() {
      +        System.out.println(new Object(){}.getClass().getEnclosingMethod().getName());
      +        this.initializeUnstartedMatch(2);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            view1 = new TestView();
      +            player1.registerView(view1);
      +            player2 = new PlayerControllerRMI("player2", match);
      +            view2 = new TestView();
      +            player2.registerView(view2);
      +
      +            PlayerControllerRMI currentPlayer;
      +            PlayerControllerRMI otherPlayer;
      +
      +            if (match.getCurrentPlayer().equals(player1.getPlayer())) {
      +                currentPlayer = player1;
      +                otherPlayer = player2;
      +            } else {
      +                currentPlayer = player2;
      +                otherPlayer = player1;
      +            }
      +
      +            TestView currentPlayerView = (TestView) currentPlayer.getView();
      +            TestView otherPlayerView = (TestView) otherPlayer.getView();
      +
      +            currentPlayer.drawInitialCard();
      +            currentPlayer.chooseInitialCardSide(Side.FRONT);
      +            otherPlayer.drawInitialCard();
      +            otherPlayer.chooseInitialCardSide(Side.FRONT);
      +            Objective obj = currentPlayer.getPlayer().drawSecretObjectives().first();
      +            Thread th = new Thread(() -> {
      +                synchronized (currentPlayerView) {
      +                    try {
      +                        currentPlayer.chooseSecretObjective(obj);
      +                        currentPlayerView.notifyAll();
      +                    } catch (Exception e) {
      +                        throw new RuntimeException(e);
      +                    }
      +                }
      +            });
      +            // Verify that current player PlayerControllerRMI called the method someoneChoseSecretObjective on its view
      +            String name = (String) currentPlayerView.waitForCall("someoneChoseSecretObjective", th).get("name");
      +
      +            assertEquals("someoneChoseSecretObjective: wrong arg in currentPlayerView", currentPlayer.getPlayer().getUsername(), name);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void someonePlayedCard() {
      +        System.out.println(new Object(){}.getClass().getEnclosingMethod().getName());
      +        this.initializeUnstartedMatch(2);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            view1 = new TestView();
      +            player1.registerView(view1);
      +            player2 = new PlayerControllerRMI("player2", match);
      +            view2 = new TestView();
      +            player2.registerView(view2);
      +
      +            PlayerControllerRMI currentPlayer;
      +            PlayerControllerRMI otherPlayer;
      +
      +            if (match.getCurrentPlayer().equals(player1.getPlayer())) {
      +                currentPlayer = player1;
      +                otherPlayer = player2;
      +            } else {
      +                currentPlayer = player2;
      +                otherPlayer = player1;
      +            }
      +
      +            TestView currentPlayerView = (TestView) currentPlayer.getView();
      +            TestView otherPlayerView = (TestView) otherPlayer.getView();
      +
      +            // Advance the game
      +            currentPlayer.drawInitialCard();
      +            currentPlayer.chooseInitialCardSide(Side.FRONT);
      +            otherPlayer.drawInitialCard();
      +            otherPlayer.chooseInitialCardSide(Side.FRONT);
      +            Objective currObj = currentPlayer.getPlayer().drawSecretObjectives().first();
      +            currentPlayer.chooseSecretObjective(currObj);
      +            Objective otherObj = otherPlayer.getPlayer().drawSecretObjectives().first();
      +            otherPlayer.chooseSecretObjective(otherObj);
      +
      +            // Play the card
      +            PlayableCard playedCard = currentPlayer.getPlayer().getBoard().getCurrentHand().stream().filter(c -> c instanceof ResourceCard).findAny().get();
      +            Thread th = new Thread(() -> {
      +                synchronized (currentPlayerView) {
      +                    try {
      +                        currentPlayer.playCard(new Pair<>(-1, 1), playedCard, Side.FRONT);
      +                        currentPlayerView.notifyAll();
      +                    } catch (Exception e) {
      +                        throw new RuntimeException(e);
      +                    }
      +                }
      +            });
      +
      +            // Verify that current player PlayerControllerRMI called the method someonePlayedCard on its view
      +            Map<String, Object> lastCall = currentPlayerView.waitForCall("someonePlayedCard", th);
      +            String name = (String) lastCall.get("name");
      +            Pair<Integer, Integer> coords = (Pair<Integer, Integer>) lastCall.get("coords");
      +            Side side = (Side) lastCall.get("side");
      +            PlayableCard card = (PlayableCard) lastCall.get("card");
      +
      +            assertEquals("someonePlayedCard: wrong name arg in currentPlayerView", currentPlayer.getPlayer().getUsername(), name);
      +            assertEquals("someonePlayedCard: wrong card arg in currentPlayerView", playedCard, card);
      +            assertEquals("someonePlayedCard: wrong side arg in currentPlayerView", Side.FRONT, side);
      +            assertEquals("someonePlayedCard: wrong coords(x) arg in currentPlayerView", Integer.valueOf(-1), coords.first());
      +            assertEquals("someonePlayedCard: wrong coords(y) arg in currentPlayerView", Integer.valueOf(1), coords.second());
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void someoneDrewCard() {
      +        System.out.println(new Object(){}.getClass().getEnclosingMethod().getName());
      +        this.initializeUnstartedMatch(2);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            view1 = new TestView();
      +            player1.registerView(view1);
      +            player2 = new PlayerControllerRMI("player2", match);
      +            view2 = new TestView();
      +            player2.registerView(view2);
      +
      +            PlayerControllerRMI currentPlayer;
      +            PlayerControllerRMI otherPlayer;
      +
      +            if (match.getCurrentPlayer().equals(player1.getPlayer())) {
      +                currentPlayer = player1;
      +                otherPlayer = player2;
      +            } else {
      +                currentPlayer = player2;
      +                otherPlayer = player1;
      +            }
      +
      +            TestView currentPlayerView = (TestView) currentPlayer.getView();
      +            TestView otherPlayerView = (TestView) otherPlayer.getView();
      +
      +            // Advance the game
      +            currentPlayer.drawInitialCard();
      +            currentPlayer.chooseInitialCardSide(Side.FRONT);
      +            otherPlayer.drawInitialCard();
      +            otherPlayer.chooseInitialCardSide(Side.FRONT);
      +            Objective currObj = currentPlayer.getPlayer().drawSecretObjectives().first();
      +            currentPlayer.chooseSecretObjective(currObj);
      +            Objective otherObj = otherPlayer.getPlayer().drawSecretObjectives().first();
      +            otherPlayer.chooseSecretObjective(otherObj);
      +            PlayableCard playedCard = currentPlayer.getPlayer().getBoard().getCurrentHand().stream().filter(c -> c instanceof ResourceCard).findAny().get();
      +            currentPlayer.playCard(new Pair<>(-1, 1), playedCard, Side.FRONT);
      +            Thread.sleep(200);
      +            // Check drawn card
      +            PlayableCard drawnCard = ((Map<DrawSource, PlayableCard>) this.getPrivateAttribute(match, "visiblePlayableCards")).get(DrawSource.FIRST_VISIBLE);
      +
      +            // Verify that current player PlayerControllerRMI called the method someoneDrewCard on its view
      +            Thread th = new Thread(() -> {
      +                synchronized (currentPlayerView) {
      +                    try {
      +                        currentPlayer.drawCard(DrawSource.FIRST_VISIBLE);
      +                    } catch (Exception e) {
      +                        throw new RuntimeException(e);
      +                    }
      +                }
      +            });
      +            Map<String, Object> lastCall = currentPlayerView.waitForCall("someoneDrewCard", th);
      +
      +            PlayableCard actualReplCard = ((Map<DrawSource, PlayableCard>) this.getPrivateAttribute(match, "visiblePlayableCards")).get(DrawSource.FIRST_VISIBLE);
      +            Pair<Symbol, Symbol> deckReign = match.getDecksTopReigns();
      +
      +            String name = (String) lastCall.get("name");
      +            DrawSource source = (DrawSource) lastCall.get("source");
      +            Side side = (Side) lastCall.get("side");
      +            PlayableCard card = (PlayableCard) lastCall.get("card");
      +            PlayableCard replCard = (PlayableCard) lastCall.get("replCard");
      +            Pair<Symbol, Symbol> reigns = (Pair<Symbol, Symbol>) lastCall.get("deckReign");
      +
      +            assertEquals("someoneDrewCard: wrong name arg in currentPlayerView", currentPlayer.getPlayer().getUsername(), name);
      +            assertEquals("someoneDrewCard: wrong card arg in currentPlayerView", drawnCard, card);
      +            assertEquals("someoneDrewCard: wrong replCard arg in currentPlayerView", actualReplCard, replCard);
      +            assertEquals("someoneDrewCard: wrong deckReign arg in currentPlayerView", reigns, deckReign);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void someoneSentBroadcastText() {
      +        System.out.println(new Object(){}.getClass().getEnclosingMethod().getName());
      +        this.initializeUnstartedMatch(2);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            view1 = new TestView();
      +            player1.registerView(view1);
      +            player2 = new PlayerControllerRMI("player2", match);
      +            view2 = new TestView();
      +            player2.registerView(view2);
      +            Thread.sleep(200);
      +
      +            Thread th = new Thread(() -> {
      +                synchronized (view1) {
      +                    try {
      +                        player1.sendBroadcastText("test text :)");
      +                        view1.notifyAll();
      +                    } catch (RemoteException e) {
      +                        throw new RuntimeException(e);
      +                    }
      +                }
      +            });
      +            // Verify that current player PlayerControllerRMI called the method someonePlayedCard on its view
      +
      +            Map<String, Object> lastCall = view1.waitForCall("someoneSentBroadcastText", th);
      +            String name = (String) lastCall.get("name");
      +            String text = (String) lastCall.get("text");
      +
      +            assertEquals("someoneSentBroadcastText: wrong name arg in currentPlayerView", player1.getPlayer().getUsername(), name);
      +            assertEquals("someoneSentBroadcastText: wrong text arg in currentPlayerView", "test text :)", text);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void someoneSentPrivateText() {
      +        System.out.println(new Object(){}.getClass().getEnclosingMethod().getName());
      +        this.initializeUnstartedMatch(2);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            view1 = new TestView();
      +            player1.registerView(view1);
      +            player2 = new PlayerControllerRMI("player2", match);
      +            view2 = new TestView();
      +            player2.registerView(view2);
      +
      +            Thread th = new Thread(() -> {
      +                synchronized (view2) {
      +                    try {
      +                        player1.sendPrivateText("player2", "test text :)");
      +                    } catch (RemoteException e) {
      +                        throw new RuntimeException(e);
      +                    }
      +                }
      +            });
      +
      +            // Verify that other player PlayerControllerRMI called the method someoneSentPrivateText on its view
      +            Map<String, Object> lastCall  = view2.waitForCall("someoneSentPrivateText", th);
      +            String sender = (String) lastCall.get("name");
      +            String text = (String) lastCall.get("text");
      +
      +            assertEquals("someoneSentPrivateText: wrong name arg in currentPlayerView", player1.getPlayer().getUsername(), sender);
      +            assertEquals("someoneSentPrivateText: wrong text arg in currentPlayerView", "test text :)", text);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void matchFinished() throws RemoteException, WrongStateException, AlreadyUsedUsernameException, ChosenMatchException, InterruptedException {
      +        this.initializeTwoPlayerFinishedMatch();
      +        view1.waitingCall = "matchFinished";
      +        view1.waitForCall("matchFinished");
      +        Map<String, Object> args = view1.getLastCallArguments();
      +        List<LeaderboardEntry> ranking = (List<LeaderboardEntry>) args.get("ranking");
      +        List<Pair<Player, Boolean>> matchRaking = match.getPlayersFinalRanking();
      +
      +        for (int i =0; i < ranking.size(); i++) {
      +            assertEquals(matchRaking.get(i).first().getUsername(), ranking.get(i).username());
      +            assertEquals(matchRaking.get(i).second(), ranking.get(i).winner());
      +        }
      +    }
      +
      +    @Test
      +    public void matchStarted() {
      +        this.initializeUnstartedMatch(2);
      +        this.addTwoPlayerWithView();
      +        view1.waitingCall = "matchStarted";
      +        player1.matchStarted();
      +        player2.matchStarted();
      +
      +        view1.waitForCall("matchStarted");
      +        Map<String, Object> args = view1.getLastCallArguments();
      +        Map<Color, String> pawns = (Map<Color, String>) args.get("pawns");
      +        Map<String, List<PlayableCard>> hands = (Map<String, List<PlayableCard>>) args.get("hands");
      +        Map<DrawSource, PlayableCard> visbile = (Map<DrawSource, PlayableCard>) args.get("playable");
      +
      +        assertEquals(match.getVisibleObjectives().first(), ((Pair<Objective, Objective>)args.get("objectives")).first());
      +        assertEquals(match.getVisibleObjectives().second(), ((Pair<Objective, Objective>)args.get("objectives")).second());
      +        assertEquals(match.getDecksTopReigns().first(), ((Pair<Symbol, Symbol>) args.get("decksTopReigns")).first());
      +        assertEquals(match.getDecksTopReigns().second(), ((Pair<Symbol, Symbol>) args.get("decksTopReigns")).second());
      +        for (Player p : match.getPlayers()) {
      +            assertEquals(p.getPawnColor(), pawns.get(p.getUsername()));
      +            for (PlayableCard c : p.getBoard().getCurrentHand()) {
      +                assertTrue(hands.get(p.getUsername()).contains(c));
      +            }
      +        }
      +        for (DrawSource s : visbile.keySet()) {
      +            assertEquals(match.getVisiblePlayableCards().get(s), visbile.get(s));
      +        }
      +    }
      +
      +    @Test
      +    public void matchResumed() {
      +        this.initializeUnstartedMatch(2);
      +        this.addTwoPlayerWithView();
      +        view1.waitingCall = "matchResumed";
      +        player1.matchResumed();
      +        player2.matchResumed();
      +
      +        view1.waitForCall("matchResumed");
      +        Map<String, Object> args = view1.getLastCallArguments();
      +        Map<Color, String> pawns = (Map<Color, String>) args.get("pawns");
      +        Map<String, List<PlayableCard>> hands = (Map<String, List<PlayableCard>>) args.get("hands");
      +        Map<DrawSource, PlayableCard> visbile = (Map<DrawSource, PlayableCard>) args.get("playable");
      +
      +        assertEquals(match.getVisibleObjectives().first(), ((Pair<Objective, Objective>)args.get("objectives")).first());
      +        assertEquals(match.getVisibleObjectives().second(), ((Pair<Objective, Objective>)args.get("objectives")).second());
      +        assertEquals(match.getDecksTopReigns().first(), ((Pair<Symbol, Symbol>) args.get("decksTopReigns")).first());
      +        assertEquals(match.getDecksTopReigns().second(), ((Pair<Symbol, Symbol>) args.get("decksTopReigns")).second());
      +        for (Player p : match.getPlayers()) {
      +            assertEquals(p.getPawnColor(), pawns.get(p.getUsername()));
      +            for (PlayableCard c : p.getBoard().getCurrentHand()) {
      +                assertTrue(hands.get(p.getUsername()).contains(c));
      +            }
      +        }
      +        for (DrawSource s : visbile.keySet()) {
      +            assertEquals(match.getVisiblePlayableCards().get(s), visbile.get(s));
      +        }
      +    }
      +
      +    @Test
      +    public void registerView() {
      +        this.initializeUnstartedMatch(3);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("player1", match);
      +            player2 = new PlayerControllerRMI("player2", match);
      +            view2 = new TestView();
      +            view2.waitingCall = "someoneJoined";
      +            // Verify that registering a view to player2 triggers player.registerView and it calls the view method getLobbyInfo
      +            player1.registerView(view2);
      +
      +            List<String> names = (List<String>) view2.getLastCallArguments().get("names");
      +
      +            assertTrue("registerView: wrong args in view2", names.contains("player1"));
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    // Utility methods
      +
      +    private Object getPrivateAttribute(Object object, String privateAttr) throws NoSuchFieldException, IllegalAccessException {
      +        Field privateField = object.getClass().getDeclaredField(privateAttr);
      +        privateField.setAccessible(true);
      +
      +        return privateField.get(object);
      +    }
      +
      +    private void initializeUnstartedMatch(int maxPlayers) {
      +        match = new Match(maxPlayers, MatchTest.createDeterministicInitialsDeck(10), MatchTest.createDeterministicResourcesDeck(40), MatchTest.createDeterministicGoldsDeck(40), MatchTest.createDeterministicObjectivesDeck(6));
      +    }
      +
      +    private void initializeStartedMatch(int maxPlayers) {
      +        GameDeck<InitialCard> initialsDeck;
      +        GameDeck<ResourceCard> resourcesDeck;
      +        GameDeck<GoldCard> goldsDeck;
      +        GameDeck<Objective> objectivesDeck;
      +
      +        initialsDeck = MatchTest.createDeterministicInitialsDeck(10);
      +        objectivesDeck = MatchTest.createDeterministicObjectivesDeck(6);
      +        goldsDeck = MatchTest.createDeterministicGoldsDeck(40);
      +        resourcesDeck = MatchTest.createDeterministicResourcesDeck(40);
      +
      +        // Set up a basic game
      +        String[] names = {"Oingo", "Boingo", "Jotaro", "Polnareff"};
      +        Player[] players = new Player[4];
      +
      +        match = new Match(maxPlayers, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +
      +        for (int i = 0; i < maxPlayers; i++) {
      +            players[i] = new Player(names[i], match);
      +            try {
      +                match.addPlayer(players[i]);
      +            } catch (Exception e) {
      +                throw new RuntimeException(e);
      +            }
      +        }
      +    }
      +
      +    public void initializeTwoPlayerFinishedMatch() throws WrongStateException, AlreadyUsedUsernameException, RemoteException, ChosenMatchException {
      +        int maxPlayers = 2;
      +
      +        GameDeck<InitialCard> initialsDeck;
      +        GameDeck<ResourceCard> resourcesDeck;
      +        GameDeck<GoldCard> goldsDeck;
      +        GameDeck<Objective> objectivesDeck;
      +
      +        initialsDeck = MatchTest.createDeterministicInitialsDeck(10);
      +        objectivesDeck = MatchTest.createDeterministicObjectivesDeck(6);
      +        goldsDeck = MatchTest.createDeterministicGoldsDeck(40);
      +        resourcesDeck = MatchTest.createDeterministicResourcesDeck(40);
      +
      +        match = new Match(maxPlayers, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +
      +        try {
      +            player1 = new PlayerControllerRMI("Oingo", match);
      +            view1 = new TestView();
      +            player1.registerView(view1);
      +
      +            player2 = new PlayerControllerRMI("Boingo", match);
      +            view2 = new TestView();
      +            player2.registerView(view2);
      +
      +            for (int i = 0; i < maxPlayers; i++) {
      +                match.getCurrentPlayer().drawInitialCard();
      +                match.getCurrentPlayer().chooseInitialCardSide(Side.FRONT);
      +            }
      +
      +            for (int i = 0; i < maxPlayers; i++) {
      +                Pair<Objective, Objective> obj = match.getCurrentPlayer().drawSecretObjectives();
      +                match.getCurrentPlayer().chooseSecretObjective(obj.first());
      +            }
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +        int i = 1;
      +        while (!match.isFinished()) {
      +            try {
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                match.getCurrentPlayer().drawCard(decideDrawSource(resourcesDeck, goldsDeck));
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                match.getCurrentPlayer().drawCard(decideDrawSource(resourcesDeck, goldsDeck));
      +            } catch (Exception e) {
      +                throw new RuntimeException(e);
      +            }
      +            i++;
      +        }
      +    }
      +
      +    private void addTwoPlayerWithView() {
      +        try {
      +            player1 = new PlayerControllerRMI("Oingo", match);
      +            view1 = new TestView();
      +            player1.registerView(view1);
      +
      +            player2 = new PlayerControllerRMI("Boingo", match);
      +            view2 = new TestView();
      +            player2.registerView(view2);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    private DrawSource decideDrawSource(GameDeck<ResourceCard> resourcesDeck, GameDeck<GoldCard> goldsDeck) {
      +        Map<DrawSource, PlayableCard> visible = match.getVisiblePlayableCards();
      +        if (!resourcesDeck.isEmpty()) {
      +            return DrawSource.RESOURCES_DECK;
      +        } else if (!goldsDeck.isEmpty()) {
      +            return DrawSource.GOLDS_DECK;
      +        } else {
      +            DrawSource[] values = DrawSource.values();
      +            for (int i=2; i < 6; i++) {
      +                if (visible.get(values[i]) != null) {
      +                    return values[i];
      +                }
      +            }
      +        }
      +        return null;
      +    }
      +
      +    private static class TestView implements RemoteViewInterface {
      +        private String lastCall = "";
      +        private Map<String, Object> args;
      +        private String waitingCall = null;
      +
      +
      +        public synchronized void giveInitialCard(InitialCard initialCard) {
      +            if (waitingCall != null && waitingCall.equals("giveInitialCard")) {
      +                lastCall = "giveInitialCard";
      +                this.notifyAll();
      +                args = new HashMap<>();
      +                args.put("card", initialCard);
      +            }
      +
      +        }
      +
      +        public synchronized void giveSecretObjectives(Pair<Objective, Objective> secretObjectives) {
      +            if (waitingCall != null && waitingCall.equals("giveSecretObjectives")) {
      +                lastCall = "giveSecretObjectives";
      +                args = new HashMap<>();
      +                args.put("objectives", secretObjectives);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        public synchronized void matchStarted(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands, Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards, Pair<Symbol, Symbol> decksTopReigns) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("matchStarted")) {
      +                lastCall = "matchStarted";
      +                args = new HashMap<>();
      +                args.put("pawns", playersUsernamesAndPawns);
      +                args.put("hands", playersHands);
      +                args.put("objectives", visibleObjectives);
      +                args.put("playable", visiblePlayableCards);
      +                args.put("decksTopReigns", decksTopReigns);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        @Override
      +        public synchronized void matchResumed(Map<String, Color> playersUsernamesAndPawns, Map<String, List<PlayableCard>> playersHands, Pair<Objective, Objective> visibleObjectives, Map<DrawSource, PlayableCard> visiblePlayableCards, Pair<Symbol, Symbol> decksTopReigns, Objective secretObjective, Map<String, Map<Symbol, Integer>> availableResources, Map<String, Map<Pair<Integer, Integer>, PlacedCard>> placedCards, Map<String, Integer> playerPoints, String currentPlayer, boolean drawPhase) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("matchResumed")) {
      +                lastCall = "matchResumed";
      +                args = new HashMap<>();
      +                args.put("pawns", playersUsernamesAndPawns);
      +                args.put("hands", playersHands);
      +                args.put("objectives", visibleObjectives);
      +                args.put("playable", visiblePlayableCards);
      +                args.put("decksTopReigns", decksTopReigns);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        @Override
      +        public void receiveAvailableMatches(List<AvailableMatch> availableMatchs) throws RemoteException {
      +        }
      +
      +        public synchronized void someoneDrewInitialCard(String someoneUsername, InitialCard card) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("someoneDrewInitialCard")) {
      +                lastCall = "someoneDrewInitialCard";
      +                args = new HashMap<>();
      +                args.put("name", someoneUsername);
      +                args.put("card", card);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        @Override
      +        public synchronized void someoneSetInitialSide(String someoneUsername, Side side, Map<Symbol, Integer> availableResources) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("someoneSetInitialSide")) {
      +                lastCall = "someoneSetInitialSide";
      +                args = new HashMap<>();
      +                args.put("name", someoneUsername);
      +                args.put("side", side);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        public synchronized void someoneDrewSecretObjective(String someoneUsername) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("someoneDrewSecretObjective")) {
      +
      +                lastCall = "someoneDrewSecretObjective";
      +                args = new HashMap<>();
      +                args.put("name", someoneUsername);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        public synchronized void someoneChoseSecretObjective(String someoneUsername) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("someoneChoseSecretObjective")) {
      +                lastCall = "someoneChoseSecretObjective";
      +                args = new HashMap<>();
      +                args.put("name", someoneUsername);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        @Override
      +        public synchronized void someonePlayedCard(String someoneUsername, Pair<Integer, Integer> coords, PlayableCard card, Side side, int points, Map<Symbol, Integer> availableResources) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("someonePlayedCard")) {
      +                lastCall = "someonePlayedCard";
      +                args = new HashMap<>();
      +                args.put("name", someoneUsername);
      +                args.put("coords", coords);
      +                args.put("card", card);
      +                args.put("side", side);
      +                args.put("resources", availableResources);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        public synchronized void someoneDrewCard(String someoneUsername, DrawSource source, PlayableCard card, PlayableCard replacementCard, Pair<Symbol, Symbol> deckTopReigns) throws RemoteException {
      +            lastCall = "someoneDrewCard";
      +            if (waitingCall != null && waitingCall.equals("someoneDrewCard")) {
      +                args = new HashMap<>();
      +                args.put("name", someoneUsername);
      +                args.put("source", source);
      +                args.put("card", card);
      +                args.put("replCard", replacementCard);
      +                args.put("deckReign", deckTopReigns);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        @Override
      +        public synchronized void someoneJoined(String someoneUsername, List<String> joinedPlayers) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("someoneJoined")) {
      +                lastCall = "someoneJoined";
      +                args = new HashMap<>();
      +                args.put("name", someoneUsername);
      +                args.put("names", joinedPlayers);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        @Override
      +        public synchronized void someoneQuit(String someoneUsername) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("someoneQuit")) {
      +                lastCall = "someoneQuit";
      +                args = new HashMap<>();
      +                args.put("name", someoneUsername);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        @Override
      +        public synchronized void matchFinished(List<LeaderboardEntry> ranking) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("matchFinished")) {
      +                lastCall = "matchFinished";
      +                args = new HashMap<>();
      +                args.put("ranking", ranking);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        public synchronized void someoneSentBroadcastText(String someoneUsername, String text) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("someoneSentBroadcastText")) {
      +                lastCall = "someoneSentBroadcastText";
      +                args = new HashMap<>();
      +                args.put("name", someoneUsername);
      +                args.put("text", text);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        public synchronized void someoneSentPrivateText(String someoneUsername, String text) throws RemoteException {
      +            if (waitingCall != null && waitingCall.equals("someoneSentPrivateText")) {
      +                lastCall = "someoneSentPrivateText";
      +                args = new HashMap<>();
      +                args.put("name", someoneUsername);
      +                args.put("text", text);
      +                this.notifyAll();
      +            }
      +        }
      +
      +        public String getLastCall() {
      +            return lastCall;
      +        }
      +
      +        public synchronized Map<String, Object> waitForCall(String call) {
      +            waitingCall = call;
      +            while (!lastCall.equals(call)) {
      +                try {
      +                    this.wait();
      +                } catch (InterruptedException e) {
      +                    throw new RuntimeException(e);
      +                }
      +            }
      +            return args;
      +        }
      +
      +        public synchronized Map<String, Object> waitForCall(String call, Thread th) {
      +            waitingCall = call;
      +            th.start();
      +            while (!lastCall.equals(call)) {
      +                try {
      +                    this.wait();
      +                } catch (InterruptedException e) {
      +                    throw new RuntimeException();
      +                }
      +            }
      +            waitingCall = null;
      +            this.notifyAll();
      +            return args;
      +        }
      +        public synchronized Map<String, Object> waitForCallDestructive(String call) {
      +            while (!lastCall.equals(call)) {
      +                try {
      +                    this.wait();
      +                } catch (InterruptedException e) {
      +                    throw new RuntimeException(e);
      +                }
      +            }
      +            return getLastCallArguments();
      +        }
      +        public Map<String, Object> getLastCallArguments() {
      +            synchronized (this) {
      +                while (args == null) {
      +                    try {
      +                        this.wait();
      +                    } catch (InterruptedException e) {
      +                        throw new RuntimeException(e);
      +                    }
      +                }
      +                HashMap<String, Object> argsCopy = new HashMap<>();
      +                argsCopy.putAll(args);
      +                args = null;
      +                return argsCopy;
      +            }
      +        }
      +    }
      +}
      diff --git a/src/test/java/it/polimi/ingsw/gamemodel/BoardTest.java b/src/test/java/it/polimi/ingsw/gamemodel/BoardTest.java
      new file mode 100644
      index 00000000..9a92523a
      --- /dev/null
      +++ b/src/test/java/it/polimi/ingsw/gamemodel/BoardTest.java
      @@ -0,0 +1,122 @@
      +package it.polimi.ingsw.gamemodel;
      +
      +import static org.junit.Assert.assertEquals;
      +import static org.junit.Assert.assertTrue;
      +import org.junit.Test;
      +
      +import java.util.Map;
      +import java.util.Set;
      +
      +
      +import it.polimi.ingsw.utils.*;
      +
      +public class BoardTest {
      +        InitialCard initial;
      +        PlayableCard base;
      +        PlayableCard validGold;
      +        PlayableCard invalidGold;
      +        PlayableCard brempty;
      +
      +        PlayableCard nores;
      +
      +        Board board;
      +    public BoardTest() {
      +        board = new Board();
      +
      +        try {
      +            initial = new InitialCard(
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of(Symbol.PLANT)),
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of(Symbol.PLANT))
      +            );
      +
      +            base = new ResourceCard(
      +                new CardFace(Symbol.PLANT, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of(Symbol.PLANT)),
      +                Symbol.PLANT, 1
      +            );
      +
      +            brempty = new ResourceCard(
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.EMPTY_CORNER, Set.of()),
      +                Symbol.PLANT, 1
      +            );
      +
      +            nores = new ResourceCard(
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of()),
      +                Symbol.PLANT, 1
      +            );
      +
      +            Map<Symbol, Integer> valid = Map.of(Symbol.PLANT, 5);
      +
      +            Map<Symbol, Integer> invalid = Map.of(Symbol.FUNGUS, 2);
      +
      +            validGold = new GoldCard(
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.EMPTY_CORNER, Set.of(Symbol.PLANT)),
      +                Symbol.PLANT, Symbol.INKWELL, 2, new QuantityRequirement(valid)
      +            );
      +
      +            invalidGold = new GoldCard(
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.EMPTY_CORNER, Set.of(Symbol.PLANT)),
      +                Symbol.PLANT, Symbol.INKWELL, 2, new QuantityRequirement(invalid)
      +            );
      +
      +            board.setInitialCard(initial, Side.FRONT); // +1 plant
      +            board.placeCard(new Pair<>(1,1),    brempty,    Side.FRONT, 0); // +0 plant
      +            board.placeCard(new Pair<>(-1,-1),  base,       Side.FRONT, 0); // +2 plant
      +            board.placeCard(new Pair<>(0,-2),   base,       Side.FRONT, 0); // +2 plant
      +            board.placeCard(new Pair<>(1,-3),   base,       Side.FRONT, 0); // +2 plant
      +            board.placeCard(new Pair<>(2,-2),   base,       Side.FRONT, 0); // +2 plant
      +            board.placeCard(new Pair<>(3,-1),   base,       Side.FRONT, 0); // +2 plant
      +            board.placeCard(new Pair<>(-2,0),   base,       Side.FRONT, 0); // +2 plant -1 plant
      +
      +            board.placeCard(new Pair<>(0,-4),   nores,      Side.FRONT, 0); // +0
      +            board.placeCard(new Pair<>(-1,-5),  nores,      Side.FRONT, 0); // +0
      +            board.placeCard(new Pair<>(0,-6),   nores,      Side.FRONT, 0); // +0
      +            board.placeCard(new Pair<>(1,-7),   nores,      Side.FRONT, 0); // +0
      +            board.placeCard(new Pair<>(2,-6),   nores,      Side.FRONT, 0); // +0
      +            board.placeCard(new Pair<>(3,-5),   nores,      Side.FRONT, 0); // +0
      +            board.placeCard(new Pair<>(2,-4),   nores,      Side.FRONT, 0); // +0
      +
      +            board.addHandCard(base);
      +            board.addHandCard(brempty);
      +            board.addHandCard(validGold);
      +
      +            verifyResources(Symbol.PLANT, 12);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void verifyBasicPlacement() {
      +        try {
      +            // (0, 0) is reserved to initial
      +            assertEquals(PlacementOutcome.INVALID_COORDS,           board.verifyCardPlacement(new Pair<>(0, 0),         base, Side.FRONT));
      +            // (1, 1) is already occupied
      +            assertEquals(PlacementOutcome.INVALID_COORDS,           board.verifyCardPlacement(new Pair<>(0, 0),         base, Side.FRONT));
      +            // (2, 0) is invalid since in (1, 1) there is a bottom right corner empty
      +            assertEquals(PlacementOutcome.INVALID_COORDS,           board.verifyCardPlacement(new Pair<>(2, 0),         base, Side.FRONT));
      +            // (1, -1) is a valid placement (covers 4 corners)
      +            assertEquals(PlacementOutcome.VALID,                    board.verifyCardPlacement(new Pair<>(1, -1),        base, Side.FRONT));
      +            // (1, -5) is a valid placement
      +            assertEquals(PlacementOutcome.VALID,                    board.verifyCardPlacement(new Pair<>(1, -5),        base, Side.FRONT));
      +            // no adjacent
      +            assertEquals(PlacementOutcome.INVALID_COORDS,           board.verifyCardPlacement(new Pair<>(5, 5),         base, Side.FRONT));
      +            // enough res
      +            assertEquals(PlacementOutcome.VALID,                    board.verifyCardPlacement(new Pair<>(1, -5),        validGold, Side.FRONT));
      +
      +            board.removeHandCard(base);
      +            board.addHandCard(invalidGold);
      +            // not enough res
      +            assertEquals(PlacementOutcome.INVALID_ENOUGH_RESOURCES, board.verifyCardPlacement(new Pair<>(1, -5),        invalidGold, Side.FRONT));
      +            board.removeHandCard(invalidGold);
      +            board.addHandCard(base);
      +
      +            board.verifyCardPlacement(new Pair<>(1, -5), invalidGold, Side.FRONT);
      +        } catch (Exception e) {
      +            assertEquals("The card is not in the player's hand!", e.getMessage());
      +        }
      +    }
      +
      +    public void verifyResources(Symbol s, Integer expected) {
      +        assertEquals(expected, board.getAvailableResources().get(s));
      +    }
      +}
      diff --git a/src/test/java/it/polimi/ingsw/gamemodel/GameDeckTest.java b/src/test/java/it/polimi/ingsw/gamemodel/GameDeckTest.java
      new file mode 100644
      index 00000000..379b5199
      --- /dev/null
      +++ b/src/test/java/it/polimi/ingsw/gamemodel/GameDeckTest.java
      @@ -0,0 +1,42 @@
      +package it.polimi.ingsw.gamemodel;
      +
      +import static org.junit.Assert.assertEquals;
      +import static org.junit.Assert.assertTrue;
      +import org.junit.Test;
      +
      +import java.util.Set;
      +
      +public class GameDeckTest {
      +    GameDeck<ResourceCard> deck;
      +    ResourceCard base; // sadge, no PlayableCard
      +
      +    public GameDeckTest() {
      +        try {
      +            deck = new GameDeck<>();
      +            base = new ResourceCard(
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of()),
      +                Symbol.PLANT, 0
      +            );
      +
      +            deck.add(base);
      +            deck.add(base);
      +        } catch (Exception e) {
      +            System.err.println(e);
      +            assertTrue(false);
      +        }
      +    }
      +
      +    @Test
      +    public void testAll() {
      +        try {
      +            assertEquals(2, deck.getSize());
      +            assertEquals(base, deck.pop());
      +            assertEquals(base, deck.poll());
      +            assertEquals(0, deck.getSize());
      +            assertEquals(null, deck.poll());
      +            deck.pop();
      +        } catch (Exception e) {
      +            assertEquals("Tried to draw from an empty deck!", e.getMessage());
      +        }
      +    }
      +}
      diff --git a/src/test/java/it/polimi/ingsw/gamemodel/GoldCardTest.java b/src/test/java/it/polimi/ingsw/gamemodel/GoldCardTest.java
      new file mode 100644
      index 00000000..d63847c1
      --- /dev/null
      +++ b/src/test/java/it/polimi/ingsw/gamemodel/GoldCardTest.java
      @@ -0,0 +1,115 @@
      +package it.polimi.ingsw.gamemodel;
      +
      +import it.polimi.ingsw.utils.Pair;
      +import org.junit.Test;
      +
      +import java.util.Map;
      +import java.util.Set;
      +
      +import static org.junit.Assert.assertEquals;
      +import static org.junit.Assert.assertTrue;
      +
      +/**
      + * Unit test for class GoldCard.
      + */
      +public class GoldCardTest
      +{
      +    Board board;
      +    InitialCard initialCard;
      +    PlayableCard goldAutopoint;
      +    PlayableCard goldCovering;
      +    PlayableCard goldNoPoints;
      +    PlayableCard goldPositioning;
      +
      +    Pair<Integer, Integer> coordAutopoint;
      +    Pair<Integer, Integer> coordCovering;
      +    Pair<Integer, Integer> coordNoPoints;
      +    Pair<Integer, Integer> coordPositioning;
      +
      +    /**
      +    * Unit test for method calculatePoints.
      +    */
      +    public GoldCardTest(){
      +        board = new Board(); // created empty board
      +
      +        try{
      +            // map of symbols for the center of the card
      +            Map<Symbol, Integer> mapGoldAutopoint = Map.of(Symbol.PLANT, 1);
      +            Map<Symbol, Integer> mapGoldCovering = Map.of(Symbol.INKWELL, 1);
      +            Map<Symbol, Integer> mapGoldNoPoints_Positioning = Map.of(Symbol.FUNGUS, 1);
      +
      +            // coordinates for each card to be placed
      +            coordAutopoint = new Pair<Integer,Integer>(1, -1);
      +            coordCovering = new Pair<Integer,Integer>(2, -2);
      +            coordNoPoints = new Pair<Integer,Integer>(1, 1);
      +            coordPositioning = new Pair<Integer,Integer>(2, 0);
      +
      +            // creation of the cards
      +            initialCard = new InitialCard(
      +                    new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.PLANT, Set.of(Symbol.FUNGUS)),
      +                    new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.PLANT, Set.of(Symbol.FUNGUS))
      +            );
      +
      +            goldAutopoint = new GoldCard(
      +                    new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.INKWELL, Set.of(Symbol.INSECT)),
      +                    Symbol.INSECT, Symbol.INKWELL, 1, new QuantityRequirement(mapGoldAutopoint)
      +            );
      +
      +            goldCovering = new GoldCard(
      +                    new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of(Symbol.INSECT)),
      +                    Symbol.INSECT, Symbol.INKWELL, 2, new QuantityRequirement(mapGoldCovering)
      +            );
      +
      +            goldNoPoints = new GoldCard(
      +                    new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of(Symbol.INSECT)),
      +                    Symbol.INSECT, Symbol.ANIMAL, 3, new QuantityRequirement(mapGoldNoPoints_Positioning)
      +            );
      +
      +            goldPositioning = new GoldCard(
      +                    new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of(Symbol.INSECT)),
      +                    Symbol.INSECT, Symbol.CORNER_OBJ, 2, new QuantityRequirement(mapGoldNoPoints_Positioning)
      +            );
      +
      +            // placement phase: initial card
      +            board.setInitialCard(initialCard, Side.FRONT);
      +
      +        } catch (Exception e) {
      +            System.err.println(e);
      +            assertTrue(false);
      +        }
      +    }
      +
      +    @Test
      +    public void verifyPointCalculation(){
      +        try{
      +            assertEquals(1, board.placeCard(coordAutopoint, goldAutopoint, Side.FRONT, 0));
      +            assertEquals(0, board.placeCard(coordCovering, goldCovering, Side.FRONT, 0));
      +            assertEquals(0, board.placeCard(coordNoPoints, goldNoPoints, Side.FRONT, 0));
      +            assertEquals(4, board.placeCard(coordPositioning, goldPositioning, Side.FRONT, 0));
      +        } catch (Exception e) {
      +            System.err.println(e);
      +            assertTrue(false);
      +        }
      +    }
      +
      +
      +/* info:
      +    // initial card has full corners, a plant in the bottom right and a fungus in the center, for both front and back
      +
      +    // goldAutopoint contains its multiplier on one corner
      +        // created gold card with full corners, an inkwell on the bottom right and an insect in the center of the back
      +        // 1 point, multiplier is inkwell, requires 1 plant
      +
      +    // goldCovering placement covers the only corner containing the multiplier
      +        // created gold card with full corners and an insect in the center of the back
      +        // 2 points, multiplier is inkwell, requires 1 inkwell
      +
      +    // goldNoPoints has no multipliers on board
      +        // created gold card with full corners and an insect in the center of the back
      +        // 2 points, multiplier is animal, requires 1 fungus
      +
      +    // goldPositioning covers 2 edges
      +        // created gold card with full corners and an insect in the center of the back
      +        // 2 points, multiplier is corner_object, requires 1 fungus
      +*/
      +}
      \ No newline at end of file
      diff --git a/src/test/java/it/polimi/ingsw/gamemodel/MatchTest.java b/src/test/java/it/polimi/ingsw/gamemodel/MatchTest.java
      new file mode 100644
      index 00000000..09536350
      --- /dev/null
      +++ b/src/test/java/it/polimi/ingsw/gamemodel/MatchTest.java
      @@ -0,0 +1,980 @@
      +package it.polimi.ingsw.gamemodel;
      +
      +import static org.junit.Assert.assertEquals;
      +import static org.junit.Assert.assertFalse;
      +import static org.junit.Assert.assertNotNull;
      +import static org.junit.Assert.assertTrue;
      +import static org.junit.Assert.fail;
      +import java.util.*;
      +import javax.management.RuntimeErrorException;
      +import org.junit.Test;
      +import it.polimi.ingsw.exceptions.AlreadyUsedUsernameException;
      +import it.polimi.ingsw.exceptions.InvalidResourceException;
      +import it.polimi.ingsw.exceptions.WrongChoiceException;
      +import it.polimi.ingsw.exceptions.WrongStateException;
      +import it.polimi.ingsw.network.messages.Message;
      +import it.polimi.ingsw.network.messages.responses.MatchStartedMessage;
      +import it.polimi.ingsw.utils.MessageJsonParser;
      +import it.polimi.ingsw.utils.Pair;
      +
      +public class MatchTest {
      +
      +    private Match match;
      +    private Player player1, player2, player3, player4;
      +    private GameDeck<InitialCard> initialsDeck;
      +    private GameDeck<ResourceCard> resourcesDeck;
      +    private GameDeck<GoldCard> goldsDeck;
      +    private GameDeck<Objective> objectivesDeck;
      +
      +    @Test
      +    public void constructor() {
      +        player1 = new Player("Oingo", match);
      +        player2 = new Player("Boingo", match);
      +        player3 = new Player("Foingo", match);
      +        player4 = new Player("Francesco Edoardo Caracciolo", match);
      +
      +        // Verify that Match throws an exception when the initial cards deck has fewer
      +        // cards than the number of players (3 cards in this case, minus than 4
      +        // players in the match)
      +        initializeAllEqualDecks();
      +        initialsDeck = createInitialsDeck(3);
      +
      +        try {
      +            match = new Match(4, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +            // An exception is supposed to be thrown here
      +            fail("Match constructor: Exception about initials deck not thrown");
      +        } catch (IllegalArgumentException e) {}
      +
      +        // Verify that Match throws an exception when the gold cards deck has less
      +        // than 9 cards
      +        initializeAllEqualDecks();
      +        goldsDeck = createGoldsDeck(5);
      +
      +        try {
      +            match = new Match(4, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +            // An exception is supposed to be thrown here
      +            fail("Match constructor: Exception about golds deck not thrown");
      +        } catch (IllegalArgumentException e) {}
      +
      +        // Verify that Match throws an exception when the initial cards deck has less
      +        // than 10 cards
      +        initializeAllEqualDecks();
      +        resourcesDeck = createResourcesDeck(9);
      +
      +        try {
      +            match = new Match(4, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +            // An exception is supposed to be thrown here
      +            fail("Match constructor: Exception about resources deck not thrown");
      +        } catch (IllegalArgumentException e) {}
      +
      +        // Verify that Match throws an exception when the number of players is more or
      +        // less than expected
      +        initializeAllEqualDecks();
      +        objectivesDeck = createObjectivesDeck(5);
      +
      +        try {
      +            match = new Match(1, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +            // An exception is supposed to be thrown here
      +            fail("Match constructor: Exception about players not thrown");
      +        } catch (IllegalArgumentException e) {}
      +    }
      +
      +    @Test
      +    public void addPlayer() {
      +        initializeAllEqualDecks();
      +
      +        player1 = new Player("Oingo", match);
      +        player2 = new Player("Boingo", match);
      +        player3 = new Player("Miozio", match);
      +
      +        match = new Match(2, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +
      +        // Verify that Match throws an exception when a plyer is added while the match
      +        // is in a state which is not valid (i.e. not equal to WaitState)
      +        try {
      +            match.setState(new AfterMoveState(match));
      +            match.addPlayer(player1);
      +            // An exception is supposed to be thrown here
      +            fail("Exception about wrong state not thrown ");
      +        }
      +        catch (WrongStateException e) {}
      +        catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        match = new Match(2, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +
      +        // Verify that all players are correctly added
      +        try {
      +            match.addPlayer(player1);
      +            match.addPlayer(player2);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        assertTrue("1st player not added", match.getPlayers().contains(player1));
      +        assertTrue("2nd player not added", match.getPlayers().contains(player2));
      +
      +        // Verify that Match throws an exception when a player already in the match
      +        // is added again
      +        try {
      +            match.addPlayer(player1);
      +            // An exception is supposed to be thrown here
      +            fail("Exception about duplicated player not thrown");
      +        }
      +        catch (AlreadyUsedUsernameException e) {}
      +        catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        // Verify that Match throws an exception when a player is added even if the
      +        // math is full
      +        try {
      +            match.addPlayer(player3);
      +            // An exception is supposed to be thrown here
      +            fail("Exception about too many players not thrown");
      +        }
      +        catch (WrongStateException e) {}
      +        catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +    }
      +
      +    @Test
      +    public void nextPlayer() {
      +        initializeAllEqualDecks();
      +
      +        player1 = new Player("Oingo", match);
      +        player2 = new Player("Boingo", match);
      +        player3 = new Player("Miozio", match);
      +
      +        match = new Match(3, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +
      +        try {
      +            match.addPlayer(player1);
      +            match.addPlayer(player2);
      +            // a third player is not added, otherwise Match would be full and go to NextTurnState, then call nextTurn
      +            // automatically
      +        } catch (WrongStateException|AlreadyUsedUsernameException e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        // Verify that match sets the current player as the first in the players List
      +        match.nextPlayer();
      +        assertEquals("Current player not equal to 1st player", match.getCurrentPlayer(), match.getPlayers().get(0));
      +
      +        // Verify that match switches to the next player in the List, the 2nd
      +        match.nextPlayer();
      +        assertEquals("Current player not equal to 2st player", match.getCurrentPlayer(), match.getPlayers().get(1));
      +
      +        // Verify that match switches to the next player in the list, back to the 1st
      +        match.nextPlayer();
      +        assertEquals("Current player not equal to 1st player again", match.getCurrentPlayer(), match.getPlayers().get(0));
      +    }
      +
      +    @Test
      +    public void removePlayer() {
      +        initializeAllEqualDecks();
      +
      +        match = new Match(4, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +
      +        player1 = new Player("Oingo", match);
      +        player2 = new Player("Boingo", match);
      +        player3 = new Player("Jotaro", match);
      +        player4 = new Player("Polnareff", match);
      +
      +        // Tests while Match is in WaitState: removePlayer can be called
      +        try {
      +            match.addPlayer(player1);
      +            match.addPlayer(player2);
      +
      +            // Verify that Match correctly removes a player
      +            match.removePlayer(player1);
      +            assertFalse("Player not removed", match.getPlayers().contains(player1));
      +
      +            // Match should now be full and switch to NextTurnState
      +            match.addPlayer(player1);
      +            match.addPlayer(player3);
      +            match.addPlayer(player4);
      +        } catch (Exception e) {
      +            fail("No exception must be thrown, exception thrown:" + e.getMessage());
      +        }
      +
      +        // Verify that Match is in the right state, that is NextTurnState
      +        assertTrue("Match not in correct state", match.getCurrentState() instanceof NextTurnState);
      +
      +        // Match is not in NextTurnState
      +        // Tests while Match is NOT in WaitState: removePlayer stops the match
      +        try {
      +            // Verify that Match throws an exception when the method is called while being in the wrong state
      +            match.removePlayer(player1);
      +            // An exception is supposed to be thrown here
      +        } catch (Exception e) {
      +            fail("Wrong exception: " + e.getMessage());
      +        }
      +        // Verify that Match, after a player quit in the wrong state, is in FinalState
      +        assertTrue("Match is not in FinalState even if a player quit in the wrong state", match.getCurrentState() instanceof FinalState);
      +
      +        match = new Match(4, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +
      +        // Verify that players with the same username can't join
      +        player1 = new Player("Doppio", match);
      +        player2 = new Player("Doppio", match);
      +        try {
      +            match.addPlayer(player1);
      +            match.addPlayer(player2);
      +            fail("AlreadyUsedUsernameException not thrown");
      +        } catch (AlreadyUsedUsernameException e) {
      +            // Good
      +        } catch (Exception e) {
      +            fail("Wrong exception returned: " + e);
      +        }
      +
      +    }
      +
      +    @Test
      +    public void drawInitialCard() {
      +        initializeBlankMatch(2);
      +
      +        InitialCard card = null;
      +
      +        try {
      +            card = match.drawInitialCard();
      +        } catch (WrongStateException e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        // Verify that Match draws the inital card
      +        assertNotNull(card);
      +
      +        // Verify that Match has gone to the next state
      +        assertTrue("State not changed after drawInitialCard", match.getCurrentState() instanceof ChooseInitialSideState);
      +
      +        // Verify that Match throws an exception when the method is called while being in the wrong state
      +        match.setState(new AfterMoveState(match));
      +
      +        try {
      +            match.drawInitialCard();
      +            // An exception is supposed to be thrown here
      +            fail("drawInitialCard called in wrong state and has not given an exception");
      +        } catch (WrongStateException e) {}
      +    }
      +
      +    @Test
      +    public void setInitialSide() {
      +        // Set up a basic game
      +        initializeBlankMatch(2);
      +
      +        // For each player in the match
      +        for (int i = 0; i < 2; i++) {
      +            Player current = match.getCurrentPlayer();
      +            Side side = Side.values()[i];
      +            InitialCard card = null;
      +
      +            try {
      +                card = current.drawInitialCard();
      +            } catch (Exception e) {
      +                throw new RuntimeException(e);
      +            }
      +
      +            // Verify that Match doesn't throw a WrongStateException if the current state is in the right state
      +            // i.e. ChooseInitialSideState
      +            try {
      +                match.setInitialSide(side, null);
      +            } catch (WrongStateException e) {
      +                fail("Exception thrown even if in ChooseInitialSideState" + e.getMessage());
      +            }
      +
      +            PlacedCard playedCard = current.getBoard().getPlacedCards().get(new Pair<>(0,0));
      +            Side playedSide = playedCard.getPlayedSide();
      +
      +            assertEquals("Side not applied correctly", playedSide, side);
      +            assertEquals("Wrong card played", card, playedCard.getCard());
      +            assertTrue("Wrong state after setInitialSide", match.getCurrentState() instanceof NextTurnState);
      +        }
      +
      +    }
      +
      +    @Test
      +    public void proposeSecretObjectives() {
      +        // Initialize a match
      +        initializeBlankMatch(2);
      +
      +        // Setup Match so that, in the end, should be in NextTurnState and ready to go to ChooseSecretObjectiveState
      +        try {
      +            for (int i = 0; i < 2; i++) {
      +                match.getCurrentPlayer().drawInitialCard();
      +                match.getCurrentPlayer().chooseInitialCardSide(Side.FRONT);
      +            }
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        // Start actual testing
      +        // For each player in the match
      +        for (int i = 0; i < 2; i++) {
      +            try {
      +                // Should trigger match state transition to ChooseSecretObjectiveState
      +                Pair<Objective, Objective> obj = match.proposeSecretObjectives();
      +
      +                assertNotNull(obj);
      +                assertNotNull(obj.first());
      +                assertNotNull(obj.second());
      +                assertTrue("State change has not happened", match.getCurrentState() instanceof ChooseSecretObjectiveState);
      +
      +                // Trigger match state transition to NextTurnState
      +                match.setSecretObjective(obj.first());
      +            } catch (Exception e) {
      +                fail("Exception should not have been thrown " + e.getMessage());
      +            }
      +        }
      +
      +        // Match should now be in AfterMoveState
      +        try {
      +            match.proposeSecretObjectives();
      +            // An exception is supposed to be thrown here
      +            fail("Exception not thrown when called in the wrong state");
      +        } catch (WrongStateException e) {}
      +    }
      +
      +    @Test
      +    public void setSecretObjective() {
      +        initializeBlankMatch(2);
      +        try {
      +            for (int i = 0; i < 2; i++) {
      +                match.getCurrentPlayer().drawInitialCard();
      +                match.getCurrentPlayer().chooseInitialCardSide(Side.FRONT);
      +            }
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +        // Start actual testing
      +        // Call in wrong state
      +        try {
      +            match.setSecretObjective(generateRandomObjective());
      +            fail("setSecretObjective has not thrown a wrong state exception");
      +        } catch (WrongStateException e) {
      +            assertTrue("Exception thrown correctly", true);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        for (int i = 0; i < 2; i++) {
      +            Pair<Objective, Objective> obj = null;
      +            try {
      +                obj = match.proposeSecretObjectives();
      +            } catch (Exception e) {
      +                throw new RuntimeException(e);
      +            }
      +            // Test setting the objective to a non given one
      +            try {
      +                match.setSecretObjective(generateRandomObjective());
      +                fail("Should have thrown a WrongChoiceException");
      +            } catch (WrongChoiceException e) {
      +                // Good
      +            } catch (Exception e) {
      +                throw new RuntimeException(e);
      +            }
      +            // Test the correct behavoir
      +            try {
      +                int size = objectivesDeck.getSize();
      +                match.setSecretObjective(obj.first());
      +                assertEquals("The card has not been put back in the deck",objectivesDeck.getSize(), size+1);
      +            } catch (Exception e) {
      +                fail("An exception should not have been thrown" + e.getMessage());
      +            }
      +        }
      +    }
      +
      +    @Test
      +    public void makeMove() {
      +        initializeBlankStartedMatch(2);
      +
      +        // Try placing a card in the wrong coordinates
      +        try {
      +            match.makeMove(new Pair<>(1, 4), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.FRONT);
      +            fail("Should have thrown a WrongChoiceException");
      +        } catch (WrongChoiceException e) {
      +            // Good
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        // Try placing that is not in the player hand
      +        try {
      +            match.makeMove(new Pair<>(1, 1), generateRandomResourceCard(), Side.FRONT);
      +            fail("Should have thrown WrongChoiceException");
      +        } catch (WrongChoiceException e) {
      +            // Good
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +        // Try placing a card that the user does not enough resources to
      +        PlayableCard card = match.getCurrentPlayer().getBoard().getCurrentHand().get(0);
      +        try {
      +            match.makeMove(new Pair<>(1, 1), card, Side.FRONT);
      +            fail("Card placed even though there were not enough resources available");
      +        } catch (Exception e) {
      +            // Good
      +        }
      +
      +        // Try placing the card in the right position
      +        card = match.getCurrentPlayer().getBoard().getCurrentHand().get(1);
      +        // Note: now user has 2 Fungus
      +
      +        try {
      +            match.makeMove(new Pair<>(1, 1), card, Side.BACK);
      +        } catch (Exception e) {
      +            fail("Exception thrown when no exception expected" + e.getMessage());
      +        }
      +
      +        assertEquals("Card not placed", card, match.getCurrentPlayer().getBoard().getPlacedCards().get(new Pair<>(1,1)).getCard());
      +        assertEquals("Card not removed from hand", 2, match.getCurrentPlayer().getBoard().getCurrentHand().size());
      +        assertTrue("State not changed after makeMove", match.getCurrentState() instanceof AfterMoveState);
      +
      +        // Make the game go on
      +        try {
      +            match.getCurrentPlayer().drawCard(DrawSource.RESOURCES_DECK);
      +            match.makeMove(new Pair<>(1,1), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +            match.getCurrentPlayer().drawCard(DrawSource.RESOURCES_DECK);
      +        } catch (Exception e) {
      +            fail(match.getCurrentState().getClass().getSimpleName());
      +            throw new RuntimeException(e);
      +        }
      +        // Test placing a gold card with enough resources, should not fail
      +        PlayableCard card2 = match.getCurrentPlayer().getBoard().getCurrentHand().get(0);
      +        try {
      +            Player curr = match.getCurrentPlayer();
      +            int oldplayerpoints = curr.getPoints();
      +            match.makeMove(new Pair<>(2,2), card2, Side.FRONT);
      +            assertEquals(oldplayerpoints + card2.points, match.getCurrentPlayer().getPoints());
      +        } catch (Exception e) {
      +            fail("No exception should be thrown: " + e.getMessage());
      +        }
      +    }
      +
      +    @Test
      +    public void drawCard() {
      +        initializeBlankStartedMatch(2, 2, 10, 9, 7);
      +
      +        // Try drawing card in the wrong state
      +        try {
      +            match.drawCard(DrawSource.FIRST_VISIBLE);
      +            // An exception is supposed to be thrown here
      +            fail("Should have thrown WrongStateException");
      +        }
      +        catch (WrongStateException e) {}
      +        catch (Exception e) {
      +            fail("Wrong exception launched: " + e.getMessage());
      +        }
      +        assertEquals(3, goldsDeck.getSize());
      +        assertEquals(3, resourcesDeck.getSize());
      +        // NOTE: at this point of the game
      +        // resourcesDeck: 3 card goldsDeck: 3 cards
      +        // Try drawing a card from FIRST_VISIBLE
      +        // Draw from every source
      +        DrawSource[] sources = DrawSource.values();
      +        int j = 1;
      +        for (int i = 0; i < 6; i++) {
      +            try {
      +                Player p = match.getCurrentPlayer();
      +
      +                p.playCard(new Pair<>(j, j), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                // Increment indexes for the next player
      +                if (match.getPlayers().getLast().equals(match.getCurrentPlayer())) j++;
      +                PlayableCard card = match.drawCard(sources[i]);
      +                p.getBoard().addHandCard(card);
      +                assertNotNull(card);
      +                // Check right replacement
      +                if (i == 0) {
      +                    assertTrue("Wrong state reached after draw", match.getCurrentState() instanceof NextTurnState);
      +                    assertEquals(2, goldsDeck.getSize());
      +                } else if (i == 1) {
      +                    assertTrue("Wrong state reached after draw", match.getCurrentState() instanceof NextTurnState);
      +                    assertEquals(2, resourcesDeck.getSize());
      +                } else if (i <= 3) {
      +                    assertTrue("Wrong state reached after draw", match.getCurrentState() instanceof NextTurnState);
      +                    assertTrue("Wrong card placed", match.getVisiblePlayableCards().get(sources[i]) instanceof GoldCard);
      +                } else {
      +                    if (i == 4) {
      +                        assertTrue("Wrong state reached after draw", match.getCurrentState() instanceof NextTurnState);
      +                    } else {
      +                        assertTrue("Wrong state reached after draw", match.getCurrentState() instanceof FinalState);
      +                    }
      +                    assertTrue("Wrong card placed", match.getVisiblePlayableCards().get(sources[i]) instanceof ResourceCard);
      +                }
      +            } catch (Exception e) {
      +                fail("Should not have launched an exception: " + e.getMessage());
      +            }
      +        }
      +        // Check the state
      +        // Now all the decks should be empty and the match should be finished
      +        assertEquals(0, goldsDeck.getSize());
      +        assertEquals(0, resourcesDeck.getSize());
      +        assertTrue(match.isFinished());
      +
      +        // Try drawing from an empty deck
      +        initializeBlankStartedMatch(2, 2, 10, 6, 4);
      +        j=1;
      +        assertFalse(match.isFinished());
      +        // Draw from the two empty decks
      +        for (int i = 0; i < 2; i++) {
      +            try {
      +                match.getCurrentPlayer().playCard(new Pair<>(j, j), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                match.drawCard(sources[i]);
      +            } catch (WrongChoiceException e) {
      +                // Go on with the state, correct exception launched
      +                try {
      +                    match.drawCard(sources[i + 2]);
      +                } catch (Exception e2) {
      +                    throw new RuntimeException(e2);
      +                }
      +            } catch (Exception e) {
      +                fail("Wrong exception launched: " + e.getMessage() + " " + match.getCurrentState().getClass().getSimpleName());
      +            }
      +        }
      +        assertTrue(match.isFinished());
      +    }
      +
      +    @Test
      +    public void decideWinners() {
      +        // Note: match and because of deck end has already been tested
      +        // in drawCard testing
      +        // Create a match where both players win
      +        initializeBlankStartedMatch(2, 2, 10, 9, 7);
      +        // The objectives used as a test give
      +        // two points for every two fungus
      +        Integer i = 1;
      +        // For every move, a fungus is placed, the index is the number of fungus a player has
      +        while (!match.isFinished()) {
      +            try {
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                match.getCurrentPlayer().drawCard(decideDrawSource());
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                match.getCurrentPlayer().drawCard(decideDrawSource());
      +            } catch (Exception e) {
      +                throw new RuntimeException(e);
      +            }
      +            i++;
      +        }
      +        int pair_i = i%2==0 ? i :  i-1;
      +        // Since there are three objectives,
      +        // the expected number of points from each player is
      +        // pair_i * 3
      +        for (Player p : match.getPlayers()) {
      +            assertEquals(i, p.getBoard().getAvailableResources().get(Symbol.FUNGUS));
      +            assertEquals("Wrong points given to players",pair_i * 3, p.getPoints());
      +        }
      +        // Check if the ranking is right
      +        List<Pair<Player, Boolean>> ranking = match.getPlayersFinalRanking();
      +        assertTrue("Player is not marked as winner", ranking.get(0).second());
      +        assertTrue("Player is not marked as winner", ranking.get(1).second());
      +        // Create a match where only one player wins
      +        initializeBlankMatch(2, 2, 6, 9, 7);
      +        try {
      +            // Finish initials card turn
      +            match.getCurrentPlayer().drawInitialCard();
      +            match.getCurrentPlayer().chooseInitialCardSide(Side.FRONT);
      +            match.getCurrentPlayer().drawInitialCard();
      +            match.getCurrentPlayer().chooseInitialCardSide(Side.FRONT);
      +
      +            // Change objectives deck
      +            Objective[] normalObjectives = {objectivesDeck.poll(), objectivesDeck.poll()};
      +            while (!objectivesDeck.isEmpty()) objectivesDeck.poll();
      +            HashMap<Symbol, Integer> impossibleRequirement = new HashMap<>();
      +            impossibleRequirement.put(Symbol.ANIMAL, 900000);
      +            Objective impossible = new Objective(0, new QuantityRequirement(impossibleRequirement));
      +            objectivesDeck.add(impossible);
      +            objectivesDeck.add(normalObjectives[0]);
      +            objectivesDeck.add(normalObjectives[1]);
      +
      +            // Let players "choose" their objectives
      +            match.getCurrentPlayer().drawSecretObjectives();
      +            match.getCurrentPlayer().chooseSecretObjective(impossible);
      +            match.getCurrentPlayer().drawSecretObjectives();
      +            match.getCurrentPlayer().chooseSecretObjective(normalObjectives[1]);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        i = 1;
      +        // For every move, a fungus is placed, the index is the number of fungus a player has
      +        while (!match.isFinished()) {
      +            try {
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                match.getCurrentPlayer().drawCard(decideDrawSource());
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                match.getCurrentPlayer().drawCard(decideDrawSource());
      +            } catch (Exception e) {
      +                throw new RuntimeException(e);
      +            }
      +            i++;
      +        }
      +        player1 = match.getPlayers().get(0);
      +        player2 = match.getPlayers().get(1);
      +        assertEquals("Wrong points given to players",pair_i * 3, player2.getPoints());
      +        // player 1 has only two objectives
      +        assertEquals("Wrong points given to players",pair_i * 2, player1.getPoints());
      +        // Check if the ranking is right
      +        ranking = match.getPlayersFinalRanking();
      +        // Player 2 wins, player 1 lost
      +        assertEquals(player2, ranking.get(0).first());
      +        assertEquals(player1, ranking.get(1).first());
      +        assertTrue("Player is not marked as winner", ranking.get(0).second());
      +        assertFalse("Player is marked as winner", ranking.get(1).second());
      +
      +        // This variable is useful for next test
      +        int pointDifference = player2.getPoints() - player1.getPoints();
      +        // Test that the winner is choosen correctly when
      +        // they have the same amount of points but different amount of objectives
      +
      +
      +        // Same as before...
      +        initializeBlankMatch(2, 2, 6, 9, 7);
      +        player1 = match.getPlayers().get(0);
      +        player2 = match.getPlayers().get(1);
      +        try {
      +            // Finish initials card turn
      +            match.getCurrentPlayer().drawInitialCard();
      +            match.getCurrentPlayer().chooseInitialCardSide(Side.FRONT);
      +            match.getCurrentPlayer().drawInitialCard();
      +            match.getCurrentPlayer().chooseInitialCardSide(Side.FRONT);
      +
      +            // Change objectives deck
      +            Objective[] normalObjectives = {objectivesDeck.poll(), objectivesDeck.poll()};
      +            while (!objectivesDeck.isEmpty()) objectivesDeck.poll();
      +            HashMap<Symbol, Integer> impossibleRequirement = new HashMap<>();
      +            impossibleRequirement.put(Symbol.ANIMAL, 900000);
      +            Objective impossible = new Objective(0, new QuantityRequirement(impossibleRequirement));
      +            objectivesDeck.add(impossible);
      +            objectivesDeck.add(normalObjectives[0]);
      +            objectivesDeck.add(normalObjectives[1]);
      +
      +            // Let players "choose" their objectives
      +            match.getCurrentPlayer().drawSecretObjectives();
      +            match.getCurrentPlayer().chooseSecretObjective(impossible);
      +            match.getCurrentPlayer().drawSecretObjectives();
      +            match.getCurrentPlayer().chooseSecretObjective(normalObjectives[1]);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        i = 1;
      +        // For every move, a fungus is placed, the index is the number of fungus a player has
      +        // Let's add a cheat gold card to player1 hand
      +        GoldCard cheatCard = null;
      +        HashMap<Symbol, Integer> noreq = new HashMap<>();
      +        noreq.put(Symbol.FUNGUS, 1);
      +        try {
      +            player1.getBoard().removeHandCard(player1.getBoard().getCurrentHand().get(1));
      +            cheatCard = new GoldCard(
      +                    new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FUNGUS, Symbol.FULL_CORNER, Collections.emptySet()),
      +                    Symbol.FUNGUS,
      +                    Symbol.NO_MULT,
      +                    pointDifference,
      +                    new QuantityRequirement(noreq)
      +            );
      +            player1.getBoard().addHandCard(cheatCard);
      +        } catch (Exception e) {
      +            throw new RuntimeException(e);
      +        }
      +
      +        // Simulate the match
      +        if (match.getCurrentPlayer().equals(player1)) {
      +            try {
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(2), Side.FRONT);
      +                match.getCurrentPlayer().drawCard(decideDrawSource());
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                match.getCurrentPlayer().drawCard(decideDrawSource());
      +            } catch (Exception e) {
      +                throw new RuntimeException(e);
      +            }
      +            i++;
      +        } else {
      +            try {
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                match.getCurrentPlayer().drawCard(decideDrawSource());
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(2), Side.FRONT);
      +                match.getCurrentPlayer().drawCard(decideDrawSource());
      +            } catch (Exception e) {
      +                throw new RuntimeException(e);
      +            }
      +            i++;
      +        }
      +        player1.getPoints();
      +        player2.getPoints();
      +        while (!match.isFinished()) {
      +            try {
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                match.getCurrentPlayer().drawCard(decideDrawSource());
      +                match.getCurrentPlayer().playCard(new Pair<>(i, i), match.getCurrentPlayer().getBoard().getCurrentHand().get(1), Side.BACK);
      +                match.getCurrentPlayer().drawCard(decideDrawSource());
      +            } catch (Exception e) {
      +                throw new RuntimeException(e);
      +            }
      +            i++;
      +        }
      +        // Check that the players have the same amount of points
      +        assertEquals(player1.getPoints(), player2.getPoints());
      +        // Check if the ranking is right
      +        ranking = match.getPlayersFinalRanking();
      +        // Player 2 wins, player 1 lost
      +        assertEquals(player2, ranking.get(0).first());
      +        assertEquals(player1, ranking.get(1).first());
      +        assertTrue("Player is not marked as winner", ranking.get(0).second());
      +        assertFalse("Player is marked as winner", ranking.get(1).second());
      +        MessageJsonParser parser = new MessageJsonParser();
      +    }
      +
      +    @Test
      +    public void generateJson() {
      +        initializeBlankStartedMatch(3);
      +        Message m = new MatchStartedMessage(match.getVisibleObjectives(), match.getVisiblePlayableCards(), match.getDecksTopReigns(), match.getPlayers());
      +        MessageJsonParser parser = new MessageJsonParser();
      +        System.out.println(parser.toJson(m));
      +    }
      +    // Private helper Methods
      +    private DrawSource decideDrawSource() {
      +        Map<DrawSource, PlayableCard> visible = match.getVisiblePlayableCards();
      +        if (!resourcesDeck.isEmpty()) {
      +            return DrawSource.RESOURCES_DECK;
      +        } else if (!goldsDeck.isEmpty()) {
      +            return DrawSource.GOLDS_DECK;
      +        } else {
      +            DrawSource[] values = DrawSource.values();
      +            for (int i=2; i < 6; i++) {
      +                if (visible.get(values[i]) != null) {
      +                    return values[i];
      +                }
      +            }
      +        }
      +        return null;
      +    }
      +
      +    private void initializeAllEqualDecks() {
      +        // Initialize Initial Cards deck
      +        initializeAllEqualDecks(4, 10, 40, 40);
      +    }
      +
      +    private void initializeAllEqualDecks(int initialsNum, int objectsNum, int resourcesNum, int goldsNum) {
      +        initialsDeck = createDeterministicInitialsDeck(initialsNum);
      +        objectivesDeck = createDeterministicObjectivesDeck(objectsNum);
      +        goldsDeck = createDeterministicGoldsDeck(goldsNum);
      +        resourcesDeck = createDeterministicResourcesDeck(resourcesNum);
      +    }
      +
      +    public static GameDeck<Objective> createDeterministicObjectivesDeck(int size) {
      +        // Initialize Objective deck
      +        GameDeck<Objective> objectivesDeck = new GameDeck<>();
      +        Objective objective = null;
      +        HashMap<Symbol, Integer> resources = new HashMap<>();
      +        resources.put(Symbol.FUNGUS, 2);
      +        Requirement req;
      +        try {
      +            req = new QuantityRequirement(resources);
      +        } catch (Exception e) {
      +            throw new RuntimeException();
      +        }
      +        for (int i = 0; i < size; i++) {
      +            objective = new Objective(2, req);
      +            objectivesDeck.add(objective);
      +        }
      +        return objectivesDeck;
      +    }
      +
      +    public static GameDeck<InitialCard> createDeterministicInitialsDeck(int size) {
      +        // Initialize Initial Cards deck
      +        GameDeck<InitialCard> initialsDeck = new GameDeck<InitialCard>();
      +        InitialCard card = null;
      +        for (int i = 0; i < size; i++) {
      +            card = new InitialCard(
      +                    new CardFace(Symbol.FUNGUS, Symbol.ANIMAL, Symbol.PLANT, Symbol.INSECT, Collections.emptySet()),
      +                    new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER,
      +                            Collections.emptySet()));
      +            initialsDeck.add(card);
      +        }
      +        return initialsDeck;
      +    }
      +
      +    public static GameDeck<ResourceCard> createDeterministicResourcesDeck(int size) {
      +        GameDeck<ResourceCard> resourcesDeck = new GameDeck<>();
      +        ResourceCard card = null;
      +        for (int i = 0; i < size; i++) {
      +            try {
      +                card = new ResourceCard(
      +                        new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER,
      +                                Collections.emptySet()),
      +                        Symbol.FUNGUS, 0);
      +                resourcesDeck.add(card);
      +            } catch (Exception e) {
      +                throw new RuntimeException();
      +            }
      +        }
      +        return resourcesDeck;
      +    }
      +
      +    public static GameDeck<GoldCard> createDeterministicGoldsDeck(int size) {
      +        GameDeck<GoldCard> goldsDeck = new GameDeck<>();
      +        GoldCard card = null;
      +        HashMap<Symbol, Integer> resources = new HashMap<>();
      +        resources.put(Symbol.FUNGUS, 2);
      +        for (int i = 0; i < size; i++) {
      +            try {
      +                card = new GoldCard(new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.EMPTY_CORNER,
      +                        Symbol.FULL_CORNER, Collections.emptySet()), Symbol.FUNGUS, Symbol.NO_MULT, 3,
      +                        new QuantityRequirement(resources));
      +                goldsDeck.add(card);
      +            } catch (Exception e) {
      +                throw new RuntimeErrorException(null);
      +            }
      +        }
      +        return goldsDeck;
      +    }
      +
      +    private GameDeck<Objective> createObjectivesDeck(int size) {
      +        GameDeck<Objective> objectivesDeck = new GameDeck<Objective>();
      +        for (int i = 0; i < size; i++) {
      +            objectivesDeck.add(generateRandomObjective());
      +        }
      +        return objectivesDeck;
      +    }
      +
      +    private GameDeck<ResourceCard> createResourcesDeck(int size) {
      +        GameDeck<ResourceCard> resourcesDeck = new GameDeck<ResourceCard>();
      +        for (int i = 0; i < size; i++) {
      +            resourcesDeck.add(generateRandomResourceCard());
      +        }
      +        return resourcesDeck;
      +    }
      +
      +    private GameDeck<GoldCard> createGoldsDeck(int size) {
      +        GameDeck<GoldCard> goldsDeck = new GameDeck<GoldCard>();
      +        for (int i = 0; i < size; i++) {
      +            goldsDeck.add(generateRandomGoldCard());
      +        }
      +        return goldsDeck;
      +    }
      +
      +    private GameDeck<InitialCard> createInitialsDeck(int size) {
      +        GameDeck<InitialCard> initialsDeck = new GameDeck<InitialCard>();
      +        for (int i = 0; i < size; i++) {
      +            initialsDeck.add(generateRandomInitialCard());
      +        }
      +        return initialsDeck;
      +    }
      +
      +    protected static ResourceCard generateRandomResourceCard() {
      +        EnumSet<Symbol> reigns = Symbol.getReigns();
      +        EnumSet<Symbol> corners = Symbol.getValidCorner();
      +        try {
      +            return new ResourceCard(
      +                    new CardFace(randomSymbol(corners), randomSymbol(corners), randomSymbol(corners),
      +                            randomSymbol(corners), Collections.emptySet()),
      +                    randomSymbol(reigns),
      +                    (int) Math.random() * 2);
      +        } catch (InvalidResourceException e) {
      +            throw new RuntimeException();
      +        }
      +    }
      +
      +    protected static GoldCard generateRandomGoldCard() {
      +        EnumSet<Symbol> reigns = Symbol.getReigns();
      +        EnumSet<Symbol> corners = Symbol.getValidCorner();
      +        EnumSet<Symbol> multipliers = Symbol.getValidMultiplier();
      +        EnumSet<Symbol> resources = Symbol.getBasicResources();
      +        try {
      +            return new GoldCard(
      +                    new CardFace(randomSymbol(corners), randomSymbol(corners), randomSymbol(corners),
      +                            randomSymbol(corners),
      +                            Collections.emptySet()),
      +                    randomSymbol(reigns),
      +                    randomSymbol(multipliers),
      +                    (int) Math.random() * 2,
      +                    new QuantityRequirement(Map.of(randomSymbol(resources), 1)));
      +        } catch (InvalidResourceException e) {
      +            throw new RuntimeException();
      +        }
      +    }
      +
      +    public static InitialCard generateRandomInitialCard() {
      +        EnumSet<Symbol> reigns = Symbol.getReigns();
      +        // Generate a random number between 0 and 3
      +        int index = (int) (Math.random() * 3);
      +
      +        return new InitialCard(
      +                new CardFace(randomSymbol(reigns), randomSymbol(reigns), randomSymbol(reigns), randomSymbol(reigns),
      +                        Set.of(randomSymbol(reigns))),
      +                new CardFace(randomSymbol(reigns), randomSymbol(reigns), randomSymbol(reigns), randomSymbol(reigns),
      +                        Set.of(randomSymbol(reigns))));
      +    }
      +
      +    public static Objective generateRandomObjective() {
      +        EnumSet<Symbol> resources = Symbol.getBasicResources();
      +        try {
      +            return new Objective((int) (Math.random() * 2),
      +                    new QuantityRequirement(Map.of(randomSymbol(resources), 3)));
      +        } catch (InvalidResourceException e) {
      +            throw new RuntimeErrorException(null);
      +        }
      +    }
      +
      +    public static Symbol randomSymbol(EnumSet<Symbol> validSymbols) {
      +        int size = validSymbols.size();
      +        // Generate a random number between 0 and 3
      +        int index = (int) (Math.random() * size);
      +        int i = 0;
      +        for (Symbol element : validSymbols) {
      +            if (i == index) {
      +                return element;
      +            }
      +            i++;
      +        }
      +        return null;
      +    }
      +
      +    private void initializeBlankMatch(int maxPlayers, int initialsNum, int objectivesNum, int resourcesNum, int goldsNum) {
      +        // Set up a basic game
      +        String names[] = {"Oingo", "Boingo", "Jotaro", "Polnareff"};
      +        Player players[] = new Player[4];
      +
      +        initializeAllEqualDecks(initialsNum, objectivesNum, resourcesNum, goldsNum);
      +
      +        match = new Match(maxPlayers, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +
      +        for (int i = 0; i < maxPlayers; i++) {
      +            players[i] = new Player(names[i], match);
      +            try {
      +                match.addPlayer(players[i]);
      +            } catch (Exception e) {
      +                throw new RuntimeException(e);
      +            }
      +        }
      +    }
      +
      +    private void initializeBlankMatch(int maxPlayers) {
      +        initializeBlankMatch(maxPlayers, 4, 10, 40, 40);
      +    }
      +
      +    private void initializeBlankStartedMatch(int maxPlayers, int initialsNum, int objectivesNum, int resourcesNum, int goldsNum) {
      +        // Set up a basic game
      +        initializeBlankMatch(maxPlayers, initialsNum, objectivesNum, resourcesNum, goldsNum);
      +
      +        try {
      +            for (int i = 0; i < maxPlayers; i++) {
      +                match.getCurrentPlayer().drawInitialCard();
      +                match.getCurrentPlayer().chooseInitialCardSide(Side.FRONT);
      +            }
      +
      +            for (int i = 0; i < maxPlayers; i++) {
      +                Pair<Objective, Objective> obj = match.getCurrentPlayer().drawSecretObjectives();
      +                match.getCurrentPlayer().chooseSecretObjective(obj.first());
      +            }
      +        } catch (Exception e) {
      +                throw new RuntimeException(e);
      +        }
      +    }
      +
      +    private void initializeBlankStartedMatch(int maxPlayers) {
      +        initializeBlankStartedMatch(maxPlayers, 4, 10, 40, 40);
      +    }
      +}
      diff --git a/src/test/java/it/polimi/ingsw/gamemodel/PlayerTest.java b/src/test/java/it/polimi/ingsw/gamemodel/PlayerTest.java
      new file mode 100644
      index 00000000..9065825d
      --- /dev/null
      +++ b/src/test/java/it/polimi/ingsw/gamemodel/PlayerTest.java
      @@ -0,0 +1,111 @@
      +//package it.polimi.ingsw.gamemodel;
      +//
      +//import it.polimi.ingsw.exceptions.AlreadyUsedUsernameException;
      +//import it.polimi.ingsw.exceptions.WrongStateException;
      +//import it.polimi.ingsw.exceptions.WrongTurnException;
      +//import it.polimi.ingsw.utils.Pair;
      +//import org.junit.Test;
      +//import static org.junit.Assert.fail;
      +//
      +//public class PlayerTest {
      +//    // No Player method is specifically tested since the only actual action carried out by all of them is to check
      +//    // if the calling player instance corresponds to the match current player (this == match.currentPlayer()) and,
      +//    // if so, call a corresponding method of Match and/or of Board (e.g. Player.chooseInitialCardSide() just calls
      +//    // Match.setInitialSide()); if the player doesn't correspond to the match current player, a WrongTurnException
      +//    // is thrown: this occurrence is tested
      +//
      +//    @Test
      +//    public void notCurrentPlayer() {
      +//        GameDeck<GoldCard> goldsDeck = MatchTest.createDeterministicGoldsDeck(40);
      +//        GameDeck<ResourceCard> resourcesDeck = MatchTest.createDeterministicResourcesDeck(40);
      +//        GameDeck<Objective> objectivesDeck = MatchTest.createDeterministicObjectivesDeck(10);
      +//        GameDeck<InitialCard> initialsDeck = MatchTest.createDeterministicInitialsDeck(10);
      +//
      +//        Match match = new Match(4, initialsDeck, resourcesDeck, goldsDeck, objectivesDeck);
      +//
      +//        Player player1 = new Player("A", match);
      +//        Player player2 = new Player("B", match);
      +//        Player player3 = new Player("C", match);
      +//        Player player4 = new Player("D", match);
      +//
      +//        try {
      +//            match.addPlayer(player1);
      +//            match.addPlayer(player2);
      +//            match.addPlayer(player3);
      +//            match.addPlayer(player4);
      +//        } catch (WrongStateException | AlreadyUsedUsernameException e) {
      +//            throw new RuntimeException(e);
      +//        }
      +//
      +//        PlayableCard card = MatchTest.generateRandomResourceCard();
      +//        Objective objective = MatchTest.generateRandomObjective();
      +//        Pair<Integer, Integer> pos = new Pair<>(1, 1);
      +//        Player NotCurrPlayer = match.getPlayers().get(1); // the current player is the one at 0th position
      +//
      +//        // Verify that drawInitialCard() throws a WrongTurnException when the caller is not the match current player
      +//        try {
      +//            NotCurrPlayer.drawInitialCard();
      +//            // An exception should be thrown here
      +//            fail("WrongTurnException wasn't thrown but should have been");
      +//        }
      +//        catch (WrongTurnException e) {}
      +//        catch (Exception e) {
      +//            throw new RuntimeException(e);
      +//        }
      +//
      +//        // Verify that chooseInitialCardSide() throws a WrongTurnException when the caller is not the match current player
      +//        try {
      +//            NotCurrPlayer.chooseInitialCardSide(Side.FRONT);
      +//            // An exception should be thrown here
      +//            fail("WrongTurnException wasn't thrown but should have been");
      +//        }
      +//        catch (WrongTurnException e) {}
      +//        catch (Exception e) {
      +//            throw new RuntimeException(e);
      +//        }
      +//
      +//        // Verify that drawSecretObjectives() throws a WrongTurnException when the caller is not the match current player
      +//        try {
      +//            NotCurrPlayer.drawSecretObjectives();
      +//            // An exception should be thrown here
      +//            fail("WrongTurnException wasn't thrown but should have been");
      +//        }
      +//        catch (WrongTurnException e) {}
      +//        catch (Exception e) {
      +//            throw new RuntimeException(e);
      +//        }
      +//
      +//        // Verify that chooseSecretObjective() throws a WrongTurnException when the caller is not the match current player
      +//        try {
      +//            NotCurrPlayer.chooseSecretObjective(objective);
      +//            // An exception should be thrown here
      +//            fail("WrongTurnException wasn't thrown but should have been");
      +//        }
      +//        catch (WrongTurnException e) {}
      +//        catch (Exception e) {
      +//            throw new RuntimeException(e);
      +//        }
      +//
      +//        // Verify that drawCard() throws a WrongTurnException when the caller is not the match current player
      +//        try {
      +//            NotCurrPlayer.drawCard(DrawSource.FIRST_VISIBLE);
      +//            // An exception should be thrown here
      +//            fail("WrongTurnException wasn't thrown but should have been");
      +//        }
      +//        catch (WrongTurnException e) {}
      +//        catch (Exception e) {
      +//            throw new RuntimeException(e);
      +//        }
      +//
      +//        // Verify that playCard() throws a WrongTurnException when the caller is not the match current player
      +//        try {
      +//            NotCurrPlayer.playCard(pos, card, Side.FRONT);
      +//            // An exception should be thrown here
      +//            fail("WrongTurnException wasn't thrown but should have been");
      +//        }
      +//        catch (WrongTurnException e) {}
      +//        catch (Exception e) {
      +//            throw new RuntimeException(e);
      +//        }
      +//    }
      +//}
      diff --git a/src/test/java/it/polimi/ingsw/gamemodel/PositionRequirementTest.java b/src/test/java/it/polimi/ingsw/gamemodel/PositionRequirementTest.java
      new file mode 100644
      index 00000000..ff0df46d
      --- /dev/null
      +++ b/src/test/java/it/polimi/ingsw/gamemodel/PositionRequirementTest.java
      @@ -0,0 +1,113 @@
      +package it.polimi.ingsw.gamemodel;
      +
      +import static org.junit.Assert.assertEquals;
      +import static org.junit.Assert.assertTrue;
      +import org.junit.Test;
      +
      +import java.util.Map;
      +import java.util.Set;
      +
      +
      +import it.polimi.ingsw.utils.*;
      +
      +public class PositionRequirementTest {
      +    Board board;
      +    PlayableCard plant;
      +    PlayableCard insect;
      +    PlayableCard fungus;
      +
      +    public PositionRequirementTest() {
      +        board = new Board();
      +
      +        try {
      +            plant = new ResourceCard(
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of()),
      +                Symbol.PLANT, 0
      +            );
      +            insect = new ResourceCard(
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of()),
      +                Symbol.INSECT, 0
      +            );
      +
      +            fungus = new ResourceCard(
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of()),
      +                Symbol.FUNGUS, 0
      +            );
      +
      +            board.setInitialCard(new InitialCard(
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of()),
      +                new CardFace(Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Symbol.FULL_CORNER, Set.of())
      +            ), Side.FRONT);
      +
      +            board.placeCard(new Pair<>(1, -1), insect, Side.FRONT, 0);
      +
      +            board.placeCard(new Pair<>(1, 1), insect, Side.FRONT, 0);
      +            board.placeCard(new Pair<>(1, 3), insect, Side.FRONT, 0);
      +            board.placeCard(new Pair<>(2, 4), plant, Side.FRONT, 0);
      +
      +            board.placeCard(new Pair<>(2, 2), insect, Side.FRONT, 0);
      +
      +            board.placeCard(new Pair<>(1, 5), insect, Side.FRONT, 0);
      +            board.placeCard(new Pair<>(2, 6), plant, Side.FRONT, 0);
      +
      +            board.placeCard(new Pair<>(3, 1), insect, Side.FRONT, 0);
      +
      +            board.placeCard(new Pair<>(3, 5), plant, Side.FRONT, 0);
      +            board.placeCard(new Pair<>(3, 7), plant, Side.FRONT, 0);
      +            board.placeCard(new Pair<>(4, 8), plant, Side.FRONT, 0);
      +            board.placeCard(new Pair<>(5, 9), plant, Side.FRONT, 0);
      +
      +       } catch (Exception e) {
      +            System.err.println(e);
      +            assertTrue(false);
      +        }
      +    }
      +
      +    @Test
      +    public void verifyPositionReqs() {
      +        try {
      +            assertEquals(1, new PositionRequirement(
      +                Map.of(
      +                    new Pair<>(0, 0), Symbol.INSECT,
      +                    new Pair<>(0, 2), Symbol.INSECT,
      +                    new Pair<>(1, 3), Symbol.PLANT
      +                )
      +            ).timesMet(board));
      +
      +            assertEquals(0, new PositionRequirement(
      +                Map.of(
      +                    new Pair<>(0, 0), Symbol.PLANT,
      +                    new Pair<>(0, 2), Symbol.INSECT,
      +                    new Pair<>(1, 3), Symbol.INSECT
      +                )
      +            ).timesMet(board));
      +
      +            assertEquals(1, new PositionRequirement(
      +                Map.of(
      +                    new Pair<>(0, 0), Symbol.PLANT,
      +                    new Pair<>(1, 1), Symbol.PLANT,
      +                    new Pair<>(2, 2), Symbol.PLANT
      +                )
      +            ).timesMet(board));
      +
      +            assertEquals(1, new PositionRequirement(
      +                Map.of(
      +                    new Pair<>(0, 0), Symbol.INSECT,
      +                    new Pair<>(0, 2), Symbol.INSECT,
      +                    new Pair<>(1, 3), Symbol.INSECT
      +                )
      +            ).timesMet(board));
      +
      +            assertEquals(1, new PositionRequirement(
      +                Map.of(
      +                    new Pair<>(0, 0), Symbol.INSECT,
      +                    new Pair<>(1, -1), Symbol.INSECT,
      +                    new Pair<>(2, -2), Symbol.INSECT
      +                )
      +            ).timesMet(board));
      +        } catch (Exception e) {
      +            System.err.println(e);
      +            assertTrue(false);
      +        }
      +    }
      +}
      diff --git a/src/test/java/it/polimi/ingsw/network/tcp/ServerTCPTest.java b/src/test/java/it/polimi/ingsw/network/tcp/ServerTCPTest.java
      new file mode 100644
      index 00000000..989b793a
      --- /dev/null
      +++ b/src/test/java/it/polimi/ingsw/network/tcp/ServerTCPTest.java
      @@ -0,0 +1,149 @@
      +package it.polimi.ingsw.network.tcp;
      +
      +import java.net.Socket;
      +import java.rmi.RemoteException;
      +import java.util.ArrayList;
      +import java.util.List;
      +import org.junit.Test;
      +import it.polimi.ingsw.network.messages.Message;
      +import it.polimi.ingsw.network.messages.actions.*;
      +import it.polimi.ingsw.server.Server;
      +import it.polimi.ingsw.utils.MessageJsonParser;
      +
      +public class ServerTCPTest {
      +    MessageJsonParser messageParser;
      +    Integer port;
      +    Server server;
      +    List<Socket> sockets;
      +
      +    public ServerTCPTest() throws RemoteException {
      +        try {
      +            messageParser = new MessageJsonParser();
      +            port = 9999;
      +            server = new Server(12, port);
      +            sockets = new ArrayList<>();
      +
      +            TCPServer tcpServer = new TCPServer(port, server);
      +            new Thread(() -> {
      +                tcpServer.listen();
      +            }).start();
      +
      +        } catch (Exception e) {
      +            System.out.println("Could not start test! port already taken");
      +            System.exit(0);
      +        }
      +    }
      +
      +    private IOHandler matchCreator(String username, String matchName, Integer maxPlayers) {
      +        IOHandler io;
      +        try {
      +            Socket socket = new Socket("localhost", this.port);
      +            io = new IOHandler(socket);
      +
      +            Message create = new CreateMatchMessage(username, matchName, maxPlayers);
      +            io.writeMsg(create);
      +            io.readMsg();
      +        } catch (Exception e) {
      +            return null;
      +        }
      +
      +        return io;
      +    }
      +
      +    private IOHandler matchJoin(String username, String matchName) {
      +        IOHandler io;
      +        try {
      +            Socket socket = new Socket("localhost", this.port);
      +            io = new IOHandler(socket);
      +
      +            Message getAvailable = new GetAvailableMatchesMessage(username);
      +            io.writeMsg(getAvailable);
      +            io.readMsg();
      +            Message join = new JoinMatchMessage(username, matchName);
      +            io.writeMsg(join);
      +            io.readMsg();
      +        } catch (Exception e) {
      +            return null;
      +        }
      +
      +        return io;
      +    }
      +
      +    @Test
      +    public void testChat() throws Exception {
      +        String matchCreatorUsername = "Davide";
      +        String matchJoineeUsername = "Luca";
      +        String matchName = "pippo";
      +
      +        IOHandler matchCreator = this.matchCreator(matchCreatorUsername, matchName, 4);
      +        IOHandler matchJoinee = this.matchJoin(matchJoineeUsername, matchName);
      +        IOHandler matchJoineev2 = this.matchJoin(matchJoineeUsername + "V2", matchName);
      +
      +        Message publicText = new SendBroadcastTextMessage(matchCreatorUsername, "ciao bimbi");
      +        matchCreator.writeMsg(publicText);
      +        Message privateText = new SendPrivateTextMessage(matchCreatorUsername, matchJoineeUsername, "ciao bimbo");
      +        matchCreator.writeMsg(privateText);
      +        matchCreator.writeMsg(publicText); // avoid infinite loop and check if the other user receives the message
      +
      +        matchJoinee.readMsg(); // remove join
      +        System.out.println(matchJoinee.readMsg());
      +        System.out.println(matchJoineev2.readMsg());
      +
      +        System.out.println(matchJoinee.readMsg());
      +        System.out.println(matchJoineev2.readMsg());
      +    }
      +
      +    // @Test
      +    // public void startMatchTest() throws Exception {
      +    //     String matchCreatorUsername = "a";
      +    //     String matchJoineeUsername = "b";
      +    //     String matchName = "match";
      +
      +    //     IOHandler matchCreator = this.matchCreator(matchCreatorUsername, matchName, 4);
      +    //     IOHandler matchJoinee = this.matchJoin(matchJoineeUsername, matchName);
      +    //     IOHandler matchJoinee2 = this.matchJoin(matchJoineeUsername + "V2", matchName);
      +    //     IOHandler matchJoinee3 = this.matchJoin(matchJoineeUsername + "V3", matchName);
      +
      +
      +    //     System.out.println("Creator: " + matchCreator.readMsg());
      +    //     System.out.println("Creator: " + matchCreator.readMsg());
      +    //     System.out.println("Creator: " + matchCreator.readMsg());
      +    //     System.out.println("Creator: " + matchCreator.readMsg());
      +
      +    //     System.out.println("Joinee: " + matchJoinee.readMsg());
      +    //     System.out.println("Joinee: " + matchJoinee.readMsg());
      +    //     System.out.println("Joinee: " + matchJoinee.readMsg());
      +
      +    //     System.out.println("Joinee2: " + matchJoinee2.readMsg());
      +    //     System.out.println("Joinee2: " + matchJoinee2.readMsg());
      +
      +    //     System.out.println("Joinee3: " + matchJoinee3.readMsg());
      +    // }
      +
      +    // @Test
      +    // public void testDuplicateName() {
      +    //     String matchCreatorUsername = "a";
      +    //     String matchJoineeUsername = "b";
      +    //     String matchName = "match2";
      +
      +    //     IOHandler matchCreator = this.matchCreator(matchCreatorUsername, matchName, 4);
      +    //     IOHandler matchJoinee = this.matchJoin(matchJoineeUsername, matchName);
      +
      +    //     IOHandler io;
      +    //     try {
      +    //         Socket socket = new Socket("localhost", this.port);
      +    //         io = new IOHandler(socket);
      +
      +    //         Message getAvailable = new GetAvailableMatchesMessage(matchJoineeUsername);
      +    //         io.writeMsg(getAvailable);
      +    //         io.readMsg();
      +    //         Message join = new JoinMatchMessage(matchJoineeUsername, matchName);
      +    //         io.writeMsg(join);
      +    //         System.out.println(io.readMsg());
      +    //     } catch (Exception e) {
      +    //         assertTrue(false);
      +    //     }
      +
      +    // }
      +
      +}
      diff --git a/src/test/java/it/polimi/ingsw/utils/CardsManagerTest.java b/src/test/java/it/polimi/ingsw/utils/CardsManagerTest.java
      new file mode 100644
      index 00000000..3f1d8865
      --- /dev/null
      +++ b/src/test/java/it/polimi/ingsw/utils/CardsManagerTest.java
      @@ -0,0 +1,132 @@
      +package it.polimi.ingsw.utils;
      +
      +import static org.junit.Assert.assertEquals;
      +import static org.junit.Assert.assertTrue;
      +
      +import java.util.HashSet;
      +import java.util.LinkedHashMap;
      +import java.util.Map;
      +import java.util.Set;
      +
      +import org.junit.Test;
      +
      +import it.polimi.ingsw.exceptions.CardException;
      +import it.polimi.ingsw.exceptions.InvalidResourceException;
      +import it.polimi.ingsw.gamemodel.CardFace;
      +import it.polimi.ingsw.gamemodel.Corner;
      +import it.polimi.ingsw.gamemodel.GoldCard;
      +import it.polimi.ingsw.gamemodel.InitialCard;
      +import it.polimi.ingsw.gamemodel.Objective;
      +import it.polimi.ingsw.gamemodel.PositionRequirement;
      +import it.polimi.ingsw.gamemodel.QuantityRequirement;
      +import it.polimi.ingsw.gamemodel.ResourceCard;
      +import it.polimi.ingsw.gamemodel.Side;
      +import it.polimi.ingsw.gamemodel.Symbol;
      +
      +public class CardsManagerTest {
      +    CardsManager cardsManager = CardsManager.getInstance();
      +
      +    @Test
      +    public void getInitialCards() throws CardException {
      +        Map<Integer, InitialCard> initialCards = cardsManager.getInitialCards();
      +
      +        CardFace front = initialCards.get(1).getSide(Side.FRONT);
      +        CardFace back = initialCards.get(1).getSide(Side.BACK);
      +
      +        assertEquals("Initial card id.1 has wrong id", Integer.valueOf(1), initialCards.get(1).getId());
      +        System.out.println(Symbol.INSECT.toString());
      +
      +        assertEquals("Initial card id.1 has wrong front top left corner", Symbol.INSECT, front.getCorner(Corner.TOP_LEFT));
      +        assertEquals("Initial card id.1 has wrong front top right corner", Symbol.FUNGUS, front.getCorner(Corner.TOP_RIGHT));
      +        assertEquals("Initial card id.1 has wrong front bottom left corner", Symbol.PLANT, front.getCorner(Corner.BOTTOM_LEFT));
      +        assertEquals("Initial card id.1 has wrong front bottom right corner", Symbol.ANIMAL, front.getCorner(Corner.BOTTOM_RIGHT));
      +        assertTrue("Initial card id.1 has wrong front center", front.getCenter().isEmpty());
      +
      +        Set<Symbol> centerExpectedValues = new HashSet<>();
      +        centerExpectedValues.add(Symbol.INSECT);
      +        centerExpectedValues.add(Symbol.PLANT);
      +        centerExpectedValues.add(Symbol.ANIMAL);
      +
      +        assertEquals("Initial card id.1 has wrong back top left corner", Symbol.FULL_CORNER, back.getCorner(Corner.TOP_LEFT));
      +        assertEquals("Initial card id.1 has wrong back top right corner", Symbol.FULL_CORNER, back.getCorner(Corner.TOP_RIGHT));
      +        assertEquals("Initial card id.1 has wrong back bottom left corner", Symbol.EMPTY_CORNER, back.getCorner(Corner.BOTTOM_LEFT));
      +        assertEquals("Initial card id.1 has wrong back bottom right corner", Symbol.EMPTY_CORNER, back.getCorner(Corner.BOTTOM_RIGHT));
      +        assertTrue("Initial card id.1 has wrong back center", back.getCenter().containsAll(centerExpectedValues));
      +    }
      +
      +    @Test
      +    public void getGoldCards() throws CardException, InvalidResourceException {
      +        Map<Integer, GoldCard> goldCards = cardsManager.getGoldCards();
      +
      +        GoldCard card = goldCards.get(64);
      +
      +        CardFace front = card.getSide(Side.FRONT);
      +        CardFace back = card.getSide(Side.BACK);
      +
      +        Map<Symbol, Integer> reqMap = new LinkedHashMap<>();
      +        reqMap.put(Symbol.ANIMAL, 1);
      +        reqMap.put(Symbol.PLANT, 3);
      +        QuantityRequirement req = new QuantityRequirement(reqMap);
      +
      +        assertEquals("Gold card id.64 has wrong id", Integer.valueOf(64), card.getId());
      +        assertEquals("Gold card id.64 has wrong multiplier", Symbol.CORNER_OBJ, card.getMultiplier());
      +        assertEquals("Gold card id.64 has wrong reign", Symbol.PLANT, card.getReign());
      +
      +        assertEquals("Gold card id.64 has wrong front top left corner", Symbol.FULL_CORNER, front.getCorner(Corner.TOP_LEFT));
      +        assertEquals("Gold card id.64 has wrong front top right corner", Symbol.FULL_CORNER, front.getCorner(Corner.TOP_RIGHT));
      +        assertEquals("Gold card id.64 has wrong front bottom left corner", Symbol.FULL_CORNER, front.getCorner(Corner.BOTTOM_LEFT));
      +        assertEquals("Gold card id.64 has wrong front bottom right corner", Symbol.EMPTY_CORNER, front.getCorner(Corner.BOTTOM_RIGHT));
      +        assertTrue("Gold card id.64 has wrong front center", front.getCenter().isEmpty());
      +
      +        Set<Symbol> centerExpectedValues = new HashSet<>();
      +        centerExpectedValues.add(Symbol.PLANT);
      +
      +        assertEquals("Gold card id.64 has wrong back top left corner", Symbol.FULL_CORNER, back.getCorner(Corner.TOP_LEFT));
      +        assertEquals("Gold card id.64 has wrong back top right corner", Symbol.FULL_CORNER, back.getCorner(Corner.TOP_RIGHT));
      +        assertEquals("Gold card id.64 has wrong back bottom left corner", Symbol.FULL_CORNER, back.getCorner(Corner.BOTTOM_LEFT));
      +        assertEquals("Gold card id.64 has wrong back bottom right corner", Symbol.FULL_CORNER, back.getCorner(Corner.BOTTOM_RIGHT));
      +        assertTrue("Gold card id.64 has wrong back center", back.getCenter().containsAll(centerExpectedValues));
      +    }
      +
      +    @Test
      +    public void getResourceCard() throws CardException, InvalidResourceException {
      +        Map<Integer, ResourceCard> resourceCards = cardsManager.getResourceCards();
      +
      +        ResourceCard card = resourceCards.get(1);
      +
      +        CardFace front = card.getSide(Side.FRONT);
      +        CardFace back = card.getSide(Side.BACK);
      +
      +        assertEquals("Resource card id.1 has wrong id", Integer.valueOf(1), card.getId());
      +        assertEquals("Resource card id.1 has wrong reign", Symbol.INSECT, card.getReign());
      +
      +        assertEquals("Resource card id.1 has wrong front top left corner", Symbol.EMPTY_CORNER, front.getCorner(Corner.TOP_LEFT));
      +        assertEquals("Resource card id.1 has wrong front top right corner", Symbol.FULL_CORNER, front.getCorner(Corner.TOP_RIGHT));
      +        assertEquals("Resource card id.1 has wrong front bottom left corner", Symbol.INSECT, front.getCorner(Corner.BOTTOM_LEFT));
      +        assertEquals("Resource card id.1 has wrong front bottom right corner", Symbol.INSECT, front.getCorner(Corner.BOTTOM_RIGHT));
      +        assertTrue("Resource card id.1 has wrong front center", front.getCenter().isEmpty());
      +
      +        Set<Symbol> centerExpectedValues = new HashSet<>();
      +        centerExpectedValues.add(Symbol.INSECT);
      +        assertEquals("Resource card id.1 has wrong back top left corner", Symbol.FULL_CORNER, back.getCorner(Corner.TOP_LEFT));
      +        assertEquals("Resource card id.1 has wrong back top right corner", Symbol.FULL_CORNER, back.getCorner(Corner.TOP_RIGHT));
      +        assertEquals("Resource card id.1 has wrong back bottom left corner", Symbol.FULL_CORNER, back.getCorner(Corner.BOTTOM_LEFT));
      +        assertEquals("Resource card id.1 has wrong back bottom right corner", Symbol.FULL_CORNER, back.getCorner(Corner.BOTTOM_RIGHT));
      +        assertTrue("Resource card id.1 has wrong back center", back.getCenter().containsAll(centerExpectedValues));
      +    }
      +
      +    @Test
      +    public void getObjectives() {
      +        Map<Integer, Objective> objectives = cardsManager.getObjectives();
      +
      +        Objective obj = objectives.get(1);
      +
      +        assertEquals("Objective id.1 has wrong id", Integer.valueOf(1), obj.getID());
      +        assertEquals("Objective id.1 has wrong points", 2, obj.getPoints());
      +        assertTrue("Objective id.1 has wrong requirement type", obj.getReq() instanceof QuantityRequirement);
      +
      +        obj = objectives.get(13);
      +        assertTrue("Objective id.13 was wrong requirement type", obj.getReq() instanceof PositionRequirement);
      +    }
      +
      +}
      diff --git a/src/test/java/it/polimi/ingsw/utils/JsonTest.java b/src/test/java/it/polimi/ingsw/utils/JsonTest.java
      new file mode 100644
      index 00000000..db730d33
      --- /dev/null
      +++ b/src/test/java/it/polimi/ingsw/utils/JsonTest.java
      @@ -0,0 +1,106 @@
      +package it.polimi.ingsw.utils;
      +
      +import static org.junit.Assert.assertEquals;
      +import static org.junit.Assert.assertTrue;
      +import static org.junit.Assert.fail;
      +import org.junit.Test;
      +import com.google.gson.JsonParseException;
      +import it.polimi.ingsw.gamemodel.DrawSource;
      +import it.polimi.ingsw.gamemodel.Side;
      +import it.polimi.ingsw.network.messages.Message;
      +import it.polimi.ingsw.network.messages.actions.DrawCardMessage;
      +import it.polimi.ingsw.network.messages.actions.DrawInitialCardMessage;
      +import it.polimi.ingsw.network.messages.actions.PlayCardMessage;
      +import it.polimi.ingsw.network.messages.responses.SomeoneDrewSecretObjectivesMessage;
      +
      +public class JsonTest {
      +    @Test
      +    public void parseDrawInitialCard() {
      +        DrawInitialCardMessage m1 = new DrawInitialCardMessage("Oingo");
      +        // Serialize
      +        MessageJsonParser parser = new MessageJsonParser();
      +        String m1json = parser.toJson(m1);
      +        System.out.println(m1json);
      +        // Deserialize
      +        Message convertedMessage = parser.toMessage(m1json);
      +        assertTrue(convertedMessage instanceof DrawInitialCardMessage);
      +        assertEquals("Oingo", ((DrawInitialCardMessage) convertedMessage).getUsername());
      +    }
      +
      +    @Test
      +    public void parsePlayCard() {
      +        PlayCardMessage m1 = new PlayCardMessage("Oingo", new Pair<>(0, 0), 12, Side.FRONT);
      +        // Serialize
      +        MessageJsonParser parser = new MessageJsonParser();
      +        String m1json = parser.toJson(m1);
      +        System.out.println(m1json);
      +        Message convertedMessage = parser.toMessage(m1json);
      +        assertTrue(convertedMessage instanceof PlayCardMessage);
      +        PlayCardMessage pm = (PlayCardMessage) convertedMessage;
      +        assertEquals("Oingo",  pm.getUsername());
      +        assertEquals(Side.FRONT, pm.getSide());
      +        assertEquals(Integer.valueOf(0), pm.getX());
      +        assertEquals(Integer.valueOf(0), pm.getY());
      +        assertEquals(Integer.valueOf(12), pm.getCardID());
      +    }
      +
      +    @Test
      +    public void parseDrawCard() {
      +        DrawCardMessage m1 = new DrawCardMessage("Oingo", DrawSource.GOLDS_DECK);
      +        // Serialize
      +        MessageJsonParser parser = new MessageJsonParser();
      +        String m1json = parser.toJson(m1);
      +        System.out.println(m1json);
      +        // Deserialize
      +        Message convertedMessage = parser.toMessage(m1json);
      +        assertTrue(convertedMessage instanceof DrawCardMessage);
      +        assertEquals(DrawSource.GOLDS_DECK, ((DrawCardMessage) convertedMessage).getSource());
      +    }
      +
      +    @Test
      +    public void parseSomeoneDrawSecretObjectives() {
      +        SomeoneDrewSecretObjectivesMessage m1 = new SomeoneDrewSecretObjectivesMessage("Boingo", new Pair<>(12, 11));
      +        // Serialize
      +        MessageJsonParser parser = new MessageJsonParser();
      +        String m1json = parser.toJson(m1);
      +        System.out.println(m1json);
      +        // Deserialize
      +        Message convertedMessage = parser.toMessage(m1json);
      +        assertTrue(convertedMessage instanceof SomeoneDrewSecretObjectivesMessage);
      +        assertEquals(Integer.valueOf(12), ((SomeoneDrewSecretObjectivesMessage) convertedMessage).getFirstID());
      +    }
      +
      +    @Test
      +    public void wrongJson() {
      +        String json = "{";
      +        MessageJsonParser parser = new MessageJsonParser();
      +        try {
      +            parser.toMessage(json);
      +            fail("Exception not thrown");
      +        } catch (JsonParseException e) {
      +            // Good
      +        } catch (Exception e) {
      +            fail("Wrong exception thrown");
      +        }
      +
      +        json = "{\"response\": \"DrawInitialCard\"}";
      +        try {
      +            parser.toMessage(json);
      +            fail("Exception not thrown");
      +        } catch (JsonParseException e) {
      +            // Good
      +        } catch (Exception e) {
      +            fail("Wrong exception thrown");
      +        }
      +
      +        json = "{\"response\": \"Lol\"}";
      +        try {
      +            parser.toMessage(json);
      +            fail("Exception not thrown");
      +        } catch (JsonParseException e) {
      +            // Good
      +        } catch (Exception e) {
      +            fail("Wrong exception thrown");
      +        }
      +    }
      +}