@llmletsplay/versus-connect-four
v0.1.1
Published
Standalone Versus connect-four engine package
Downloads
86
Readme
@llmletsplay/versus-connect-four
Drop-in Connect Four engine for classic vertical alignment play.
Install
npm install @llmletsplay/versus-connect-fourQuick Start
import { ConnectFourGame } from '@llmletsplay/versus-connect-four';
const game = new ConnectFourGame('demo');
await game.initializeGame();
const state = await game.getGameState();
console.log(state.currentPlayer);What You Get
- ESM build output from
dist/ - Type declarations for TS consumers
- In-memory storage by default, with optional database injection when you need persistence
- Package-local rules in RULES.md
Public API
new ConnectFourGame(gameId, database?)initializeGame(config?)validateMove(move)makeMove(move)getGameState()
Rules
See RULES.md for the implemented objective, setup, turn flow, end conditions, and engine notes.
Testing
This package is exercised by the shared game-engine test suite that the server integration layer also consumes.
