trucoshi 0.5.7 → 0.5.9
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/lib/constants.d.ts +3 -2
- package/dist/lib/constants.js +4 -9
- package/dist/server/constants.d.ts +0 -3
- package/dist/server/constants.js +1 -4
- package/dist/types.d.ts +5 -1
- package/dist/types.js +1 -5
- package/package.json +1 -1
package/dist/lib/constants.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const PLAYER_ABANDON_TIMEOUT: number;
|
|
2
|
+
export declare const PLAYER_TURN_TIMEOUT: number;
|
|
3
|
+
export declare const PREVIOUS_HAND_ACK_TIMEOUT: number;
|
|
3
4
|
export declare const CARDS: {
|
|
4
5
|
"1e": number;
|
|
5
6
|
"1b": number;
|
package/dist/lib/constants.js
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TEAM_SIZE_VALUES = exports.CARDS_HUMAN_READABLE = exports.BURNT_CARD = exports.CARDS = exports.
|
|
4
|
-
|
|
5
|
-
exports.
|
|
6
|
-
|
|
7
|
-
flor: false,
|
|
8
|
-
matchPoint: 9,
|
|
9
|
-
maxPlayers: 6,
|
|
10
|
-
turnTime: types_1.PLAYER_TURN_TIMEOUT,
|
|
11
|
-
};
|
|
3
|
+
exports.TEAM_SIZE_VALUES = exports.CARDS_HUMAN_READABLE = exports.BURNT_CARD = exports.CARDS = exports.PREVIOUS_HAND_ACK_TIMEOUT = exports.PLAYER_TURN_TIMEOUT = exports.PLAYER_ABANDON_TIMEOUT = void 0;
|
|
4
|
+
exports.PLAYER_ABANDON_TIMEOUT = 1000 * 45;
|
|
5
|
+
exports.PLAYER_TURN_TIMEOUT = 1000 * 30;
|
|
6
|
+
exports.PREVIOUS_HAND_ACK_TIMEOUT = 1000 * 6;
|
|
12
7
|
exports.CARDS = {
|
|
13
8
|
"1e": 13,
|
|
14
9
|
"1b": 12,
|
package/dist/server/constants.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PLAYER_LOBBY_TIMEOUT = exports.PLAYER_TIMEOUT_GRACE =
|
|
4
|
-
exports.PREVIOUS_HAND_ACK_TIMEOUT = 1000 * 6;
|
|
5
|
-
exports.PLAYER_ABANDON_TIMEOUT = 1000 * 45;
|
|
6
|
-
exports.PLAYER_TURN_TIMEOUT = 1000 * 30;
|
|
3
|
+
exports.PLAYER_LOBBY_TIMEOUT = exports.PLAYER_TIMEOUT_GRACE = void 0;
|
|
7
4
|
exports.PLAYER_TIMEOUT_GRACE = 500;
|
|
8
5
|
exports.PLAYER_LOBBY_TIMEOUT = 1000 * 10;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { CARDS, CARDS_HUMAN_READABLE } from "./lib/constants";
|
|
2
2
|
export { CARDS, CARDS_HUMAN_READABLE };
|
|
3
|
-
export { PREVIOUS_HAND_ACK_TIMEOUT, PLAYER_ABANDON_TIMEOUT, PLAYER_TURN_TIMEOUT, } from "./server/constants";
|
|
4
3
|
export interface ILobbyOptions {
|
|
5
4
|
maxPlayers: 2 | 4 | 6;
|
|
6
5
|
faltaEnvido: 1 | 2;
|
|
7
6
|
flor: boolean;
|
|
8
7
|
matchPoint: number;
|
|
8
|
+
handAckTime: number;
|
|
9
9
|
turnTime: number;
|
|
10
|
+
abandonTime: number;
|
|
10
11
|
}
|
|
11
12
|
export interface ISaidCommand {
|
|
12
13
|
player: IPlayer | IPublicPlayer;
|
|
@@ -18,6 +19,7 @@ export interface IMatchPreviousHand {
|
|
|
18
19
|
matchSessionId: string;
|
|
19
20
|
}
|
|
20
21
|
export interface IPublicMatch {
|
|
22
|
+
options: ILobbyOptions;
|
|
21
23
|
state: EMatchTableState;
|
|
22
24
|
winner: ITeam | null;
|
|
23
25
|
matchSessionId: string;
|
|
@@ -146,6 +148,7 @@ export interface ClientToServerEvents {
|
|
|
146
148
|
[EClientEvent.LEAVE_MATCH]: (matchId: string) => void;
|
|
147
149
|
[EClientEvent.CREATE_MATCH]: (callback: IEventCallback<{
|
|
148
150
|
match?: IPublicMatch;
|
|
151
|
+
activeMatches?: IPublicMatchInfo[];
|
|
149
152
|
}>) => void;
|
|
150
153
|
[EClientEvent.START_MATCH]: (matchId: string, callback: IEventCallback<{
|
|
151
154
|
matchSessionId?: string;
|
|
@@ -166,6 +169,7 @@ export interface ClientToServerEvents {
|
|
|
166
169
|
}>) => void;
|
|
167
170
|
[EClientEvent.JOIN_MATCH]: (matchSessionId: string, teamIdx: 0 | 1 | undefined, callback: IEventCallback<{
|
|
168
171
|
match?: IPublicMatch;
|
|
172
|
+
activeMatches?: IPublicMatchInfo[];
|
|
169
173
|
}>) => void;
|
|
170
174
|
}
|
|
171
175
|
export declare enum ETrucoshiMatchState {
|
package/dist/types.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GAME_ERROR = exports.TMap = exports.ETrucoshiMatchState = exports.EClientEvent = exports.EServerEvent = exports.EHandState = exports.EEnvidoCommand = exports.EEnvidoAnswerCommand = exports.EAnswerCommand = exports.ETrucoCommand = exports.EFlorCommand = exports.ESayCommand = exports.EMatchTableState = exports.EChatSystem = exports.
|
|
3
|
+
exports.GAME_ERROR = exports.TMap = exports.ETrucoshiMatchState = exports.EClientEvent = exports.EServerEvent = exports.EHandState = exports.EEnvidoCommand = exports.EEnvidoAnswerCommand = exports.EAnswerCommand = exports.ETrucoCommand = exports.EFlorCommand = exports.ESayCommand = exports.EMatchTableState = exports.EChatSystem = exports.CARDS_HUMAN_READABLE = exports.CARDS = void 0;
|
|
4
4
|
const constants_1 = require("./lib/constants");
|
|
5
5
|
Object.defineProperty(exports, "CARDS", { enumerable: true, get: function () { return constants_1.CARDS; } });
|
|
6
6
|
Object.defineProperty(exports, "CARDS_HUMAN_READABLE", { enumerable: true, get: function () { return constants_1.CARDS_HUMAN_READABLE; } });
|
|
7
|
-
var constants_2 = require("./server/constants");
|
|
8
|
-
Object.defineProperty(exports, "PREVIOUS_HAND_ACK_TIMEOUT", { enumerable: true, get: function () { return constants_2.PREVIOUS_HAND_ACK_TIMEOUT; } });
|
|
9
|
-
Object.defineProperty(exports, "PLAYER_ABANDON_TIMEOUT", { enumerable: true, get: function () { return constants_2.PLAYER_ABANDON_TIMEOUT; } });
|
|
10
|
-
Object.defineProperty(exports, "PLAYER_TURN_TIMEOUT", { enumerable: true, get: function () { return constants_2.PLAYER_TURN_TIMEOUT; } });
|
|
11
7
|
var EChatSystem;
|
|
12
8
|
(function (EChatSystem) {
|
|
13
9
|
EChatSystem[EChatSystem["TEAM_0"] = 0] = "TEAM_0";
|