@gamepark/react-client 6.38.5 → 7.0.0-beta.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.
- package/dist/Actions/ActionFailed.d.ts +6 -6
- package/dist/Actions/ActionFailed.js +8 -8
- package/dist/Actions/ActionFailed.js.map +1 -1
- package/dist/Actions/ActionType.d.ts +3 -3
- package/dist/Actions/ActionType.js +7 -7
- package/dist/Actions/ActionType.js.map +1 -1
- package/dist/Actions/AnimationComplete.d.ts +6 -6
- package/dist/Actions/AnimationComplete.js +8 -8
- package/dist/Actions/AnimationComplete.js.map +1 -1
- package/dist/Actions/AnimationPaused.d.ts +6 -6
- package/dist/Actions/AnimationPaused.js +8 -8
- package/dist/Actions/AnimationPaused.js.map +1 -1
- package/dist/Actions/AnimationStart.d.ts +5 -5
- package/dist/Actions/AnimationStart.js +4 -4
- package/dist/Actions/ClearFailures.d.ts +5 -5
- package/dist/Actions/ClearFailures.js +8 -8
- package/dist/Actions/ClearFailures.js.map +1 -1
- package/dist/Actions/GameNotificationsReceived.d.ts +10 -10
- package/dist/Actions/GameNotificationsReceived.js +9 -9
- package/dist/Actions/GameNotificationsReceived.js.map +1 -1
- package/dist/Actions/GameOver.d.ts +16 -16
- package/dist/Actions/GameOver.js +8 -8
- package/dist/Actions/GameOver.js.map +1 -1
- package/dist/Actions/GameStateLoaded.d.ts +16 -16
- package/dist/Actions/GameStateLoaded.js +20 -20
- package/dist/Actions/GameStateLoaded.js.map +1 -1
- package/dist/Actions/MovePlayed.d.ts +11 -11
- package/dist/Actions/MovePlayed.js +4 -2
- package/dist/Actions/MovePlayed.js.map +1 -1
- package/dist/Actions/MoveUndone.d.ts +7 -7
- package/dist/Actions/MoveUndone.js +9 -9
- package/dist/Actions/MoveUndone.js.map +1 -1
- package/dist/Actions/PlayerQuit.d.ts +11 -11
- package/dist/Actions/PlayerQuit.js +19 -19
- package/dist/Actions/PlayerQuit.js.map +1 -1
- package/dist/Actions/SetAnimationsSpeed.d.ts +6 -6
- package/dist/Actions/SetAnimationsSpeed.js +8 -8
- package/dist/Actions/SetAnimationsSpeed.js.map +1 -1
- package/dist/Actions/index.d.ts +11 -12
- package/dist/Actions/index.js +27 -28
- package/dist/Actions/index.js.map +1 -1
- package/dist/Chat/ChatChannel.d.ts +5 -5
- package/dist/Chat/ChatChannel.js +2 -2
- package/dist/Chat/Message.d.ts +6 -6
- package/dist/Chat/Message.js +2 -2
- package/dist/Chat/index.d.ts +2 -2
- package/dist/Chat/index.js +18 -18
- package/dist/Deckbuilding/Deck.d.ts +5 -5
- package/dist/Deckbuilding/Deck.js +2 -2
- package/dist/Deckbuilding/index.d.ts +4 -4
- package/dist/Deckbuilding/index.js +24 -24
- package/dist/Deckbuilding/useDeleteDeck.d.ts +2 -2
- package/dist/Deckbuilding/useDeleteDeck.js +15 -15
- package/dist/Deckbuilding/useDeleteDeck.js.map +1 -1
- package/dist/Deckbuilding/useMyDecks.d.ts +2 -2
- package/dist/Deckbuilding/useMyDecks.js +14 -14
- package/dist/Deckbuilding/useMyDecks.js.map +1 -1
- package/dist/Deckbuilding/useSaveDeck.d.ts +2 -2
- package/dist/Deckbuilding/useSaveDeck.js +15 -15
- package/dist/Deckbuilding/useSaveDeck.js.map +1 -1
- package/dist/EjectPlayer/EjectPlayer.d.ts +6 -6
- package/dist/EjectPlayer/EjectPlayer.js +8 -8
- package/dist/EjectPlayer/EjectPlayer.js.map +1 -1
- package/dist/EjectPlayer/index.d.ts +1 -1
- package/dist/EjectPlayer/index.js +17 -17
- package/dist/Failure/Failure.d.ts +6 -6
- package/dist/Failure/Failure.js +9 -9
- package/dist/Failure/index.d.ts +1 -1
- package/dist/Failure/index.js +17 -17
- package/dist/GiveUp/GiveUp.d.ts +7 -7
- package/dist/GiveUp/GiveUp.js +5 -5
- package/dist/GiveUp/index.d.ts +1 -1
- package/dist/GiveUp/index.js +17 -17
- package/dist/Hooks/index.d.ts +5 -5
- package/dist/Hooks/index.js +21 -21
- package/dist/Hooks/useChatMessages.d.ts +12 -12
- package/dist/Hooks/useChatMessages.js +53 -51
- package/dist/Hooks/useChatMessages.js.map +1 -1
- package/dist/Hooks/useMessageAuthor.d.ts +4 -4
- package/dist/Hooks/useMessageAuthor.js +17 -18
- package/dist/Hooks/useMessageAuthor.js.map +1 -1
- package/dist/Hooks/useOptions.d.ts +2 -2
- package/dist/Hooks/useOptions.js +7 -8
- package/dist/Hooks/useOptions.js.map +1 -1
- package/dist/Hooks/useRematch.d.ts +7 -7
- package/dist/Hooks/useRematch.js +22 -19
- package/dist/Hooks/useRematch.js.map +1 -1
- package/dist/Hooks/useSendMessage.d.ts +1 -1
- package/dist/Hooks/useSendMessage.js +13 -14
- package/dist/Hooks/useSendMessage.js.map +1 -1
- package/dist/Log/StartLiveLog.d.ts +4 -4
- package/dist/Log/StartLiveLog.js +4 -4
- package/dist/Log/StopLiveLog.d.ts +5 -5
- package/dist/Log/StopLiveLog.js +8 -8
- package/dist/Log/StopLiveLog.js.map +1 -1
- package/dist/Log/index.d.ts +4 -4
- package/dist/Log/index.js +20 -20
- package/dist/Log/useLogControls.d.ts +7 -7
- package/dist/Log/useLogControls.js +21 -22
- package/dist/Log/useLogControls.js.map +1 -1
- package/dist/PlayerTime/PlayerTime.d.ts +11 -11
- package/dist/PlayerTime/PlayerTime.js +2 -2
- package/dist/PlayerTime/index.d.ts +1 -1
- package/dist/PlayerTime/index.js +17 -17
- package/dist/Rematch/RematchQueries.d.ts +19 -19
- package/dist/Rematch/RematchQueries.js +13 -13
- package/dist/Rematch/index.d.ts +1 -1
- package/dist/Rematch/index.js +17 -17
- package/dist/Sound/MuteSounds.d.ts +5 -5
- package/dist/Sound/MuteSounds.js +9 -9
- package/dist/Sound/MuteSounds.js.map +1 -1
- package/dist/Sound/UnmuteSounds.d.ts +4 -4
- package/dist/Sound/UnmuteSounds.js +4 -4
- package/dist/Sound/index.d.ts +3 -3
- package/dist/Sound/index.js +19 -19
- package/dist/Sound/useSoundControls.d.ts +7 -7
- package/dist/Sound/useSoundControls.js +21 -22
- package/dist/Sound/useSoundControls.js.map +1 -1
- package/dist/Store/DisplayedAction.d.ts +15 -15
- package/dist/Store/DisplayedAction.js +18 -19
- package/dist/Store/DisplayedAction.js.map +1 -1
- package/dist/Store/GamePageState.d.ts +28 -28
- package/dist/Store/GamePageState.js +2 -2
- package/dist/Store/PlayedMove.d.ts +5 -5
- package/dist/Store/PlayedMove.js +2 -2
- package/dist/Store/gameMiddleware.d.ts +4 -4
- package/dist/Store/gameMiddleware.js +45 -41
- package/dist/Store/gameMiddleware.js.map +1 -1
- package/dist/Store/gameReducer.d.ts +23 -20
- package/dist/Store/gameReducer.js +538 -525
- package/dist/Store/gameReducer.js.map +1 -1
- package/dist/Store/index.d.ts +3 -3
- package/dist/Store/index.js +19 -19
- package/dist/Store/localMovePreviewMiddleware.d.ts +4 -4
- package/dist/Store/localMovePreviewMiddleware.js +17 -18
- package/dist/Store/localMovePreviewMiddleware.js.map +1 -1
- package/dist/Tutorial/PlayTutorialMoves.d.ts +9 -9
- package/dist/Tutorial/PlayTutorialMoves.js +6 -6
- package/dist/Tutorial/Tutorial.d.ts +5 -5
- package/dist/Tutorial/Tutorial.js +2 -2
- package/dist/Tutorial/TutorialDescription.d.ts +7 -7
- package/dist/Tutorial/TutorialDescription.js +2 -2
- package/dist/Tutorial/index.d.ts +4 -4
- package/dist/Tutorial/index.js +20 -20
- package/dist/Tutorial/useTutorial.d.ts +2 -2
- package/dist/Tutorial/useTutorial.js +21 -22
- package/dist/Tutorial/useTutorial.js.map +1 -1
- package/dist/Types/GameAI.d.ts +1 -1
- package/dist/Types/GameAI.js +2 -2
- package/dist/Types/GameData.d.ts +18 -18
- package/dist/Types/GameData.js +2 -2
- package/dist/Types/GameMessage.d.ts +8 -8
- package/dist/Types/GameMessage.js +2 -2
- package/dist/Types/GameMode.d.ts +6 -6
- package/dist/Types/GameMode.js +10 -10
- package/dist/Types/GameMode.js.map +1 -1
- package/dist/Types/GameNotification.d.ts +6 -6
- package/dist/Types/GameNotification.js +2 -2
- package/dist/Types/GameOptions.d.ts +9 -9
- package/dist/Types/GameOptions.js +8 -8
- package/dist/Types/GameOptions.js.map +1 -1
- package/dist/Types/MovePlayedNotification.d.ts +9 -9
- package/dist/Types/MovePlayedNotification.js +11 -12
- package/dist/Types/MovePlayedNotification.js.map +1 -1
- package/dist/Types/MoveUndoneNotification.d.ts +8 -8
- package/dist/Types/MoveUndoneNotification.js +11 -12
- package/dist/Types/MoveUndoneNotification.js.map +1 -1
- package/dist/Types/Player.d.ts +13 -13
- package/dist/Types/Player.js +2 -2
- package/dist/Types/PlayerQuitReason.d.ts +4 -4
- package/dist/Types/PlayerQuitReason.js +8 -8
- package/dist/Types/PlayerQuitReason.js.map +1 -1
- package/dist/Types/ProxyGameData.d.ts +13 -13
- package/dist/Types/ProxyGameData.js +2 -2
- package/dist/Types/Tournament.d.ts +4 -4
- package/dist/Types/Tournament.js +2 -2
- package/dist/Types/index.d.ts +12 -12
- package/dist/Types/index.js +28 -28
- package/dist/User/User.d.ts +6 -6
- package/dist/User/User.js +2 -2
- package/dist/User/index.d.ts +2 -2
- package/dist/User/index.js +18 -18
- package/dist/User/useMe.d.ts +4 -4
- package/dist/User/useMe.js +20 -21
- package/dist/User/useMe.js.map +1 -1
- package/dist/animations/Animation.d.ts +6 -6
- package/dist/animations/Animation.js +2 -2
- package/dist/animations/AnimationContext.d.ts +8 -8
- package/dist/animations/AnimationContext.js +2 -2
- package/dist/animations/AnimationState.d.ts +6 -6
- package/dist/animations/AnimationState.js +2 -2
- package/dist/animations/AnimationStep.d.ts +6 -6
- package/dist/animations/AnimationStep.js +10 -10
- package/dist/animations/AnimationStep.js.map +1 -1
- package/dist/animations/Animations.d.ts +8 -8
- package/dist/animations/Animations.js +22 -22
- package/dist/animations/Animations.js.map +1 -1
- package/dist/animations/AnimationsListenerCreator.d.ts +5 -4
- package/dist/animations/AnimationsListenerCreator.js +46 -50
- package/dist/animations/AnimationsListenerCreator.js.map +1 -1
- package/dist/animations/index.d.ts +6 -6
- package/dist/animations/index.js +22 -22
- package/dist/api/Client/GameClientAPI.d.ts +25 -24
- package/dist/api/Client/GameClientAPI.js +166 -166
- package/dist/api/Client/GameClientAPI.js.map +1 -1
- package/dist/api/Client/GameNotificationsListener.d.ts +5 -5
- package/dist/api/Client/GameNotificationsListener.js +116 -114
- package/dist/api/Client/GameNotificationsListener.js.map +1 -1
- package/dist/api/Client/RemoteGameLoader.d.ts +4 -5
- package/dist/api/Client/RemoteGameLoader.js +61 -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 +55 -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 +57 -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 +20 -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 +16 -0
- package/dist/api/Client/pusher.js.map +1 -0
- package/dist/api/GameAPI.d.ts +11 -10
- package/dist/api/GameAPI.js +2 -2
- package/dist/api/Local/ConsoleTools.d.ts +26 -25
- package/dist/api/Local/ConsoleTools.js +85 -86
- package/dist/api/Local/ConsoleTools.js.map +1 -1
- package/dist/api/Local/GameLocalAPI.d.ts +45 -44
- package/dist/api/Local/GameLocalAPI.js +541 -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 +49 -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 +17 -17
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +36 -36
- package/dist/util/ArrayUtil.d.ts +2 -2
- package/dist/util/ArrayUtil.js +20 -21
- package/dist/util/ArrayUtil.js.map +1 -1
- package/package.json +19 -22
package/dist/PlayerTime/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./PlayerTime"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./PlayerTime"), exports);
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export declare const CAN_REMATCH: import("@apollo/client").DocumentNode;
|
|
2
|
-
export interface CanRematchData {
|
|
3
|
-
id: string;
|
|
4
|
-
canRematch: boolean;
|
|
5
|
-
rematch: RematchData;
|
|
6
|
-
}
|
|
7
|
-
export interface RematchData {
|
|
8
|
-
id: string;
|
|
9
|
-
startDate: string | null;
|
|
10
|
-
players: RematchPlayerData[];
|
|
11
|
-
}
|
|
12
|
-
export interface RematchPlayerData {
|
|
13
|
-
name: string;
|
|
14
|
-
userId: string;
|
|
15
|
-
ready: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare const REMATCH: import("@apollo/client").DocumentNode;
|
|
18
|
-
export declare const ACCEPT_REMATCH: import("@apollo/client").DocumentNode;
|
|
19
|
-
export declare const REFUSE_REMATCH: import("@apollo/client").DocumentNode;
|
|
1
|
+
export declare const CAN_REMATCH: import("@apollo/client").DocumentNode;
|
|
2
|
+
export interface CanRematchData {
|
|
3
|
+
id: string;
|
|
4
|
+
canRematch: boolean;
|
|
5
|
+
rematch: RematchData;
|
|
6
|
+
}
|
|
7
|
+
export interface RematchData {
|
|
8
|
+
id: string;
|
|
9
|
+
startDate: string | null;
|
|
10
|
+
players: RematchPlayerData[];
|
|
11
|
+
}
|
|
12
|
+
export interface RematchPlayerData {
|
|
13
|
+
name: string;
|
|
14
|
+
userId: string;
|
|
15
|
+
ready: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const REMATCH: import("@apollo/client").DocumentNode;
|
|
18
|
+
export declare const ACCEPT_REMATCH: import("@apollo/client").DocumentNode;
|
|
19
|
+
export declare const REFUSE_REMATCH: import("@apollo/client").DocumentNode;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.REFUSE_REMATCH = exports.ACCEPT_REMATCH = exports.REMATCH = exports.CAN_REMATCH = void 0;
|
|
8
|
-
var client_1 = require("@apollo/client");
|
|
9
|
-
exports.CAN_REMATCH = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query Game($id: String!) {\n game(id: $id) {\n id canRematch rematch { id startDate players { name userId ready } }\n }\n }\n"], ["\n query Game($id: String!) {\n game(id: $id) {\n id canRematch rematch { id startDate players { name userId ready } }\n }\n }\n"])));
|
|
10
|
-
exports.REMATCH = (0, client_1.gql)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n mutation Rematch($gameId: String!) {\n rematch(gameId: $gameId) { id canRematch rematch { id startDate myPlayerId players { id name userId ready } } }\n }\n"], ["\n mutation Rematch($gameId: String!) {\n rematch(gameId: $gameId) { id canRematch rematch { id startDate myPlayerId players { id name userId ready } } }\n }\n"])));
|
|
11
|
-
exports.ACCEPT_REMATCH = (0, client_1.gql)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n mutation AcceptRematch($gameId: String!) {\n joinGame(gameId: $gameId) { id myPlayerId players { id ready } }\n }\n"], ["\n mutation AcceptRematch($gameId: String!) {\n joinGame(gameId: $gameId) { id myPlayerId players { id ready } }\n }\n"])));
|
|
12
|
-
exports.REFUSE_REMATCH = (0, client_1.gql)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n mutation RefuseRematch($gameId: String!) {\n leaveGameSetup(gameId: $gameId) { id myPlayerId players { id ready } }\n }\n"], ["\n mutation RefuseRematch($gameId: String!) {\n leaveGameSetup(gameId: $gameId) { id myPlayerId players { id ready } }\n }\n"])));
|
|
13
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.REFUSE_REMATCH = exports.ACCEPT_REMATCH = exports.REMATCH = exports.CAN_REMATCH = void 0;
|
|
8
|
+
var client_1 = require("@apollo/client");
|
|
9
|
+
exports.CAN_REMATCH = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query Game($id: String!) {\n game(id: $id) {\n id canRematch rematch { id startDate players { name userId ready } }\n }\n }\n"], ["\n query Game($id: String!) {\n game(id: $id) {\n id canRematch rematch { id startDate players { name userId ready } }\n }\n }\n"])));
|
|
10
|
+
exports.REMATCH = (0, client_1.gql)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n mutation Rematch($gameId: String!) {\n rematch(gameId: $gameId) { id canRematch rematch { id startDate myPlayerId players { id name userId ready } } }\n }\n"], ["\n mutation Rematch($gameId: String!) {\n rematch(gameId: $gameId) { id canRematch rematch { id startDate myPlayerId players { id name userId ready } } }\n }\n"])));
|
|
11
|
+
exports.ACCEPT_REMATCH = (0, client_1.gql)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n mutation AcceptRematch($gameId: String!) {\n joinGame(gameId: $gameId) { id myPlayerId players { id ready } }\n }\n"], ["\n mutation AcceptRematch($gameId: String!) {\n joinGame(gameId: $gameId) { id myPlayerId players { id ready } }\n }\n"])));
|
|
12
|
+
exports.REFUSE_REMATCH = (0, client_1.gql)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n mutation RefuseRematch($gameId: String!) {\n leaveGameSetup(gameId: $gameId) { id myPlayerId players { id ready } }\n }\n"], ["\n mutation RefuseRematch($gameId: String!) {\n leaveGameSetup(gameId: $gameId) { id myPlayerId players { id ready } }\n }\n"])));
|
|
13
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
14
14
|
//# sourceMappingURL=RematchQueries.js.map
|
package/dist/Rematch/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './RematchQueries';
|
|
1
|
+
export * from './RematchQueries';
|
package/dist/Rematch/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./RematchQueries"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./RematchQueries"), exports);
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const MUTE_SOUNDS = "MUTE_SOUNDS";
|
|
2
|
-
export interface MuteSounds {
|
|
3
|
-
type: typeof MUTE_SOUNDS;
|
|
4
|
-
}
|
|
5
|
-
export declare function soundsMuted(): boolean;
|
|
1
|
+
export declare const MUTE_SOUNDS = "MUTE_SOUNDS";
|
|
2
|
+
export interface MuteSounds {
|
|
3
|
+
type: typeof MUTE_SOUNDS;
|
|
4
|
+
}
|
|
5
|
+
export declare function soundsMuted(): boolean;
|
package/dist/Sound/MuteSounds.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MUTE_SOUNDS = void 0;
|
|
4
|
+
exports.soundsMuted = soundsMuted;
|
|
5
|
+
exports.MUTE_SOUNDS = 'MUTE_SOUNDS';
|
|
6
|
+
function soundsMuted() {
|
|
7
|
+
var query = new URLSearchParams(window.location.search);
|
|
8
|
+
return !!query.get('mute') || !!localStorage.getItem('soundsMuted');
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=MuteSounds.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MuteSounds.js","sourceRoot":"","sources":["../../src/Sound/MuteSounds.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"MuteSounds.js","sourceRoot":"","sources":["../../src/Sound/MuteSounds.ts"],"names":[],"mappings":";;;AAMA,kCAGC;AATY,QAAA,WAAW,GAAG,aAAa,CAAA;AAMxC,SAAgB,WAAW;IACzB,IAAM,KAAK,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IACzD,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,CAAA;AACrE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const UNMUTE_SOUNDS = "UNMUTE_SOUNDS";
|
|
2
|
-
export interface UnmuteSounds {
|
|
3
|
-
type: typeof UNMUTE_SOUNDS;
|
|
4
|
-
}
|
|
1
|
+
export declare const UNMUTE_SOUNDS = "UNMUTE_SOUNDS";
|
|
2
|
+
export interface UnmuteSounds {
|
|
3
|
+
type: typeof UNMUTE_SOUNDS;
|
|
4
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UNMUTE_SOUNDS = void 0;
|
|
4
|
-
exports.UNMUTE_SOUNDS = 'UNMUTE_SOUNDS';
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UNMUTE_SOUNDS = void 0;
|
|
4
|
+
exports.UNMUTE_SOUNDS = 'UNMUTE_SOUNDS';
|
|
5
5
|
//# sourceMappingURL=UnmuteSounds.js.map
|
package/dist/Sound/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './MuteSounds';
|
|
2
|
-
export * from './UnmuteSounds';
|
|
3
|
-
export * from './useSoundControls';
|
|
1
|
+
export * from './MuteSounds';
|
|
2
|
+
export * from './UnmuteSounds';
|
|
3
|
+
export * from './useSoundControls';
|
package/dist/Sound/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./MuteSounds"), exports);
|
|
18
|
-
__exportStar(require("./UnmuteSounds"), exports);
|
|
19
|
-
__exportStar(require("./useSoundControls"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./MuteSounds"), exports);
|
|
18
|
+
__exportStar(require("./UnmuteSounds"), exports);
|
|
19
|
+
__exportStar(require("./useSoundControls"), exports);
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
type SoundControls = {
|
|
2
|
-
mute: () => void;
|
|
3
|
-
unmute: () => void;
|
|
4
|
-
muted: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare function useSoundControls(): SoundControls;
|
|
7
|
-
export {};
|
|
1
|
+
type SoundControls = {
|
|
2
|
+
mute: () => void;
|
|
3
|
+
unmute: () => void;
|
|
4
|
+
muted: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function useSoundControls(): SoundControls;
|
|
7
|
+
export {};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useSoundControls =
|
|
4
|
-
var react_redux_1 = require("react-redux");
|
|
5
|
-
var MuteSounds_1 = require("./MuteSounds");
|
|
6
|
-
var UnmuteSounds_1 = require("./UnmuteSounds");
|
|
7
|
-
function useSoundControls() {
|
|
8
|
-
var muted = (0, react_redux_1.useSelector)(function (state) { return state.soundsMuted; });
|
|
9
|
-
var dispatch = (0, react_redux_1.useDispatch)();
|
|
10
|
-
return {
|
|
11
|
-
mute: function () {
|
|
12
|
-
dispatch({ type: MuteSounds_1.MUTE_SOUNDS });
|
|
13
|
-
localStorage.setItem('soundsMuted', 'true');
|
|
14
|
-
},
|
|
15
|
-
unmute: function () {
|
|
16
|
-
dispatch({ type: UnmuteSounds_1.UNMUTE_SOUNDS });
|
|
17
|
-
localStorage.removeItem('soundsMuted');
|
|
18
|
-
},
|
|
19
|
-
muted: muted
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
exports.useSoundControls = useSoundControls;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSoundControls = useSoundControls;
|
|
4
|
+
var react_redux_1 = require("react-redux");
|
|
5
|
+
var MuteSounds_1 = require("./MuteSounds");
|
|
6
|
+
var UnmuteSounds_1 = require("./UnmuteSounds");
|
|
7
|
+
function useSoundControls() {
|
|
8
|
+
var muted = (0, react_redux_1.useSelector)(function (state) { return state.soundsMuted; });
|
|
9
|
+
var dispatch = (0, react_redux_1.useDispatch)();
|
|
10
|
+
return {
|
|
11
|
+
mute: function () {
|
|
12
|
+
dispatch({ type: MuteSounds_1.MUTE_SOUNDS });
|
|
13
|
+
localStorage.setItem('soundsMuted', 'true');
|
|
14
|
+
},
|
|
15
|
+
unmute: function () {
|
|
16
|
+
dispatch({ type: UnmuteSounds_1.UNMUTE_SOUNDS });
|
|
17
|
+
localStorage.removeItem('soundsMuted');
|
|
18
|
+
},
|
|
19
|
+
muted: muted
|
|
20
|
+
};
|
|
21
|
+
}
|
|
23
22
|
//# sourceMappingURL=useSoundControls.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSoundControls.js","sourceRoot":"","sources":["../../src/Sound/useSoundControls.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSoundControls.js","sourceRoot":"","sources":["../../src/Sound/useSoundControls.ts"],"names":[],"mappings":";;AAWA,4CAcC;AAzBD,2CAAsD;AAEtD,2CAA0C;AAC1C,+CAA8C;AAQ9C,SAAgB,gBAAgB;IAC9B,IAAM,KAAK,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAoB,IAAK,OAAA,KAAK,CAAC,WAAW,EAAjB,CAAiB,CAAC,CAAA;IACtE,IAAM,QAAQ,GAAG,IAAA,yBAAW,GAAO,CAAA;IACnC,OAAO;QACL,IAAI,EAAE;YACJ,QAAQ,CAAC,EAAE,IAAI,EAAE,wBAAW,EAAE,CAAC,CAAA;YAC/B,YAAY,CAAC,OAAO,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;QAC7C,CAAC;QACD,MAAM,EAAE;YACN,QAAQ,CAAC,EAAE,IAAI,EAAE,4BAAa,EAAE,CAAC,CAAA;YACjC,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;QACxC,CAAC;QACD,KAAK,OAAA;KACN,CAAA;AACH,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Action } from '@gamepark/rules-api';
|
|
2
|
-
import { AnimationState, AnimationStep } from '../animations';
|
|
3
|
-
export type DisplayedAction<Move = any, PlayerId = any> = Action<Move, PlayerId> & {
|
|
4
|
-
played: number;
|
|
5
|
-
pending?: boolean;
|
|
6
|
-
delayed?: boolean;
|
|
7
|
-
animation?: AnimationState;
|
|
8
|
-
cancelled?: boolean;
|
|
9
|
-
cancelPending?: boolean;
|
|
10
|
-
local?: boolean;
|
|
11
|
-
activePlayers?: PlayerId[];
|
|
12
|
-
transient?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare function isActionToAnimate(action: DisplayedAction): boolean;
|
|
15
|
-
export declare function getAnimatedMove<Move>(action: DisplayedAction<Move>, step?: AnimationStep | undefined): Move;
|
|
1
|
+
import { Action } from '@gamepark/rules-api';
|
|
2
|
+
import { AnimationState, AnimationStep } from '../animations';
|
|
3
|
+
export type DisplayedAction<Move = any, PlayerId = any> = Action<Move, PlayerId> & {
|
|
4
|
+
played: number;
|
|
5
|
+
pending?: boolean;
|
|
6
|
+
delayed?: boolean;
|
|
7
|
+
animation?: AnimationState;
|
|
8
|
+
cancelled?: boolean;
|
|
9
|
+
cancelPending?: boolean;
|
|
10
|
+
local?: boolean;
|
|
11
|
+
activePlayers?: PlayerId[];
|
|
12
|
+
transient?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare function isActionToAnimate(action: DisplayedAction): boolean;
|
|
15
|
+
export declare function getAnimatedMove<Move>(action: DisplayedAction<Move>, step?: AnimationStep | undefined): Move;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function getAnimatedMove(action, step) {
|
|
14
|
-
var _a;
|
|
15
|
-
if (step === void 0) { step = (_a = action.animation) === null || _a === void 0 ? void 0 : _a.step; }
|
|
16
|
-
var consequenceIndex = (step === animations_1.AnimationStep.BEFORE_MOVE || step === animations_1.AnimationStep.AFTER_UNDO) ? action.played - 1 : action.played - 2;
|
|
17
|
-
return consequenceIndex < 0 ? action.move : action.consequences[consequenceIndex];
|
|
18
|
-
}
|
|
19
|
-
exports.getAnimatedMove = getAnimatedMove;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isActionToAnimate = isActionToAnimate;
|
|
4
|
+
exports.getAnimatedMove = getAnimatedMove;
|
|
5
|
+
var animations_1 = require("../animations");
|
|
6
|
+
function isActionToAnimate(action) {
|
|
7
|
+
if (action.delayed)
|
|
8
|
+
return false;
|
|
9
|
+
if (action.cancelled)
|
|
10
|
+
return action.played > 0;
|
|
11
|
+
return action.played <= action.consequences.length;
|
|
12
|
+
}
|
|
13
|
+
function getAnimatedMove(action, step) {
|
|
14
|
+
var _a;
|
|
15
|
+
if (step === void 0) { step = (_a = action.animation) === null || _a === void 0 ? void 0 : _a.step; }
|
|
16
|
+
var consequenceIndex = (step === animations_1.AnimationStep.BEFORE_MOVE || step === animations_1.AnimationStep.AFTER_UNDO) ? action.played - 1 : action.played - 2;
|
|
17
|
+
return consequenceIndex < 0 ? action.move : action.consequences[consequenceIndex];
|
|
18
|
+
}
|
|
20
19
|
//# sourceMappingURL=DisplayedAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayedAction.js","sourceRoot":"","sources":["../../src/Store/DisplayedAction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DisplayedAction.js","sourceRoot":"","sources":["../../src/Store/DisplayedAction.ts"],"names":[],"mappings":";;AAeA,8CAIC;AAED,0CAGC;AAvBD,4CAA6D;AAc7D,SAAgB,iBAAiB,CAAC,MAAuB;IACvD,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAChC,IAAI,MAAM,CAAC,SAAS;QAAE,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAA;IAC9C,OAAO,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,CAAA;AACpD,CAAC;AAED,SAAgB,eAAe,CAAO,MAA6B,EAAE,IAA6B;;IAA7B,qBAAA,EAAA,aAAO,MAAM,CAAC,SAAS,0CAAE,IAAI;IAChG,IAAM,gBAAgB,GAAG,CAAC,IAAI,KAAK,0BAAa,CAAC,WAAW,IAAI,IAAI,KAAK,0BAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAA;IAC1I,OAAO,gBAAgB,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAA;AACnF,CAAC"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { GameMode, GameOptions, IndexedGameNotification, Player, Tournament } from '../Types';
|
|
2
|
-
import { PlayedMove } from './PlayedMove';
|
|
3
|
-
import { DisplayedAction } from './DisplayedAction';
|
|
4
|
-
export type GamePageState<Game = any, Move = any, PlayerId = any> = {
|
|
5
|
-
players: Player<PlayerId>[];
|
|
6
|
-
playerId?: PlayerId;
|
|
7
|
-
options?: GameOptions;
|
|
8
|
-
gameMode?: GameMode;
|
|
9
|
-
setup?: Game;
|
|
10
|
-
state?: Game;
|
|
11
|
-
actions?: DisplayedAction<Move, PlayerId>[];
|
|
12
|
-
pendingNotifications: IndexedGameNotification<PlayerId>[];
|
|
13
|
-
nextNotificationIndex: number;
|
|
14
|
-
legalMoves: Move[];
|
|
15
|
-
failures: string[];
|
|
16
|
-
animationIncrement: number;
|
|
17
|
-
animationsSpeed: number;
|
|
18
|
-
animationPaused: boolean;
|
|
19
|
-
soundsMuted: boolean;
|
|
20
|
-
liveLogStopped: boolean;
|
|
21
|
-
clientTimeDelta: number;
|
|
22
|
-
gameOver?: boolean;
|
|
23
|
-
tournament?: Tournament;
|
|
24
|
-
client?: {
|
|
25
|
-
player?: PlayerId;
|
|
26
|
-
};
|
|
27
|
-
playedMoves?: PlayedMove<Move>[];
|
|
28
|
-
};
|
|
1
|
+
import { GameMode, GameOptions, IndexedGameNotification, Player, Tournament } from '../Types';
|
|
2
|
+
import { PlayedMove } from './PlayedMove';
|
|
3
|
+
import { DisplayedAction } from './DisplayedAction';
|
|
4
|
+
export type GamePageState<Game = any, Move = any, PlayerId = any> = {
|
|
5
|
+
players: Player<PlayerId>[];
|
|
6
|
+
playerId?: PlayerId;
|
|
7
|
+
options?: GameOptions;
|
|
8
|
+
gameMode?: GameMode;
|
|
9
|
+
setup?: Game;
|
|
10
|
+
state?: Game;
|
|
11
|
+
actions?: DisplayedAction<Move, PlayerId>[];
|
|
12
|
+
pendingNotifications: IndexedGameNotification<PlayerId>[];
|
|
13
|
+
nextNotificationIndex: number;
|
|
14
|
+
legalMoves: Move[];
|
|
15
|
+
failures: string[];
|
|
16
|
+
animationIncrement: number;
|
|
17
|
+
animationsSpeed: number;
|
|
18
|
+
animationPaused: boolean;
|
|
19
|
+
soundsMuted: boolean;
|
|
20
|
+
liveLogStopped: boolean;
|
|
21
|
+
clientTimeDelta: number;
|
|
22
|
+
gameOver?: boolean;
|
|
23
|
+
tournament?: Tournament;
|
|
24
|
+
client?: {
|
|
25
|
+
player?: PlayerId;
|
|
26
|
+
};
|
|
27
|
+
playedMoves?: PlayedMove<Move>[];
|
|
28
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=GamePageState.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type PlayedMove<Move = any> = {
|
|
2
|
-
move: Move;
|
|
3
|
-
actionId: string;
|
|
4
|
-
consequenceIndex?: number;
|
|
5
|
-
};
|
|
1
|
+
export type PlayedMove<Move = any> = {
|
|
2
|
+
move: Move;
|
|
3
|
+
actionId: string;
|
|
4
|
+
consequenceIndex?: number;
|
|
5
|
+
};
|
package/dist/Store/PlayedMove.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=PlayedMove.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Middleware } from 'redux';
|
|
2
|
-
import { GameAPI } from '../api/GameAPI';
|
|
3
|
-
import { GamePageState } from './GamePageState';
|
|
4
|
-
export declare function gameMiddleware<Game, Move, PlayerId>(api: GameAPI<Move, PlayerId>): Middleware<{}, GamePageState<Game, Move, PlayerId>>;
|
|
1
|
+
import { Middleware } from 'redux';
|
|
2
|
+
import { GameAPI } from '../api/GameAPI';
|
|
3
|
+
import { GamePageState } from './GamePageState';
|
|
4
|
+
export declare function gameMiddleware<Game, Move, PlayerId>(api: GameAPI<Move, PlayerId>): Middleware<{}, GamePageState<Game, Move, PlayerId>>;
|
|
@@ -1,42 +1,46 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.gameMiddleware =
|
|
4
|
-
var Actions_1 = require("../Actions");
|
|
5
|
-
var EjectPlayer_1 = require("../EjectPlayer");
|
|
6
|
-
var GiveUp_1 = require("../GiveUp");
|
|
7
|
-
var Tutorial_1 = require("../Tutorial");
|
|
8
|
-
var ArrayUtil_1 = require("../util/ArrayUtil");
|
|
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
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gameMiddleware = gameMiddleware;
|
|
4
|
+
var Actions_1 = require("../Actions");
|
|
5
|
+
var EjectPlayer_1 = require("../EjectPlayer");
|
|
6
|
+
var GiveUp_1 = require("../GiveUp");
|
|
7
|
+
var Tutorial_1 = require("../Tutorial");
|
|
8
|
+
var ArrayUtil_1 = require("../util/ArrayUtil");
|
|
9
|
+
var gameReducer_1 = require("./gameReducer");
|
|
10
|
+
function gameMiddleware(api) {
|
|
11
|
+
return function (store) { return function (next) { return function (action) {
|
|
12
|
+
if ((0, gameReducer_1.isGameAction)(action)) {
|
|
13
|
+
switch (action.type) {
|
|
14
|
+
case Actions_1.MOVE_PLAYED: {
|
|
15
|
+
if (!action.local && !action.transient) {
|
|
16
|
+
api.play(action.move);
|
|
17
|
+
}
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
case Actions_1.MOVE_UNDONE: {
|
|
21
|
+
var actions = store.getState().actions;
|
|
22
|
+
if (!actions)
|
|
23
|
+
return console.error('gameMiddleware - MOVE_UNDONE: Actions is missing');
|
|
24
|
+
var gameAction = (0, ArrayUtil_1.findLastItem)(actions, function (gameAction) { return gameAction.id === action.actionId; });
|
|
25
|
+
if (!gameAction)
|
|
26
|
+
return console.error('gameMiddleware - MOVE_UNDONE: Action not found');
|
|
27
|
+
if (!gameAction.local) {
|
|
28
|
+
api.undo(action.actionId);
|
|
29
|
+
}
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
case EjectPlayer_1.EJECT_PLAYER:
|
|
33
|
+
api.eject(action.playerId);
|
|
34
|
+
break;
|
|
35
|
+
case GiveUp_1.GIVE_UP:
|
|
36
|
+
api.giveUp();
|
|
37
|
+
break;
|
|
38
|
+
case Tutorial_1.PLAY_TUTORIAL_MOVES:
|
|
39
|
+
api.playTutorialMoves(action.quantity);
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return next(action);
|
|
44
|
+
}; }; };
|
|
45
|
+
}
|
|
42
46
|
//# sourceMappingURL=gameMiddleware.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gameMiddleware.js","sourceRoot":"","sources":["../../src/Store/gameMiddleware.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gameMiddleware.js","sourceRoot":"","sources":["../../src/Store/gameMiddleware.ts"],"names":[],"mappings":";;AAUA,wCAmCC;AA5CD,sCAAqD;AAErD,8CAA6C;AAC7C,oCAAmC;AACnC,wCAAiD;AACjD,+CAAgD;AAEhD,6CAA4C;AAE5C,SAAgB,cAAc,CAAuB,GAA4B;IAE/E,OAAO,UAAA,KAAK,IAAI,OAAA,UAAA,IAAI,IAAI,OAAA,UAAA,MAAM;QAC5B,IAAI,IAAA,0BAAY,EAAC,MAAM,CAAC,EAAE,CAAC;YACzB,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;gBACpB,KAAK,qBAAW,CAAC,CAAC,CAAC;oBACjB,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;wBACvC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;oBACvB,CAAC;oBACD,MAAK;gBACP,CAAC;gBACD,KAAK,qBAAW,CAAC,CAAC,CAAC;oBACjB,IAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAA;oBACxC,IAAI,CAAC,OAAO;wBAAE,OAAO,OAAO,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAA;oBACtF,IAAM,UAAU,GAAG,IAAA,wBAAY,EAAC,OAAO,EAAE,UAAA,UAAU,IAAI,OAAA,UAAU,CAAC,EAAE,KAAK,MAAM,CAAC,QAAQ,EAAjC,CAAiC,CAAC,CAAA;oBACzF,IAAI,CAAC,UAAU;wBAAE,OAAO,OAAO,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAA;oBACvF,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;wBACtB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;oBAC3B,CAAC;oBACD,MAAK;gBAEP,CAAC;gBACD,KAAK,0BAAY;oBACf,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;oBAC1B,MAAK;gBACP,KAAK,gBAAO;oBACV,GAAG,CAAC,MAAM,EAAE,CAAA;oBACZ,MAAK;gBACP,KAAK,8BAAmB;oBACtB,GAAG,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;oBACtC,MAAK;YACT,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAA;IACrB,CAAC,EAhCuB,CAgCvB,EAhCe,CAgCf,CAAA;AACH,CAAC"}
|