trucoshi 13.1.0 → 13.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/events.d.ts CHANGED
@@ -63,6 +63,7 @@ export declare enum EClientEvent {
63
63
  LIST_MATCHES = "LIST_MATCHES",
64
64
  LIST_RANKING = "LIST_RANKING",
65
65
  SET_PLAYER_READY = "SET_PLAYER_READY",
66
+ SET_SHOW_CARDS_AT_HAND_END = "SET_SHOW_CARDS_AT_HAND_END",
66
67
  JOIN_MATCH = "JOIN_MATCH",
67
68
  START_MATCH = "START_MATCH",
68
69
  PAUSE_MATCH = "PAUSE_MATCH",
@@ -117,6 +118,7 @@ export interface ClientToServerEvents {
117
118
  [EClientEvent.SET_PLAYER_READY]: (matchSessionId: string, ready: boolean, callback: IEventCallback<{
118
119
  match?: IPublicMatch;
119
120
  }>) => void;
121
+ [EClientEvent.SET_SHOW_CARDS_AT_HAND_END]: (matchSessionId: string, showCards: boolean, callback: IEventCallback<{}>) => void;
120
122
  [EClientEvent.JOIN_MATCH]: (matchSessionId: string, teamIdx: 0 | 1 | undefined, callback: IEventCallback<{
121
123
  match?: IPublicMatch;
122
124
  activeMatches?: IPublicMatchInfo[];
package/dist/events.js CHANGED
@@ -35,6 +35,7 @@ export var EClientEvent;
35
35
  EClientEvent["LIST_MATCHES"] = "LIST_MATCHES";
36
36
  EClientEvent["LIST_RANKING"] = "LIST_RANKING";
37
37
  EClientEvent["SET_PLAYER_READY"] = "SET_PLAYER_READY";
38
+ EClientEvent["SET_SHOW_CARDS_AT_HAND_END"] = "SET_SHOW_CARDS_AT_HAND_END";
38
39
  EClientEvent["JOIN_MATCH"] = "JOIN_MATCH";
39
40
  EClientEvent["START_MATCH"] = "START_MATCH";
40
41
  EClientEvent["PAUSE_MATCH"] = "PAUSE_MATCH";
package/dist/types.d.ts CHANGED
@@ -157,6 +157,7 @@ export interface IMatchFlorBattle {
157
157
  winnerTeamIdx: 0 | 1 | null;
158
158
  winner: IPublicPlayer | null;
159
159
  }
160
+ export type PublicRoundResult = 0 | 1 | "tie" | null;
160
161
  export interface IMatchPreviousHand {
161
162
  envido: {
162
163
  winner: IPublicPlayer;
@@ -173,7 +174,12 @@ export interface IMatchPreviousHand {
173
174
  cards: ICard[];
174
175
  }>;
175
176
  } | null;
177
+ revealedHands: Array<{
178
+ idx: number;
179
+ cards: ICard[];
180
+ }>;
176
181
  rounds: IPlayedCard[][];
182
+ roundResults: PublicRoundResult[];
177
183
  points: IHandPoints;
178
184
  matchSessionId: string;
179
185
  }
@@ -196,6 +202,7 @@ export interface IPublicMatch {
196
202
  me: IPublicPlayer | null;
197
203
  freshHand: boolean;
198
204
  rounds: IPlayedCard[][];
205
+ roundResults: PublicRoundResult[];
199
206
  lastCard?: ICard | null;
200
207
  lastCommand?: ECommand | number | null;
201
208
  awardedSatsPerPlayer?: number;
@@ -561,6 +568,7 @@ export interface IPlayer {
561
568
  hasSaidEnvidoPoints: boolean;
562
569
  hasSaidTruco: boolean;
563
570
  hasPassed: boolean;
571
+ showCardsAtHandEnd: boolean;
564
572
  isEnvidoTurn: boolean;
565
573
  isOwner: boolean;
566
574
  disabled: boolean;
@@ -578,6 +586,7 @@ export interface IPlayer {
578
586
  saidFlor(): void;
579
587
  saidTruco(): void;
580
588
  passed(): void;
589
+ setShowCardsAtHandEnd(showCards: boolean): void;
581
590
  resetPassed(): void;
582
591
  resetCommands(): void;
583
592
  calculateEnvido(): Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trucoshi",
3
- "version": "13.1.0",
3
+ "version": "13.2.2",
4
4
  "description": "Truco Game Server",
5
5
  "main": "dist/types.js",
6
6
  "license": "GPL-3.0",