valtech-components 4.0.506 → 4.0.507
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/esm2022/lib/components/organisms/mini-games/chessimals-challenge-progress.service.mjs +43 -24
- package/esm2022/lib/components/organisms/mini-games/chessimals-challenge-state.mjs +44 -0
- package/esm2022/lib/components/organisms/mini-games/chessimals-engine.mjs +57 -16
- package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +66 -23
- package/esm2022/lib/components/organisms/mini-games/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +206 -60
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/chessimals-challenge-progress.service.d.ts +2 -0
- package/lib/components/organisms/mini-games/chessimals-challenge-state.d.ts +3 -0
- package/lib/components/organisms/mini-games/chessimals-engine.d.ts +5 -1
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +3 -1
- package/lib/components/organisms/mini-games/types.d.ts +6 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ export declare class ChessimalsChallengeProgressService {
|
|
|
22
22
|
emptyStats(): ChessimalsChallengeStats;
|
|
23
23
|
private readStats;
|
|
24
24
|
private normalizeStats;
|
|
25
|
+
normalizeRun(value: Partial<ChessimalsChallengeRun>, uid?: string): ChessimalsChallengeRun;
|
|
25
26
|
private addModeResult;
|
|
26
27
|
private emptyModeStats;
|
|
27
28
|
private normalizeModeStats;
|
|
@@ -31,6 +32,7 @@ export declare class ChessimalsChallengeProgressService {
|
|
|
31
32
|
private runsPath;
|
|
32
33
|
private readLocalActiveRun;
|
|
33
34
|
private writeLocalActiveRun;
|
|
35
|
+
private localActiveRunKey;
|
|
34
36
|
private withoutUndefined;
|
|
35
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsChallengeProgressService, never>;
|
|
36
38
|
static ɵprov: i0.ɵɵInjectableDeclaration<ChessimalsChallengeProgressService>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ChessimalsChallengeRun } from './types';
|
|
2
|
+
export declare function normalizeChessimalsChallengeRun(value: Partial<ChessimalsChallengeRun>, uid?: string): ChessimalsChallengeRun;
|
|
3
|
+
export declare function chooseActiveChessimalsChallengeRun(values: Array<Partial<ChessimalsChallengeRun>>, uid?: string): ChessimalsChallengeRun | undefined;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ChessimalsAnimalType, ChessimalsBotDifficulty, ChessimalsBotProfile, ChessimalsBotProfileId, ChessimalsBoardSize, ChessimalsGameMode, ChessimalsGameState, ChessimalsGameStatus, ChessimalsMove, ChessimalsMoveHistoryEntry, ChessimalsOnlineState, ChessimalsPiece, ChessimalsPlayerColor, ChessimalsPosition } from './types';
|
|
2
|
+
interface ChessimalsBotOptions {
|
|
3
|
+
challengeRound?: number;
|
|
4
|
+
}
|
|
2
5
|
export declare const CHESSIMALS_BOT_PROFILES: ChessimalsBotProfile[];
|
|
3
6
|
export interface CreateChessimalsGameOptions {
|
|
4
7
|
id?: string;
|
|
@@ -10,8 +13,9 @@ export declare function createChessimalsGame(boardSize?: ChessimalsBoardSize, op
|
|
|
10
13
|
export declare function getChessimalsPieceAt(state: ChessimalsGameState, position: ChessimalsPosition): ChessimalsPiece | undefined;
|
|
11
14
|
export declare function getChessimalsLegalMoves(state: ChessimalsGameState, pieceId: string, animal?: ChessimalsAnimalType): ChessimalsMove[];
|
|
12
15
|
export declare function getChessimalsAllLegalMoves(state: ChessimalsGameState, color?: ChessimalsPlayerColor): ChessimalsMove[];
|
|
13
|
-
export declare function chooseChessimalsBotMove(state: ChessimalsGameState, difficulty?: ChessimalsBotDifficulty, profileId?: ChessimalsBotProfileId): ChessimalsMove | undefined;
|
|
16
|
+
export declare function chooseChessimalsBotMove(state: ChessimalsGameState, difficulty?: ChessimalsBotDifficulty, profileId?: ChessimalsBotProfileId, options?: ChessimalsBotOptions): ChessimalsMove | undefined;
|
|
14
17
|
export declare function applyChessimalsMove(state: ChessimalsGameState, candidate: ChessimalsMove): ChessimalsGameState;
|
|
15
18
|
export declare function createChessimalsReviewState(state: ChessimalsGameState, entry: ChessimalsMoveHistoryEntry): ChessimalsGameState;
|
|
16
19
|
export declare function resignChessimalsGame(state: ChessimalsGameState, color: ChessimalsPlayerColor): ChessimalsGameState;
|
|
17
20
|
export declare function positionKey(position: ChessimalsPosition): string;
|
|
21
|
+
export {};
|
|
@@ -123,7 +123,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
123
123
|
readonly botProfiles: ChessimalsBotProfile[];
|
|
124
124
|
readonly challengeLadder: ChessimalsChallengeBot[];
|
|
125
125
|
readonly animals: ChessimalsAnimalView[];
|
|
126
|
-
readonly valtechComponentsVersion = "4.0.
|
|
126
|
+
readonly valtechComponentsVersion = "4.0.507";
|
|
127
127
|
readonly screen: import("@angular/core").WritableSignal<"home" | "challenge" | "path" | "game">;
|
|
128
128
|
readonly selectedBoardSize: import("@angular/core").WritableSignal<ChessimalsBoardSize>;
|
|
129
129
|
readonly selectedLocalMode: import("@angular/core").WritableSignal<ChessimalsLocalMode>;
|
|
@@ -450,6 +450,8 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
450
450
|
challengeTensionMoment(): ChessimalsChallengeTensionView | undefined;
|
|
451
451
|
challengeHasNewRecord(): boolean;
|
|
452
452
|
totalChallengePowers(stats?: ChessimalsChallengeRoundStats): number;
|
|
453
|
+
private challengeRunRoundIndex;
|
|
454
|
+
private challengeRunRoundsWon;
|
|
453
455
|
private createGameScore;
|
|
454
456
|
private scoreChessimalsMove;
|
|
455
457
|
private colorFromPieceId;
|
|
@@ -92,10 +92,15 @@ export interface ChessimalsChallengeRoundResult {
|
|
|
92
92
|
export interface ChessimalsChallengeRun {
|
|
93
93
|
id: string;
|
|
94
94
|
userId?: string;
|
|
95
|
+
schemaVersion?: 2;
|
|
95
96
|
status: ChessimalsChallengeStatus;
|
|
96
97
|
livesStart: 3;
|
|
97
98
|
livesRemaining: number;
|
|
99
|
+
roundIndex?: number;
|
|
98
100
|
currentRound: number;
|
|
101
|
+
roundsWon?: number;
|
|
102
|
+
highestRoundReached?: number;
|
|
103
|
+
activeRoundId?: string;
|
|
99
104
|
wins: number;
|
|
100
105
|
losses: number;
|
|
101
106
|
bestStreakInRun: number;
|
|
@@ -103,6 +108,7 @@ export interface ChessimalsChallengeRun {
|
|
|
103
108
|
botLadder: string[];
|
|
104
109
|
roundResults: ChessimalsChallengeRoundResult[];
|
|
105
110
|
startedAt: string;
|
|
111
|
+
lastEventAt?: string;
|
|
106
112
|
updatedAt: string;
|
|
107
113
|
finishedAt?: string;
|
|
108
114
|
}
|
package/lib/version.d.ts
CHANGED