add game interface for genericity over simulation / actual play
This commit is contained in:
parent
aa98d8805b
commit
5d2ca505d7
1 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
import { Awaitable } from "../utils.ts";
|
||||||
|
|
||||||
export type Info = { kind: "abscent" } | { kind: "somewhere" } | { kind: "there" };
|
export type Info = { kind: "abscent" } | { kind: "somewhere" } | { kind: "there" };
|
||||||
|
|
||||||
export type GuessResult = { kind: "success" } | { kind: "failure"; informations: Info[] };
|
export type GuessResult = { kind: "success" } | { kind: "failure"; informations: Info[] };
|
||||||
|
|
||||||
|
export interface Gaming {
|
||||||
|
length(): number;
|
||||||
|
guess(guess: string, known: string): Awaitable<GuessResult>;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue