Skip to content

Commit 1a27d43

Browse files
committed
[refactoring] Rename goalie to goalkeeper to distinguish it from 'goal'
1 parent 39af536 commit 1a27d43

15 files changed

+74
-74
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The ssl-game-controller replaces the ssl-refbox. With the introduction of automa
2929

3030
The referee message, that is send to the teams, has no breaking changes. Teams do not need to change their systems. Additional data will be send with the referee messages though. To read those changes, teams can update their `.proto` files from this repository to take advantage of it.
3131

32-
Teams will also have the possibility to connect to a new interface, where they can change their goalie number during Stoppage. Additionally, there will be an advantage rule, where teams can decide to let the game continue on certain fouls.
32+
Teams will also have the possibility to connect to a new interface, where they can change their goalkeeper number during Stoppage. Additionally, there will be an advantage rule, where teams can decide to let the game continue on certain fouls.
3333

3434
List of new features:
3535
* Modern, scalable Web-UI
@@ -48,7 +48,7 @@ List of new features:
4848
* Select team names
4949
* Switch sides, if necessary (button)
5050
* Select division (button switch)
51-
* Set goalie id
51+
* Set goalkeeper id
5252
* divB: set ball placement capability
5353

5454
#### How to end a game?

internal/app/controller/engine.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ func (e *Engine) processTeamModify(m *EventModifyValue) error {
328328
teamState := e.State.TeamState[m.ForTeam]
329329
if m.Goals != nil {
330330
teamState.Goals = *m.Goals
331-
} else if m.Goalie != nil {
332-
teamState.Goalie = *m.Goalie
331+
} else if m.Goalkeeper != nil {
332+
teamState.Goalkeeper = *m.Goalkeeper
333333
} else if m.YellowCards != nil {
334334
teamState.YellowCards = *m.YellowCards
335335
} else if m.RedCards != nil {

internal/app/controller/events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ type EventModifyValue struct {
107107
ForTeam Team `json:"forTeam,omitempty"`
108108

109109
Goals *int `json:"goals,omitempty"`
110-
Goalie *int `json:"goalie,omitempty"`
110+
Goalkeeper *int `json:"goalkeeper,omitempty"`
111111
YellowCards *int `json:"yellowCards,omitempty"`
112112
YellowCardTime *EventModifyCardTime `json:"yellowCardTime,omitempty"`
113113
RedCards *int `json:"redCards,omitempty"`

internal/app/controller/publisher.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func initTeamInfo(t *refproto.Referee_TeamInfo) {
8484
t.YellowCards = new(uint32)
8585
t.Timeouts = new(uint32)
8686
t.TimeoutTime = new(uint32)
87-
t.Goalie = new(uint32)
87+
t.Goalkeeper = new(uint32)
8888
t.FoulCounter = new(uint32)
8989
t.BallPlacementFailures = new(uint32)
9090
t.CanPlaceBall = new(bool)
@@ -234,7 +234,7 @@ func updateTeam(team *refproto.Referee_TeamInfo, state *TeamInfo) {
234234
*team.YellowCards = uint32(state.YellowCards)
235235
*team.Timeouts = uint32(state.TimeoutsLeft)
236236
*team.TimeoutTime = uint32(state.TimeoutTimeLeft.Nanoseconds() / 1000)
237-
*team.Goalie = uint32(state.Goalie)
237+
*team.Goalkeeper = uint32(state.Goalkeeper)
238238
*team.FoulCounter = uint32(state.FoulCounter)
239239
*team.BallPlacementFailures = uint32(state.BallPlacementFailures)
240240
*team.CanPlaceBall = state.CanPlaceBall

internal/app/controller/state.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ const (
232232
type TeamInfo struct {
233233
Name string `json:"name"`
234234
Goals int `json:"goals"`
235-
Goalie int `json:"goalie"`
235+
Goalkeeper int `json:"goalkeeper"`
236236
YellowCards int `json:"yellowCards"`
237237
YellowCardTimes []time.Duration `json:"yellowCardTimes"`
238238
RedCards int `json:"redCards"`
@@ -408,7 +408,7 @@ func (s State) PrimaryGameEvent() (e *GameEvent) {
408408
func newTeamInfo() (t TeamInfo) {
409409
t.Name = ""
410410
t.Goals = 0
411-
t.Goalie = 0
411+
t.Goalkeeper = 0
412412
t.YellowCards = 0
413413
t.YellowCardTimes = []time.Duration{}
414414
t.RedCards = 0

internal/app/controller/teamConnection.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ func (c *GameController) ProcessTeamRequests(teamName string, request refproto.T
7070

7171
if x, ok := request.GetRequest().(*refproto.TeamToControllerRequest_DesiredKeeper); ok {
7272
if x.DesiredKeeper < 0 || x.DesiredKeeper > 15 {
73-
return errors.Errorf("Keeper id is invalid: %v", x.DesiredKeeper)
73+
return errors.Errorf("Goalkeeper id is invalid: %v", x.DesiredKeeper)
7474
}
75-
log.Printf("Changing goalie for team %v to %v", team, x.DesiredKeeper)
76-
c.Engine.State.TeamState[team].Goalie = int(x.DesiredKeeper)
75+
log.Printf("Changing keeper for team %v to %v", team, x.DesiredKeeper)
76+
c.Engine.State.TeamState[team].Goalkeeper = int(x.DesiredKeeper)
7777
}
7878

7979
return nil

internal/app/controller/testdata/transition_ballplacement.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"Blue": {
1818
"name": "",
1919
"goals": 0,
20-
"goalie": 0,
20+
"goalkeeper": 0,
2121
"yellowCards": 0,
2222
"yellowCardTimes": [],
2323
"redCards": 0,
@@ -28,7 +28,7 @@
2828
"Yellow": {
2929
"name": "",
3030
"goals": 0,
31-
"goalie": 0,
31+
"goalkeeper": 0,
3232
"yellowCards": 0,
3333
"yellowCardTimes": [],
3434
"redCards": 0,
@@ -63,7 +63,7 @@
6363
"Blue": {
6464
"name": "",
6565
"goals": 0,
66-
"goalie": 0,
66+
"goalkeeper": 0,
6767
"yellowCards": 0,
6868
"yellowCardTimes": [],
6969
"redCards": 0,
@@ -74,7 +74,7 @@
7474
"Yellow": {
7575
"name": "",
7676
"goals": 0,
77-
"goalie": 0,
77+
"goalkeeper": 0,
7878
"yellowCards": 0,
7979
"yellowCardTimes": [],
8080
"redCards": 0,
@@ -108,7 +108,7 @@
108108
"Blue": {
109109
"name": "",
110110
"goals": 0,
111-
"goalie": 0,
111+
"goalkeeper": 0,
112112
"yellowCards": 0,
113113
"yellowCardTimes": [],
114114
"redCards": 0,
@@ -119,7 +119,7 @@
119119
"Yellow": {
120120
"name": "",
121121
"goals": 0,
122-
"goalie": 0,
122+
"goalkeeper": 0,
123123
"yellowCards": 0,
124124
"yellowCardTimes": [],
125125
"redCards": 0,

internal/app/controller/testdata/transition_commands.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"Blue": {
2020
"name": "",
2121
"goals": 0,
22-
"goalie": 0,
22+
"goalkeeper": 0,
2323
"yellowCards": 0,
2424
"yellowCardTimes": [],
2525
"redCards": 0,
@@ -30,7 +30,7 @@
3030
"Yellow": {
3131
"name": "",
3232
"goals": 0,
33-
"goalie": 0,
33+
"goalkeeper": 0,
3434
"yellowCards": 0,
3535
"yellowCardTimes": [],
3636
"redCards": 0,
@@ -66,7 +66,7 @@
6666
"Blue": {
6767
"name": "",
6868
"goals": 0,
69-
"goalie": 0,
69+
"goalkeeper": 0,
7070
"yellowCards": 0,
7171
"yellowCardTimes": [],
7272
"redCards": 0,
@@ -77,7 +77,7 @@
7777
"Yellow": {
7878
"name": "",
7979
"goals": 0,
80-
"goalie": 0,
80+
"goalkeeper": 0,
8181
"yellowCards": 0,
8282
"yellowCardTimes": [],
8383
"redCards": 0,
@@ -114,7 +114,7 @@
114114
"Blue": {
115115
"name": "",
116116
"goals": 0,
117-
"goalie": 0,
117+
"goalkeeper": 0,
118118
"yellowCards": 0,
119119
"yellowCardTimes": [],
120120
"redCards": 0,
@@ -125,7 +125,7 @@
125125
"Yellow": {
126126
"name": "",
127127
"goals": 0,
128-
"goalie": 0,
128+
"goalkeeper": 0,
129129
"yellowCards": 0,
130130
"yellowCardTimes": [],
131131
"redCards": 0,
@@ -161,7 +161,7 @@
161161
"Blue": {
162162
"name": "",
163163
"goals": 0,
164-
"goalie": 0,
164+
"goalkeeper": 0,
165165
"yellowCards": 0,
166166
"yellowCardTimes": [],
167167
"redCards": 0,
@@ -172,7 +172,7 @@
172172
"Yellow": {
173173
"name": "",
174174
"goals": 0,
175-
"goalie": 0,
175+
"goalkeeper": 0,
176176
"yellowCards": 0,
177177
"yellowCardTimes": [],
178178
"redCards": 0,
@@ -208,7 +208,7 @@
208208
"Blue": {
209209
"name": "",
210210
"goals": 0,
211-
"goalie": 0,
211+
"goalkeeper": 0,
212212
"yellowCards": 0,
213213
"yellowCardTimes": [],
214214
"redCards": 0,
@@ -219,7 +219,7 @@
219219
"Yellow": {
220220
"name": "",
221221
"goals": 0,
222-
"goalie": 0,
222+
"goalkeeper": 0,
223223
"yellowCards": 0,
224224
"yellowCardTimes": [],
225225
"redCards": 0,
@@ -256,7 +256,7 @@
256256
"Blue": {
257257
"name": "",
258258
"goals": 0,
259-
"goalie": 0,
259+
"goalkeeper": 0,
260260
"yellowCards": 0,
261261
"yellowCardTimes": [],
262262
"redCards": 0,
@@ -267,7 +267,7 @@
267267
"Yellow": {
268268
"name": "",
269269
"goals": 0,
270-
"goalie": 0,
270+
"goalkeeper": 0,
271271
"yellowCards": 0,
272272
"yellowCardTimes": [],
273273
"redCards": 0,
@@ -303,7 +303,7 @@
303303
"Blue": {
304304
"name": "",
305305
"goals": 0,
306-
"goalie": 0,
306+
"goalkeeper": 0,
307307
"yellowCards": 0,
308308
"yellowCardTimes": [],
309309
"redCards": 0,
@@ -314,7 +314,7 @@
314314
"Yellow": {
315315
"name": "",
316316
"goals": 0,
317-
"goalie": 0,
317+
"goalkeeper": 0,
318318
"yellowCards": 0,
319319
"yellowCardTimes": [],
320320
"redCards": 0,
@@ -351,7 +351,7 @@
351351
"Blue": {
352352
"name": "",
353353
"goals": 0,
354-
"goalie": 0,
354+
"goalkeeper": 0,
355355
"yellowCards": 0,
356356
"yellowCardTimes": [],
357357
"redCards": 0,
@@ -362,7 +362,7 @@
362362
"Yellow": {
363363
"name": "",
364364
"goals": 0,
365-
"goalie": 0,
365+
"goalkeeper": 0,
366366
"yellowCards": 0,
367367
"yellowCardTimes": [],
368368
"redCards": 0,

internal/app/controller/testdata/transition_penalty.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"Blue": {
2020
"name": "",
2121
"goals": 0,
22-
"goalie": 0,
22+
"goalkeeper": 0,
2323
"yellowCards": 0,
2424
"yellowCardTimes": [],
2525
"redCards": 0,
@@ -30,7 +30,7 @@
3030
"Yellow": {
3131
"name": "",
3232
"goals": 0,
33-
"goalie": 0,
33+
"goalkeeper": 0,
3434
"yellowCards": 0,
3535
"yellowCardTimes": [],
3636
"redCards": 0,
@@ -67,7 +67,7 @@
6767
"Blue": {
6868
"name": "",
6969
"goals": 0,
70-
"goalie": 0,
70+
"goalkeeper": 0,
7171
"yellowCards": 0,
7272
"yellowCardTimes": [],
7373
"redCards": 0,
@@ -78,7 +78,7 @@
7878
"Yellow": {
7979
"name": "",
8080
"goals": 0,
81-
"goalie": 0,
81+
"goalkeeper": 0,
8282
"yellowCards": 0,
8383
"yellowCardTimes": [],
8484
"redCards": 0,
@@ -114,7 +114,7 @@
114114
"Blue": {
115115
"name": "",
116116
"goals": 0,
117-
"goalie": 0,
117+
"goalkeeper": 0,
118118
"yellowCards": 0,
119119
"yellowCardTimes": [],
120120
"redCards": 0,
@@ -125,7 +125,7 @@
125125
"Yellow": {
126126
"name": "",
127127
"goals": 0,
128-
"goalie": 0,
128+
"goalkeeper": 0,
129129
"yellowCards": 0,
130130
"yellowCardTimes": [],
131131
"redCards": 0,

0 commit comments

Comments
 (0)