Move the amount of culture to reach to win into a constant.
This commit is contained in:
parent
3587196bd9
commit
f427f4e2b6
1
src/constants.ts
Normal file
1
src/constants.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export const CULTURE_TO_WIN = 20000;
|
@ -1,8 +1,9 @@
|
|||||||
import { produce } from 'immer';
|
import { produce } from 'immer';
|
||||||
|
|
||||||
import { getBuilding, getProduction, getStorage, getUnitSource, shuffle } from './utils';
|
import { CULTURE_TO_WIN } from './constants';
|
||||||
import village, { type VillageState } from "./village";
|
|
||||||
import type { ProductionType } from './types';
|
import type { ProductionType } from './types';
|
||||||
|
import { getProduction, getStorage, shuffle } from './utils';
|
||||||
|
import village, { type VillageState } from "./village";
|
||||||
|
|
||||||
|
|
||||||
let lastFrame: number;
|
let lastFrame: number;
|
||||||
@ -84,7 +85,7 @@ export default function update(timestamp: number) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Check if the game is won.
|
// Check if the game is won.
|
||||||
if (V.resources.culture >= 2000) {
|
if (V.resources.culture >= CULTURE_TO_WIN) {
|
||||||
V.victory = true;
|
V.victory = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user