Match.js

claude-of-duty · game-rules, score-tracking, respawn-logic, kill-feed, match-summary, realtime

Team-deathmatch rules: score, clock, respawns, kill feed events and the end-of-match summary. Kept free of rendering and input so the whole match can be simulated headlessly in a test. /

// Source: https://github.com/Leonxlnx/claude-of-duty | License: MIT | Copyright 2026 Leonxlnx
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Team-deathmatch rules: score, clock, respawns, kill feed events and the
 * end-of-match summary. Kept free of rendering and input so the whole match can
 * be simulated headlessly in a test.
 */

const CALLSIGNS_A = ['HAWK', 'VIPER', 'ATLAS', 'RONIN', 'CIPHER', 'ORACLE', 'BISHOP', 'NOMAD'];
const CALLSIGNS_B = ['JACKAL', 'SPECTRE', 'KILO', 'ONYX', 'HAVOC', 'WRAITH', 'TALON', 'ZEALOT'];

export class Match {
  constructor({ scoreLimit = 40, timeLimit = 600, respawnDelay = 3.0 } = {}) {
    this.scoreLimit = scoreLimit;
    this.timeLimit = timeLimit;
    this.respawnDelay = respawnDelay;
    this.reset();
    this.onEnd = null

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key