-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimpleAIClient.d.ts
73 lines (73 loc) · 3.37 KB
/
SimpleAIClient.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import {
ChoiceMeta,
DataForChoiceMeta,
} from '@civ-clone/core-client/ChoiceMeta';
import { CityBuildRegistry } from '@civ-clone/core-city-build/CityBuildRegistry';
import { CityGrowthRegistry } from '@civ-clone/core-city-growth/CityGrowthRegistry';
import { CityRegistry } from '@civ-clone/core-city/CityRegistry';
import { ClientRegistry } from '@civ-clone/core-client/ClientRegistry';
import { Engine } from '@civ-clone/core-engine/Engine';
import { GoodyHutRegistry } from '@civ-clone/core-goody-hut/GoodyHutRegistry';
import { InteractionRegistry } from '@civ-clone/core-diplomacy/InteractionRegistry';
import { PathFinderRegistry } from '@civ-clone/core-world-path/PathFinderRegistry';
import { PlayerGovernmentRegistry } from '@civ-clone/core-government/PlayerGovernmentRegistry';
import { PlayerResearchRegistry } from '@civ-clone/core-science/PlayerResearchRegistry';
import { PlayerTreasuryRegistry } from '@civ-clone/core-treasury/PlayerTreasuryRegistry';
import { PlayerWorldRegistry } from '@civ-clone/core-player-world/PlayerWorldRegistry';
import { RuleRegistry } from '@civ-clone/core-rule/RuleRegistry';
import { TerrainFeatureRegistry } from '@civ-clone/core-terrain-feature/TerrainFeatureRegistry';
import { TileImprovementRegistry } from '@civ-clone/core-tile-improvement/TileImprovementRegistry';
import { Turn } from '@civ-clone/core-turn-based-game/Turn';
import { UnitImprovementRegistry } from '@civ-clone/core-unit-improvement/UnitImprovementRegistry';
import { UnitRegistry } from '@civ-clone/core-unit/UnitRegistry';
import AIClient from '@civ-clone/core-ai-client/AIClient';
import City from '@civ-clone/core-city/City';
import { IAction } from '@civ-clone/core-diplomacy/Negotiation/Action';
import Player from '@civ-clone/core-player/Player';
import Tile from '@civ-clone/core-world/Tile';
import Unit from '@civ-clone/core-unit/Unit';
declare global {
interface ChoiceMetaDataMap {
'negotiation.next-step': IAction;
}
}
export declare class SimpleAIClient extends AIClient {
#private;
constructor(
player: Player,
cityRegistry?: CityRegistry,
cityBuildRegistry?: CityBuildRegistry,
cityGrowthRegistry?: CityGrowthRegistry,
goodyHutRegistry?: GoodyHutRegistry,
pathFinderRegistry?: PathFinderRegistry,
playerGovernmentRegistry?: PlayerGovernmentRegistry,
playerResearchRegistry?: PlayerResearchRegistry,
playerTreasuryRegistry?: PlayerTreasuryRegistry,
playerWorldRegistry?: PlayerWorldRegistry,
ruleRegistry?: RuleRegistry,
terrainFeatureRegistry?: TerrainFeatureRegistry,
tileImprovementRegistry?: TileImprovementRegistry,
unitImprovementRegistry?: UnitImprovementRegistry,
unitRegistry?: UnitRegistry,
engine?: Engine,
clientRegistry?: ClientRegistry,
interactionRegistry?: InteractionRegistry,
turn?: Turn,
randomNumberGenerator?: () => number
);
scoreUnitMove(unit: Unit, tile: Tile): number;
moveUnit(unit: Unit): Promise<void>;
preProcessTurn(): void;
chooseFromList<Name extends keyof ChoiceMetaDataMap>(
meta: ChoiceMeta<Name>
): Promise<DataForChoiceMeta<ChoiceMeta<Name>>>;
takeTurn(): Promise<void>;
private buildItemInCity;
cityLost(city: City, player: Player | null, destroyed: boolean): void;
unitDestroyed(unit: Unit, player: Player | null): void;
private canNegotiate;
private handleNegotiation;
private noOrders;
private shouldAttack;
}
export default SimpleAIClient;