jp.ms.common.modules 1.0.30 → 1.0.32
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/dto/app-screen/index.d.ts +1 -0
- package/dist/dto/app-screen/index.js +3 -1
- package/dist/dto/app-screen/index.js.map +1 -1
- package/dist/dto/{table-game/cards → app-table}/card.dto.d.ts +2 -2
- package/dist/dto/app-table/card.dto.js.map +1 -0
- package/dist/dto/app-table/cards-deck.dto.d.ts +6 -0
- package/dist/dto/app-table/cards-deck.dto.js +38 -0
- package/dist/dto/app-table/cards-deck.dto.js.map +1 -0
- package/dist/dto/{table-game/cards/card-pair-slot.dto.d.ts → app-table/cards-pair-slots-item.dto.d.ts} +2 -2
- package/dist/dto/{table-game/cards/card-pair-slot.dto.js → app-table/cards-pair-slots-item.dto.js} +9 -9
- package/dist/dto/app-table/cards-pair-slots-item.dto.js.map +1 -0
- package/dist/dto/app-table/cards-pair-slots.dto.d.ts +5 -0
- package/dist/dto/app-table/cards-pair-slots.dto.js +27 -0
- package/dist/dto/app-table/cards-pair-slots.dto.js.map +1 -0
- package/dist/dto/app-table/cards-panel.dto.d.ts +10 -0
- package/dist/dto/{table-game/cards → app-table}/cards-panel.dto.js +4 -4
- package/dist/dto/app-table/cards-panel.dto.js.map +1 -0
- package/dist/dto/app-table/cards-player.dto.d.ts +6 -0
- package/dist/dto/{table-game/cards/card-player.dto.js → app-table/cards-player.dto.js} +6 -6
- package/dist/dto/app-table/cards-player.dto.js.map +1 -0
- package/dist/dto/app-table/index.d.ts +11 -0
- package/dist/dto/app-table/index.js +26 -0
- package/dist/dto/app-table/index.js.map +1 -0
- package/dist/dto/app-table/moves-panel-button.dto.d.ts +5 -0
- package/dist/dto/{table-game/base/base-table-yours-action.dto.js → app-table/moves-panel-button.dto.js} +6 -6
- package/dist/dto/app-table/moves-panel-button.dto.js.map +1 -0
- package/dist/dto/app-table/moves-panel.dto.d.ts +6 -0
- package/dist/dto/{table-game/base/base-table-moves-panel.dto.js → app-table/moves-panel.dto.js} +9 -9
- package/dist/dto/app-table/moves-panel.dto.js.map +1 -0
- package/dist/dto/{table-game/base/game-player.dto.d.ts → app-table/player.dto.d.ts} +2 -2
- package/dist/dto/{table-game/base/game-player.dto.js → app-table/player.dto.js} +11 -11
- package/dist/dto/app-table/player.dto.js.map +1 -0
- package/dist/dto/app-table/summary-item.dto.d.ts +8 -0
- package/dist/dto/{table-game/base/base-table-summary-item.dto.js → app-table/summary-item.dto.js} +9 -9
- package/dist/dto/app-table/summary-item.dto.js.map +1 -0
- package/dist/dto/app-table/summary.dto.d.ts +5 -0
- package/dist/dto/{table-game/base/base-table-summary.dto.js → app-table/summary.dto.js} +7 -7
- package/dist/dto/app-table/summary.dto.js.map +1 -0
- package/dist/dto/games/fool/fool-player.dto.d.ts +3 -0
- package/dist/dto/games/fool/fool-player.dto.js +8 -0
- package/dist/dto/games/fool/fool-player.dto.js.map +1 -0
- package/dist/dto/games/fool/fool-table.dto.d.ts +18 -0
- package/dist/dto/games/fool/fool-table.dto.js +105 -0
- package/dist/dto/games/fool/fool-table.dto.js.map +1 -0
- package/dist/dto/games/index.d.ts +1 -0
- package/dist/dto/games/index.js +18 -0
- package/dist/dto/games/index.js.map +1 -0
- package/dist/dto/index.d.ts +2 -1
- package/dist/dto/index.js +2 -1
- package/dist/dto/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/many-tables-tournament/many-tables-tournament.controller.d.ts +3 -3
- package/dist/modules/many-tables-tournament/many-tables-tournament.service.d.ts +3 -3
- package/dist/modules/one-table-tournament/one-table-tournament.controller.d.ts +3 -3
- package/dist/modules/one-table-tournament/one-table-tournament.service.d.ts +3 -3
- package/dist/modules/simple-rooms/simple-rooms.controller.d.ts +5 -5
- package/dist/modules/simple-rooms/simple-rooms.service.d.ts +5 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/views/index.d.ts +3 -0
- package/dist/views/index.js +7 -1
- package/dist/views/index.js.map +1 -1
- package/dist/views/many-tables-tournament-conifrm-exit-dialog.view.d.ts +4 -0
- package/dist/views/many-tables-tournament-conifrm-exit-dialog.view.js +11 -0
- package/dist/views/many-tables-tournament-conifrm-exit-dialog.view.js.map +1 -0
- package/dist/views/one-table-tournament-conifrm-exit-dialog.view.d.ts +4 -0
- package/dist/views/one-table-tournament-conifrm-exit-dialog.view.js +11 -0
- package/dist/views/one-table-tournament-conifrm-exit-dialog.view.js.map +1 -0
- package/dist/views/table-summary.view.d.ts +11 -0
- package/dist/views/table-summary.view.js +47 -0
- package/dist/views/table-summary.view.js.map +1 -0
- package/package.json +3 -3
- package/src/dto/app-screen/index.ts +1 -0
- package/src/dto/{table-game/cards → app-table}/card.dto.ts +2 -2
- package/src/dto/app-table/cards-deck.dto.ts +22 -0
- package/src/dto/{table-game/cards/card-pair-slot.dto.ts → app-table/cards-pair-slots-item.dto.ts} +2 -2
- package/src/dto/app-table/cards-pair-slots.dto.ts +13 -0
- package/src/dto/{table-game/cards → app-table}/cards-panel.dto.ts +5 -6
- package/src/dto/app-table/cards-player.dto.ts +14 -0
- package/src/dto/app-table/index.ts +11 -0
- package/src/dto/{table-game/base/base-table-yours-action.dto.ts → app-table/moves-panel-button.dto.ts} +2 -3
- package/src/dto/{table-game/base/base-table-moves-panel.dto.ts → app-table/moves-panel.dto.ts} +5 -5
- package/src/dto/{table-game/base/game-player.dto.ts → app-table/player.dto.ts} +2 -2
- package/src/dto/{table-game/base/base-table-summary-item.dto.ts → app-table/summary-item.dto.ts} +2 -3
- package/src/dto/app-table/summary.dto.ts +13 -0
- package/src/dto/games/fool/fool-player.dto.ts +3 -0
- package/src/dto/games/fool/fool-table.dto.ts +79 -0
- package/src/dto/games/index.ts +1 -0
- package/src/dto/index.ts +2 -1
- package/src/index.ts +1 -1
- package/src/modules/many-tables-tournament/many-tables-tournament.controller.ts +3 -3
- package/src/modules/many-tables-tournament/many-tables-tournament.service.ts +3 -3
- package/src/modules/one-table-tournament/one-table-tournament.controller.ts +3 -3
- package/src/modules/one-table-tournament/one-table-tournament.service.ts +3 -3
- package/src/modules/simple-rooms/simple-rooms.controller.ts +5 -5
- package/src/modules/simple-rooms/simple-rooms.service.ts +5 -5
- package/src/views/index.ts +4 -1
- package/src/views/many-tables-tournament-conifrm-exit-dialog.view.ts +21 -0
- package/src/views/one-table-tournament-conifrm-exit-dialog.view.ts +21 -0
- package/src/views/table-summary.view.ts +87 -0
- package/dist/adapter/base-table-game-state-adapter.d.ts +0 -36
- package/dist/adapter/base-table-game-state-adapter.js +0 -183
- package/dist/adapter/base-table-game-state-adapter.js.map +0 -1
- package/dist/adapter/card-table-game-state-adapter.d.ts +0 -14
- package/dist/adapter/card-table-game-state-adapter.js +0 -51
- package/dist/adapter/card-table-game-state-adapter.js.map +0 -1
- package/dist/adapter/index.d.ts +0 -1
- package/dist/adapter/index.js +0 -6
- package/dist/adapter/index.js.map +0 -1
- package/dist/dto/table-game/base/base-table-game-state.dto.d.ts +0 -17
- package/dist/dto/table-game/base/base-table-game-state.dto.js +0 -128
- package/dist/dto/table-game/base/base-table-game-state.dto.js.map +0 -1
- package/dist/dto/table-game/base/base-table-moves-panel.dto.d.ts +0 -6
- package/dist/dto/table-game/base/base-table-moves-panel.dto.js.map +0 -1
- package/dist/dto/table-game/base/base-table-summary-item.dto.d.ts +0 -8
- package/dist/dto/table-game/base/base-table-summary-item.dto.js.map +0 -1
- package/dist/dto/table-game/base/base-table-summary.dto.d.ts +0 -5
- package/dist/dto/table-game/base/base-table-summary.dto.js.map +0 -1
- package/dist/dto/table-game/base/base-table-yours-action.dto.d.ts +0 -5
- package/dist/dto/table-game/base/base-table-yours-action.dto.js.map +0 -1
- package/dist/dto/table-game/base/game-player.dto.js.map +0 -1
- package/dist/dto/table-game/cards/card-pair-slot.dto.js.map +0 -1
- package/dist/dto/table-game/cards/card-player.dto.d.ts +0 -6
- package/dist/dto/table-game/cards/card-player.dto.js.map +0 -1
- package/dist/dto/table-game/cards/card-table-game-state.dto.d.ts +0 -16
- package/dist/dto/table-game/cards/card-table-game-state.dto.js +0 -68
- package/dist/dto/table-game/cards/card-table-game-state.dto.js.map +0 -1
- package/dist/dto/table-game/cards/card.dto.js.map +0 -1
- package/dist/dto/table-game/cards/cards-panel.dto.d.ts +0 -10
- package/dist/dto/table-game/cards/cards-panel.dto.js.map +0 -1
- package/dist/dto/table-game/index.d.ts +0 -1
- package/dist/dto/table-game/index.js +0 -6
- package/dist/dto/table-game/index.js.map +0 -1
- package/src/adapter/base-table-game-state-adapter.ts +0 -272
- package/src/adapter/card-table-game-state-adapter.ts +0 -78
- package/src/adapter/index.ts +0 -1
- package/src/dto/table-game/base/base-table-game-state.dto.ts +0 -95
- package/src/dto/table-game/base/base-table-summary.dto.ts +0 -13
- package/src/dto/table-game/cards/card-player.dto.ts +0 -15
- package/src/dto/table-game/cards/card-table-game-state.dto.ts +0 -50
- package/src/dto/table-game/index.ts +0 -2
- /package/dist/dto/{table-game/cards → app-table}/card.dto.js +0 -0
package/dist/views/index.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { TournamentBuyTicketDialogView } from './tournament-buy-ticket-dialog.view';
|
|
2
2
|
export { SimpleRoomConfirmExitDialogView } from './simple-room-conifrm-exit-dialog.view';
|
|
3
|
+
export { ManyTablesTournamentConfirmExitDialogView } from './many-tables-tournament-conifrm-exit-dialog.view';
|
|
4
|
+
export { OneTableTournamentConfirmExitDialogView } from './one-table-tournament-conifrm-exit-dialog.view';
|
|
5
|
+
export { TableSummaryView } from './table-summary.view';
|
package/dist/views/index.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SimpleRoomConfirmExitDialogView = exports.TournamentBuyTicketDialogView = void 0;
|
|
3
|
+
exports.TableSummaryView = exports.OneTableTournamentConfirmExitDialogView = exports.ManyTablesTournamentConfirmExitDialogView = exports.SimpleRoomConfirmExitDialogView = exports.TournamentBuyTicketDialogView = void 0;
|
|
4
4
|
var tournament_buy_ticket_dialog_view_1 = require("./tournament-buy-ticket-dialog.view");
|
|
5
5
|
Object.defineProperty(exports, "TournamentBuyTicketDialogView", { enumerable: true, get: function () { return tournament_buy_ticket_dialog_view_1.TournamentBuyTicketDialogView; } });
|
|
6
6
|
var simple_room_conifrm_exit_dialog_view_1 = require("./simple-room-conifrm-exit-dialog.view");
|
|
7
7
|
Object.defineProperty(exports, "SimpleRoomConfirmExitDialogView", { enumerable: true, get: function () { return simple_room_conifrm_exit_dialog_view_1.SimpleRoomConfirmExitDialogView; } });
|
|
8
|
+
var many_tables_tournament_conifrm_exit_dialog_view_1 = require("./many-tables-tournament-conifrm-exit-dialog.view");
|
|
9
|
+
Object.defineProperty(exports, "ManyTablesTournamentConfirmExitDialogView", { enumerable: true, get: function () { return many_tables_tournament_conifrm_exit_dialog_view_1.ManyTablesTournamentConfirmExitDialogView; } });
|
|
10
|
+
var one_table_tournament_conifrm_exit_dialog_view_1 = require("./one-table-tournament-conifrm-exit-dialog.view");
|
|
11
|
+
Object.defineProperty(exports, "OneTableTournamentConfirmExitDialogView", { enumerable: true, get: function () { return one_table_tournament_conifrm_exit_dialog_view_1.OneTableTournamentConfirmExitDialogView; } });
|
|
12
|
+
var table_summary_view_1 = require("./table-summary.view");
|
|
13
|
+
Object.defineProperty(exports, "TableSummaryView", { enumerable: true, get: function () { return table_summary_view_1.TableSummaryView; } });
|
|
8
14
|
//# sourceMappingURL=index.js.map
|
package/dist/views/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/views/index.ts"],"names":[],"mappings":";;;AAAA,yFAAoF;AAA3E,kJAAA,6BAA6B,OAAA;AACtC,+FAAyF;AAAhF,uJAAA,+BAA+B,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/views/index.ts"],"names":[],"mappings":";;;AAAA,yFAAoF;AAA3E,kJAAA,6BAA6B,OAAA;AACtC,+FAAyF;AAAhF,uJAAA,+BAA+B,OAAA;AACxC,qHAA8G;AAArG,4KAAA,yCAAyC,OAAA;AAClD,iHAA0G;AAAjG,wKAAA,uCAAuC,OAAA;AAChD,2DAAuD;AAA9C,sHAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ManyTablesTournamentConfirmExitDialogView = void 0;
|
|
4
|
+
const jp_common_models_1 = require("jp.common.models");
|
|
5
|
+
class ManyTablesTournamentConfirmExitDialogView extends jp_common_models_1.UniversalScreenDialogView {
|
|
6
|
+
build() {
|
|
7
|
+
return new jp_common_models_1.StandardDialogComponent(jp_common_models_1.AppScreenDialogIdEnum.DIALOG_MANY_TABLES_TOURNAMENT_CONFIRM_EXIT, this.localeService.t('common.room.screen.dialog.confirm.exit.game.title', { lang: this.lang }), this.localeService.t('common.room.screen.dialog.confirm.exit.game.message', { lang: this.lang }), new jp_common_models_1.FullButtonsButtonsComponent(new jp_common_models_1.TextButtonComponent(this.localeService.t('common.room.screen.dialog.confirm.exit.game.ok', { lang: this.lang })), new jp_common_models_1.TextButtonComponent(this.localeService.t('common.room.screen.dialog.confirm.exit.game.cancel', { lang: this.lang }))));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.ManyTablesTournamentConfirmExitDialogView = ManyTablesTournamentConfirmExitDialogView;
|
|
11
|
+
//# sourceMappingURL=many-tables-tournament-conifrm-exit-dialog.view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"many-tables-tournament-conifrm-exit-dialog.view.js","sourceRoot":"","sources":["../../src/views/many-tables-tournament-conifrm-exit-dialog.view.ts"],"names":[],"mappings":";;;AAAA,uDAM0B;AAE1B,MAAa,yCAA0C,SAAQ,4CAAyB;IACpF,KAAK;QACD,OAAO,IAAI,0CAAuB,CAC9B,wCAAqB,CAAC,0CAA0C,EAChE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,mDAAmD,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EAC9F,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,qDAAqD,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EAChG,IAAI,8CAA2B,CAC3B,IAAI,sCAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,gDAAgD,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EACpH,IAAI,sCAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,oDAAoD,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAC3H,CACJ,CAAC;IACN,CAAC;CACJ;AAZD,8FAYC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OneTableTournamentConfirmExitDialogView = void 0;
|
|
4
|
+
const jp_common_models_1 = require("jp.common.models");
|
|
5
|
+
class OneTableTournamentConfirmExitDialogView extends jp_common_models_1.UniversalScreenDialogView {
|
|
6
|
+
build() {
|
|
7
|
+
return new jp_common_models_1.StandardDialogComponent(jp_common_models_1.AppScreenDialogIdEnum.DIALOG_ONE_TABLE_TOURNAMENT_CONFIRM_EXIT, this.localeService.t('common.room.screen.dialog.confirm.exit.game.title', { lang: this.lang }), this.localeService.t('common.room.screen.dialog.confirm.exit.game.message', { lang: this.lang }), new jp_common_models_1.FullButtonsButtonsComponent(new jp_common_models_1.TextButtonComponent(this.localeService.t('common.room.screen.dialog.confirm.exit.game.ok', { lang: this.lang })), new jp_common_models_1.TextButtonComponent(this.localeService.t('common.room.screen.dialog.confirm.exit.game.cancel', { lang: this.lang }))));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.OneTableTournamentConfirmExitDialogView = OneTableTournamentConfirmExitDialogView;
|
|
11
|
+
//# sourceMappingURL=one-table-tournament-conifrm-exit-dialog.view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"one-table-tournament-conifrm-exit-dialog.view.js","sourceRoot":"","sources":["../../src/views/one-table-tournament-conifrm-exit-dialog.view.ts"],"names":[],"mappings":";;;AAAA,uDAM0B;AAE1B,MAAa,uCAAwC,SAAQ,4CAAyB;IAClF,KAAK;QACD,OAAO,IAAI,0CAAuB,CAC9B,wCAAqB,CAAC,wCAAwC,EAC9D,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,mDAAmD,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EAC9F,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,qDAAqD,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EAChG,IAAI,8CAA2B,CAC3B,IAAI,sCAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,gDAAgD,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EACpH,IAAI,sCAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,oDAAoD,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAC3H,CACJ,CAAC;IACN,CAAC;CACJ;AAZD,0FAYC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IAppTableSummary, ILocaleService, UniversalView } from "jp.common.models";
|
|
2
|
+
import { GameMaster } from "jp.ms.common.engine";
|
|
3
|
+
export declare class TableSummaryView extends UniversalView {
|
|
4
|
+
private readonly gameMaster;
|
|
5
|
+
constructor(localeService: ILocaleService, lang: string, gameMaster: GameMaster);
|
|
6
|
+
build(): IAppTableSummary;
|
|
7
|
+
private getSummaryTechBreak;
|
|
8
|
+
private getSummaryPlaying;
|
|
9
|
+
private getSummaryWaiting;
|
|
10
|
+
private getSummaryEnd;
|
|
11
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TableSummaryView = void 0;
|
|
4
|
+
const jp_common_models_1 = require("jp.common.models");
|
|
5
|
+
const jp_common_utils_1 = require("jp.common.utils");
|
|
6
|
+
class TableSummaryView extends jp_common_models_1.UniversalView {
|
|
7
|
+
gameMaster;
|
|
8
|
+
constructor(localeService, lang, gameMaster) {
|
|
9
|
+
super(localeService, lang);
|
|
10
|
+
this.gameMaster = gameMaster;
|
|
11
|
+
}
|
|
12
|
+
build() {
|
|
13
|
+
if (this.gameMaster.isInProgress()) {
|
|
14
|
+
return this.getSummaryPlaying();
|
|
15
|
+
}
|
|
16
|
+
else if (this.gameMaster.isTechBreak()) {
|
|
17
|
+
return this.getSummaryTechBreak();
|
|
18
|
+
}
|
|
19
|
+
else if (this.gameMaster.isWaiting()) {
|
|
20
|
+
return this.getSummaryWaiting();
|
|
21
|
+
}
|
|
22
|
+
else if (this.gameMaster.isFinish()) {
|
|
23
|
+
return this.getSummaryEnd();
|
|
24
|
+
}
|
|
25
|
+
return new jp_common_models_1.SummaryComponent([]);
|
|
26
|
+
}
|
|
27
|
+
getSummaryTechBreak() {
|
|
28
|
+
return new jp_common_models_1.OneLineSummaryComponent(new jp_common_models_1.BodyMdSummaryItemComponent('tech-break', this.localeService.t('room.screen.tech.break.message', { lang: this.lang })));
|
|
29
|
+
}
|
|
30
|
+
getSummaryPlaying() {
|
|
31
|
+
return new jp_common_models_1.OneLineSummaryComponent(new jp_common_models_1.TitleMdSummaryItemComponent('pot', this.localeService.t('room.screen.summary.pot', {
|
|
32
|
+
lang: this.lang,
|
|
33
|
+
args: { POT: (0, jp_common_utils_1.formatChips)(this.gameMaster?.getGameRound()?.getPot() ?? 0, this.lang, true) },
|
|
34
|
+
})));
|
|
35
|
+
}
|
|
36
|
+
getSummaryWaiting() {
|
|
37
|
+
return new jp_common_models_1.OneLineSummaryComponent(new jp_common_models_1.BodyMdSummaryItemComponent('waiting', this.localeService.t('room.screen.waiting.for.the.players', { lang: this.lang })));
|
|
38
|
+
}
|
|
39
|
+
getSummaryEnd() {
|
|
40
|
+
return new jp_common_models_1.SummaryComponent([
|
|
41
|
+
new jp_common_models_1.BodySmSummaryItemComponent('WINNER', this.localeService.t('room.screen.summary.winner', { lang: this.lang }), this.gameMaster.getGameResultHelper()?.getWinnersName() ?? ''),
|
|
42
|
+
new jp_common_models_1.BodySmSummaryItemComponent('NEW_GAME', this.localeService.t('room.screen.summary.new.game', { lang: this.lang }), this.localeService.t('room.screen.summary.new.game.value', { lang: this.lang }))
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.TableSummaryView = TableSummaryView;
|
|
47
|
+
//# sourceMappingURL=table-summary.view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-summary.view.js","sourceRoot":"","sources":["../../src/views/table-summary.view.ts"],"names":[],"mappings":";;;AAAA,uDAS0B;AAC1B,qDAA8C;AAG9C,MAAa,gBAAiB,SAAQ,gCAAa;IAC9B,UAAU,CAAa;IAExC,YACI,aAA6B,EAC7B,IAAY,EACZ,UAAsB;QAEtB,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,KAAK;QACD,IAAI,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpC,CAAC;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC;YACvC,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACtC,CAAC;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC;YACrC,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpC,CAAC;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;QAChC,CAAC;QAED,OAAO,IAAI,mCAAgB,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;IAGO,mBAAmB;QACvB,OAAO,IAAI,0CAAuB,CAC9B,IAAI,6CAA0B,CAC1B,YAAY,EACZ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,gCAAgC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAC9E,CACJ,CAAC;IACN,CAAC;IAEO,iBAAiB;QACrB,OAAO,IAAI,0CAAuB,CAC9B,IAAI,8CAA2B,CAC3B,KAAK,EACL,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,yBAAyB,EAAE;YAC5C,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,EAAE,GAAG,EAAE,IAAA,6BAAW,EAAC,IAAI,CAAC,UAAU,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE;SAC9F,CAAC,CACL,CACJ,CAAC;IACN,CAAC;IAEO,iBAAiB;QACrB,OAAO,IAAI,0CAAuB,CAC9B,IAAI,6CAA0B,CAC1B,SAAS,EACT,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,qCAAqC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CACnF,CACJ,CAAC;IACN,CAAC;IAEO,aAAa;QACjB,OAAO,IAAI,mCAAgB,CACvB;YACI,IAAI,6CAA0B,CAC1B,QAAQ,EACR,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,4BAA4B,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EACvE,IAAI,CAAC,UAAU,CAAC,mBAAmB,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAChE;YACD,IAAI,6CAA0B,CAC1B,UAAU,EACV,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,8BAA8B,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EACzE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,oCAAoC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAClF;SACJ,CACJ,CAAC;IACN,CAAC;CACJ;AAzED,4CAyEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jp.ms.common.modules",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"@nestjs/mongoose": "11.0.4",
|
|
14
14
|
"@nestjs/websockets": "11.1.9",
|
|
15
15
|
"dayjs": "1.11.18",
|
|
16
|
-
"jp.common.models": "1.1.
|
|
16
|
+
"jp.common.models": "1.1.24",
|
|
17
17
|
"jp.common.utils": "1.0.4",
|
|
18
18
|
"jp.db.schemas": "2.2.8",
|
|
19
|
-
"jp.ms.common.engine": "3.0.
|
|
19
|
+
"jp.ms.common.engine": "3.0.14",
|
|
20
20
|
"mongoose": "9.1.5",
|
|
21
21
|
"nestjs-i18n": "10.5.1",
|
|
22
22
|
"node-schedule": "2.1.1",
|
|
@@ -7,3 +7,4 @@ export { AppScreenSectionButtonsDto } from './app-screen-section-buttons.dto';
|
|
|
7
7
|
export { AppScreenSectionImageDto } from './app-screen-section-image.dto';
|
|
8
8
|
export { AppScreenSectionListItemDto } from './app-screen-section-list-item.dto';
|
|
9
9
|
export { AppScreenSectionReqDto } from './app-screen-section-req.dto';
|
|
10
|
+
export { AppScreenDialogDto } from './app-screen-dialog.dto';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ApiProperty } from '@nestjs/swagger';
|
|
2
2
|
import { Expose, Type } from 'class-transformer';
|
|
3
3
|
import { IsString, IsNumber, IsBoolean, IsArray, ValidateNested } from 'class-validator';
|
|
4
|
-
import {
|
|
4
|
+
import { IAppTableCard } from 'jp.common.models';
|
|
5
5
|
|
|
6
|
-
export class CardDto implements
|
|
6
|
+
export class CardDto implements IAppTableCard {
|
|
7
7
|
@ApiProperty({
|
|
8
8
|
description: 'card ID',
|
|
9
9
|
required: true,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Type, Expose } from "class-transformer";
|
|
2
|
+
import { IsString, ValidateNested } from "class-validator";
|
|
3
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
4
|
+
import { IAppTableCardsDeck } from "jp.common.models";
|
|
5
|
+
|
|
6
|
+
import { CardDto } from "./card.dto";
|
|
7
|
+
|
|
8
|
+
export class CardsDeckDto implements IAppTableCardsDeck {
|
|
9
|
+
@ApiProperty({
|
|
10
|
+
description: 'trumpSuit',
|
|
11
|
+
required: true,
|
|
12
|
+
type: String,
|
|
13
|
+
})
|
|
14
|
+
@Expose()
|
|
15
|
+
@IsString()
|
|
16
|
+
trumpSuit: string;
|
|
17
|
+
|
|
18
|
+
@ValidateNested()
|
|
19
|
+
@Type(() => CardDto)
|
|
20
|
+
@Expose()
|
|
21
|
+
trump?: CardDto | undefined;
|
|
22
|
+
}
|
package/src/dto/{table-game/cards/card-pair-slot.dto.ts → app-table/cards-pair-slots-item.dto.ts}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Expose, Type } from 'class-transformer';
|
|
2
2
|
import { IsBoolean, IsNumber, ValidateNested } from 'class-validator';
|
|
3
|
-
import { ICardPairSlotState } from 'jp.common.models';
|
|
4
3
|
import { ApiProperty } from '@nestjs/swagger';
|
|
4
|
+
import { IAppTableCardsPairSlotsItem } from 'jp.common.models';
|
|
5
5
|
|
|
6
6
|
import { CardDto } from './card.dto';
|
|
7
7
|
|
|
8
|
-
export class
|
|
8
|
+
export class CardPairSlotItemDto implements IAppTableCardsPairSlotsItem {
|
|
9
9
|
@ApiProperty({
|
|
10
10
|
description: 'id',
|
|
11
11
|
required: true,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { IsArray, ValidateNested } from 'class-validator';
|
|
3
|
+
import { IAppTableCardsPairSlots } from 'jp.common.models';
|
|
4
|
+
|
|
5
|
+
import { CardPairSlotItemDto } from './cards-pair-slots-item.dto';
|
|
6
|
+
|
|
7
|
+
export class CardsPairSlotsDto implements IAppTableCardsPairSlots {
|
|
8
|
+
@IsArray()
|
|
9
|
+
@ValidateNested({ each: true })
|
|
10
|
+
@Type(() => CardPairSlotItemDto)
|
|
11
|
+
@Expose()
|
|
12
|
+
slots: Array<CardPairSlotItemDto>;
|
|
13
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Expose, Type } from 'class-transformer';
|
|
2
2
|
import { IsArray, IsBoolean, IsString, ValidateNested } from 'class-validator';
|
|
3
|
-
import { ICardsPanelState } from 'jp.common.models';
|
|
4
3
|
import { ApiProperty } from '@nestjs/swagger';
|
|
5
|
-
|
|
6
|
-
import { BaseTableYoursActionDto } from '../base/base-table-yours-action.dto';
|
|
4
|
+
import { IAppTableCardsPanel } from 'jp.common.models';
|
|
7
5
|
|
|
8
6
|
import { CardDto } from './card.dto';
|
|
7
|
+
import { MovesPanelButtonDto } from './moves-panel-button.dto';
|
|
9
8
|
|
|
10
|
-
export class CardsPanelDto implements
|
|
9
|
+
export class CardsPanelDto implements IAppTableCardsPanel {
|
|
11
10
|
@ApiProperty({
|
|
12
11
|
description: 'isOpen',
|
|
13
12
|
required: true,
|
|
@@ -28,9 +27,9 @@ export class CardsPanelDto implements ICardsPanelState {
|
|
|
28
27
|
|
|
29
28
|
@IsArray()
|
|
30
29
|
@ValidateNested({ each: true })
|
|
31
|
-
@Type(() =>
|
|
30
|
+
@Type(() => MovesPanelButtonDto)
|
|
32
31
|
@Expose()
|
|
33
|
-
|
|
32
|
+
buttons: Array<MovesPanelButtonDto>;
|
|
34
33
|
|
|
35
34
|
@IsArray()
|
|
36
35
|
@ValidateNested({ each: true })
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { IsArray, ValidateNested } from 'class-validator';
|
|
3
|
+
import { IAppTableCardsPlayer } from 'jp.common.models';
|
|
4
|
+
|
|
5
|
+
import { CardDto } from './card.dto';
|
|
6
|
+
import { PlayerDto } from './player.dto';
|
|
7
|
+
|
|
8
|
+
export class CardsPlayerDto extends PlayerDto implements IAppTableCardsPlayer {
|
|
9
|
+
@IsArray()
|
|
10
|
+
@ValidateNested({ each: true })
|
|
11
|
+
@Type(() => CardDto)
|
|
12
|
+
@Expose()
|
|
13
|
+
cards: Array<CardDto>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { CardDto } from './card.dto';
|
|
2
|
+
export { CardsDeckDto } from './cards-deck.dto';
|
|
3
|
+
export { CardPairSlotItemDto } from './cards-pair-slots-item.dto';
|
|
4
|
+
export { CardsPairSlotsDto } from './cards-pair-slots.dto';
|
|
5
|
+
export { CardsPanelDto } from './cards-panel.dto';
|
|
6
|
+
export { CardsPlayerDto } from './cards-player.dto';
|
|
7
|
+
export { MovesPanelButtonDto } from './moves-panel-button.dto';
|
|
8
|
+
export { MovesPanelDto } from './moves-panel.dto';
|
|
9
|
+
export { PlayerDto } from './player.dto';
|
|
10
|
+
export { SummaryDto } from './summary.dto';
|
|
11
|
+
export { SummaryItemDto } from './summary-item.dto';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ApiProperty } from '@nestjs/swagger';
|
|
2
2
|
import { Expose } from 'class-transformer';
|
|
3
3
|
import { IsString } from 'class-validator';
|
|
4
|
+
import { IAppTableMovesPanelButton } from 'jp.common.models';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export class BaseTableYoursActionDto implements IBaseTableGameStateYoursActionItem {
|
|
6
|
+
export class MovesPanelButtonDto implements IAppTableMovesPanelButton {
|
|
8
7
|
@ApiProperty({
|
|
9
8
|
description: 'ID',
|
|
10
9
|
required: true,
|
package/src/dto/{table-game/base/base-table-moves-panel.dto.ts → app-table/moves-panel.dto.ts}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Expose, Type } from 'class-transformer';
|
|
2
2
|
import { IsArray, IsBoolean, ValidateNested } from 'class-validator';
|
|
3
|
-
import {
|
|
3
|
+
import { IAppTableMovesPanel } from 'jp.common.models';
|
|
4
4
|
import { ApiProperty } from '@nestjs/swagger';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { MovesPanelButtonDto } from './moves-panel-button.dto';
|
|
7
7
|
|
|
8
|
-
export class
|
|
8
|
+
export class MovesPanelDto implements IAppTableMovesPanel {
|
|
9
9
|
@ApiProperty({
|
|
10
10
|
description: 'isOpen',
|
|
11
11
|
required: true,
|
|
@@ -17,7 +17,7 @@ export class BaseTableMovesPanelDto implements IBaseTableGameStateMovesPanel {
|
|
|
17
17
|
|
|
18
18
|
@IsArray()
|
|
19
19
|
@ValidateNested({ each: true })
|
|
20
|
-
@Type(() =>
|
|
20
|
+
@Type(() => MovesPanelButtonDto)
|
|
21
21
|
@Expose()
|
|
22
|
-
|
|
22
|
+
buttons: Array<MovesPanelButtonDto>;
|
|
23
23
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ApiProperty } from '@nestjs/swagger';
|
|
2
2
|
import { Expose } from 'class-transformer';
|
|
3
3
|
import { IsString, IsNumber, IsBoolean } from 'class-validator';
|
|
4
|
-
import {
|
|
4
|
+
import { IAppTablePlayer } from 'jp.common.models';
|
|
5
5
|
|
|
6
|
-
export class
|
|
6
|
+
export class PlayerDto implements IAppTablePlayer {
|
|
7
7
|
@ApiProperty({
|
|
8
8
|
description: 'user ID',
|
|
9
9
|
required: true,
|
package/src/dto/{table-game/base/base-table-summary-item.dto.ts → app-table/summary-item.dto.ts}
RENAMED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ApiProperty } from '@nestjs/swagger';
|
|
2
2
|
import { Expose } from 'class-transformer';
|
|
3
3
|
import { IsString } from 'class-validator';
|
|
4
|
+
import { IAppTableSummaryItem } from 'jp.common.models';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export class BaseTableSummaryItemDto implements IBaseTableGameStateSummaryItem {
|
|
6
|
+
export class SummaryItemDto implements IAppTableSummaryItem {
|
|
8
7
|
@ApiProperty({
|
|
9
8
|
description: 'id',
|
|
10
9
|
required: true,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { IsArray, ValidateNested } from 'class-validator';
|
|
3
|
+
import { IAppTableSummary } from 'jp.common.models';
|
|
4
|
+
|
|
5
|
+
import { SummaryItemDto } from './summary-item.dto';
|
|
6
|
+
|
|
7
|
+
export class SummaryDto implements IAppTableSummary {
|
|
8
|
+
@IsArray()
|
|
9
|
+
@ValidateNested({ each: true })
|
|
10
|
+
@Type(() => SummaryItemDto)
|
|
11
|
+
@Expose()
|
|
12
|
+
list: Array<SummaryItemDto>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
2
|
+
import { Expose, plainToInstance, Type } from "class-transformer";
|
|
3
|
+
import { IsArray, IsNumber, ValidateNested } from "class-validator";
|
|
4
|
+
import { IFoolTable } from "jp.common.models";
|
|
5
|
+
|
|
6
|
+
import { AppScreenAppBarDto, AppScreenDialogDto } from "../../app-screen";
|
|
7
|
+
import {
|
|
8
|
+
CardsPairSlotsDto,
|
|
9
|
+
CardsDeckDto,
|
|
10
|
+
CardsPanelDto,
|
|
11
|
+
MovesPanelDto,
|
|
12
|
+
SummaryDto,
|
|
13
|
+
} from "../../app-table";
|
|
14
|
+
|
|
15
|
+
import { FoolPlayerDto } from "./fool-player.dto";
|
|
16
|
+
|
|
17
|
+
export class FoolTableDto implements IFoolTable {
|
|
18
|
+
@Type(() => AppScreenAppBarDto)
|
|
19
|
+
@Expose()
|
|
20
|
+
appBar: AppScreenAppBarDto;
|
|
21
|
+
|
|
22
|
+
@Type(() => AppScreenDialogDto)
|
|
23
|
+
@Expose()
|
|
24
|
+
confirmExitDialog: AppScreenDialogDto | undefined;
|
|
25
|
+
|
|
26
|
+
@ApiProperty({
|
|
27
|
+
description: 'Player Turn Timer Remain',
|
|
28
|
+
type: Number,
|
|
29
|
+
})
|
|
30
|
+
@IsNumber()
|
|
31
|
+
@Expose()
|
|
32
|
+
playersTurnTimer: number | undefined;
|
|
33
|
+
|
|
34
|
+
@ApiProperty({
|
|
35
|
+
description: 'Restart Timer Remain',
|
|
36
|
+
type: Number,
|
|
37
|
+
})
|
|
38
|
+
@IsNumber()
|
|
39
|
+
@Expose()
|
|
40
|
+
restartTimer: number | undefined;
|
|
41
|
+
|
|
42
|
+
@ApiProperty({
|
|
43
|
+
description: 'Table size',
|
|
44
|
+
type: Number,
|
|
45
|
+
})
|
|
46
|
+
@IsNumber()
|
|
47
|
+
@Expose()
|
|
48
|
+
tableSize: number;
|
|
49
|
+
|
|
50
|
+
@IsArray()
|
|
51
|
+
@ValidateNested({ each: true })
|
|
52
|
+
@Type(() => FoolPlayerDto)
|
|
53
|
+
@Expose()
|
|
54
|
+
players: FoolPlayerDto[];
|
|
55
|
+
|
|
56
|
+
@Type(() => CardsPairSlotsDto)
|
|
57
|
+
@Expose()
|
|
58
|
+
cardsSlots: CardsPairSlotsDto;
|
|
59
|
+
|
|
60
|
+
@Type(() => CardsDeckDto)
|
|
61
|
+
@Expose()
|
|
62
|
+
cardsDeck: CardsDeckDto;
|
|
63
|
+
|
|
64
|
+
@Type(() => SummaryDto)
|
|
65
|
+
@Expose()
|
|
66
|
+
summary: SummaryDto;
|
|
67
|
+
|
|
68
|
+
@Type(() => CardsPanelDto)
|
|
69
|
+
@Expose()
|
|
70
|
+
cardsPanel: CardsPanelDto;
|
|
71
|
+
|
|
72
|
+
@Type(() => MovesPanelDto)
|
|
73
|
+
@Expose()
|
|
74
|
+
movesPanel: MovesPanelDto;
|
|
75
|
+
|
|
76
|
+
constructor(entity: IFoolTable) {
|
|
77
|
+
return plainToInstance(FoolTableDto, entity, { excludeExtraneousValues: true })
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fool/fool-table.dto';
|
package/src/dto/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Body, Controller, Get, Param, Post, Headers, HttpStatus, HttpCode, Patch, Delete } from '@nestjs/common';
|
|
2
|
-
import { IAppHeaders, IBaseAppScreen, IBaseMoveData,
|
|
2
|
+
import { IAppHeaders, IBaseAppScreen, IBaseMoveData, IAppTableState } from 'jp.common.models';
|
|
3
3
|
|
|
4
4
|
import { ManyTablesTournamentService } from './many-tables-tournament.service';
|
|
5
5
|
import { JoinTournamentDto } from '../../dto/common/join-tournament.dto';
|
|
@@ -50,7 +50,7 @@ export class ManyTablesTournamentController {
|
|
|
50
50
|
watchTheTable(
|
|
51
51
|
@Param('tableId') tableId: string,
|
|
52
52
|
@Headers() headers: IAppHeaders,
|
|
53
|
-
):
|
|
53
|
+
): IAppTableState {
|
|
54
54
|
return this.tournamentService.watchTheTable(tableId, headers.client_auth_token);
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -60,7 +60,7 @@ export class ManyTablesTournamentController {
|
|
|
60
60
|
@Param('tableId') tableId: string,
|
|
61
61
|
@Body() baseMoveData: IBaseMoveData,
|
|
62
62
|
@Headers() headers: IAppHeaders,
|
|
63
|
-
):
|
|
63
|
+
): IAppTableState {
|
|
64
64
|
return this.tournamentService.moveOnTheTable(tableId, headers.client_auth_token, baseMoveData);
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Inject, Injectable, InternalServerErrorException } from '@nestjs/common';
|
|
2
2
|
import {
|
|
3
3
|
IBaseMoveData,
|
|
4
|
-
|
|
4
|
+
IAppTableState,
|
|
5
5
|
AppScreenRouter,
|
|
6
6
|
} from 'jp.common.models';
|
|
7
7
|
import { ManyTablesTournamentMaster, TournamentMaster } from 'jp.ms.common.engine';
|
|
@@ -82,7 +82,7 @@ export class ManyTablesTournamentService {
|
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
watchTheTable (tableId: string, clientAuthToken: string):
|
|
85
|
+
watchTheTable (tableId: string, clientAuthToken: string): IAppTableState {
|
|
86
86
|
const player = this.playersManager.getPlayerById(clientAuthToken);
|
|
87
87
|
const room = this.manyTablesRoomsManagerService.getRoomByTableId(tableId);
|
|
88
88
|
const master = room?.getMasterById(tableId);
|
|
@@ -96,7 +96,7 @@ export class ManyTablesTournamentService {
|
|
|
96
96
|
throw new InternalServerErrorException();
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
moveOnTheTable (tableId: string, clientAuthToken: string, moveDto: IBaseMoveData):
|
|
99
|
+
moveOnTheTable (tableId: string, clientAuthToken: string, moveDto: IBaseMoveData): IAppTableState {
|
|
100
100
|
const player = this.playersManager.getPlayerById(clientAuthToken);
|
|
101
101
|
const room = this.manyTablesRoomsManagerService.getRoomByTableId(tableId);
|
|
102
102
|
const master = room?.getMasterById(tableId);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Body, Controller, Get, Param, Post, Headers, HttpStatus, HttpCode } from '@nestjs/common';
|
|
2
|
-
import { IAppHeaders, IBaseAppScreen, IBaseMoveData,
|
|
2
|
+
import { IAppHeaders, IBaseAppScreen, IBaseMoveData, IAppTableState } from 'jp.common.models';
|
|
3
3
|
|
|
4
4
|
import { OneTableTournamentService } from './one-table-tournament.service';
|
|
5
5
|
|
|
@@ -39,7 +39,7 @@ export class OneTableTournamentController {
|
|
|
39
39
|
watchTheTable(
|
|
40
40
|
@Param('tableId') tableId: string,
|
|
41
41
|
@Headers() headers: IAppHeaders,
|
|
42
|
-
):
|
|
42
|
+
): IAppTableState {
|
|
43
43
|
return this.tournamentService.watchTheTable(tableId, headers.client_auth_token);
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -49,7 +49,7 @@ export class OneTableTournamentController {
|
|
|
49
49
|
@Param('tableId') tableId: string,
|
|
50
50
|
@Body() baseMoveData: IBaseMoveData,
|
|
51
51
|
@Headers() headers: IAppHeaders,
|
|
52
|
-
):
|
|
52
|
+
): IAppTableState {
|
|
53
53
|
return this.tournamentService.moveOnTheTable(tableId, headers.client_auth_token, baseMoveData);
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
IAppHeaders,
|
|
4
4
|
IBaseAppScreen,
|
|
5
5
|
IBaseMoveData,
|
|
6
|
-
|
|
6
|
+
IAppTableState,
|
|
7
7
|
} from 'jp.common.models';
|
|
8
8
|
|
|
9
9
|
import { BaseAppScreenDto } from '../../dto';
|
|
@@ -66,7 +66,7 @@ export class OneTableTournamentService {
|
|
|
66
66
|
throw new InternalServerErrorException();
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
watchTheTable (tableId: string, clientAuthToken: string):
|
|
69
|
+
watchTheTable (tableId: string, clientAuthToken: string): IAppTableState {
|
|
70
70
|
const player = this.playersManager.getPlayerById(clientAuthToken);
|
|
71
71
|
const room = this.oneTableRoomsManagerService.getRoomByTableId(tableId);
|
|
72
72
|
const master = room?.getMasterById(tableId);
|
|
@@ -80,7 +80,7 @@ export class OneTableTournamentService {
|
|
|
80
80
|
throw new InternalServerErrorException();
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
moveOnTheTable (tableId: string, clientAuthToken: string, moveDto: IBaseMoveData):
|
|
83
|
+
moveOnTheTable (tableId: string, clientAuthToken: string, moveDto: IBaseMoveData): IAppTableState {
|
|
84
84
|
const player = this.playersManager.getPlayerById(clientAuthToken);
|
|
85
85
|
const room = this.oneTableRoomsManagerService.getRoomByTableId(tableId);
|
|
86
86
|
const master = room?.getMasterById(tableId);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Body, Controller, Param, Post, Headers, HttpStatus, HttpCode } from '@nestjs/common';
|
|
2
|
-
import { IAppHeaders, IBaseMoveData,
|
|
2
|
+
import { IAppHeaders, IBaseMoveData, IAppTableState } from 'jp.common.models';
|
|
3
3
|
|
|
4
4
|
import { SimpleRoomsService } from './simple-rooms.service';
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ export class SimpleRoomsController {
|
|
|
14
14
|
watchTheTable (
|
|
15
15
|
@Param('tableId') tableId: string,
|
|
16
16
|
@Headers() headers: IAppHeaders,
|
|
17
|
-
):
|
|
17
|
+
): IAppTableState {
|
|
18
18
|
return this.roomsService.watchTheTable(tableId, headers.client_auth_token);
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ export class SimpleRoomsController {
|
|
|
23
23
|
enterTheTable (
|
|
24
24
|
@Param('tableId') tableId: string,
|
|
25
25
|
@Headers() headers: IAppHeaders,
|
|
26
|
-
):
|
|
26
|
+
): IAppTableState {
|
|
27
27
|
return this.roomsService.enterTheTable(tableId, headers.client_auth_token);
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -32,7 +32,7 @@ export class SimpleRoomsController {
|
|
|
32
32
|
exitTheTable (
|
|
33
33
|
@Param('tableId') tableId: string,
|
|
34
34
|
@Headers() headers: IAppHeaders,
|
|
35
|
-
):
|
|
35
|
+
): IAppTableState {
|
|
36
36
|
return this.roomsService.exitTheTable(tableId, headers.client_auth_token);
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -42,7 +42,7 @@ export class SimpleRoomsController {
|
|
|
42
42
|
@Param('tableId') tableId: string,
|
|
43
43
|
@Body() baseMoveData: IBaseMoveData,
|
|
44
44
|
@Headers() headers: IAppHeaders,
|
|
45
|
-
):
|
|
45
|
+
): IAppTableState {
|
|
46
46
|
return this.roomsService.moveOnTheTable(tableId, headers.client_auth_token, baseMoveData);
|
|
47
47
|
}
|
|
48
48
|
|