-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.java
90 lines (74 loc) · 1.35 KB
/
Game.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package com.achur.avalon.entity;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import lombok.Data;
import java.util.List;
/**
* Represents a single game of Avalon.
*/
@Entity
@Data
public class Game {
/**
* Synthetic ID (woo boilerplate)
*/
@Id
Long id;
/**
* The players in the game.
*/
List<Long> players;
/**
* The roles in the game.
*/
List<Player.Role> roles;
public enum State {
WAIT,
START,
TEAM_SELECTION,
TEAM_VOTING,
QUEST,
GUESS_MERLIN,
END
}
/**
* The state of the game
*/
State state;
/**
* The number of votes in the current iteration of the game.
*/
Integer voteCount;
/**
* Results of the quests (true: success, false: fail).
*/
List<Boolean> questResults;
/**
* The current team proposed.
*/
List<Long> currentTeam;
/**
* The current leader.
*/
Long currentLeader;
/**
* The current votes for the given team.
*/
List<Long> teamVotesYay;
/**
* The current votes against the given team.
*/
List<Long> teamVotesNay;
/**
* The current votes for the given quest.
*/
List<Long> questVotesYay;
/**
* The current votes against the given quest.
*/
List<Long> questVotesNay;
/**
* Outcome of the game (true = good wins).
*/
Boolean outcome;
}