Package game
Interface GameApi
public interface GameApi
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canStart
(int idGame) void
chooseSuit
(int idGame, CardSuit suit) createGame
(String username, int numberOfPlayers, int expectedScore, GameMode gameMode) create a game and username is one of the playersboolean
the username join the specif gameboolean
the username played a cardvoid
startNewRound
(int idGame)
-
Method Details
-
createGame
create a game and username is one of the players- Parameters:
username
- of the player who has created the game- Returns:
- the id of the Game (modeled with a Verticle)
-
joinGame
the username join the specif game- Parameters:
username
- of the player who has created the gameidGame
- of the game the user wants to join- Returns:
- true if success
-
playCard
the username played a card- Parameters:
idGame
- of the game the user wants to joincard
- played by the userusername
- user who played the card- Returns:
-
canStart
boolean canStart(int idGame) - Parameters:
idGame
- the game to check- Returns:
- true if all players have joined the game
-
chooseSuit
- Parameters:
idGame
- the specific gamesuit
- the suit choosen by the first player
-
startNewRound
void startNewRound(int idGame) - Parameters:
idGame
- the specific game reset the leading suit in order to start a new round
-