Files
AIHostingTycoon/packages/game-simulation/src/actions/data.ts
T
josh c1cc70eeb9
Balance Check / balance-simulation (pull_request) Successful in 38s
Balance Check / multi-run-balance (pull_request) Successful in 13m44s
Rename AI Tycoon to Token Empire across entire codebase
Full rebrand: UI display text, package scope (@ai-tycoon/* -> @token-empire/*),
localStorage keys, Docker/CI image paths, database names, and documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-27 21:04:07 -04:00

11 lines
363 B
TypeScript

import type { GameState, OwnedDataset } from '@token-empire/shared';
export function purchaseDataset(state: GameState, dataset: OwnedDataset, cost: number): boolean {
if (state.economy.money < cost) return false;
state.economy.money -= cost;
state.data.ownedDatasets.push(dataset);
state.data.totalTrainingTokens += dataset.sizeTokens;
return true;
}