Package it.polimi.ingsw.client.gui
Class ChooseGodController
java.lang.Object
it.polimi.ingsw.client.gui.ChooseGodController
public class ChooseGodController
extends java.lang.Object
Controller class of the GUI choose god scene.
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringapolloDescriptionprotected static java.lang.StringartemisDescriptionprotected static java.lang.StringathenaDescriptionprotected static java.lang.StringatlasDescriptionprotected static java.lang.StringcharonDescriptionprotected static java.lang.StringdemeterDescriptionprotected static java.lang.StringhephaestusDescriptionprotected static java.lang.StringheraDescriptionprotected static java.lang.StringhestiaDescriptionprotected static java.lang.StringminotaurDescriptionprotected static java.lang.StringpanDescriptionprotected static java.lang.StringprometheusDescriptionprotected java.util.ArrayList<javafx.scene.image.ImageView>redFramesprotected static java.lang.StringtritonDescriptionprotected static java.lang.StringzeusDescription -
Constructor Summary
Constructors Constructor Description ChooseGodController() -
Method Summary
Modifier and Type Method Description voidaskPlayerGod()Gives the player the order to choose the god for the game.voidgetGodFromChallenger(int numOfPlayers, int alreadyChosenGods)protected voidinit()voidotherPlayerChoseGod(java.lang.String otherPlayer, java.lang.String chosenGod)If a player has already chosen the god for the current game, the other players are notified of his choice.voidplayerChoseInvalidGod()Allows to print into the main text field that the god was already chosen.voidprintChosenGods(java.util.ArrayList<java.lang.String> chosenGods)Shows with a frame the gods that the challenger has chosen for the game.voidsetChallenger()voidwaitChallengerChooseGods(java.lang.String challenger)Lets the player know that the challenger is choosing the gods for the game.voidwaitOtherPlayerChooseGod(java.lang.String otherPlayer)Lets the player know that the other player is choosing his god for the game.
-
Field Details
-
apolloDescription
protected static final java.lang.String apolloDescription- See Also:
- Constant Field Values
-
artemisDescription
protected static final java.lang.String artemisDescription- See Also:
- Constant Field Values
-
athenaDescription
protected static final java.lang.String athenaDescription- See Also:
- Constant Field Values
-
atlasDescription
protected static final java.lang.String atlasDescription- See Also:
- Constant Field Values
-
charonDescription
protected static final java.lang.String charonDescription- See Also:
- Constant Field Values
-
demeterDescription
protected static final java.lang.String demeterDescription- See Also:
- Constant Field Values
-
hephaestusDescription
protected static final java.lang.String hephaestusDescription- See Also:
- Constant Field Values
-
heraDescription
protected static final java.lang.String heraDescription- See Also:
- Constant Field Values
-
hestiaDescription
protected static final java.lang.String hestiaDescription- See Also:
- Constant Field Values
-
minotaurDescription
protected static final java.lang.String minotaurDescription- See Also:
- Constant Field Values
-
panDescription
protected static final java.lang.String panDescription- See Also:
- Constant Field Values
-
prometheusDescription
protected static final java.lang.String prometheusDescription- See Also:
- Constant Field Values
-
tritonDescription
protected static final java.lang.String tritonDescription- See Also:
- Constant Field Values
-
zeusDescription
protected static final java.lang.String zeusDescription- See Also:
- Constant Field Values
-
redFrames
protected java.util.ArrayList<javafx.scene.image.ImageView> redFrames
-
-
Constructor Details
-
ChooseGodController
public ChooseGodController()
-
-
Method Details
-
init
protected void init() -
getGodFromChallenger
public void getGodFromChallenger(int numOfPlayers, int alreadyChosenGods) -
setChallenger
public void setChallenger() -
waitOtherPlayerChooseGod
public void waitOtherPlayerChooseGod(java.lang.String otherPlayer)Lets the player know that the other player is choosing his god for the game.- Parameters:
otherPlayer- The nickname of the other player who's choosing his god.
-
waitChallengerChooseGods
public void waitChallengerChooseGods(java.lang.String challenger)Lets the player know that the challenger is choosing the gods for the game.- Parameters:
challenger- The nickname of the challenger.
-
askPlayerGod
public void askPlayerGod()Gives the player the order to choose the god for the game. The player must choose an available god chosen by the challenger. -
printChosenGods
public void printChosenGods(java.util.ArrayList<java.lang.String> chosenGods)Shows with a frame the gods that the challenger has chosen for the game.- Parameters:
chosenGods- The list of the chosen gods.
-
otherPlayerChoseGod
public void otherPlayerChoseGod(java.lang.String otherPlayer, java.lang.String chosenGod)If a player has already chosen the god for the current game, the other players are notified of his choice.- Parameters:
otherPlayer- The player who has already made his choice.chosenGod- The god that the other player has chosen.
-
playerChoseInvalidGod
public void playerChoseInvalidGod()Allows to print into the main text field that the god was already chosen.
-