Records for the JSON the clients read, leaving out only the fields TypeScript leaves undefined. GameLoop is the single thread that owns live state; ManualScheduler replaces Jest's fake timers in tests. Keycloak tokens are verified with jose4j and the same checks as before.
21 lines
555 B
Java
21 lines
555 B
Java
package app.playmancala.model;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
public enum EndReason {
|
|
@JsonProperty("completed") COMPLETED,
|
|
@JsonProperty("left") LEFT,
|
|
@JsonProperty("timeout") TIMEOUT,
|
|
// Only in games saved before the game clock.
|
|
@JsonProperty("inactive") INACTIVE;
|
|
|
|
// The value stored in the games.end_reason column.
|
|
public String wireName() {
|
|
return name().toLowerCase();
|
|
}
|
|
|
|
public static EndReason fromWireName(String value) {
|
|
return valueOf(value.toUpperCase());
|
|
}
|
|
}
|