@vankosoft/game-platform 1.2.0 → 1.2.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.
@@ -0,0 +1,8 @@
1
+ import { ActionDto } from './actionDto';
2
+
3
+ import { PlayerPosition } from '../../Enum/playerPosition';
4
+
5
+ export interface DummyFaceupActionDto extends ActionDto {
6
+ DummyPlayer: PlayerPosition;
7
+ Player: PlayerPosition;
8
+ }
@@ -22,5 +22,6 @@ export interface CardGameDto extends GameDto {
22
22
 
23
23
  MyCards: any;
24
24
  Bids: any;
25
+
25
26
  LastBid: boolean;
26
27
  }
@@ -8,6 +8,7 @@ export interface GameCookieDto
8
8
 
9
9
  color?: PlayerColor;
10
10
  position?: PlayerPosition;
11
+ dummyPlayer?: PlayerPosition;
11
12
 
12
13
  roomSelected: boolean;
13
14
  }
@@ -20,14 +20,15 @@ export declare enum ActionNames {
20
20
  playingStarted = 18,
21
21
  playCard = 19,
22
22
  opponentPlayCard = 20,
23
- trickEnded = 21,
24
- roundEnded = 22,
25
- startNewRound = 23,
26
- announceMade = 24,
27
- startNewGame = 25,
28
- chessGameStarted = 26,
29
- chessMoveMade = 27,
30
- chessOpponentMove = 28,
31
- chessInvalidMoveMade = 29,
32
- serverWasTerminated = 30
23
+ dummyFaceup = 21,
24
+ trickEnded = 22,
25
+ roundEnded = 23,
26
+ startNewRound = 24,
27
+ announceMade = 25,
28
+ startNewGame = 26,
29
+ chessGameStarted = 27,
30
+ chessMoveMade = 28,
31
+ chessOpponentMove = 29,
32
+ chessInvalidMoveMade = 30,
33
+ serverWasTerminated = 31
33
34
  }
@@ -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, 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, isDummy: boolean, highLighted: boolean, debugCards: boolean): void;
7
7
  }
@@ -89,6 +89,7 @@ export { OpponentBidsActionDto } from './Dto/Actions/opponentBidsActionDto';
89
89
  export { PlayingStartedActionDto } from './Dto/Actions/playingStartedActionDto';
90
90
  export { PlayCardActionDto } from './Dto/Actions/playCardActionDto';
91
91
  export { OpponentPlayCardActionDto } from './Dto/Actions/opponentPlayCardActionDto';
92
+ export { DummyFaceupActionDto } from './Dto/Actions/dummyFaceupActionDto';
92
93
  export { TrickEndedActionDto } from './Dto/Actions/trickEndedActionDto';
93
94
  export { RoundEndedActionDto } from './Dto/Actions/roundEndedActionDto';
94
95
  export { StartNewRoundActionDto } from './Dto/Actions/startNewRoundActionDto';
package/dist/cjs/index.js CHANGED
@@ -202,17 +202,18 @@ exports.ActionNames = void 0;
202
202
  ActionNames[ActionNames["playingStarted"] = 18] = "playingStarted";
203
203
  ActionNames[ActionNames["playCard"] = 19] = "playCard";
204
204
  ActionNames[ActionNames["opponentPlayCard"] = 20] = "opponentPlayCard";
205
- ActionNames[ActionNames["trickEnded"] = 21] = "trickEnded";
206
- ActionNames[ActionNames["roundEnded"] = 22] = "roundEnded";
207
- ActionNames[ActionNames["startNewRound"] = 23] = "startNewRound";
208
- ActionNames[ActionNames["announceMade"] = 24] = "announceMade";
209
- ActionNames[ActionNames["startNewGame"] = 25] = "startNewGame";
205
+ ActionNames[ActionNames["dummyFaceup"] = 21] = "dummyFaceup";
206
+ ActionNames[ActionNames["trickEnded"] = 22] = "trickEnded";
207
+ ActionNames[ActionNames["roundEnded"] = 23] = "roundEnded";
208
+ ActionNames[ActionNames["startNewRound"] = 24] = "startNewRound";
209
+ ActionNames[ActionNames["announceMade"] = 25] = "announceMade";
210
+ ActionNames[ActionNames["startNewGame"] = 26] = "startNewGame";
210
211
  // Chess Game Actions
211
- ActionNames[ActionNames["chessGameStarted"] = 26] = "chessGameStarted";
212
- ActionNames[ActionNames["chessMoveMade"] = 27] = "chessMoveMade";
213
- ActionNames[ActionNames["chessOpponentMove"] = 28] = "chessOpponentMove";
214
- ActionNames[ActionNames["chessInvalidMoveMade"] = 29] = "chessInvalidMoveMade";
215
- ActionNames[ActionNames["serverWasTerminated"] = 30] = "serverWasTerminated";
212
+ ActionNames[ActionNames["chessGameStarted"] = 27] = "chessGameStarted";
213
+ ActionNames[ActionNames["chessMoveMade"] = 28] = "chessMoveMade";
214
+ ActionNames[ActionNames["chessOpponentMove"] = 29] = "chessOpponentMove";
215
+ ActionNames[ActionNames["chessInvalidMoveMade"] = 30] = "chessInvalidMoveMade";
216
+ ActionNames[ActionNames["serverWasTerminated"] = 31] = "serverWasTerminated";
216
217
  })(exports.ActionNames || (exports.ActionNames = {}));
217
218
 
218
219
  /* Auto Generated */
@@ -575,13 +576,13 @@ function GetAnnounceSymbol(symbolId) {
575
576
  }
576
577
 
577
578
  class Card {
578
- static draw(cx, cardImagesPath, cardBack, card, point, width, height, angle, theme, position, highLighted, debugCards) {
579
+ static draw(cx, cardImagesPath, cardBack, card, point, width, height, angle, theme, position, isDummy, highLighted, debugCards) {
579
580
  if (!cx) {
580
581
  return;
581
582
  }
582
583
  const { x, y } = point;
583
584
  const image = new Image(width, height);
584
- if (position === exports.PlayerPosition.south || debugCards) {
585
+ if (position === exports.PlayerPosition.south || isDummy || debugCards) {
585
586
  let imgSrc = `${cardImagesPath}/${card.cardIndex}.png`;
586
587
  image.src = imgSrc;
587
588
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vankosoft/game-platform",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Game Platform",
5
5
  "repository": {
6
6
  "type": "git",