Class ExpertCommunicationController
java.lang.Object
it.polimi.ingsw.communication.sugar_framework.message_processing.SugarMessageProcessor
it.polimi.ingsw.server.controller.game_state_controller.CommunicationController
it.polimi.ingsw.server.controller.game_state_controller.ExpertCommunicationController
-
Field Summary
Fields inherited from class it.polimi.ingsw.server.controller.game_state_controller.CommunicationController
gameStateController, usernameToSchoolBoardId -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExpertCommunicationController(List<Player> players) ExpertCommunicationController(List<org.javatuples.Pair<String, Integer>> players, UUID gameUUID) -
Method Summary
Modifier and TypeMethodDescriptioncharacterIndexArchipelagoMsg(CharacterIndexArchipelagoMsg message, Peer peer) This is the handler of the messages for the characters with ID 3 and 5.This is the handler of the messages for the characters with ID 1.characterIndexColorListsMsg(CharacterIndexColorListsMsg message, Peer peer) This is the handler of the messages for the characters with ID 1.characterIndexColorMsg(CharacterIndexColorMsg message, Peer peer) This is the handler of the messages for the characters with ID 9, 11 and 12.characterIndexMsg(CharacterIndexMsg message, Peer peer) This is the handler of the messages for the characters with ID 2,4,6 and 8.endTurnMsg(EndTurnMsg message, Peer peer) This is the handler of the messages for the characters with ID 1.protected GameStateControllerinitializeGameStateController(int playersNumber) protected GameStateControllerinitializeGameStateController(UUID gameUUID) rollbackMsg(RollbackMsg message, Peer peer) This is the handler of the messages for the characters with ID 1.Methods inherited from class it.polimi.ingsw.server.controller.game_state_controller.CommunicationController
base, createCommunicationController, createCommunicationController, getGameUUID, getLightGameState, getTeamUsernames, getUsernameToWinnerMap, grabStudentsFromCloudMsg, isOthersPlayersTurn, moveMotherNatureMsg, moveStudentFromEntranceToArchipelagoMsg, moveStudentFromEntranceToDiningRoomMsg, playCardMsgMethods inherited from class it.polimi.ingsw.communication.sugar_framework.message_processing.SugarMessageProcessor
drop, process, process, processFromLowerLayers
-
Constructor Details
-
ExpertCommunicationController
protected ExpertCommunicationController(List<Player> players) throws GameStateInitializationFailureException -
ExpertCommunicationController
-
-
Method Details
-
initializeGameStateController
protected GameStateController initializeGameStateController(int playersNumber) throws GameStateInitializationFailureException - Overrides:
initializeGameStateControllerin classCommunicationController- Throws:
GameStateInitializationFailureException
-
initializeGameStateController
- Overrides:
initializeGameStateControllerin classCommunicationController
-
characterIndexMsg
This is the handler of the messages for the characters with ID 2,4,6 and 8. It manages all the exceptions related to the rules of the game and notifies the player with the result.- Parameters:
message- is the CharacterIndexMsg received from the playerpeer- is the Peer from which the message is received- Returns:
- a SugarMessage with the result of the invocation
-
characterIndexArchipelagoMsg
This is the handler of the messages for the characters with ID 3 and 5. It manages all the exceptions related to the rules of the game and notifies the player with the result.- Parameters:
message- is the CharacterIndexArchipelagoMsg received from the playerpeer- is the Peer from which the message is received- Returns:
- a SugarMessage with the result of the invocation
-
characterIndexColorMsg
This is the handler of the messages for the characters with ID 9, 11 and 12. It manages all the exceptions related to the rules of the game and notifies the player with the result.- Parameters:
message- is the CharacterIndexColorMsg received from the playerpeer- is the Peer from which the message is received- Returns:
- a SugarMessage with the result of the invocation
-
characterIndexColorArchipelagoMsg
public SugarMessage characterIndexColorArchipelagoMsg(CharacterIndexColorArchipelagoMsg message, Peer peer) This is the handler of the messages for the characters with ID 1. It manages all the exceptions related to the rules of the game and notifies the player with the result.- Parameters:
message- is the CharacterIndexColorArchipelagoMsg received from the playerpeer- is the Peer from which the message is received- Returns:
- a SugarMessage with the result of the invocation
-
characterIndexColorListsMsg
This is the handler of the messages for the characters with ID 1. It manages all the exceptions related to the rules of the game and notifies the player with the result.- Parameters:
message- is the CharacterIndexColorListsMsg received from the playerpeer- is the Peer from which the message is received- Returns:
- a SugarMessage with the result of the invocation
-
rollbackMsg
This is the handler of the messages for the characters with ID 1. It manages all the exceptions related to the rules of the game and notifies the player with the result.- Overrides:
rollbackMsgin classCommunicationController- Parameters:
message- is the RollbackMsg received from the playerpeer- is the Peer from which the message is received- Returns:
- a SugarMessage with the result of the invocation
-
endTurnMsg
This is the handler of the messages for the characters with ID 1. It manages all the exceptions related to the rules of the game and notifies the player with the result.- Overrides:
endTurnMsgin classCommunicationController- Parameters:
message- is the EndTurnMsg received from the playerpeer- is the Peer from which the message is received- Returns:
- a SugarMessage with the result of the invocation
-