seatingLocked function

bool seatingLocked(
  1. AccessSnapshot? access,
  2. String tier
)

Whether access is known not to include seating a bot in tier.

The rule is the engine's capabilityAllows for bot.use: every bot belongs to exactly one tier, and a grant covers only the tier it names. An unknown access is not a lock.

Presentation only. The server decides when it seats the bot; this just stops a paid opponent looking free until then. It applies to server seating alone: a game played on the device is not priced, so the untimed picker never asks.

Implementation

bool seatingLocked(AccessSnapshot? access, String tier) {
  if (access == null) return false;
  return !access.permissions.any(
    (grant) =>
        grant.kind == AccessCapabilityKindEnum.botPeriodUse &&
        grant.tier == tier,
  );
}