-
Notifications
You must be signed in to change notification settings - Fork 0
/
World.d.ts
44 lines (44 loc) · 1.44 KB
/
World.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import {
DataObject,
IDataObject,
} from '@civ-clone/core-data-object/DataObject';
import { LandMassRegistry } from './LandMassRegistry';
import { RuleRegistry } from '@civ-clone/core-rule/RuleRegistry';
import Generator from '@civ-clone/core-world-generator/Generator';
import { IRegistryIterator } from '@civ-clone/core-registry/Registry';
import Tile from './Tile';
import LandMass from './LandMass';
export interface IWorld extends IDataObject {
build(): Promise<World>;
filter(iterator: IRegistryIterator<Tile>): Tile[];
forEach(iterator: (item: Tile, i: number) => void): void;
get(x: number, y: number): Tile;
height(): number;
includes(tile: Tile): boolean;
landMasses(): LandMass[];
map(iterator: (item: Tile, i: number) => any): any[];
register(...tiles: Tile[]): void;
tiles(): Tile[];
width(): number;
}
export declare class World extends DataObject implements IWorld {
#private;
constructor(
generator: Generator,
ruleRegistry?: RuleRegistry,
landMassRegistry?: LandMassRegistry
);
build(): Promise<World>;
entries(): Tile[];
filter(iterator: IRegistryIterator<Tile>): Tile[];
forEach(iterator: (item: Tile, i: number) => void): void;
get(x: number, y: number): Tile;
height(): number;
includes(tile: Tile): boolean;
landMasses(): LandMass[];
map(iterator: (item: Tile, i: number) => any): any[];
register(...tiles: Tile[]): void;
tiles(): Tile[];
width(): number;
}
export default World;