ZoneState

Whether a zone is free, spoken for, or covered.

Three states rather than a pair of booleans, because the invariants this subsystem must hold are statements about states and are far easier to assert when the state is a single value. The distinction between being claimed and being covered is the one that matters: a claimed zone is already unavailable to everyone else, but nobody's body is in it yet, so it counts against availability and not against coverage.

Covered, not occupied, and the word is chosen rather than inherited. Plain English calls a zone with three people standing in it occupied, so "occupied" is the wrong word for space a vehicle's body fills -- and it becomes actively misleading once a zone can hold a population that takes no exclusive claim at all. "Covers" is the word this subsystem's own prose has always used for a body spanning zones; the identifiers now agree with it.

Entries

Link copied to clipboard

Nothing holds the zone.

Link copied to clipboard

A holder has reserved the zone and is travelling into it, but does not yet cover it. Reserving before entering is what prevents two transporters from both starting into the same free zone and arriving together.

Link copied to clipboard

A holder's body covers the zone.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Functions

Link copied to clipboard
fun valueOf(value: String): ZoneState

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.