@vankosoft/game-platform 1.3.3 → 1.4.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ 1.2.0 | Release date: **31.08.2026**
2
+ ============================================
3
+ * New Features:
4
+ - Add a DTO Websocket Action.
5
+ - Add I18n and Game sounds Assets.
6
+ - Add Some Helper Methods and Some New Translations.
7
+ - Add Create a Player Positions for Card Game to Can Loop Clockwize and Back.
8
+ - Add a New Utils Helper Method to Split Arrays.
9
+ - Update NPM Package Version.
10
+ - Improve Get AnnouceSymbol Model.
11
+ - Update NPM Package Version.
12
+ - Add Some Tranlsations and Update Minor NPM Package Version.
13
+
14
+
1
15
  1.1.0 | Release date: **26.08.2026**
2
16
  ============================================
3
17
  * New Features:
package/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.2.0
@@ -297,7 +297,8 @@
297
297
  },
298
298
  "card-game": {
299
299
  "kontra": "Double",
300
- "rekontra": "ReDouble"
300
+ "rekontra": "ReDouble",
301
+ "my_cards": "My Cards"
301
302
  },
302
303
  "contract-bridge-auction": {
303
304
  "auction": "Auction",
@@ -297,7 +297,8 @@
297
297
  },
298
298
  "card-game": {
299
299
  "kontra": "Double",
300
- "rekontra": "ReDouble"
300
+ "rekontra": "ReDouble",
301
+ "my_cards": "My Cards"
301
302
  },
302
303
  "contract-bridge-auction": {
303
304
  "auction": "Auction",
@@ -5,5 +5,7 @@ import { PlayerPosition } from '../../Enum/playerPosition';
5
5
 
6
6
  export interface CardGameCreatedActionDto extends ActionDto {
7
7
  game: CardGameDto;
8
+
8
9
  myPosition: PlayerPosition;
10
+ myTeamMate: PlayerPosition;
9
11
  }
@@ -5,5 +5,7 @@ import { PlayerPosition } from '../../Enum/playerPosition';
5
5
 
6
6
  export interface CardGameRestoreActionDto extends ActionDto {
7
7
  game: CardGameDto;
8
- position: PlayerPosition;
8
+
9
+ myPosition: PlayerPosition;
10
+ myTeamMate: PlayerPosition;
9
11
  }
@@ -10,8 +10,10 @@ export interface CardGameDto extends GameDto {
10
10
  bidHistory: any;
11
11
  contract: any;
12
12
 
13
+ DummyPlayer: PlayerPosition;
14
+ DummyOwner: PlayerPosition;
13
15
  currentPlayer: PlayerPosition;
14
- winner: CardGameTeam;
16
+
15
17
  thinkTime: number;
16
18
 
17
19
  FirstToPlayInTheRound: PlayerPosition;
@@ -20,9 +22,9 @@ export interface CardGameDto extends GameDto {
20
22
 
21
23
  SouthNorthPoints: number;
22
24
  EastWestPoints: number;
25
+ winner: CardGameTeam;
23
26
 
24
27
  MyCards: any;
25
28
  Bids: any;
26
-
27
29
  LastBid: boolean;
28
30
  }
@@ -6,8 +6,10 @@ export interface GameCookieDto
6
6
  id: string;
7
7
  game: string;
8
8
 
9
- color?: PlayerColor;
10
- position?: PlayerPosition;
9
+ myColor?: PlayerColor;
10
+
11
+ myPosition?: PlayerPosition;
12
+ myTeamMate?: PlayerPosition;
11
13
  dummyPlayer?: PlayerPosition;
12
14
 
13
15
  roomSelected: boolean;
@@ -3,5 +3,5 @@ import { IThemes } from './themes';
3
3
  import { CardDto } from '../Dto/CardGame/cardDto';
4
4
  import { PlayerPosition } from '../Enum/playerPosition';
5
5
  export declare class Card {
6
- static draw(cx: CanvasRenderingContext2D | null, cardImagesPath: string, cardBack: string, card: CardDto, point: Point, width: number, height: number, angle: number, theme: IThemes, position: PlayerPosition, isDummy: boolean, highLighted: boolean, debugCards: boolean): void;
6
+ static draw(cx: CanvasRenderingContext2D | null, cardImagesPath: string, cardBack: string, card: CardDto, point: Point, width: number, height: number, angle: number, theme: IThemes, position: PlayerPosition, openCard: boolean, highLighted: boolean, debugCards: boolean): void;
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -642,18 +642,15 @@ function GetAnnounceSymbol(symbolId) {
642
642
  }
643
643
 
644
644
  class Card {
645
- static draw(cx, cardImagesPath, cardBack, card, point, width, height, angle, theme, position, isDummy, highLighted, debugCards) {
645
+ static draw(cx, cardImagesPath, cardBack, card, point, width, height, angle, theme, position, openCard, highLighted, debugCards) {
646
646
  if (!cx) {
647
647
  return;
648
648
  }
649
649
  const { x, y } = point;
650
650
  const image = new Image(width, height);
651
- if (position === exports.PlayerPosition.south || isDummy || debugCards) {
652
- let imgSrc = `${cardImagesPath}/${card.cardIndex}.png`;
653
- image.src = imgSrc;
654
- }
655
- else {
656
- image.src = cardBack;
651
+ image.src = cardBack;
652
+ if (position === exports.PlayerPosition.south || openCard || debugCards) {
653
+ image.src = `${cardImagesPath}/${card.cardIndex}.png`;
657
654
  }
658
655
  cx.save();
659
656
  cx.translate(x, y);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vankosoft/game-platform",
3
- "version": "1.3.3",
3
+ "version": "1.4.1",
4
4
  "description": "Game Platform",
5
5
  "repository": {
6
6
  "type": "git",