@vankosoft/game-platform 0.2.1 → 1.0.0
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 +17 -0
- package/README.md +1 -1
- package/VERSION +1 -1
- package/dist/cjs/Dto/Actions/actionDto.d.ts +5 -0
- package/dist/cjs/Dto/Actions/announceMadeActionDto.d.ts +7 -0
- package/dist/cjs/Dto/Actions/bidMadeActionDto.d.ts +7 -0
- package/dist/cjs/Dto/Actions/biddingStartedActionDto.d.ts +13 -0
- package/dist/cjs/Dto/Actions/boardGameCreatedActionDto.d.ts +9 -0
- package/dist/cjs/Dto/Actions/boardGameEndedActionDto.d.ts +9 -0
- package/dist/cjs/Dto/Actions/boardGameRestoreActionDto.d.ts +11 -0
- package/dist/cjs/Dto/Actions/cardGameCreatedActionDto.d.ts +9 -0
- package/dist/cjs/Dto/Actions/cardGameEndedActionDto.d.ts +9 -0
- package/dist/cjs/Dto/Actions/cardGameRestoreActionDto.d.ts +9 -0
- package/dist/cjs/Dto/Actions/chessGameStartedActionDto.d.ts +10 -0
- package/dist/cjs/Dto/Actions/chessInvalidMoveMadeActionDto.d.ts +7 -0
- package/dist/cjs/Dto/Actions/chessMoveMadeActionDto.d.ts +7 -0
- package/dist/cjs/Dto/Actions/chessOpponentMoveActionDto.d.ts +13 -0
- package/dist/cjs/Dto/Actions/connectionInfoActionDto.d.ts +6 -0
- package/dist/cjs/Dto/Actions/dicesRolledActionDto.d.ts +12 -0
- package/dist/cjs/Dto/Actions/doublingActionDto.d.ts +7 -0
- package/dist/cjs/Dto/Actions/hintMovesActionDto.d.ts +8 -0
- package/dist/cjs/Dto/Actions/movesMadeActionDto.d.ts +7 -0
- package/dist/cjs/Dto/Actions/opponentBidsActionDto.d.ts +15 -0
- package/dist/cjs/Dto/Actions/opponentMoveActionDto.d.ts +7 -0
- package/dist/cjs/Dto/Actions/opponentPlayCardActionDto.d.ts +14 -0
- package/dist/cjs/Dto/Actions/playCardActionDto.d.ts +11 -0
- package/dist/cjs/Dto/Actions/playingStartedActionDto.d.ts +16 -0
- package/dist/cjs/Dto/Actions/rolledActionDto.d.ts +5 -0
- package/dist/cjs/Dto/Actions/roundEndedActionDto.d.ts +13 -0
- package/dist/cjs/Dto/Actions/serverWasTerminatedActionDto.d.ts +4 -0
- package/dist/cjs/Dto/Actions/startGamePlayActionDto.d.ts +9 -0
- package/dist/cjs/Dto/Actions/startNewGameActionDto.d.ts +5 -0
- package/dist/cjs/Dto/Actions/startNewRoundActionDto.d.ts +5 -0
- package/dist/cjs/Dto/Actions/trickEndedActionDto.d.ts +7 -0
- package/dist/cjs/Dto/Actions/undoActionDto.d.ts +4 -0
- package/dist/cjs/Dto/BoardGame/checkerDto.d.ts +5 -0
- package/dist/cjs/{Model → Dto}/BoardGame/chessMoveDto.d.ts +3 -3
- package/dist/cjs/Dto/BoardGame/chessPieceDto.d.ts +9 -0
- package/dist/cjs/{Model → Dto}/BoardGame/gameDto.d.ts +3 -2
- package/dist/cjs/Dto/BoardGame/index.d.ts +9 -0
- package/dist/cjs/Dto/BoardGame/index.ts +9 -0
- package/dist/cjs/{Model → Dto}/BoardGame/moveDto.d.ts +1 -1
- package/dist/cjs/{Model → Dto}/BoardGame/playerDto.d.ts +2 -2
- package/dist/cjs/{Model → Dto}/CardGame/announceDto.d.ts +2 -2
- package/dist/cjs/{Model → Dto}/CardGame/bidDto.d.ts +2 -2
- package/dist/cjs/Dto/CardGame/cardDto.d.ts +14 -0
- package/dist/cjs/{Model → Dto}/CardGame/gameDto.d.ts +3 -3
- package/dist/cjs/Dto/CardGame/index.d.ts +6 -0
- package/dist/cjs/Dto/CardGame/index.ts +6 -0
- package/dist/cjs/Dto/CardGame/playerDto.d.ts +6 -0
- package/dist/cjs/Dto/admin/playedGameDto.d.ts +10 -0
- package/dist/cjs/Dto/admin/playedGameListDto.d.ts +7 -0
- package/dist/cjs/Dto/chat/chatDto.d.ts +5 -0
- package/dist/cjs/Dto/chat/chatMessageDto.d.ts +9 -0
- package/dist/cjs/Dto/chat/joinedChatDto.d.ts +7 -0
- package/dist/cjs/Dto/chat/leftChatDto.d.ts +7 -0
- package/dist/cjs/Dto/editor/gameStringRequest.d.ts +10 -0
- package/dist/cjs/Dto/editor/gameStringResponseDto.d.ts +6 -0
- package/dist/cjs/Dto/feedback/feedbackDto.d.ts +8 -0
- package/dist/cjs/{Model/Core → Dto}/gameCookieDto.d.ts +2 -2
- package/dist/cjs/{Model/Core → Dto}/gameDto.d.ts +1 -1
- package/dist/cjs/Dto/index.d.ts +9 -0
- package/dist/cjs/Dto/index.ts +12 -0
- package/dist/cjs/Dto/message/messageDto.d.ts +12 -0
- package/dist/cjs/Dto/rest/inviteResponseDto.d.ts +6 -0
- package/dist/cjs/Enum/actionNames.d.ts +33 -0
- package/dist/cjs/Enum/messageType.d.ts +6 -0
- package/dist/cjs/Model/announce.d.ts +4 -0
- package/dist/cjs/Model/card-area.d.ts +13 -0
- package/dist/cjs/Model/card-drag.d.ts +13 -0
- package/dist/cjs/Model/card-game-player-area.d.ts +11 -0
- package/dist/cjs/Model/card.d.ts +7 -0
- package/dist/cjs/Model/checker-area.d.ts +18 -0
- package/dist/cjs/Model/checker-drag.d.ts +10 -0
- package/dist/cjs/Model/checker.d.ts +6 -0
- package/dist/cjs/Model/index.d.ts +9 -0
- package/dist/cjs/Model/move-animation.d.ts +17 -0
- package/dist/cjs/Model/pile.d.ts +6 -0
- package/dist/cjs/Model/point.d.ts +5 -0
- package/dist/cjs/Model/themes.d.ts +91 -0
- package/dist/cjs/{Model → Type}/CardGameAnnounceSymbolModel.d.ts +1 -1
- package/dist/cjs/Type/GamePlayerModel.d.ts +8 -0
- package/dist/cjs/Type/auth.d.ts +15 -0
- package/dist/cjs/Type/index.d.ts +8 -0
- package/dist/cjs/Type/index.ts +11 -0
- package/dist/cjs/Type/mercure-action.d.ts +6 -0
- package/dist/cjs/Type/signed-url-response.d.ts +5 -0
- package/dist/cjs/Type/toggle-sound-mute-response.d.ts +5 -0
- package/dist/cjs/Utils/helper.d.ts +9 -0
- package/dist/cjs/Utils/keys.d.ts +5 -0
- package/dist/cjs/Utils/status-message.d.ts +15 -0
- package/dist/cjs/game.variant.d.ts +10 -0
- package/dist/cjs/index.d.ts +108 -46
- package/dist/cjs/index.js +751 -56
- package/package.json +1 -1
- package/rollup.config.mjs +4 -2
- package/dist/cjs/Model/BoardGame/checkerDto.d.ts +0 -5
- package/dist/cjs/Model/BoardGame/chessMoveType.ts +0 -8
- package/dist/cjs/Model/BoardGame/chessPieceDto.d.ts +0 -9
- package/dist/cjs/Model/BoardGame/chessPieceType.ts +0 -9
- package/dist/cjs/Model/BoardGame/playerColor.ts +0 -6
- package/dist/cjs/Model/CardGame/announceType.ts +0 -18
- package/dist/cjs/Model/CardGame/bidType.ts +0 -13
- package/dist/cjs/Model/CardGame/bridgeBeloteCardType.ts +0 -11
- package/dist/cjs/Model/CardGame/cardDto.d.ts +0 -14
- package/dist/cjs/Model/CardGame/cardGameTeam.ts +0 -6
- package/dist/cjs/Model/CardGame/cardSuit.ts +0 -7
- package/dist/cjs/Model/CardGame/contractBridgeCardType.ts +0 -16
- package/dist/cjs/Model/CardGame/playerDto.d.ts +0 -6
- package/dist/cjs/Model/CardGame/playerPosition.ts +0 -8
- package/dist/cjs/Model/Core/gameState.ts +0 -17
- package/dist/cjs/Model/GamePlayerModel.d.ts +0 -8
- /package/dist/cjs/{Model → Dto}/BoardGame/chessSquareDto.d.ts +0 -0
- /package/dist/cjs/{Model → Dto}/BoardGame/diceDto.d.ts +0 -0
- /package/dist/cjs/{Model → Dto}/BoardGame/pointDto.d.ts +0 -0
- /package/dist/cjs/{Model → Dto}/CardGame/bridgeBeloteScoreDto.d.ts +0 -0
- /package/dist/cjs/{Model/Core → Dto}/connectionDto.d.ts +0 -0
- /package/dist/cjs/{Model/Core → Dto}/errorReportDto.d.ts +0 -0
- /package/dist/cjs/{Model/Core → Dto}/newScoreDto.d.ts +0 -0
- /package/dist/cjs/{Model/Core → Dto}/playerDto.d.ts +0 -0
- /package/dist/cjs/{Model/Core → Dto}/userDto.d.ts +0 -0
- /package/dist/cjs/{Model/CardGame → Enum}/announceType.d.ts +0 -0
- /package/dist/cjs/{Model/CardGame → Enum}/bidType.d.ts +0 -0
- /package/dist/cjs/{Model/CardGame → Enum}/bridgeBeloteCardType.d.ts +0 -0
- /package/dist/cjs/{Model/CardGame → Enum}/cardGameTeam.d.ts +0 -0
- /package/dist/cjs/{Model/CardGame → Enum}/cardSuit.d.ts +0 -0
- /package/dist/cjs/{Model/BoardGame → Enum}/chessMoveType.d.ts +0 -0
- /package/dist/cjs/{Model/BoardGame → Enum}/chessPieceType.d.ts +0 -0
- /package/dist/cjs/{Model/CardGame → Enum}/contractBridgeCardType.d.ts +0 -0
- /package/dist/cjs/{Model/Core → Enum}/gameState.d.ts +0 -0
- /package/dist/cjs/{Model/BoardGame → Enum}/playerColor.d.ts +0 -0
- /package/dist/cjs/{Model/CardGame → Enum}/playerPosition.d.ts +0 -0
- /package/dist/cjs/{Model → Type}/GameInterface.d.ts +0 -0
- /package/dist/cjs/{Model → Type}/GamePlayInterface.d.ts +0 -0
- /package/dist/cjs/{Model → Type}/GameRoomInterface.d.ts +0 -0
- /package/dist/cjs/{Model → Type}/GameRoomModel.d.ts +0 -0
- /package/dist/cjs/{Model → Type}/PlayerInterface.d.ts +0 -0
- /package/dist/cjs/{Model/BoardGame → Type}/toplist.d.ts +0 -0
- /package/dist/cjs/{Model/BoardGame → Type}/toplistResult.d.ts +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* */
|
|
2
|
+
export * from "./connectionDto";
|
|
3
|
+
export * from "./errorReportDto";
|
|
4
|
+
export * from "./userDto";
|
|
5
|
+
export * from "./gameDto";
|
|
6
|
+
export * from "./gameCookieDto";
|
|
7
|
+
export * from "./playerDto";
|
|
8
|
+
export * from "./newScoreDto";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export * from "./BoardGame";
|
|
12
|
+
export * from "./CardGame";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare enum ActionNames {
|
|
2
|
+
gameCreated = 0,
|
|
3
|
+
dicesRolled = 1,
|
|
4
|
+
movesMade = 2,
|
|
5
|
+
gameEnded = 3,
|
|
6
|
+
opponentMove = 4,
|
|
7
|
+
undoMove = 5,
|
|
8
|
+
connectionInfo = 6,
|
|
9
|
+
gameRestore = 7,
|
|
10
|
+
resign = 8,
|
|
11
|
+
exitGame = 9,
|
|
12
|
+
requestedDoubling = 10,
|
|
13
|
+
acceptedDoubling = 11,
|
|
14
|
+
rolled = 12,
|
|
15
|
+
requestHint = 13,
|
|
16
|
+
hintMoves = 14,
|
|
17
|
+
biddingStarted = 15,
|
|
18
|
+
bidMade = 16,
|
|
19
|
+
opponentBids = 17,
|
|
20
|
+
playingStarted = 18,
|
|
21
|
+
playCard = 19,
|
|
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
|
|
33
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CardGameAnnounceSymbolModel } from '../Type/CardGameAnnounceSymbolModel';
|
|
2
|
+
import { BidType } from '../Enum/bidType';
|
|
3
|
+
export declare function GetAnnounceSymbols(): Array<CardGameAnnounceSymbolModel>;
|
|
4
|
+
export declare function GetAnnounceSymbol(symbolId: BidType): CardGameAnnounceSymbolModel;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class CardArea {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
cardIdx: string;
|
|
7
|
+
constructor(x: number, y: number, width: number, height: number, cardIdx: string);
|
|
8
|
+
hasValidCard: boolean;
|
|
9
|
+
canBePlayed: boolean;
|
|
10
|
+
set(x: number, y: number, width: number, height: number, cardIdx: string): void;
|
|
11
|
+
contains(x: number, y: number): boolean;
|
|
12
|
+
drawBorder(cx: CanvasRenderingContext2D): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CardArea } from './';
|
|
2
|
+
import { PlayerPosition } from '../Enum/playerPosition';
|
|
3
|
+
/**
|
|
4
|
+
* May be will be used if I Create Solitaires ( Пасианси )
|
|
5
|
+
*/
|
|
6
|
+
export declare class CardDrag {
|
|
7
|
+
cardArea: CardArea;
|
|
8
|
+
xDown: number;
|
|
9
|
+
yDown: number;
|
|
10
|
+
cardIdx: string;
|
|
11
|
+
position: PlayerPosition;
|
|
12
|
+
constructor(cardArea: CardArea, xDown: number, yDown: number, cardIdx: string, position: PlayerPosition);
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PlayerPosition } from '../Enum/playerPosition';
|
|
2
|
+
export declare class CardGamePlayerArea {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
playerPosition: PlayerPosition;
|
|
8
|
+
constructor(x: number, y: number, width: number, height: number, playerPosition: PlayerPosition);
|
|
9
|
+
set(x: number, y: number, width: number, height: number, playerPosition: PlayerPosition): void;
|
|
10
|
+
drawBorder(cx: CanvasRenderingContext2D): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Point } from './point';
|
|
2
|
+
import { IThemes } from './themes';
|
|
3
|
+
import { CardDto } from '../Dto/CardGame/cardDto';
|
|
4
|
+
import { PlayerPosition } from '../Enum/playerPosition';
|
|
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;
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Point } from '.';
|
|
2
|
+
export declare class CheckerArea {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
pointIdx: number;
|
|
8
|
+
constructor(x: number, y: number, width: number, height: number, pointIdx: number);
|
|
9
|
+
hasValidMove: boolean;
|
|
10
|
+
canBeMovedTo: boolean;
|
|
11
|
+
set(x: number, y: number, width: number, height: number, pointIdx: number): void;
|
|
12
|
+
contains(x: number, y: number): boolean;
|
|
13
|
+
drawBorder(cx: CanvasRenderingContext2D, text: boolean): void;
|
|
14
|
+
fill(cx: CanvasRenderingContext2D, fillStyle: string | CanvasGradient | CanvasPattern): void;
|
|
15
|
+
highLightTop(cx: CanvasRenderingContext2D): void;
|
|
16
|
+
highLightBottom(cx: CanvasRenderingContext2D): void;
|
|
17
|
+
getCenter(): Point;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CheckerArea } from './';
|
|
2
|
+
import { PlayerColor } from '../Enum/playerColor';
|
|
3
|
+
export declare class CheckerDrag {
|
|
4
|
+
checkerArea: CheckerArea;
|
|
5
|
+
xDown: number;
|
|
6
|
+
yDown: number;
|
|
7
|
+
fromIdx: number;
|
|
8
|
+
color: PlayerColor;
|
|
9
|
+
constructor(checkerArea: CheckerArea, xDown: number, yDown: number, fromIdx: number, color: PlayerColor);
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Point } from './point';
|
|
2
|
+
import { IThemes } from './themes';
|
|
3
|
+
import { PlayerColor } from '../Enum/playerColor';
|
|
4
|
+
export declare class Checker {
|
|
5
|
+
static draw(cx: CanvasRenderingContext2D | null, point: Point, width: number, theme: IThemes, color: PlayerColor, highLighted: boolean, shaddow: boolean, flipped: boolean, hint: boolean): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './checker';
|
|
2
|
+
export * from './checker-area';
|
|
3
|
+
export * from './checker-drag';
|
|
4
|
+
export * from './point';
|
|
5
|
+
export * from './move-animation';
|
|
6
|
+
export * from './card';
|
|
7
|
+
export * from './card-area';
|
|
8
|
+
export * from './card-drag';
|
|
9
|
+
export * from './pile';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Point } from './';
|
|
2
|
+
import { IThemes } from './themes';
|
|
3
|
+
import { MoveDto } from '../Dto/BoardGame/moveDto';
|
|
4
|
+
export declare class MoveAnimation {
|
|
5
|
+
move: MoveDto;
|
|
6
|
+
private from;
|
|
7
|
+
private to;
|
|
8
|
+
private theme;
|
|
9
|
+
private flipped;
|
|
10
|
+
frames: number;
|
|
11
|
+
currentFrame: number;
|
|
12
|
+
incrementX: number;
|
|
13
|
+
incrementY: number;
|
|
14
|
+
currentPos: Point;
|
|
15
|
+
constructor(move: MoveDto, from: Point, to: Point, theme: IThemes, flipped: boolean, finished: (move: MoveDto) => void, step: () => void);
|
|
16
|
+
draw(cx: CanvasRenderingContext2D, width: number): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IThemes } from './themes';
|
|
2
|
+
import { CardDto } from '../Dto/CardGame/cardDto';
|
|
3
|
+
export declare class Pile {
|
|
4
|
+
static drawAsPile(cx: CanvasRenderingContext2D | null, pile: CardDto[], boardWidth: number, boardHeight: number, cardWidth: number, cardHeight: number, theme: IThemes): void;
|
|
5
|
+
static drawAsRound(cx: CanvasRenderingContext2D | null, pile: CardDto[], boardWidth: number, boardHeight: number, cardWidth: number, cardHeight: number, theme: IThemes): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export interface IThemes {
|
|
2
|
+
name: string;
|
|
3
|
+
boardBackground: string | CanvasGradient | CanvasPattern;
|
|
4
|
+
homeBackground: string | CanvasGradient | CanvasPattern;
|
|
5
|
+
border: string | CanvasGradient | CanvasPattern;
|
|
6
|
+
whiteTriangle: string | CanvasGradient | CanvasPattern;
|
|
7
|
+
blackTriangle: string | CanvasGradient | CanvasPattern;
|
|
8
|
+
whiteChecker: string | CanvasGradient | CanvasPattern;
|
|
9
|
+
blackChecker: string | CanvasGradient | CanvasPattern;
|
|
10
|
+
textColor: string | CanvasGradient | CanvasPattern;
|
|
11
|
+
highLight: string | CanvasGradient | CanvasPattern;
|
|
12
|
+
checkerBorder: string | CanvasGradient | CanvasPattern;
|
|
13
|
+
}
|
|
14
|
+
export declare class DarkTheme implements IThemes {
|
|
15
|
+
name: string;
|
|
16
|
+
boardBackground: string;
|
|
17
|
+
homeBackground: string;
|
|
18
|
+
border: string;
|
|
19
|
+
whiteTriangle: string;
|
|
20
|
+
blackTriangle: string;
|
|
21
|
+
whiteChecker: string;
|
|
22
|
+
blackChecker: string;
|
|
23
|
+
textColor: string;
|
|
24
|
+
highLight: string;
|
|
25
|
+
checkerBorder: string;
|
|
26
|
+
}
|
|
27
|
+
export declare class LightTheme implements IThemes {
|
|
28
|
+
name: string;
|
|
29
|
+
boardBackground: string;
|
|
30
|
+
homeBackground: string;
|
|
31
|
+
border: string;
|
|
32
|
+
whiteTriangle: string;
|
|
33
|
+
blackTriangle: string;
|
|
34
|
+
whiteChecker: string;
|
|
35
|
+
blackChecker: string;
|
|
36
|
+
textColor: string;
|
|
37
|
+
highLight: string;
|
|
38
|
+
checkerBorder: string;
|
|
39
|
+
}
|
|
40
|
+
export declare class BlueTheme implements IThemes {
|
|
41
|
+
name: string;
|
|
42
|
+
boardBackground: string;
|
|
43
|
+
homeBackground: string;
|
|
44
|
+
border: string;
|
|
45
|
+
whiteTriangle: string;
|
|
46
|
+
blackTriangle: string;
|
|
47
|
+
whiteChecker: string;
|
|
48
|
+
blackChecker: string;
|
|
49
|
+
textColor: string;
|
|
50
|
+
highLight: string;
|
|
51
|
+
checkerBorder: string;
|
|
52
|
+
}
|
|
53
|
+
export declare class PinkTheme implements IThemes {
|
|
54
|
+
name: string;
|
|
55
|
+
boardBackground: string;
|
|
56
|
+
homeBackground: string;
|
|
57
|
+
border: string;
|
|
58
|
+
whiteTriangle: string;
|
|
59
|
+
blackTriangle: string;
|
|
60
|
+
whiteChecker: string;
|
|
61
|
+
blackChecker: string;
|
|
62
|
+
textColor: string;
|
|
63
|
+
highLight: string;
|
|
64
|
+
checkerBorder: string;
|
|
65
|
+
}
|
|
66
|
+
export declare class GreenTheme implements IThemes {
|
|
67
|
+
name: string;
|
|
68
|
+
boardBackground: string;
|
|
69
|
+
homeBackground: string;
|
|
70
|
+
border: string;
|
|
71
|
+
whiteTriangle: string;
|
|
72
|
+
blackTriangle: string;
|
|
73
|
+
whiteChecker: string;
|
|
74
|
+
blackChecker: string;
|
|
75
|
+
textColor: string;
|
|
76
|
+
highLight: string;
|
|
77
|
+
checkerBorder: string;
|
|
78
|
+
}
|
|
79
|
+
export declare class CardGameTheme implements IThemes {
|
|
80
|
+
name: string;
|
|
81
|
+
boardBackground: string;
|
|
82
|
+
homeBackground: string;
|
|
83
|
+
border: string;
|
|
84
|
+
whiteTriangle: string;
|
|
85
|
+
blackTriangle: string;
|
|
86
|
+
whiteChecker: string;
|
|
87
|
+
blackChecker: string;
|
|
88
|
+
textColor: string;
|
|
89
|
+
highLight: string;
|
|
90
|
+
checkerBorder: string;
|
|
91
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./GameInterface";
|
|
2
|
+
export * from "./GamePlayInterface";
|
|
3
|
+
export * from "./PlayerInterface";
|
|
4
|
+
export * from "./GameRoomInterface";
|
|
5
|
+
export * from "./GamePlayerModel";
|
|
6
|
+
export * from "./CardGameAnnounceSymbolModel";
|
|
7
|
+
export * from "./toplist";
|
|
8
|
+
export * from "./toplistResult";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* */
|
|
2
|
+
export * from "./GameInterface";
|
|
3
|
+
export * from "./GamePlayInterface";
|
|
4
|
+
export * from "./PlayerInterface";
|
|
5
|
+
export * from "./GameRoomInterface";
|
|
6
|
+
export * from "./GamePlayerModel";
|
|
7
|
+
//import { IGameRoom } from "./Types/GameRoomModel";
|
|
8
|
+
|
|
9
|
+
export * from "./CardGameAnnounceSymbolModel";
|
|
10
|
+
export * from "./toplist";
|
|
11
|
+
export * from "./toplistResult";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CardSuit } from '../Enum/cardSuit';
|
|
2
|
+
import { BridgeBeloteCardType } from '../Enum/bridgeBeloteCardType';
|
|
3
|
+
import { ContractBridgeCardType } from '../Enum/contractBridgeCardType';
|
|
4
|
+
export declare class Helper {
|
|
5
|
+
static delay(ms: number): Promise<unknown>;
|
|
6
|
+
static cardSuit(suit: CardSuit): string;
|
|
7
|
+
static bridgeBeloteCardType(type: BridgeBeloteCardType): string;
|
|
8
|
+
static contractBridgeCardType(type: ContractBridgeCardType): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class StatusMessage {
|
|
2
|
+
text: string;
|
|
3
|
+
level: MessageLevel;
|
|
4
|
+
startTimerSec?: number;
|
|
5
|
+
constructor(text: string, level: MessageLevel, startTimerSec?: number);
|
|
6
|
+
static getDefault(): StatusMessage;
|
|
7
|
+
static info(text: string): StatusMessage;
|
|
8
|
+
static error(text: string): StatusMessage;
|
|
9
|
+
static warning(text: string): StatusMessage;
|
|
10
|
+
}
|
|
11
|
+
export declare enum MessageLevel {
|
|
12
|
+
info = 0,
|
|
13
|
+
warning = 1,
|
|
14
|
+
error = 2
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class GameVariant {
|
|
2
|
+
static readonly BACKGAMMON_CODE = "backgammon";
|
|
3
|
+
static readonly BACKGAMMON_NORMAL: string;
|
|
4
|
+
static readonly BACKGAMMON_TAPA: string;
|
|
5
|
+
static readonly BACKGAMMON_GULBARA: string;
|
|
6
|
+
static readonly CHESS_CODE = "chess";
|
|
7
|
+
static readonly BRIDGE_BELOTE_CODE = "bridge-belote";
|
|
8
|
+
static readonly CONTRACT_BRIDGE_CODE = "contract-bridge";
|
|
9
|
+
static readonly SVARA_CODE = "svara";
|
|
10
|
+
}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,54 +1,116 @@
|
|
|
1
|
+
export * from "./game.variant";
|
|
2
|
+
export * from "./Utils/helper";
|
|
3
|
+
export * from "./Utils/keys";
|
|
4
|
+
export * from "./Utils/status-message";
|
|
1
5
|
/**
|
|
2
|
-
*
|
|
6
|
+
* Enum Types
|
|
3
7
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
export * from "./Enum/gameState";
|
|
9
|
+
export * from "./Enum/actionNames";
|
|
10
|
+
export * from "./Enum/messageType";
|
|
11
|
+
export * from "./Enum/playerColor";
|
|
12
|
+
export * from "./Enum/chessPieceType";
|
|
13
|
+
export * from "./Enum/chessMoveType";
|
|
14
|
+
export * from "./Enum/playerPosition";
|
|
15
|
+
export * from "./Enum/cardGameTeam";
|
|
16
|
+
export * from "./Enum/bridgeBeloteCardType";
|
|
17
|
+
export * from "./Enum/contractBridgeCardType";
|
|
18
|
+
export * from "./Enum/cardSuit";
|
|
19
|
+
export * from "./Enum/bidType";
|
|
20
|
+
export * from "./Enum/announceType";
|
|
10
21
|
/**
|
|
11
|
-
*
|
|
22
|
+
* Interfaces
|
|
12
23
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
export { IGame } from "./Type/GameInterface";
|
|
25
|
+
export { IGamePlay } from "./Type/GamePlayInterface";
|
|
26
|
+
export { IPlayer } from "./Type/PlayerInterface";
|
|
27
|
+
export { IGameRoom } from "./Type/GameRoomInterface";
|
|
28
|
+
export { IGamePlayer } from "./Type/GamePlayerModel";
|
|
29
|
+
export { Toplist } from "./Type/toplist";
|
|
30
|
+
export { ToplistResult } from "./Type/toplistResult";
|
|
31
|
+
export { CardGameAnnounceSymbolModel } from "./Type/CardGameAnnounceSymbolModel";
|
|
32
|
+
export { IAuth } from "./Type/auth";
|
|
33
|
+
export { IMercureAction } from "./Type/mercure-action";
|
|
34
|
+
export { ISignedUrlResponse } from "./Type/signed-url-response";
|
|
35
|
+
export { IToggleSoundMuteResponse } from "./Type/toggle-sound-mute-response";
|
|
21
36
|
/**
|
|
22
|
-
*
|
|
37
|
+
* DTO
|
|
23
38
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
export { FeedbackDto } from './Dto/feedback/feedbackDto';
|
|
40
|
+
export { PlayedGameListDto } from './Dto/admin/playedGameListDto';
|
|
41
|
+
export { MessageDto } from './Dto/message/messageDto';
|
|
42
|
+
export { ChatMessageDto } from './Dto/chat/chatMessageDto';
|
|
43
|
+
export { ChatUsersDto } from './Dto/chat/joinedChatDto';
|
|
44
|
+
export { LeftChatDto } from './Dto/chat/leftChatDto';
|
|
45
|
+
export { ConnectionDto } from "./Dto/connectionDto";
|
|
46
|
+
export { ErrorReportDto } from "./Dto/errorReportDto";
|
|
47
|
+
export { UserDto } from "./Dto/userDto";
|
|
48
|
+
export { GameDto } from "./Dto/gameDto";
|
|
49
|
+
export { GameCookieDto } from "./Dto/gameCookieDto";
|
|
50
|
+
export { PlayerDto } from "./Dto/playerDto";
|
|
51
|
+
export { NewScoreDto } from "./Dto/newScoreDto";
|
|
52
|
+
export { BoardGameDto } from "./Dto/BoardGame/gameDto";
|
|
53
|
+
export { MoveDto } from "./Dto/BoardGame/moveDto";
|
|
54
|
+
export { BoardGamePlayerDto } from "./Dto/BoardGame/playerDto";
|
|
55
|
+
export { PointDto } from "./Dto/BoardGame/pointDto";
|
|
56
|
+
export { CheckerDto } from "./Dto/BoardGame/checkerDto";
|
|
57
|
+
export { DiceDto } from "./Dto/BoardGame/diceDto";
|
|
58
|
+
export { ChessMoveDto } from "./Dto/BoardGame/chessMoveDto";
|
|
59
|
+
export { ChessPieceDto } from "./Dto/BoardGame/chessPieceDto";
|
|
60
|
+
export { ChessSquareDto } from "./Dto/BoardGame/chessSquareDto";
|
|
61
|
+
export { CardGameDto } from "./Dto/CardGame/gameDto";
|
|
62
|
+
export { CardGamePlayerDto } from "./Dto/CardGame/playerDto";
|
|
63
|
+
export { CardDto } from "./Dto/CardGame/cardDto";
|
|
64
|
+
export { BidDto } from "./Dto/CardGame/bidDto";
|
|
65
|
+
export { BridgeBeloteScoreDto } from "./Dto/CardGame/bridgeBeloteScoreDto";
|
|
66
|
+
export { AnnounceDto } from "./Dto/CardGame/announceDto";
|
|
67
|
+
export { ActionDto } from './Dto/Actions/actionDto';
|
|
68
|
+
export { MovesMadeActionDto } from './Dto/Actions/movesMadeActionDto';
|
|
69
|
+
export { OpponentMoveActionDto } from './Dto/Actions/opponentMoveActionDto';
|
|
70
|
+
export { UndoActionDto } from './Dto/Actions/undoActionDto';
|
|
71
|
+
export { StartGamePlayActionDto } from './Dto/Actions/startGamePlayActionDto';
|
|
72
|
+
export { ServerWasTerminatedActionDto } from './Dto/Actions/serverWasTerminatedActionDto';
|
|
73
|
+
export { DoublingActionDto } from './Dto/Actions/doublingActionDto';
|
|
74
|
+
export { HintMovesActionDto } from './Dto/Actions/hintMovesActionDto';
|
|
75
|
+
export { DicesRolledActionDto } from './Dto/Actions/dicesRolledActionDto';
|
|
76
|
+
export { BoardGameCreatedActionDto } from './Dto/Actions/boardGameCreatedActionDto';
|
|
77
|
+
export { BoardGameEndedActionDto } from './Dto/Actions/boardGameEndedActionDto';
|
|
78
|
+
export { ConnectionInfoActionDto } from './Dto/Actions/connectionInfoActionDto';
|
|
79
|
+
export { BoardGameRestoreActionDto } from './Dto/Actions/boardGameRestoreActionDto';
|
|
80
|
+
export { RolledActionDto } from './Dto/Actions/rolledActionDto';
|
|
81
|
+
export { CardGameCreatedActionDto } from './Dto/Actions/cardGameCreatedActionDto';
|
|
82
|
+
export { CardGameEndedActionDto } from './Dto/Actions/cardGameEndedActionDto';
|
|
83
|
+
export { CardGameRestoreActionDto } from './Dto/Actions/cardGameRestoreActionDto';
|
|
84
|
+
export { BiddingStartedActionDto } from './Dto/Actions/biddingStartedActionDto';
|
|
85
|
+
export { BidMadeActionDto } from './Dto/Actions/bidMadeActionDto';
|
|
86
|
+
export { OpponentBidsActionDto } from './Dto/Actions/opponentBidsActionDto';
|
|
87
|
+
export { PlayingStartedActionDto } from './Dto/Actions/playingStartedActionDto';
|
|
88
|
+
export { PlayCardActionDto } from './Dto/Actions/playCardActionDto';
|
|
89
|
+
export { OpponentPlayCardActionDto } from './Dto/Actions/opponentPlayCardActionDto';
|
|
90
|
+
export { TrickEndedActionDto } from './Dto/Actions/trickEndedActionDto';
|
|
91
|
+
export { RoundEndedActionDto } from './Dto/Actions/roundEndedActionDto';
|
|
92
|
+
export { StartNewRoundActionDto } from './Dto/Actions/startNewRoundActionDto';
|
|
93
|
+
export { AnnounceMadeActionDto } from './Dto/Actions/announceMadeActionDto';
|
|
94
|
+
export { StartNewGameActionDto } from './Dto/Actions/startNewGameActionDto';
|
|
95
|
+
export { ChessGameStartedActionDto } from './Dto/Actions/chessGameStartedActionDto';
|
|
96
|
+
export { ChessMoveMadeActionDto } from './Dto/Actions/chessMoveMadeActionDto';
|
|
97
|
+
export { ChessOpponentMoveActionDto } from './Dto/Actions/chessOpponentMoveActionDto';
|
|
98
|
+
export { ChessInvalidMoveMadeActionDto } from './Dto/Actions/chessInvalidMoveMadeActionDto';
|
|
99
|
+
export { GameStringRequest } from './Dto/editor/gameStringRequest';
|
|
100
|
+
export { GameStringResponseDto } from './Dto/editor/gameStringResponseDto';
|
|
101
|
+
export { InviteResponseDto } from './Dto/rest/inviteResponseDto';
|
|
38
102
|
/**
|
|
39
|
-
*
|
|
103
|
+
* Models
|
|
40
104
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
import { AnnounceType } from "./Model/CardGame/announceType";
|
|
54
|
-
export { IGame, IGamePlay, IPlayer, IGameRoom, CardGameAnnounceSymbolModel, IGamePlayer, ConnectionDto, ErrorReportDto, UserDto, GameState, GameDto, GameCookieDto, PlayerDto, NewScoreDto, Toplist, ToplistResult, BoardGameDto, MoveDto, BoardGamePlayerDto, PlayerColor, PointDto, CheckerDto, DiceDto, ChessMoveDto, ChessMoveType, ChessPieceDto, ChessPieceType, ChessSquareDto, CardGameDto, PlayerPosition, BidType, CardSuit, BridgeBeloteCardType, ContractBridgeCardType, CardGameTeam, CardGamePlayerDto, CardDto, BidDto, BridgeBeloteScoreDto, AnnounceDto, AnnounceType };
|
|
105
|
+
export { Checker } from "./Model/checker";
|
|
106
|
+
export { CheckerArea } from "./Model/checker-area";
|
|
107
|
+
export { CheckerDrag } from "./Model/checker-drag";
|
|
108
|
+
export { MoveAnimation } from "./Model/move-animation";
|
|
109
|
+
export { Point } from "./Model/point";
|
|
110
|
+
export { GetAnnounceSymbols, GetAnnounceSymbol } from "./Model/announce";
|
|
111
|
+
export { Card } from "./Model/card";
|
|
112
|
+
export { CardArea } from "./Model/card-area";
|
|
113
|
+
export { CardDrag } from "./Model/card-drag";
|
|
114
|
+
export { CardGamePlayerArea } from "./Model/card-game-player-area";
|
|
115
|
+
export { Pile } from "./Model/pile";
|
|
116
|
+
export * from "./Model/themes";
|