Substitutions queued by the manager and made together, so they share one stoppage and one window.
More...
#include <match_changes.h>
|
| Refusal | check (const MatchEngine &engine, bool home, std::span< const Player *const > bench, PlayerID out, PlayerID in) const |
| | Whether out can be replaced by in given the rules and the changes already planned (nothing is added).
|
| |
| Refusal | add (const MatchEngine &engine, bool home, std::span< const Player *const > bench, PlayerID out, PlayerID in) |
| | check() and, when allowed, appends the change.
|
| |
| bool | remove (std::size_t index) |
| | Drops one planned change (false for a bad index).
|
| |
| void | clear () |
| | Drops every planned change and the confirmation.
|
| |
| std::span< const PlannedSubstitution > | entries () const |
| |
| bool | empty () const |
| |
| bool | involves (PlayerID player) const |
| | The player is leaving or coming on in a planned change.
|
| |
| PlayerID | replacementFor (PlayerID out) const |
| | Planned replacement of an outgoing player (0 when none).
|
| |
| void | confirm () |
| | Hands the plan to the referee: made at the next stoppage.
|
| |
| bool | isConfirmed () const |
| |
| std::vector< SubstitutionOutcome > | apply (MatchEngine &engine, bool home, std::span< const Player *const > bench) |
| | Makes every planned change now, in order, without advancing the engine in between (so they count as one window), then clears the plan. Changes the engine refuses carry the reason.
|
| |
| std::vector< SubstitutionOutcome > | applyIfDue (MatchEngine &engine, bool home, std::span< const Player *const > bench) |
| | apply() once the plan is confirmed and play has stopped; nothing (an empty result) otherwise.
|
| |
Substitutions queued by the manager and made together, so they share one stoppage and one window.
◆ add()
check() and, when allowed, appends the change.
◆ apply()
Makes every planned change now, in order, without advancing the engine in between (so they count as one window), then clears the plan. Changes the engine refuses carry the reason.
◆ applyIfDue()
apply() once the plan is confirmed and play has stopped; nothing (an empty result) otherwise.
◆ check()
Whether out can be replaced by in given the rules and the changes already planned (nothing is added).
- Parameters
-
| bench | The side's substitutes (the matchday squad's reserves). |
◆ clear()
| void MatchChanges::SubstitutionPlan::clear |
( |
| ) |
|
Drops every planned change and the confirmation.
◆ confirm()
| void MatchChanges::SubstitutionPlan::confirm |
( |
| ) |
|
|
inline |
Hands the plan to the referee: made at the next stoppage.
◆ empty()
| bool MatchChanges::SubstitutionPlan::empty |
( |
| ) |
const |
|
inline |
◆ entries()
◆ involves()
| bool MatchChanges::SubstitutionPlan::involves |
( |
PlayerID |
player | ) |
const |
The player is leaving or coming on in a planned change.
◆ isConfirmed()
| bool MatchChanges::SubstitutionPlan::isConfirmed |
( |
| ) |
const |
|
inline |
◆ remove()
| bool MatchChanges::SubstitutionPlan::remove |
( |
std::size_t |
index | ) |
|
Drops one planned change (false for a bad index).
◆ replacementFor()
Planned replacement of an outgoing player (0 when none).
◆ confirmed
| bool MatchChanges::SubstitutionPlan::confirmed = false |
|
private |
◆ planned
The documentation for this class was generated from the following files: