# Verified local lobby example

Company-authored technical example. Verified September 10, 2026 using Node **25.6.1**, without a package install or account. The two example players are local test slots, not participants. This demonstrates SDK local state and errors; it does not demonstrate online multiplayer, deployed game activation, payouts, retention or production adoption.

## Run in a fresh directory

Download `run.mjs`, `IVXGameModes.ts`, `package.json` and `LICENSE` from this directory. Keep them together, then run:

```sh
node --experimental-strip-types run.mjs
```

Use the tested Node version with TypeScript stripping support. No npm dependencies are needed for this module. The public npm lookup for `@intelliversex/sdk@5.8.0` returned 404 on September 10, so this example deliberately uses verified source. It is not a newly published npm package.

Source: https://github.com/intelli-verse-x/Intelli-verse-X-SDK/blob/f4329a486c98fe5712dbe9ac7f5c30d1b4f1952c/SDKs/javascript/src/IVXGameModes.ts

SHA-256: `3cc8dedfd634963b16d0c41cd1ef6062b910a4b2a403ffe0e008b765486e844a`. The runner verifies this before importing. Original MIT license accompanies the source; the wrapper is provided under that license.

## Expected result

`players: 2`, `prematureStartRejected: true`, `overflowRejected: true`, `matchCompleted: true`. Match identifiers and time are generated by the SDK, so the example reports boolean checks instead of claiming a stable real-world match record.

## Setup and errors

- `Unknown file extension .ts`: use Node 25.6.1 and the command above.
- Missing module: keep the four files together; use the original filenames.
- Hash mismatch: re-download the pinned source. Do not remove the hash assertion.
- Constructor access: use `IVXGameModes.getInstance()`; its TypeScript constructor is private.
- Empty lobby or an unready slot: `canStartMatch` is false and `startMatch()` throws code -1.
- Third slot in this two-person example: `addPlayer` throws code -1. Handle that error instead of reporting success.
- Production integration: this isolated module needs no credentials; online operations require the supported backend, authenticated session and provisioned project configuration. A local passing run does not verify those requirements.

## Limitations

The SDK result currently uses `startedAt: 0`; do not use it as measured match duration. Local players and ready flags are mutable client state, not trusted attendance or completion proof. Event names and state transitions here must not be used as evidence of real reward eligibility. This source was executed and checked automatically; no independent human technical review is claimed.
