Fiasko/src/main/java/inf112/fiasko/roborally/objects/InteractableGame.java

92 lines
2.3 KiB
Java
Raw Normal View History

package inf112.fiasko.roborally.objects;
import inf112.fiasko.roborally.elementproperties.GameState;
import inf112.fiasko.roborally.networking.containers.PowerDownContainer;
2020-04-16 14:51:42 +02:00
import inf112.fiasko.roborally.networking.containers.ProgamsContainer;
import java.util.List;
/**
* This interface describes
*/
public interface InteractableGame {
/**
* Gets the current state og the game
*
* @return The state the game is currently in
*/
GameState getGameState();
/**
* Sets the state of the game
*
* @param gameState The new state of the game
*/
void setGameState(GameState gameState);
/**
* Gets the name of the player who won
*
* @return A string of the player name
*/
String getWinningPlayerName();
2020-04-16 14:51:42 +02:00
/**
* Sets the name of the player that won the game
*
* @param winningPlayerName The player winning the game
*/
void setWinningPlayerName(String winningPlayerName);
/**
* Continues turn when programs for all players are received from the server
*
* @param programs The programs container received from the server
* @throws InterruptedException If interrupted during sleep
*/
void receiveAllPrograms(ProgamsContainer programs) throws InterruptedException;
2020-04-16 14:51:42 +02:00
/**
* Continues turn when stay in power down is received from all players
*
* @param powerDowns The power down container received from the server
*/
void receiveStayInPowerDown(PowerDownContainer powerDowns);
2020-04-16 14:51:42 +02:00
/**
* Gets the hand of this player
*
* @return The hand of this player
*/
ProgrammingCardDeck getPlayerHand();
2020-04-16 14:51:42 +02:00
/**
* Sets the hand of this player
*
* @param playerHand The new hand of this player
*/
2020-04-16 14:51:42 +02:00
void setPlayerHand(ProgrammingCardDeck playerHand);
/**
* Gets the amount of cards the player can choose for their program
*
* @return The size of the player's next program
*/
int getProgramSize();
2020-04-16 14:51:42 +02:00
/**
* Gets the program of this player
*
* @return The program of this player
*/
List<ProgrammingCard> getProgram();
2020-04-16 14:51:42 +02:00
/**
* Sets the program of this player
*
* @param program The program of this player
*/
void setProgram(List<ProgrammingCard> program);
2020-04-16 14:51:42 +02:00
}