Reference · Views, replay and player
MatchResulttype
Public outcome recorded when a match ends.
Import it
import type { MatchResult } from "@johnmorrisdotca/gunjin";
Definition
type MatchResult = {
winner: Player | null;
reason: "objective-captured" | "capture-threshold" | "blocked" | "flag-won" | "flag-held" | "resigned" | "agreed-draw" | "repetition";
};
Members
| Name | Type | Description |
|---|---|---|
winner | Player | null | |
reason | "objective-captured" | "capture-threshold" | "blocked" | "flag-won" | "flag-held" | "resigned" | "agreed-draw" | "repetition" |
Examples
import type { MatchResult } from "@johnmorrisdotca/gunjin";
const value: MatchResult = {winner:null,reason:"agreed-draw"};
console.log(value);{ winner: null, reason: 'agreed-draw' }What it prints (run when this page was built)