Skip to content

Commit 5a39b22

Browse files
committed
Update geometry and bot number according to new rules
1 parent e3fe589 commit 5a39b22

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

config/ssl-game-controller.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ time-acquisition-mode: system
22
network:
33
publish-address: 224.5.23.1:10003
44
vision-address: 224.5.23.2:10006
5+
tracker-address: 224.5.23.2:10010
56
server:
67
auto-ref:
78
address: :10007
@@ -16,7 +17,7 @@ server:
1617
game:
1718
state-store-file: state-store.json.stream
1819
yellow-card-duration: 2m
19-
multiple-card-step: 3
20+
multiple-card-step: 2
2021
multiple-foul-step: 3
2122
multiple-placement-failures: 5
2223
auto-ref-proposal-timeout: 5s
@@ -52,10 +53,10 @@ game:
5253
DIV_A:
5354
field-length: 12.0
5455
field-width: 9.0
55-
defense-area-depth: 1.2
56-
defense-area-width: 2.4
56+
defense-area-depth: 1.8
57+
defense-area-width: 3.6
5758
penalty-kick-dist-to-goal: 8.0
58-
goal-width: 1.2
59+
goal-width: 1.8
5960
placement-offset-touch-line: 0.2
6061
placement-offset-goal-line: 0.2
6162
placement-offset-goal-line-goal-kick: 1.0
@@ -72,5 +73,5 @@ game:
7273
placement-offset-goal-line-goal-kick: 1.0
7374
placement-offset-defense-area: 1.0
7475
max-bots:
75-
DIV_A: 8
76+
DIV_A: 11
7677
DIV_B: 6

internal/app/config/config.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func DefaultControllerConfig() (c Controller) {
153153
c.Game.StateStoreFile = "state-store.json.stream"
154154
c.Game.YellowCardDuration = 2 * time.Minute
155155
c.Game.TeamChoiceTimeout = 200 * time.Millisecond
156-
c.Game.MultipleCardStep = 3
156+
c.Game.MultipleCardStep = 2
157157
c.Game.MultipleFoulStep = 3
158158
c.Game.MultiplePlacementFailures = 5
159159
c.Game.AutoRefProposalTimeout = 5 * time.Second
@@ -194,10 +194,10 @@ func DefaultControllerConfig() (c Controller) {
194194
c.Game.DefaultGeometry[DivA] = Geometry{
195195
FieldLength: 12,
196196
FieldWidth: 9,
197-
DefenseAreaDepth: 1.2,
198-
DefenseAreaWidth: 2.4,
197+
DefenseAreaDepth: 1.8,
198+
DefenseAreaWidth: 3.6,
199199
PenaltyKickDistToGoal: 8.0,
200-
GoalWidth: 1.2,
200+
GoalWidth: 1.8,
201201
PlacementOffsetTouchLine: 0.2,
202202
PlacementOffsetGoalLine: 0.2,
203203
PlacementOffsetGoalLineGoalKick: 1.0,
@@ -216,7 +216,7 @@ func DefaultControllerConfig() (c Controller) {
216216
PlacementOffsetDefenseArea: 1.0,
217217
}
218218

219-
c.Game.MaxBots = map[Division]int32{DivA: 8, DivB: 6}
219+
c.Game.MaxBots = map[Division]int32{DivA: 11, DivB: 6}
220220

221221
c.TimeAcquisitionMode = TimeAcquisitionModeSystem
222222

internal/app/config/testdata/config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ server:
1717
game:
1818
state-store-file: state-store.json.stream
1919
yellow-card-duration: 2m
20-
multiple-card-step: 3
20+
multiple-card-step: 2
2121
multiple-foul-step: 3
2222
multiple-placement-failures: 5
2323
auto-ref-proposal-timeout: 5s
@@ -53,10 +53,10 @@ game:
5353
DIV_A:
5454
field-length: 12.0
5555
field-width: 9.0
56-
defense-area-depth: 1.2
57-
defense-area-width: 2.4
56+
defense-area-depth: 1.8
57+
defense-area-width: 3.6
5858
penalty-kick-dist-to-goal: 8.0
59-
goal-width: 1.2
59+
goal-width: 1.8
6060
placement-offset-touch-line: 0.2
6161
placement-offset-goal-line: 0.2
6262
placement-offset-goal-line-goal-kick: 1.0
@@ -73,5 +73,5 @@ game:
7373
placement-offset-goal-line-goal-kick: 1.0
7474
placement-offset-defense-area: 1.0
7575
max-bots:
76-
DIV_A: 8
76+
DIV_A: 11
7777
DIV_B: 6

internal/app/statemachine/change_cards.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
func (s *StateMachine) processChangeAddYellowCard(newState *state.State, change *AddYellowCard) (changes []*Change) {
9-
if activeYellowCards(newState.TeamInfo(*change.ForTeam).YellowCards) >= 2 {
9+
if activeYellowCards(newState.TeamInfo(*change.ForTeam).YellowCards) >= s.gameConfig.MultipleCardStep {
1010
changes = append(changes, s.multipleYellowCardsChange(*change.ForTeam))
1111
} else {
1212
newState.TeamInfo(*change.ForTeam).AddYellowCard(s.gameConfig.YellowCardDuration, change.CausedByGameEvent)

0 commit comments

Comments
 (0)