@llmletsplay/versus-game-core
v0.1.1
Published
Shared core types and helpers for standalone Versus game packages
Downloads
234
Readme
@llmletsplay/versus-game-core
Shared runtime types and helpers for the standalone Versus game packages.
This package is headless infrastructure. It does not include any bundled UI components or styling primitives.
Install
npm install @llmletsplay/versus-game-coreWhat You Get
BaseGamefor shared turn-based flow, persistence hooks, and history handlingInMemoryDatabaseProviderfor zero-config local storage- Shared type contracts such as
GameState,GameMove, andMoveValidationResult - Logging and metadata helpers used by the publishable game packages
Quick Start
import { BaseGame, InMemoryDatabaseProvider } from '@llmletsplay/versus-game-core';
const storage = new InMemoryDatabaseProvider();
console.log(typeof BaseGame, storage.constructor.name);Host App Pattern
Most apps should keep a game instance in memory, reflect getGameState() into local UI state, and validate both user and agent moves against that same instance.
See:
examples/agent-turn-loop.mjsexamples/react-agent-omok.tsx
Notes
This package provides infrastructure rather than a playable game. Consumers normally install it transitively through a game package such as @llmletsplay/versus-chess or @llmletsplay/versus-tic-tac-toe.
