Commit 20157592 authored by Mamadou Saliou DIALLO's avatar Mamadou Saliou DIALLO

remove duplicated files and implement methods

parent 5ca16c38
include "common.thrift"
namespace java fr.univnantes.alma.thrift
enum PlayerState {
UNBLOCKED = 0,
BLOCKED
}
struct PlayerStateResponse {
1: PlayerState state,
2: string message
}
struct Player {
1: i32 id,
2: string name,
3: PlayerState state,
4: optional list<HuntCard> huntCards,
5: optional list<PlaceCard> placeCards,
}
struct Winner {
1: Player winner,
2: string message
}
struct HuntCard {
1: i32 phase,
2: string name,
3: bool visible
}
struct PlaceCard {
1: i32 number,
2: string name,
3: bool visible
}
struct BoardGameState {
1: i32 assimilationTokenPosition,
2: i32 rescuePawnPosition,
3: optional bool isBoardFacing,
4: list<Player> players
}
service GameClientService {
bool ping() throws (1:common.InvalidOperationException e)
string gameStart(BoardGameState boardGameState)
PlayerStateResponse blockActions()
PlayerStateResponse unblockActions()
void showPlayedCard()
string updatedGameBoard(BoardGameState bordGameState)
string endGame(Winner winner);
}
include "common.thrift"
namespace java fr.univnantes.alma.thrift
struct JoinRequest {
1: string name
}
struct InfoClient{
1: string ip
2: string port
}
struct PlayerID{
1: string id
}
service GameServerService {
i32 createGame(i32 numberOfPlayers)
i32 join(i32 gameId, JoinRequest request) throws (1:common.GameNotFound e)
common.Response isConnected(PlayerID player, InfoClient params)
common.Phase nextPhase(common.Phase phase)
common.Response resits(PlayerID hunted)
common.Response toGo(PlayerID hunted)
common.Response playPlaceCard(PlayerID hunted, common.Card card)
common.Response putToken(common.Token token, common.Place place)
common.Response playHuntCard(PlayerID creature, common.Card card)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment