@gamepark/its-a-wonderful-world 2.4.2 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,8 @@ export default class ItsAWonderfulWorld extends SimultaneousGame<GameState, Move
20
20
  constructor(options: ItsAWonderfulWorldOptions);
21
21
  isTurnToPlay(playerId: EmpireName): boolean;
22
22
  isOver(): boolean;
23
- getAutomaticMove(): Move | void;
23
+ getAutomaticMoves(): Move[];
24
+ getAutomaticMove(): Move | undefined;
24
25
  getLegalMoves(empire: EmpireName): Move[];
25
26
  play(move: Move): void;
26
27
  getScore(empire: EmpireName): number;
@@ -36,7 +37,7 @@ export default class ItsAWonderfulWorld extends SimultaneousGame<GameState, Move
36
37
  giveTime(playerId: EmpireName): number;
37
38
  }
38
39
  export declare function setupPlayers(options: ItsAWonderfulWorldOptions): Player[];
39
- export declare function getPredictableAutomaticMoves(state: GameState | GameView): Move & MoveView | void;
40
+ export declare function getPredictableAutomaticMoves(state: GameState | GameView): Move & MoveView | undefined;
40
41
  export declare function getLegalMoves(player: Player, phase: Phase): Move[];
41
42
  export declare function getCost(card: number): (Resource | Character)[];
42
43
  export declare function getRemainingCost(construction: Construction): {
@@ -167,6 +167,10 @@ var ItsAWonderfulWorld = (function (_super) {
167
167
  ItsAWonderfulWorld.prototype.isOver = function () {
168
168
  return isOver(this.state);
169
169
  };
170
+ ItsAWonderfulWorld.prototype.getAutomaticMoves = function () {
171
+ var move = this.getAutomaticMove();
172
+ return move ? [move] : [];
173
+ };
170
174
  ItsAWonderfulWorld.prototype.getAutomaticMove = function () {
171
175
  var e_1, _a;
172
176
  switch (this.state.phase) {
@@ -438,6 +442,7 @@ function getPredictableAutomaticMoves(state) {
438
442
  }
439
443
  finally { if (e_2) throw e_2.error; }
440
444
  }
445
+ return;
441
446
  }
442
447
  exports.getPredictableAutomaticMoves = getPredictableAutomaticMoves;
443
448
  function getLegalMoves(player, phase) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamepark/its-a-wonderful-world",
3
- "version": "2.4.2",
3
+ "version": "2.5.0",
4
4
  "description": "It's a Wonderful World rules for Game Park",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,13 +12,19 @@
12
12
  "publishConfig": {
13
13
  "access": "public"
14
14
  },
15
- "peerDependencies": {
16
- "@gamepark/rules-api": "~5.11.2",
17
- "lodash.shuffle": "^4.2.0"
18
- },
19
15
  "scripts": {
20
16
  "build": "tsc",
21
17
  "prepublishOnly": "tsc"
22
18
  },
23
- "gitHead": "976b78c55eab1bb4917da4c725c0a01eb5a91d9a"
19
+ "peerDependencies": {
20
+ "@gamepark/rules-api": "~5.14.0",
21
+ "lodash.shuffle": "^4.2.0"
22
+ },
23
+ "devDependencies": {
24
+ "@gamepark/rules-api": "~5.14.0",
25
+ "@types/lodash.shuffle": "^4.2.7",
26
+ "i18next": "^21.3.2",
27
+ "lodash.shuffle": "^4.2.0"
28
+ },
29
+ "gitHead": "b0035e7f8861377552de5df50ead1cff617dd1e1"
24
30
  }