bourgade/src/village.ts

34 lines
623 B
TypeScript
Raw Normal View History

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<VillageState>({
buildings: [
createBuilding(buildings.townhall),
],
resources: {
wood: 100,
stone: 100,
iron: 100,
food: 0,
culture: 0,
},
});
export default village;