trucoshi 0.5.6 → 0.5.7
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 +2 -0
- package/dist/lib/constants.js +9 -1
- package/dist/types.d.ts +10 -2
- package/package.json +1 -1
package/dist/lib/constants.d.ts
CHANGED
package/dist/lib/constants.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
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 = void 0;
|
|
3
|
+
exports.TEAM_SIZE_VALUES = exports.CARDS_HUMAN_READABLE = exports.BURNT_CARD = exports.CARDS = exports.DEFAULT_LOBBY_OPTIONS = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
exports.DEFAULT_LOBBY_OPTIONS = {
|
|
6
|
+
faltaEnvido: 2,
|
|
7
|
+
flor: false,
|
|
8
|
+
matchPoint: 9,
|
|
9
|
+
maxPlayers: 6,
|
|
10
|
+
turnTime: types_1.PLAYER_TURN_TIMEOUT,
|
|
11
|
+
};
|
|
4
12
|
exports.CARDS = {
|
|
5
13
|
"1e": 13,
|
|
6
14
|
"1b": 12,
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { CARDS, CARDS_HUMAN_READABLE } from "./lib/constants";
|
|
2
2
|
export { CARDS, CARDS_HUMAN_READABLE };
|
|
3
3
|
export { PREVIOUS_HAND_ACK_TIMEOUT, PLAYER_ABANDON_TIMEOUT, PLAYER_TURN_TIMEOUT, } from "./server/constants";
|
|
4
|
+
export interface ILobbyOptions {
|
|
5
|
+
maxPlayers: 2 | 4 | 6;
|
|
6
|
+
faltaEnvido: 1 | 2;
|
|
7
|
+
flor: boolean;
|
|
8
|
+
matchPoint: number;
|
|
9
|
+
turnTime: number;
|
|
10
|
+
}
|
|
4
11
|
export interface ISaidCommand {
|
|
5
12
|
player: IPlayer | IPublicPlayer;
|
|
6
13
|
command: ECommand | number;
|
|
@@ -24,7 +31,7 @@ export interface IPublicMatchInfo {
|
|
|
24
31
|
ownerId: string;
|
|
25
32
|
matchSessionId: string;
|
|
26
33
|
players: number;
|
|
27
|
-
|
|
34
|
+
options: ILobbyOptions;
|
|
28
35
|
state: EMatchTableState;
|
|
29
36
|
}
|
|
30
37
|
export type IPublicChatRoom = Pick<IChatRoom, "id" | "messages">;
|
|
@@ -203,7 +210,7 @@ export type IEnvidoCalculatorResult = {
|
|
|
203
210
|
};
|
|
204
211
|
export type IFaltaEnvidoCalculatorArgs = {
|
|
205
212
|
teams: [ITeam, ITeam];
|
|
206
|
-
|
|
213
|
+
options: ILobbyOptions;
|
|
207
214
|
};
|
|
208
215
|
export type IEnvidoCalculatorArgs = {
|
|
209
216
|
stake: number;
|
|
@@ -284,6 +291,7 @@ export interface ITeam {
|
|
|
284
291
|
name: string;
|
|
285
292
|
players: Array<IPlayer>;
|
|
286
293
|
points: ITeamPoints;
|
|
294
|
+
pointsToWin(matchPoint: number): number;
|
|
287
295
|
getPublicTeam(playerSession?: string): IPublicTeam;
|
|
288
296
|
isTeamDisabled(): boolean;
|
|
289
297
|
disable(player: IPlayer): boolean;
|