game-service.thrift 786 Bytes
Newer Older
1
2
include "common.thrift"

3
namespace java fr.univnantes.alma.thrift
4
namespace js common
5
6
7

struct JoinRequest {
    1: string name
8
9
}

Alex MOULIN's avatar
Alex MOULIN committed
10
11
12
13
14
15
16
17
18
struct InfoClient{
    1: string ip
    2: string port
}

struct PlayerID{
    1: string id
}

19
service GameService {
20

21
    i32 createGame(i32 numberOfPlayers)
22

23
    i32 join(i32 gameId, JoinRequest request) throws (1:common.GameNotFound e)
Alex MOULIN's avatar
Alex MOULIN committed
24
25
26
27
28
29
30
31
32
33
34
35
36
37

    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)
38
}