c1cc70eeb9
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>
11 lines
363 B
TypeScript
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;
|
|
}
|