trucoshi 0.4.6 → 0.4.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/README.md CHANGED
@@ -20,6 +20,10 @@ Proba la demo actual en [Trucoshi](https://trucoshi.com)
20
20
 
21
21
  Right now there's only a local CLI way of playing as there is no socket server implementation and its just the game logic.
22
22
 
23
+ # Client
24
+
25
+ [Trucoshi React Client](https://github.com/jfrader/trucoshi-client)
26
+
23
27
  ### Installation
24
28
 
25
29
  `yarn`
@@ -41,10 +45,10 @@ Right now there's only a local CLI way of playing as there is no socket server i
41
45
  [x] Logica de turnos, rondas y battalla de cartas
42
46
  [x] Irse al mazo
43
47
  [x] Cantar truco
44
- [] Cantar envido
48
+ [x] Cantar envido
45
49
  [] Cantar flor
46
50
  [x] Socket server
47
- [-] Unit tests
51
+ [x] Unit tests
48
52
  [] Bitcoin Lightning integration
49
53
 
50
54
  # Donations
package/dist/types.d.ts CHANGED
@@ -239,7 +239,7 @@ export type IPublicPlayer = Pick<IPlayer, "id" | "key" | "disabled" | "ready" |
239
239
  hasFlor?: undefined;
240
240
  envido?: undefined;
241
241
  });
242
- export type IPublicTeam = Pick<ITeam, "points"> & {
242
+ export type IPublicTeam = Pick<ITeam, "points" | "id" | "name"> & {
243
243
  players: Array<IPublicPlayer>;
244
244
  };
245
245
  export interface IPlayer {
@@ -274,13 +274,15 @@ export interface IPlayer {
274
274
  }
275
275
  export interface ITeam {
276
276
  _players: Map<string, IPlayer>;
277
+ id: 0 | 1;
278
+ name: string;
277
279
  players: Array<IPlayer>;
278
280
  points: ITeamPoints;
279
281
  getPublicTeam(playerSession?: string): IPublicTeam;
280
282
  isTeamDisabled(): boolean;
281
283
  disable(player: IPlayer): boolean;
282
284
  enable(player?: IPlayer): boolean;
283
- addPoints(matchPoint: number, points: number): ITeamPoints;
285
+ addPoints(matchPoint: number, points: number, simulate?: boolean): ITeamPoints;
284
286
  }
285
287
  export interface ITeamPoints {
286
288
  buenas: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trucoshi",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "main": "dist/types.js",
5
5
  "license": "GPL-3.0",
6
6
  "scripts": {