Package it.polimi.ingsw.client
Class Client
java.lang.Object
it.polimi.ingsw.client.Client
public class Client
extends java.lang.Object
Client wants to play Santorini and tries to establish a connection to the server.
-
Constructor Summary
Constructors Constructor Description Client() -
Method Summary
Modifier and Type Method Description voiddisconnect()Shows that the client is disconnecting from the server.static voidmain(java.lang.String[] args)voidsetUpConnection()Allows to set the connection to the game server.voidsetView()Allows the player to choose the type of view: CLI or GUI.java.lang.Objectupdate(Message receivedMessage)Updates and calls the specific method referring to the message received from the server.
-
Constructor Details
-
Client
public Client()
-
-
Method Details
-
main
public static void main(java.lang.String[] args) -
setUpConnection
public void setUpConnection()Allows to set the connection to the game server. Starts the main threads to communicate with it, keeping also track of the heartbeat. -
setView
public void setView()Allows the player to choose the type of view: CLI or GUI. -
update
Updates and calls the specific method referring to the message received from the server.- Parameters:
receivedMessage- The message received from the server.- Returns:
- The answer to send to the server.
-
disconnect
public void disconnect()Shows that the client is disconnecting from the server.
-