diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 0000000..782c886 --- /dev/null +++ b/src/constants.ts @@ -0,0 +1 @@ +export const CULTURE_TO_WIN = 20000; diff --git a/src/update.ts b/src/update.ts index 137f6a7..544ad4b 100644 --- a/src/update.ts +++ b/src/update.ts @@ -1,8 +1,9 @@ import { produce } from 'immer'; -import { getBuilding, getProduction, getStorage, getUnitSource, shuffle } from './utils'; -import village, { type VillageState } from "./village"; +import { CULTURE_TO_WIN } from './constants'; import type { ProductionType } from './types'; +import { getProduction, getStorage, shuffle } from './utils'; +import village, { type VillageState } from "./village"; let lastFrame: number; @@ -84,7 +85,7 @@ export default function update(timestamp: number) { }); // Check if the game is won. - if (V.resources.culture >= 2000) { + if (V.resources.culture >= CULTURE_TO_WIN) { V.victory = true; }