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; }