Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change state model #19

Open
ahasselbring opened this issue Apr 18, 2023 · 0 comments
Open

Change state model #19

ahasselbring opened this issue Apr 18, 2023 · 0 comments

Comments

@ahasselbring
Copy link
Member

ahasselbring commented Apr 18, 2023

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.

@ahasselbring ahasselbring added this to the RoboCup 2023 milestone Apr 20, 2023
@ahasselbring ahasselbring removed this from the RoboCup 2023 milestone Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant