@@ -120,7 +120,8 @@ export const mapGameEventToText = function (event) {
120
120
return `${ teamAndBot ( event . botSubstitution ) } requests bot substitution` ;
121
121
}
122
122
if ( event . tooManyRobots != null ) {
123
- return `${ teamAndBot ( event . tooManyRobots ) } has too many robots on field` ;
123
+ return `${ teamAndBot ( event . tooManyRobots ) } has ${ event . tooManyRobots . numRobotsOnField } robots on the field, `
124
+ + `but only ${ event . tooManyRobots . numRobotsAllowed } are allowed` ;
124
125
}
125
126
if ( event . ballLeftFieldTouchLine != null ) {
126
127
return `${ teamAndBot ( event . ballLeftFieldTouchLine ) } kicked ball out via touch line` ;
@@ -140,6 +141,9 @@ export const mapGameEventToText = function (event) {
140
141
if ( event . chippedGoal != null ) {
141
142
return `${ teamAndBot ( event . chippedGoal ) } chipped on goal` ;
142
143
}
144
+ if ( event . invalidGoal != null ) {
145
+ return `Scored goal by ${ teamAndBot ( event . invalidGoal ) } is invalid: ${ event . invalidGoal . message } ` ;
146
+ }
143
147
if ( event . aimlessKick != null ) {
144
148
return `${ teamAndBot ( event . aimlessKick ) } kicked aimlessly` ;
145
149
}
@@ -180,7 +184,7 @@ export const mapGameEventToText = function (event) {
180
184
}
181
185
if ( event . attackerTooCloseToDefenseArea != null ) {
182
186
return `${ teamAndBot ( event . attackerTooCloseToDefenseArea ) } too close to opponent defense area `
183
- + `(${ distance ( event . attackerTooCloseToDefenseArea . distance ) } )` ;
187
+ + `(${ distance ( event . attackerTooCloseToDefenseArea . distance ) } m )` ;
184
188
}
185
189
if ( event . botInterferedPlacement != null ) {
186
190
return `${ teamAndBot ( event . botInterferedPlacement ) } interfered placement` ;
@@ -311,5 +315,17 @@ export const mapGameEventToText = function (event) {
311
315
return `Major unsporting behavior by ${ teamAndBot ( event . unsportingBehaviorMajor ) } : `
312
316
+ event . unsportingBehaviorMajor . reason ;
313
317
}
318
+ if ( event . boundaryCrossing != null ) {
319
+ return `${ teamAndBot ( event . boundaryCrossing ) } kicked the ball over the field boundary` ;
320
+ }
321
+ if ( event . penaltyKickFailed != null ) {
322
+ return `Penalty kick failed by ${ teamAndBot ( event . penaltyKickFailed ) } ` ;
323
+ }
324
+ if ( event . challengeFlag != null ) {
325
+ return `${ teamAndBot ( event . challengeFlag ) } raised a challenge flag` ;
326
+ }
327
+ if ( event . emergencyStop != null ) {
328
+ return `Emergency stop for ${ teamAndBot ( event . emergencyStop ) } executed` ;
329
+ }
314
330
return 'unknown game event' ;
315
331
} ;
0 commit comments