mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-14 06:58:00 +00:00
36 lines
913 B
TypeScript
36 lines
913 B
TypeScript
import { z } from 'zod';
|
|
|
|
export enum Orientation {
|
|
OppositeLandscape = 'opposite-landscape',
|
|
Landscape = 'landscape',
|
|
Portrait = 'portrait',
|
|
}
|
|
|
|
export enum GameFormat {
|
|
Commander = 'commander',
|
|
Standard = 'standard',
|
|
TwoHeadedGiant = 'two-headed-giant',
|
|
}
|
|
|
|
export type Settings = {
|
|
keepAwake: boolean;
|
|
showStartingPlayer: boolean;
|
|
goFullscreenOnStart: boolean;
|
|
};
|
|
|
|
export type InitialGameSettings = {
|
|
startingLifeTotal: number;
|
|
useCommanderDamage: boolean;
|
|
gameFormat?: GameFormat;
|
|
numberOfPlayers: number;
|
|
orientation: Orientation;
|
|
};
|
|
|
|
export const InitialGameSettingsSchema = z.object({
|
|
startingLifeTotal: z.number().min(1).max(200).default(20),
|
|
useCommanderDamage: z.boolean().default(false),
|
|
gameFormat: z.nativeEnum(GameFormat).optional(),
|
|
numberOfPlayers: z.number().min(1).max(6).default(2),
|
|
orientation: z.nativeEnum(Orientation).default(Orientation.Landscape),
|
|
});
|