All Classes and Interfaces
Class
Description
Represents a generic card of the game.
This class parses the information of card_json and creates
Card
objects in accordance to the Factory patternRepresents a golden car, that can be played in player's field sometime during the game.
Read-only interface of a card
Represents an objective card.
Represents an objective card.
Represents a card that can be played in player's field sometime during the game.
Represents a card that can be played in player's field sometime during the game.
Represents a resource car, that can be played in player's field sometime during the game.
Represents the active side (front) of an objective card.
This class represents one of the two sides of a playable card
Represents a starter car, that can be played in player's field sometime during the game.
Represents a starter car, with its id and a visible side (if it's visible in someone's field of in the common field)
This class stores all the chat messages that meet the following requirements:
-they have thisPlayer as a sender or as one of the receivers
-the number of receivers is either one, or number of players-1 (all the players aside from the sender)
A single chat message, as it is stored on the client.
This class listens for request messages coming from a client connected via socket.
Represents color of a card side.
Enumeration of the four available colors for the token
This exception is thrown when there is attempt to reconnect a player which is already connected,
or disconnect a player which has already been disconnected.
Represents a 2-tuple of coordinates for a 2D point or vector that could be used in game.
This is a class that represents one of the four corners of the side of a card
This class represent a physical deck of cards
This class represents a deck and two visible cards
which sit on the Field at all times.
Class which represents the status of the game field of a specific player.
Interface representing a player's field.
Representation of one player's field.
This is a controller for a single game/match
Version of class representing gameController for the RMI connection.
Interface representing gameController for the RMI connection.
Interface to be implemented by the classes that handle the communication between the server and the clients.
Client-side listener for RMI connection.
Interface exposed remotely by the client representing the client-side listener for RMI connection.
Implementation of a game listener for RMI connection.
Functional interface representing a generic call to a RMI method, hence it throws
RemoteException
This class is the socket implementation of
GameListener
.Model of the entire game.
Immutable version of
GameModel
class.Representation of the state of the game in a certain instant.
Class handling the representation of the state of the game (
GameState
).Represents phases of the flow of the game
Creation of the game itself doesn't have a game phase.
Exception thrown if an action is done in the wrong game phase.
Exception thrown when CardFactory attempts to create an invalid card.
Thrown after an attempt to set a variable to a value that does not belong to the set of allowed choices
Represents invalid game coordinates, that is coordinates whose sum is not a multiple of 2, or more generically
game coordinates used improperly during the game itself.
Exception thrown when the player tries to draw a card and the deck is empty
Exception related to wrong playing of a card by a player.
This exception was the player passed to a method is not valid, either because he doesn't belong to the match
or because he isn't allowed to call that method at that moment (i.e.
This exception is thrown when the player number is not valid (ie <2 or >4), or there are different
players who have the same token
This exception is thrown when a client requests to send a message whose receivers are not valid, that is when
they are more than 1 and less than all the other players, or they contain the sender, or they contain a player who
is not in the match
Exception representing invalid set of parameters associated to a TUI command
This class is responsible for handling a List of
and notifying the view when a change occurs in the
GameListener
and notifying the view when a change occurs in the
GameModel
after a game event happens.Controller used to manage multiple games, that is to handle the lobby of players who are playing or are in a room willing to start a game.
It stores the game listeners of players in a room which has not starter the game yet.
It stores the game listeners of players in a room which has not starter the game yet.
Exception thrown by the lobby
Version of class representing lobby for the RMI connection.
Interface representing lobby for the RMI connection.
Class that stores a log of the game for the GUI
Class that stores the logs for the TUI
To avoid using too much space in the terminal, it only stores the last LOG_MAXLINES log messages
This class manages a match
The flow of the match is handled by game phase.
Class implementing the thread listening for command line inputs from the user, used for TUI view
Note that, being an object mediating between the server and the client, it has references to both the
Once started, it catches anything typed via command line after pressing enter.
NetworkHandler
and the ViewTUI
.Once started, it catches anything typed via command line after pressing enter.
Item belonging to a menu.
Menu item to change the displayed field to that of another player
Menu item for choosing the personal objective card during INIT game phase
It expects 1 argument (which card to choose) and sends the command to the server
Menu item for creating a room.
Menu item to disable the print of the legend in field view
Menu item to enable the print of the legend in field view
Menu item for entering a chat room
It expects 1 argument
Player's nickname associated to the chat room, or 'all' for the global chatroom with all the players
And then it sends the command to the server
Menu item for joining an existing room.
Menu item for leaving the chat room currently active.
Menu item for leaving the joined room.
Menu item for picking a card off the common field during a turn-based game phase.
Menu item for playing a card on field during a turn-based game phase.
Menu item for playing the starting card in INIT game phase.
Menu item to reconnect a player to an ongoing game
Menu item for sending a message to the chatroom currently active.
Menu item for updating the listed rooms.
Menu storing all possible menu items corresponding to the is possible executable action in the current state of the game.
Abstract class for a message, which can either be a command or a response message
Main exception class for the Model package
Abstract class for a command message, that is sent to the server by the client
Command message to send a chat message
Command message which is sent to choose the personal objective
Command message which is sent to create a room
Command message which is sent to get the existing rooms.
Command message which is sent to join a room
Command messages which is sent to leave a room.
Command message which is sent to pick a card
Command message corresponding to a ping from the client.
Command message which is sent to play a card
Command message which is sent to play the starter card
Command message to reconnect to an existing game, containing nickname and token of the player who wants to reconnect
Abstract class for a response message, which is sent to the client by the server
Response message containing the message that should be sent to its receivers (including its sender and receivers)
Response message containing the information describing the choice of a personal objective
Response message which is sent to signal the end of the game
Response message that is sent to a client whenever one of his commands causes an exception
Response message when the game reaches the final phase
Response message containing the rooms that are currently available
Response message which is sent when the game reaches the in game phase
Response message which is sent when the next turn starts, containing the player who has to play in the next turn
Response message which is sent when a player has successfully picked a card
Response message which is sent when the server has correctly received a ping from a client
Response message which is sent when a player has successfully played a card
Response message which is sent when a player has successfully played his starter card
Response message that is sent when a player disconnects from an ongoing game
Response message which is sent when a player successfully joins or creates a room
Response message which is sent when a player successfully leaves a game
Response message which is sent when a player successfully reconnects to an existing game
Response message containing the points of all the players after the last turn has been played
(or only a player is left and the reconnection timer expired)
Response message which is sent when the game starts, containing the game state at that moment
Response message which is sent to the player who just reconnected to an already started match, containing
the game state
Response message containing the list of players, one of which has won the game.
This is the interface used by the client to communicate with the server.
RMI implementation of
NetworkHandler
, which is used by the client to send messages to the serverThis is the socket implementation of
NetworkHandler
.Class storing all the major parameters the client classes use, both for game and technical aspects.
Class storing all the major parameters the server classes use, both for game and technical aspects.
This class manages a player of match, storing and managing his nickname, token, field, hand cards, personal
objective, starter card, points, whether he is connected or not.
This exception is thrown when there is attempt to add a card to the hand of a player who has already three cards
(i.e.
Interface of a player, which only allows to get his data
Immutable class representing a player not yet in game.
Representation of the state of one player in game.
Representation of points of a playable card side of the type "x points for each corner covered by this card when you play it"
Representation of points of a playable card side of the type "x points when you play this card on this side"
Representation of points of an objective card.
Representation of an objective card of type "x points for each pattern with 3 card in a certain position and with certain colors"
(fourth type of objective card presented in rulebook).
Representation of the points of a playable card.
Representation of points of a playable card side of the type
"x points for each resource of type y present on the field immediately after you play it"
Representation of points of an objective card of type "x points for each set of resources/objects"
(first 3 types of objective cards presentd in the rule book).
Representation of a command accepted from the command line
Exception thrown when the player tries to place a card on the field but has not met its requirements
Enum of all the possible resources, plus NO_RESOURCE for corners that are empty or non-visible
Represents a set of players who are willing to start playing or are already playing.
Interface representing a game room.
This class keeps waiting for responses coming from the server.
This class listens for new socket connection requests coming from the client.
Enumeration of the two sides of a card (front and back)
Represents token present in game.
Exception thrown when a setter of a variable that should only be set one time outside a constructor is called more than once
Interface representing methods exposed by a generic game view.
This class is the JavaFX application, and it implements the View interface.
Abstract class for the GUI controllers (the classes implementing the logic behind the various scenes)
Controller of 'Init' scene, where the player must complete the initialization part of the game
Controller of 'JoinedRoom' scene, where player can wait for the room to get full or can leave the room
Controller of 'Match' scene, where player can actually play the most of the game
Controller of the 'Rooms' scene, where the rooms are listed and the user can create/join/reconnect to a room
Controller of 'Winner' scene, where the final points and the winner are shown
Implementation of a view for TUI.
Class containing various constants used by view TUI
This class handles the TUI during the match
Class containing various utility methods used by view TUI to print elements on the terminal
Static class containing all the symbols related to a card side