import { writable } from "svelte/store"; import buildings from "./buildings"; import { createBuilding } from "./create"; import type { Building } from "./types"; export interface VillageState { buildings: Building[]; resources: { wood: number; stone: number; iron: number; food: number; culture: number; }; } const village = writable({ buildings: [ createBuilding(buildings.townhall), createBuilding(buildings.woodcutter), createBuilding(buildings.pit), createBuilding(buildings.mine), createBuilding(buildings.field), ], resources: { wood: 60, stone: 60, iron: 60, food: 50, culture: 0, }, }); export default village;