Skip to content

Change state model #19

Description

@ahasselbring

After German Open: The members of game_controller::types::Game after sides and before teams should be represented about as follows:

enum PenaltyShootoutActiveState {
  Wait,
  Playing,
  AfterShot,
}

enum PenaltyShootoutState {
  BeforePenaltyShootout,
  Timeout(Timer),
  Active {
    timer: Timer,
    state: PenaltyShootoutActiveState,
    for: Side
  },
}

enum Half {
  First,
  Second,
}

enum SetPlayType {
  KickOff,
  GoalKick,
  KickIn,
  CornerKick,
  // ...
}

enum SetPlayPhase {
  Setup(Timer), // TODO: timeout-rewind-timer
  Wait, // TODO: timeout-rewind-timer
  Playing(Timer),
}

enum BeforeKickOffState {
  BeforeHalf,
  Timeout(Timer),
}

enum NormalState {
  BeforeKickOff {
    state: BeforeKickOffState,
    next_for: Side,
  },
  SetPlay {
    ty: SetPlayType,
    phase: SetPlayPhase,
    for: Side,
  },
  Playing,
  AfterHalf,
}

enum State {
  Normal {
    half: Half,
    timer: Timer,
    state: NormalState,
  },
  PenaltyShootout(PenaltyShootoutState),
}

The control message can still be created from this.

Activity

  1. added this to the RoboCup 2023 milestone on Apr 20, 2023
  2. removed this from the RoboCup 2023 milestone on Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions