move-by-move 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/lib/index.d.ts +3 -8
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -2,17 +2,12 @@ export interface GameAction {
2
2
  type: string;
3
3
  }
4
4
  export interface Game {
5
- subscribe(listener: Function): Function;
6
- unsubscribe(listener: Function): Function;
5
+ subscribe(listener: Function): void;
6
+ unsubscribe(listener: Function): void;
7
7
  getState(): GameState;
8
8
  move(action: GameAction): void;
9
9
  }
10
10
  export declare type GameState = Object;
11
11
  export declare type RuleIO = [action: GameAction, state: GameState];
12
- declare const createGame: (rules: ((input: RuleIO) => RuleIO)[], initialGameState: GameState) => {
13
- subscribe: (listener: Function) => void;
14
- unsubscribe: (listener: Function) => void;
15
- getState: () => Object;
16
- move: (action: GameAction) => void;
17
- };
12
+ declare const createGame: (rules: ((input: RuleIO) => RuleIO)[], initialGameState: GameState) => Game;
18
13
  export default createGame;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "move-by-move",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Simple game engine for turn based games",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",