trucoshi 8.10.5 → 8.11.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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ICard, IDeck, IPlayedCard, IPlayer, IPublicPlayer } from "../../types";
|
|
2
2
|
import { ITable } from "./Table";
|
|
3
3
|
export declare function Deck(): IDeck;
|
|
4
|
-
export declare const getAllCards: () =>
|
|
4
|
+
export declare const getAllCards: () => Array<ICard>;
|
|
5
5
|
export declare function dealCards<TPlayer extends {
|
|
6
6
|
key: string;
|
|
7
7
|
idx: number;
|
|
8
8
|
setHand(h: Array<ICard>): void;
|
|
9
9
|
} = IPlayer>(table: ITable<TPlayer>, deck: IDeck): void;
|
|
10
|
-
export declare function shuffleArray<T = unknown>(array: Array<T>, getRandom?: (max: number) => number): T
|
|
10
|
+
export declare function shuffleArray<T = unknown>(array: Array<T>, getRandom?: (max: number) => number): Array<T>;
|
|
11
11
|
export declare function PlayedCard(player: IPlayer | IPublicPlayer, card: ICard, burn?: boolean): IPlayedCard;
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ICard } from "../types";
|
|
1
2
|
export declare const PLAYER_ABANDON_TIMEOUT: number;
|
|
2
3
|
export declare const PLAYER_TURN_TIMEOUT: number;
|
|
3
4
|
export declare const PREVIOUS_HAND_ACK_TIMEOUT: number;
|
|
@@ -43,7 +44,7 @@ export declare const CARDS: {
|
|
|
43
44
|
"4b": number;
|
|
44
45
|
"4c": number;
|
|
45
46
|
};
|
|
46
|
-
export declare const BURNT_CARD:
|
|
47
|
+
export declare const BURNT_CARD: ICard;
|
|
47
48
|
export declare const CARDS_HUMAN_READABLE: {
|
|
48
49
|
"1e": string;
|
|
49
50
|
"1b": string;
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
|
-
/// <reference types="lodash" />
|
|
3
1
|
import { IHand } from "../truco";
|
|
4
2
|
import { ICard } from "../types";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Cache: import("lodash").MapCacheConstructor;
|
|
8
|
-
};
|
|
3
|
+
import memoize from "lodash.memoize";
|
|
4
|
+
export declare const memoizeMinute: typeof memoize;
|
|
9
5
|
export declare function getMaxNumberIndex<T = number>(array: Array<T>): number;
|
|
10
6
|
export declare function getMinNumberIndex<T = number>(array: Array<T>): number;
|
|
11
7
|
export declare function getCardValue(card: ICard): number;
|