@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.
- package/dist/cjs/Dto/Actions/dummyFaceupActionDto.d.ts +8 -0
- package/dist/cjs/Dto/CardGame/gameDto.d.ts +1 -0
- package/dist/cjs/Dto/gameCookieDto.d.ts +1 -0
- package/dist/cjs/Enum/actionNames.d.ts +11 -10
- package/dist/cjs/Model/card.d.ts +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +13 -12
- package/package.json +1 -1
|
@@ -20,14 +20,15 @@ export declare enum ActionNames {
|
|
|
20
20
|
playingStarted = 18,
|
|
21
21
|
playCard = 19,
|
|
22
22
|
opponentPlayCard = 20,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
}
|
package/dist/cjs/Model/card.d.ts
CHANGED
|
@@ -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
|
}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -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["
|
|
206
|
-
ActionNames[ActionNames["
|
|
207
|
-
ActionNames[ActionNames["
|
|
208
|
-
ActionNames[ActionNames["
|
|
209
|
-
ActionNames[ActionNames["
|
|
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"] =
|
|
212
|
-
ActionNames[ActionNames["chessMoveMade"] =
|
|
213
|
-
ActionNames[ActionNames["chessOpponentMove"] =
|
|
214
|
-
ActionNames[ActionNames["chessInvalidMoveMade"] =
|
|
215
|
-
ActionNames[ActionNames["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
|
}
|