@gamepark/react-client 6.38.5 → 7.0.0-beta.2
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.
- package/dist/Actions/ActionFailed.d.ts +6 -6
- package/dist/Actions/ActionFailed.js +4 -8
- package/dist/Actions/ActionFailed.js.map +1 -1
- package/dist/Actions/AnimationComplete.d.ts +6 -6
- package/dist/Actions/AnimationComplete.js +4 -8
- package/dist/Actions/AnimationComplete.js.map +1 -1
- package/dist/Actions/AnimationPaused.d.ts +6 -6
- package/dist/Actions/AnimationPaused.js +4 -8
- package/dist/Actions/AnimationPaused.js.map +1 -1
- package/dist/Actions/AnimationStart.d.ts +5 -5
- package/dist/Actions/AnimationStart.js +1 -4
- package/dist/Actions/AnimationStart.js.map +1 -1
- package/dist/Actions/ClearFailures.d.ts +1 -5
- package/dist/Actions/ClearFailures.js +3 -9
- package/dist/Actions/ClearFailures.js.map +1 -1
- package/dist/Actions/GameNotificationsReceived.d.ts +8 -10
- package/dist/Actions/GameNotificationsReceived.js +2 -9
- package/dist/Actions/GameNotificationsReceived.js.map +1 -1
- package/dist/Actions/GameOver.d.ts +16 -16
- package/dist/Actions/GameOver.js +4 -8
- package/dist/Actions/GameOver.js.map +1 -1
- package/dist/Actions/GameStateLoaded.d.ts +16 -16
- package/dist/Actions/GameStateLoaded.js +7 -20
- package/dist/Actions/GameStateLoaded.js.map +1 -1
- package/dist/Actions/MovePlayed.d.ts +11 -11
- package/dist/Actions/MovePlayed.js +3 -2
- package/dist/Actions/MovePlayed.js.map +1 -1
- package/dist/Actions/MoveUndone.d.ts +7 -7
- package/dist/Actions/MoveUndone.js +4 -9
- package/dist/Actions/MoveUndone.js.map +1 -1
- package/dist/Actions/PlayerQuit.d.ts +5 -11
- package/dist/Actions/PlayerQuit.js +2 -19
- package/dist/Actions/PlayerQuit.js.map +1 -1
- package/dist/Actions/SetAnimationsSpeed.d.ts +1 -6
- package/dist/Actions/SetAnimationsSpeed.js +3 -9
- package/dist/Actions/SetAnimationsSpeed.js.map +1 -1
- package/dist/Actions/giveUp.d.ts +1 -0
- package/dist/Actions/giveUp.js +3 -0
- package/dist/Actions/giveUp.js.map +1 -0
- package/dist/Actions/index.d.ts +7 -12
- package/dist/Actions/index.js +7 -28
- package/dist/Actions/index.js.map +1 -1
- package/dist/Actions/loadGameState.d.ts +14 -0
- package/dist/Actions/loadGameState.js +3 -0
- package/dist/Actions/loadGameState.js.map +1 -0
- package/dist/Actions/playMove.d.ts +10 -0
- package/dist/Actions/playMove.js +3 -0
- package/dist/Actions/playMove.js.map +1 -0
- package/dist/Actions/receiveNotifications.d.ts +8 -0
- package/dist/Actions/receiveNotifications.js +3 -0
- package/dist/Actions/receiveNotifications.js.map +1 -0
- package/dist/Actions/removePlayer.d.ts +5 -0
- package/dist/Actions/removePlayer.js +3 -0
- package/dist/Actions/removePlayer.js.map +1 -0
- package/dist/Actions/reportFailure.d.ts +1 -0
- package/dist/Actions/reportFailure.js +3 -0
- package/dist/Actions/reportFailure.js.map +1 -0
- package/dist/Actions/setGameOver.d.ts +2 -0
- package/dist/Actions/setGameOver.js +3 -0
- package/dist/Actions/setGameOver.js.map +1 -0
- package/dist/Actions/startAnimation.d.ts +1 -0
- package/dist/Actions/startAnimation.js +3 -0
- package/dist/Actions/startAnimation.js.map +1 -0
- package/dist/Actions/undoMove.d.ts +5 -0
- package/dist/Actions/undoMove.js +4 -0
- package/dist/Actions/undoMove.js.map +1 -0
- package/dist/Chat/ChatChannel.d.ts +5 -5
- package/dist/Chat/ChatChannel.js +1 -2
- package/dist/Chat/Message.d.ts +6 -6
- package/dist/Chat/Message.js +1 -2
- package/dist/Chat/index.d.ts +2 -2
- package/dist/Chat/index.js +2 -18
- package/dist/Chat/index.js.map +1 -1
- package/dist/Deckbuilding/Deck.d.ts +5 -5
- package/dist/Deckbuilding/Deck.js +1 -2
- package/dist/Deckbuilding/index.d.ts +4 -4
- package/dist/Deckbuilding/index.js +4 -24
- package/dist/Deckbuilding/index.js.map +1 -1
- package/dist/Deckbuilding/useDeleteDeck.d.ts +5 -2
- package/dist/Deckbuilding/useDeleteDeck.js +9 -15
- package/dist/Deckbuilding/useDeleteDeck.js.map +1 -1
- package/dist/Deckbuilding/useMyDecks.d.ts +3 -2
- package/dist/Deckbuilding/useMyDecks.js +8 -14
- package/dist/Deckbuilding/useMyDecks.js.map +1 -1
- package/dist/Deckbuilding/useSaveDeck.d.ts +5 -2
- package/dist/Deckbuilding/useSaveDeck.js +9 -15
- package/dist/Deckbuilding/useSaveDeck.js.map +1 -1
- package/dist/EjectPlayer/EjectPlayer.d.ts +1 -6
- package/dist/EjectPlayer/EjectPlayer.js +2 -8
- package/dist/EjectPlayer/EjectPlayer.js.map +1 -1
- package/dist/EjectPlayer/index.d.ts +1 -1
- package/dist/EjectPlayer/index.js +1 -17
- package/dist/EjectPlayer/index.js.map +1 -1
- package/dist/Failure/Failure.d.ts +6 -6
- package/dist/Failure/Failure.js +6 -9
- package/dist/Failure/Failure.js.map +1 -1
- package/dist/Failure/index.d.ts +1 -1
- package/dist/Failure/index.js +1 -17
- package/dist/Failure/index.js.map +1 -1
- package/dist/GiveUp/GiveUp.d.ts +7 -7
- package/dist/GiveUp/GiveUp.js +2 -5
- package/dist/GiveUp/GiveUp.js.map +1 -1
- package/dist/GiveUp/index.d.ts +1 -1
- package/dist/GiveUp/index.js +1 -17
- package/dist/GiveUp/index.js.map +1 -1
- package/dist/Hooks/index.d.ts +5 -5
- package/dist/Hooks/index.js +5 -21
- package/dist/Hooks/index.js.map +1 -1
- package/dist/Hooks/useChatMessages.d.ts +7 -12
- package/dist/Hooks/useChatMessages.js +44 -51
- package/dist/Hooks/useChatMessages.js.map +1 -1
- package/dist/Hooks/useMessageAuthor.d.ts +4 -4
- package/dist/Hooks/useMessageAuthor.js +13 -18
- package/dist/Hooks/useMessageAuthor.js.map +1 -1
- package/dist/Hooks/useOptions.d.ts +2 -2
- package/dist/Hooks/useOptions.js +4 -8
- package/dist/Hooks/useOptions.js.map +1 -1
- package/dist/Hooks/useRematch.d.ts +7 -7
- package/dist/Hooks/useRematch.js +18 -19
- package/dist/Hooks/useRematch.js.map +1 -1
- package/dist/Hooks/useSendMessage.d.ts +4 -1
- package/dist/Hooks/useSendMessage.js +6 -14
- package/dist/Hooks/useSendMessage.js.map +1 -1
- package/dist/Log/StartLiveLog.d.ts +1 -4
- package/dist/Log/StartLiveLog.js +3 -5
- package/dist/Log/StartLiveLog.js.map +1 -1
- package/dist/Log/StopLiveLog.d.ts +2 -5
- package/dist/Log/StopLiveLog.js +6 -9
- package/dist/Log/StopLiveLog.js.map +1 -1
- package/dist/Log/index.d.ts +4 -4
- package/dist/Log/index.js +4 -20
- package/dist/Log/index.js.map +1 -1
- package/dist/Log/useLogControls.d.ts +7 -7
- package/dist/Log/useLogControls.js +18 -22
- package/dist/Log/useLogControls.js.map +1 -1
- package/dist/PlayerTime/PlayerTime.d.ts +11 -11
- package/dist/PlayerTime/PlayerTime.js +1 -2
- package/dist/PlayerTime/index.d.ts +1 -1
- package/dist/PlayerTime/index.js +1 -17
- package/dist/PlayerTime/index.js.map +1 -1
- package/dist/Rematch/RematchQueries.d.ts +19 -19
- package/dist/Rematch/RematchQueries.js +23 -13
- package/dist/Rematch/RematchQueries.js.map +1 -1
- package/dist/Rematch/index.d.ts +1 -1
- package/dist/Rematch/index.js +1 -17
- package/dist/Rematch/index.js.map +1 -1
- package/dist/Sound/MuteSounds.d.ts +2 -5
- package/dist/Sound/MuteSounds.js +7 -10
- package/dist/Sound/MuteSounds.js.map +1 -1
- package/dist/Sound/UnmuteSounds.d.ts +1 -4
- package/dist/Sound/UnmuteSounds.js +3 -5
- package/dist/Sound/UnmuteSounds.js.map +1 -1
- package/dist/Sound/index.d.ts +3 -3
- package/dist/Sound/index.js +3 -19
- package/dist/Sound/index.js.map +1 -1
- package/dist/Sound/useSoundControls.d.ts +7 -7
- package/dist/Sound/useSoundControls.js +18 -22
- package/dist/Sound/useSoundControls.js.map +1 -1
- package/dist/Store/DisplayedAction.d.ts +15 -15
- package/dist/Store/DisplayedAction.js +12 -19
- package/dist/Store/DisplayedAction.js.map +1 -1
- package/dist/Store/GamePageState.d.ts +27 -28
- package/dist/Store/GamePageState.js +1 -2
- package/dist/Store/PlayedMove.d.ts +5 -5
- package/dist/Store/PlayedMove.js +1 -2
- package/dist/Store/endAnimation.d.ts +1 -0
- package/dist/Store/endAnimation.js +3 -0
- package/dist/Store/endAnimation.js.map +1 -0
- package/dist/Store/gameMiddleware.d.ts +4 -4
- package/dist/Store/gameMiddleware.js +34 -41
- package/dist/Store/gameMiddleware.js.map +1 -1
- package/dist/Store/gameReducer.d.ts +14 -20
- package/dist/Store/gameReducer.js +462 -525
- package/dist/Store/gameReducer.js.map +1 -1
- package/dist/Store/index.d.ts +4 -3
- package/dist/Store/index.js +4 -19
- package/dist/Store/index.js.map +1 -1
- package/dist/Store/localMovePreviewMiddleware.d.ts +4 -4
- package/dist/Store/localMovePreviewMiddleware.js +19 -18
- package/dist/Store/localMovePreviewMiddleware.js.map +1 -1
- package/dist/Store/store.d.ts +13 -0
- package/dist/Store/store.js +27 -0
- package/dist/Store/store.js.map +1 -0
- package/dist/Tutorial/PlayTutorialMoves.d.ts +1 -9
- package/dist/Tutorial/PlayTutorialMoves.js +2 -6
- package/dist/Tutorial/PlayTutorialMoves.js.map +1 -1
- package/dist/Tutorial/Tutorial.d.ts +5 -5
- package/dist/Tutorial/Tutorial.js +1 -2
- package/dist/Tutorial/TutorialDescription.d.ts +7 -7
- package/dist/Tutorial/TutorialDescription.js +1 -2
- package/dist/Tutorial/index.d.ts +4 -4
- package/dist/Tutorial/index.js +4 -20
- package/dist/Tutorial/index.js.map +1 -1
- package/dist/Tutorial/useTutorial.d.ts +2 -2
- package/dist/Tutorial/useTutorial.js +12 -22
- package/dist/Tutorial/useTutorial.js.map +1 -1
- package/dist/Types/GameAI.d.ts +1 -1
- package/dist/Types/GameAI.js +1 -2
- package/dist/Types/GameData.d.ts +18 -18
- package/dist/Types/GameData.js +1 -2
- package/dist/Types/GameMessage.d.ts +8 -8
- package/dist/Types/GameMessage.js +1 -2
- package/dist/Types/GameMode.d.ts +6 -6
- package/dist/Types/GameMode.js +7 -10
- package/dist/Types/GameMode.js.map +1 -1
- package/dist/Types/GameNotification.d.ts +6 -6
- package/dist/Types/GameNotification.js +1 -2
- package/dist/Types/GameOptions.d.ts +9 -9
- package/dist/Types/GameOptions.js +5 -8
- package/dist/Types/GameOptions.js.map +1 -1
- package/dist/Types/MovePlayedNotification.d.ts +9 -9
- package/dist/Types/MovePlayedNotification.js +6 -12
- package/dist/Types/MovePlayedNotification.js.map +1 -1
- package/dist/Types/MoveUndoneNotification.d.ts +8 -8
- package/dist/Types/MoveUndoneNotification.js +6 -12
- package/dist/Types/MoveUndoneNotification.js.map +1 -1
- package/dist/Types/Player.d.ts +13 -13
- package/dist/Types/Player.js +1 -2
- package/dist/Types/PlayerQuitReason.d.ts +4 -4
- package/dist/Types/PlayerQuitReason.js +5 -8
- package/dist/Types/PlayerQuitReason.js.map +1 -1
- package/dist/Types/ProxyGameData.d.ts +13 -13
- package/dist/Types/ProxyGameData.js +1 -2
- package/dist/Types/Tournament.d.ts +4 -4
- package/dist/Types/Tournament.js +1 -2
- package/dist/Types/index.d.ts +12 -12
- package/dist/Types/index.js +12 -28
- package/dist/Types/index.js.map +1 -1
- package/dist/User/User.d.ts +6 -6
- package/dist/User/User.js +1 -2
- package/dist/User/index.d.ts +2 -2
- package/dist/User/index.js +2 -18
- package/dist/User/index.js.map +1 -1
- package/dist/User/useMe.d.ts +4 -4
- package/dist/User/useMe.js +10 -21
- package/dist/User/useMe.js.map +1 -1
- package/dist/animations/Animation.d.ts +6 -6
- package/dist/animations/Animation.js +1 -2
- package/dist/animations/AnimationContext.d.ts +8 -8
- package/dist/animations/AnimationContext.js +1 -2
- package/dist/animations/AnimationState.d.ts +6 -6
- package/dist/animations/AnimationState.js +1 -2
- package/dist/animations/AnimationStep.d.ts +6 -6
- package/dist/animations/AnimationStep.js +7 -10
- package/dist/animations/AnimationStep.js.map +1 -1
- package/dist/animations/Animations.d.ts +8 -8
- package/dist/animations/Animations.js +15 -22
- package/dist/animations/Animations.js.map +1 -1
- package/dist/animations/AnimationsListener.d.ts +6 -0
- package/dist/animations/AnimationsListener.js +54 -0
- package/dist/animations/AnimationsListener.js.map +1 -0
- package/dist/animations/AnimationsListenerCreator.d.ts +2 -4
- package/dist/animations/AnimationsListenerCreator.js +40 -50
- package/dist/animations/AnimationsListenerCreator.js.map +1 -1
- package/dist/animations/animationMiddleware.d.ts +4 -0
- package/dist/animations/animationMiddleware.js +50 -0
- package/dist/animations/animationMiddleware.js.map +1 -0
- package/dist/animations/index.d.ts +5 -6
- package/dist/animations/index.js +5 -22
- package/dist/animations/index.js.map +1 -1
- package/dist/api/Client/GameClientAPI.d.ts +24 -24
- package/dist/api/Client/GameClientAPI.js +116 -165
- package/dist/api/Client/GameClientAPI.js.map +1 -1
- package/dist/api/Client/GameNotificationsListener.d.ts +5 -5
- package/dist/api/Client/GameNotificationsListener.js +62 -113
- package/dist/api/Client/GameNotificationsListener.js.map +1 -1
- package/dist/api/Client/RemoteGameLoader.d.ts +4 -5
- package/dist/api/Client/RemoteGameLoader.js +66 -62
- package/dist/api/Client/RemoteGameLoader.js.map +1 -1
- package/dist/api/Client/RemoteGameProvider.d.ts +7 -7
- package/dist/api/Client/RemoteGameProvider.js +19 -70
- package/dist/api/Client/RemoteGameProvider.js.map +1 -1
- package/dist/api/Client/apollo-client.d.ts +2 -2
- package/dist/api/Client/apollo-client.js +40 -58
- package/dist/api/Client/apollo-client.js.map +1 -1
- package/dist/api/Client/index.d.ts +4 -3
- package/dist/api/Client/index.js +4 -19
- package/dist/api/Client/index.js.map +1 -1
- package/dist/api/Client/pusher.d.ts +2 -0
- package/dist/api/Client/pusher.js +9 -0
- package/dist/api/Client/pusher.js.map +1 -0
- package/dist/api/GameAPI.d.ts +10 -10
- package/dist/api/GameAPI.js +1 -2
- package/dist/api/Local/ConsoleTools.d.ts +25 -25
- package/dist/api/Local/ConsoleTools.js +78 -86
- package/dist/api/Local/ConsoleTools.js.map +1 -1
- package/dist/api/Local/GameLocalAPI.d.ts +44 -44
- package/dist/api/Local/GameLocalAPI.js +442 -540
- package/dist/api/Local/GameLocalAPI.js.map +1 -1
- package/dist/api/Local/LocalGameProvider.d.ts +15 -15
- package/dist/api/Local/LocalGameProvider.js +18 -58
- package/dist/api/Local/LocalGameProvider.js.map +1 -1
- package/dist/api/Local/index.d.ts +1 -1
- package/dist/api/Local/index.js +1 -17
- package/dist/api/Local/index.js.map +1 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +2 -18
- package/dist/api/index.js.map +1 -1
- package/dist/index.d.ts +16 -18
- package/dist/index.js +16 -36
- package/dist/index.js.map +1 -1
- package/dist/util/ArrayUtil.d.ts +2 -2
- package/dist/util/ArrayUtil.js +16 -21
- package/dist/util/ArrayUtil.js.map +1 -1
- package/package.json +66 -65
- package/dist/Actions/ActionType.d.ts +0 -3
- package/dist/Actions/ActionType.js +0 -8
- package/dist/Actions/ActionType.js.map +0 -1
- package/dist/Scoring/ScoringDescription.d.ts +0 -8
- package/dist/Scoring/ScoringDescription.js +0 -3
- package/dist/Scoring/ScoringDescription.js.map +0 -1
- package/dist/Scoring/index.d.ts +0 -1
- package/dist/Scoring/index.js +0 -18
- package/dist/Scoring/index.js.map +0 -1
- package/dist/util/TimeUtil.d.ts +0 -2
- package/dist/util/TimeUtil.js +0 -27
- package/dist/util/TimeUtil.js.map +0 -1
|
@@ -1,87 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
get
|
|
8
|
-
return
|
|
9
|
-
},
|
|
10
|
-
get
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
gameServerProxy.
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
gameServerProxy.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
localStore.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
weightedWaitForMeTime: 0
|
|
80
|
-
};
|
|
81
|
-
localStorage.setItem(gameServerProxy.storage, JSON.stringify(localStore));
|
|
82
|
-
window.location.reload();
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
exports.consoleTools = consoleTools;
|
|
1
|
+
import { GameSpeed } from '../../Types';
|
|
2
|
+
export function consoleTools(gameServerProxy, store) {
|
|
3
|
+
return {
|
|
4
|
+
get state() {
|
|
5
|
+
return gameServerProxy.getLocalStore().state;
|
|
6
|
+
},
|
|
7
|
+
get store() {
|
|
8
|
+
return store.getState();
|
|
9
|
+
},
|
|
10
|
+
get moves() {
|
|
11
|
+
return gameServerProxy.getLocalStore().actions;
|
|
12
|
+
},
|
|
13
|
+
new: (options) => {
|
|
14
|
+
gameServerProxy.newGame(options);
|
|
15
|
+
window.location.reload();
|
|
16
|
+
},
|
|
17
|
+
undo: (quantity = 1) => {
|
|
18
|
+
gameServerProxy.undo(quantity);
|
|
19
|
+
},
|
|
20
|
+
monkeyOpponents: (start = true) => {
|
|
21
|
+
if (start) {
|
|
22
|
+
gameServerProxy.startBots();
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
gameServerProxy.stopBots();
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
bot: (start = true) => {
|
|
29
|
+
if (start) {
|
|
30
|
+
gameServerProxy.startBots();
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
gameServerProxy.stopBots();
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
setPlayerName: (name, playerId) => {
|
|
37
|
+
gameServerProxy.setPlayerName(name, playerId);
|
|
38
|
+
window.location.reload();
|
|
39
|
+
},
|
|
40
|
+
setAnimationsSpeed: (speed = 1) => {
|
|
41
|
+
gameServerProxy.setAnimationsSpeed(speed);
|
|
42
|
+
},
|
|
43
|
+
tutorial: () => {
|
|
44
|
+
gameServerProxy.newTutorial();
|
|
45
|
+
window.location.reload();
|
|
46
|
+
},
|
|
47
|
+
changePlayer: (playerId) => {
|
|
48
|
+
const localStore = gameServerProxy.getLocalStore();
|
|
49
|
+
localStore.playerId = playerId;
|
|
50
|
+
localStorage.setItem(gameServerProxy.storage, JSON.stringify(localStore));
|
|
51
|
+
window.location.reload();
|
|
52
|
+
},
|
|
53
|
+
timer: (seconds, playerId) => {
|
|
54
|
+
const localStore = gameServerProxy.getLocalStore();
|
|
55
|
+
localStore.options = {
|
|
56
|
+
speed: GameSpeed.RealTime,
|
|
57
|
+
maxExceedTime: 60,
|
|
58
|
+
maxSpareTime: 180
|
|
59
|
+
};
|
|
60
|
+
if (playerId === undefined)
|
|
61
|
+
playerId = localStore.playerId;
|
|
62
|
+
const player = localStore.players.find(player => player.id === playerId);
|
|
63
|
+
player.time = {
|
|
64
|
+
playing: true,
|
|
65
|
+
lastChange: new Date().toISOString(),
|
|
66
|
+
availableTime: seconds * 1000,
|
|
67
|
+
highestPlayTime: 0,
|
|
68
|
+
highestDownTime: 0,
|
|
69
|
+
cumulatedPlayTime: 0,
|
|
70
|
+
cumulatedDownTime: 0,
|
|
71
|
+
cumulatedWaitForMeTime: 0,
|
|
72
|
+
weightedWaitForMeTime: 0
|
|
73
|
+
};
|
|
74
|
+
localStorage.setItem(gameServerProxy.storage, JSON.stringify(localStore));
|
|
75
|
+
window.location.reload();
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
87
79
|
//# sourceMappingURL=ConsoleTools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleTools.js","sourceRoot":"","sources":["../../../src/api/Local/ConsoleTools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConsoleTools.js","sourceRoot":"","sources":["../../../src/api/Local/ConsoleTools.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { GameSetup, OptionsSpec, RulesCreator } from '@gamepark/rules-api';
|
|
2
|
-
import { Dispatch } from 'redux';
|
|
3
|
-
import { GameAI, GameNotification, Player, ProxyGameData } from '../../Types';
|
|
4
|
-
import { GameAPI } from '../GameAPI';
|
|
5
|
-
import { LocalGameProviderProps } from './LocalGameProvider';
|
|
6
|
-
export declare class GameLocalAPI<Game, Move = string, PlayerId =
|
|
7
|
-
players: any;
|
|
8
|
-
} | undefined = undefined> implements GameAPI<Move, PlayerId> {
|
|
9
|
-
storage: string;
|
|
10
|
-
gameSetup: GameSetup<Game, Options>;
|
|
11
|
-
Rules: RulesCreator<Game, Move, PlayerId>;
|
|
12
|
-
ClientRules: RulesCreator<GameView, MoveView, PlayerId>;
|
|
13
|
-
optionsSpec?: OptionsSpec<Options>;
|
|
14
|
-
private readonly ai?;
|
|
15
|
-
private readonly tutorial?;
|
|
16
|
-
dispatch?: Dispatch;
|
|
17
|
-
private lastActionId;
|
|
18
|
-
private notificationsCount;
|
|
19
|
-
private autoPlayersCounter;
|
|
20
|
-
private aiProcessing;
|
|
21
|
-
private tutorialMovesToPlay;
|
|
22
|
-
constructor({ Rules, ServerRules, GameSetup, ai, game, storage, optionsSpec, tutorial }: LocalGameProviderProps<Game, GameView, Move, MoveView, PlayerId>);
|
|
23
|
-
init(dispatch: Dispatch): void;
|
|
24
|
-
initLocalStore(): ProxyGameData
|
|
25
|
-
getNotifications(data: ProxyGameData<Game, MoveView, PlayerId>): GameNotification<PlayerId>[];
|
|
26
|
-
newTutorial(): ProxyGameData;
|
|
27
|
-
private getGameOptions;
|
|
28
|
-
newGame(arg?: Options | number): ProxyGameData;
|
|
29
|
-
initGameStore(game: Game, players: Player<PlayerId>[], tutorial?: number): ProxyGameData<Game, Move, PlayerId>;
|
|
30
|
-
getLocalStore(): ProxyGameData<Game, Move, PlayerId>;
|
|
31
|
-
play(move: Move): Promise<void>;
|
|
32
|
-
playActions(playerId: PlayerId, moves: Move[]): void;
|
|
33
|
-
private incrementNotificationsCount;
|
|
34
|
-
undo(arg?: string | number, ignoreRules?: boolean): void;
|
|
35
|
-
startBots(): void;
|
|
36
|
-
stopBots(): void;
|
|
37
|
-
private runAutoPlayers;
|
|
38
|
-
getAI(playerId: PlayerId): GameAI<Game, Move, PlayerId>;
|
|
39
|
-
setPlayerName(name: string, playerId?: PlayerId): void;
|
|
40
|
-
setAnimationsSpeed(speed?: number): void;
|
|
41
|
-
eject(): void;
|
|
42
|
-
giveUp(): void;
|
|
43
|
-
playTutorialMoves(quantity: number): void;
|
|
44
|
-
}
|
|
1
|
+
import { GameSetup, OptionsSpec, RulesCreator } from '@gamepark/rules-api';
|
|
2
|
+
import { Dispatch } from 'redux';
|
|
3
|
+
import { GameAI, GameNotification, Player, ProxyGameData } from '../../Types';
|
|
4
|
+
import { GameAPI } from '../GameAPI';
|
|
5
|
+
import { LocalGameProviderProps } from './LocalGameProvider';
|
|
6
|
+
export declare class GameLocalAPI<Game, Move = string, PlayerId = any, GameView = Game, MoveView = Move, Options extends {
|
|
7
|
+
players: any;
|
|
8
|
+
} | undefined = undefined> implements GameAPI<Move, PlayerId> {
|
|
9
|
+
storage: string;
|
|
10
|
+
gameSetup: GameSetup<Game, Options>;
|
|
11
|
+
Rules: RulesCreator<Game, Move, PlayerId>;
|
|
12
|
+
ClientRules: RulesCreator<GameView, MoveView, PlayerId>;
|
|
13
|
+
optionsSpec?: OptionsSpec<Options>;
|
|
14
|
+
private readonly ai?;
|
|
15
|
+
private readonly tutorial?;
|
|
16
|
+
dispatch?: Dispatch;
|
|
17
|
+
private lastActionId;
|
|
18
|
+
private notificationsCount;
|
|
19
|
+
private autoPlayersCounter;
|
|
20
|
+
private aiProcessing;
|
|
21
|
+
private tutorialMovesToPlay;
|
|
22
|
+
constructor({ Rules, ServerRules, GameSetup, ai, game, storage, optionsSpec, tutorial }: LocalGameProviderProps<Game, GameView, Move, MoveView, PlayerId>);
|
|
23
|
+
init(dispatch: Dispatch): void;
|
|
24
|
+
initLocalStore(): ProxyGameData;
|
|
25
|
+
getNotifications(data: ProxyGameData<Game, MoveView, PlayerId>): GameNotification<PlayerId>[];
|
|
26
|
+
newTutorial(): ProxyGameData;
|
|
27
|
+
private getGameOptions;
|
|
28
|
+
newGame(arg?: Options | number): ProxyGameData;
|
|
29
|
+
initGameStore(game: Game, players: Player<PlayerId>[], tutorial?: number): ProxyGameData<Game, Move, PlayerId>;
|
|
30
|
+
getLocalStore(): ProxyGameData<Game, Move, PlayerId>;
|
|
31
|
+
play(move: Move): Promise<void>;
|
|
32
|
+
playActions(playerId: PlayerId, moves: Move[]): void;
|
|
33
|
+
private incrementNotificationsCount;
|
|
34
|
+
undo(arg?: string | number, ignoreRules?: boolean): void;
|
|
35
|
+
startBots(): void;
|
|
36
|
+
stopBots(): void;
|
|
37
|
+
private runAutoPlayers;
|
|
38
|
+
getAI(playerId: PlayerId): GameAI<Game, Move, PlayerId>;
|
|
39
|
+
setPlayerName(name: string, playerId?: PlayerId): void;
|
|
40
|
+
setAnimationsSpeed(speed?: number): void;
|
|
41
|
+
eject(): void;
|
|
42
|
+
giveUp(): void;
|
|
43
|
+
playTutorialMoves(quantity: number): void;
|
|
44
|
+
}
|