add game interface for genericity over simulation / actual play

This commit is contained in:
JOLIMAITRE Matthieu 2024-04-30 16:40:38 +02:00
parent aa98d8805b
commit 5d2ca505d7

View file

@ -1,3 +1,10 @@
import { Awaitable } from "../utils.ts";
export type Info = { kind: "abscent" } | { kind: "somewhere" } | { kind: "there" };
export type GuessResult = { kind: "success" } | { kind: "failure"; informations: Info[] };
export interface Gaming {
length(): number;
guess(guess: string, known: string): Awaitable<GuessResult>;
}