feat: AI-Native company building mini-game in Doom Accelerator#28
Merged
Conversation
- 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>
… on each tick 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>
Copilot created this pull request from a session on behalf of
nitrocode
April 22, 2026 15:02
View session
Contributor
👁️ PR Preview
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 passivetpsbonusAI_AGENTS— 6 stackable passive token generators (ChatBot Intern → AI Strategy Consultant), costs/tps scale exponentiallyCOMPANY_STAGES— 5 progression tiers keyed on workers replaced: Garage Startup → AI-Curious Disruptor → AI-First Pivot → AI-Native Company → Fully Automated CorpcomputePassiveRate(ownedAgents, replacedRoles)— pure fn summing agent counts × tps + fired role tpsgetCompanyStage(workersReplaced)— returns current stage objectGame layer (
script.js)fireWorker(id)/purchaseAgent(id)— deduct DP, update passive rate, persist tolocalStoragestartPassiveLoop()— 200 mssetInterval; updates only numeric counters (tokens, DP, milestone race) to avoid full DOM re-renders on every tickrenderWorkforcePanel,renderAgentShop,updateCompanyStage) triggered only on purchase/fire actionstokenDeathclockCompanyinlocalStorageUI (
index.html/styles.css)Tests
COMPANY_ROLES,AI_AGENTS,COMPANY_STAGES,computePassiveRate(edge cases: null inputs, fractional/negative counts, unknown ids), andgetCompanyStage(boundary transitions, floor behaviour)