Skip to content

Commit 57ea2cd

Browse files
committed
[refactoring] Renaming IsContinued() method to isSkipped
1 parent e93e531 commit 57ea2cd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

internal/app/controller/engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ func (e *Engine) processGameEvent(event *GameEvent) error {
671671

672672
e.State.PlacementPos = e.BallPlacementPos()
673673

674-
if e.State.GameState() != GameStateHalted && !event.IsContinued() && !event.IsSecondary() {
674+
if e.State.GameState() != GameStateHalted && !event.IsSkipped() && !event.IsSecondary() {
675675
teamInFavor := event.ByTeam().Opposite()
676676
if e.State.PlacementPos != nil {
677677
if e.State.TeamState[teamInFavor].CanPlaceBall {

internal/app/controller/gameEvent.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ func (e GameEvent) IsSecondary() bool {
190190
return false
191191
}
192192

193-
// IsContinued checks if the game event is was continued (not stopped) based on the decision of a team
194-
func (e GameEvent) IsContinued() bool {
193+
// IsSkipped checks if the game event is was continued (not stopped) based on the decision of a team
194+
func (e GameEvent) IsSkipped() bool {
195195
switch e.Type {
196196
case GameEventBotPushedBotSkipped,
197197
GameEventBotCrashUniqueSkipped:

internal/app/controller/placementPos.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func (e *Engine) BallPlacementPos() *Location {
1212
return nil
1313
}
1414
event := e.State.GameEvents[0]
15-
if event.IsSecondary() || event.IsContinued() {
15+
if event.IsSecondary() || event.IsSkipped() {
1616
return nil
1717
}
1818

0 commit comments

Comments
 (0)