-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGameEventLog.java
More file actions
85 lines (69 loc) · 1.74 KB
/
GameEventLog.java
File metadata and controls
85 lines (69 loc) · 1.74 KB
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
public class GameEventLog {
private int caseId;
private String playerId;
private String activity;
private String timestamp;
private String category;
private int questionValue;
private String content;
private String answer;
private boolean isCorrect;
private int newScore;
//Accessors
public int getCaseId() {
return caseId;
}
public String getPlayerId() {
return playerId;
}
public String getActivity() {
return activity;
}
public String getTimestamp() {
return timestamp;
}
public String getCategory() {
return category;
}
public int getQuestionValue() {
return questionValue;
}
public String getContent() {
return content;
}
public String getAnswer() {
return answer;
}
public boolean isCorrect() {
return isCorrect;
}
public int getNewScore() {
return newScore;
}
public GameEventLog(int caseId, String timestamp, String activity) {
this.caseId = caseId;
this.timestamp = timestamp;
this.activity = activity;
}
public void addPlayerInfo(String playerId) {
this.playerId = playerId;
}
public void selectCategory(String category) {
this.category = category;
}
public void selectValue(int questionValue) {
this.questionValue = questionValue;
}
public void addAnswer(String answer){
this.answer = answer;
}
public void updateScore(int score){
this.newScore = score;
}
public void setContent(String content) {
this.content = content;
}
public void setCorrect(boolean correct) {
this.isCorrect = correct;
}
}