Skip to content

feat: AI-Native company building mini-game in Doom Accelerator#28

Merged
nitrocode merged 2 commits into
mainfrom
copilot/ai-native-incorporate-token-maxxing
Apr 22, 2026
Merged

feat: AI-Native company building mini-game in Doom Accelerator#28
nitrocode merged 2 commits into
mainfrom
copilot/ai-native-incorporate-token-maxxing

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 22, 2026

Extends the "Accelerate the Doom" game with idle/clicker mechanics themed around token maxxing, building an AI-Native company, and replacing human workers with AI.

Core module (death-clock-core.js)

  • COMPANY_ROLES — 7 fireable human roles (Social Media Manager → CFO), each with a DP cost and passive tps bonus
  • AI_AGENTS — 6 stackable passive token generators (ChatBot Intern → AI Strategy Consultant), costs/tps scale exponentially
  • COMPANY_STAGES — 5 progression tiers keyed on workers replaced: Garage Startup → AI-Curious Disruptor → AI-First Pivot → AI-Native Company → Fully Automated Corp
  • computePassiveRate(ownedAgents, replacedRoles) — pure fn summing agent counts × tps + fired role tps
  • getCompanyStage(workersReplaced) — returns current stage object

Game layer (script.js)

  • fireWorker(id) / purchaseAgent(id) — deduct DP, update passive rate, persist to localStorage
  • startPassiveLoop() — 200 ms setInterval; updates only numeric counters (tokens, DP, milestone race) to avoid full DOM re-renders on every tick
  • Full shop re-renders (renderWorkforcePanel, renderAgentShop, updateCompanyStage) triggered only on purchase/fire actions
  • 4 new badges: Layoff Legend, Token Maxxer, AI-Native CEO, Lights Out
  • Company state persisted separately under tokenDeathclockCompany in localStorage

UI (index.html / styles.css)

  • Company stage banner with live passive-rate readout sits between the Upgrade Shop and footer
  • Workforce panel (grid of worker cards — affordable/unaffordable/automated states)
  • Agent shop (grid of agent cards with owned-count overlay)

Tests

  • 30 new unit tests covering COMPANY_ROLES, AI_AGENTS, COMPANY_STAGES, computePassiveRate (edge cases: null inputs, fractional/negative counts, unknown ids), and getCompanyStage (boundary transitions, floor behaviour)
  • Total: 228 tests passing; coverage 98.16% stmts / 95.23% branches

Copilot AI and others added 2 commits April 22, 2026 14:53
- Add COMPANY_ROLES (7 human roles that can be fired/replaced with AI)
- Add AI_AGENTS (6 passive token generators, stackable)
- Add COMPANY_STAGES (5 progression tiers from Garage Startup → Fully Automated Corp)
- Add computePassiveRate() and getCompanyStage() pure functions to core
- Add 4 new badges: layoff_legend, token_maxxer_badge, ai_native_ceo, lights_out
- Passive generation loop (200ms tick) continuously adds tokens from agents+workers
- Company stage banner with passive rate display
- Worker panel: fire human roles for DP to unlock passive token/sec
- Agent shop: purchase AI agents (stackable) for passive token generation
- Persist company state in localStorage (replacedWorkers, ownedAgents)
- 30 new unit tests; total 228 passing; coverage 98.16% stmts / 95.23% branches

Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/067d9c58-898d-4868-bb22-67f10e1eebf8

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

👁️ PR Preview

🚀 Open Preview

Deployed from commit 595d062 · Updates on every push to this PR
(Preview is removed automatically when the PR is closed.)

@nitrocode nitrocode merged commit 707cb67 into main Apr 22, 2026
3 checks passed
@nitrocode nitrocode deleted the copilot/ai-native-incorporate-token-maxxing branch April 22, 2026 15:07
github-actions Bot added a commit that referenced this pull request Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants