@tastic/cardtastic-engine 0.0.0-stage → 0.1.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/LICENSE +19 -0
- package/README.md +68 -2
- package/dist/acesup.d.mts +17 -0
- package/dist/acesup.d.ts +17 -0
- package/dist/acesup.js +8 -0
- package/dist/acesup.mjs +8 -0
- package/dist/autoFoundation-CfnFNysj.d.ts +63 -0
- package/dist/autoFoundation-Ctp9LKa-.d.mts +63 -0
- package/dist/canfield.d.mts +64 -0
- package/dist/canfield.d.ts +64 -0
- package/dist/canfield.js +20 -0
- package/dist/canfield.mjs +20 -0
- package/dist/chunk-22DC2YH6.js +95 -0
- package/dist/chunk-3BMUGHKQ.mjs +95 -0
- package/dist/chunk-4HJ7QMYV.mjs +339 -0
- package/dist/chunk-4WAWIFQF.js +131 -0
- package/dist/chunk-5266UC2Q.mjs +271 -0
- package/dist/chunk-6JWUTZVU.mjs +214 -0
- package/dist/chunk-AY3CR5EH.mjs +212 -0
- package/dist/chunk-B56TRALO.js +23 -0
- package/dist/chunk-CV3VJX34.mjs +341 -0
- package/dist/chunk-FDHHAPZA.mjs +177 -0
- package/dist/chunk-FTR733R7.mjs +297 -0
- package/dist/chunk-GFP5NUYK.mjs +23 -0
- package/dist/chunk-IKLYXDG7.mjs +131 -0
- package/dist/chunk-LH3UZP7D.js +165 -0
- package/dist/chunk-LSS44UKH.js +22 -0
- package/dist/chunk-M37CNJHF.mjs +165 -0
- package/dist/chunk-PLSNST56.mjs +163 -0
- package/dist/chunk-PTRHGPCN.js +163 -0
- package/dist/chunk-S3WNVF2K.js +339 -0
- package/dist/chunk-SDZPP3HI.mjs +22 -0
- package/dist/chunk-SLQ7RGMZ.js +212 -0
- package/dist/chunk-TNMFNWEM.mjs +249 -0
- package/dist/chunk-VGJPT3CX.js +214 -0
- package/dist/chunk-W5CPH6TD.js +115 -0
- package/dist/chunk-WJGEX74V.js +341 -0
- package/dist/chunk-WKES4P36.js +297 -0
- package/dist/chunk-XPTQNUF3.js +348 -0
- package/dist/chunk-XSS5M6C7.mjs +115 -0
- package/dist/chunk-XTHDUWJF.js +271 -0
- package/dist/chunk-XV5OUPIW.js +177 -0
- package/dist/chunk-YKY4K67K.mjs +348 -0
- package/dist/chunk-ZMNGTXU5.js +249 -0
- package/dist/fortythieves.d.mts +50 -0
- package/dist/fortythieves.d.ts +50 -0
- package/dist/fortythieves.js +22 -0
- package/dist/fortythieves.mjs +22 -0
- package/dist/freecell.d.mts +30 -0
- package/dist/freecell.d.ts +30 -0
- package/dist/freecell.js +18 -0
- package/dist/freecell.mjs +18 -0
- package/dist/gameTypes-BnfLkwzA.d.mts +201 -0
- package/dist/gameTypes-BnfLkwzA.d.ts +201 -0
- package/dist/golf.d.mts +17 -0
- package/dist/golf.d.ts +17 -0
- package/dist/golf.js +7 -0
- package/dist/golf.mjs +7 -0
- package/dist/index.d.mts +176 -0
- package/dist/index.d.ts +176 -0
- package/dist/index.js +446 -0
- package/dist/index.mjs +446 -0
- package/dist/klondike.d.mts +25 -0
- package/dist/klondike.d.ts +25 -0
- package/dist/klondike.js +15 -0
- package/dist/klondike.mjs +15 -0
- package/dist/pyramid.d.mts +36 -0
- package/dist/pyramid.d.ts +36 -0
- package/dist/pyramid.js +16 -0
- package/dist/pyramid.mjs +16 -0
- package/dist/scorpion.d.mts +14 -0
- package/dist/scorpion.d.ts +14 -0
- package/dist/scorpion.js +9 -0
- package/dist/scorpion.mjs +9 -0
- package/dist/spider.d.mts +22 -0
- package/dist/spider.d.ts +22 -0
- package/dist/spider.js +11 -0
- package/dist/spider.mjs +11 -0
- package/dist/tripeaks.d.mts +43 -0
- package/dist/tripeaks.d.ts +43 -0
- package/dist/tripeaks.js +19 -0
- package/dist/tripeaks.mjs +19 -0
- package/dist/yukon.d.mts +24 -0
- package/dist/yukon.d.ts +24 -0
- package/dist/yukon.js +15 -0
- package/dist/yukon.mjs +15 -0
- package/package.json +187 -4
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Card, GameController } from './index.mjs';
|
|
2
|
+
|
|
3
|
+
interface SpiderState {
|
|
4
|
+
tableau: Card[][];
|
|
5
|
+
stock: Card[];
|
|
6
|
+
/** One entry per completed King->Ace same-suit run, in completion order - the King itself,
|
|
7
|
+
* which the screen shows in that sequence's "foundation" slot (see resolveCompletedSequence). */
|
|
8
|
+
completed: Card[];
|
|
9
|
+
/** One entry per completed run, same order/index as `completed` - the full 13-card run (King
|
|
10
|
+
* first, Ace last), captured before resolveCompletedSequence's splice discards everything but
|
|
11
|
+
* the King. Never read by any game rule, only by the win-cascade animation (see
|
|
12
|
+
* components/winning/), which needs the whole run to chain through, not just its King. */
|
|
13
|
+
completedRuns: Card[][];
|
|
14
|
+
}
|
|
15
|
+
/** A deal needs a card under every column - unless the tableau holds fewer cards than there are columns, when that can never
|
|
16
|
+
* happen (e.g. 7 runs cleared with the last packet still in the stock): the stock would then be locked for good, and the game
|
|
17
|
+
* unwinnable with no way to know it. The usual relaxation (Microsoft's Spider among others) deals anyway. */
|
|
18
|
+
declare function canDealStock(state: SpiderState): boolean;
|
|
19
|
+
declare function createSpiderController(numSuits: 1 | 2 | 4): GameController<SpiderState>;
|
|
20
|
+
|
|
21
|
+
export { canDealStock, createSpiderController };
|
|
22
|
+
export type { SpiderState };
|
package/dist/spider.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Card, GameController } from './index.js';
|
|
2
|
+
|
|
3
|
+
interface SpiderState {
|
|
4
|
+
tableau: Card[][];
|
|
5
|
+
stock: Card[];
|
|
6
|
+
/** One entry per completed King->Ace same-suit run, in completion order - the King itself,
|
|
7
|
+
* which the screen shows in that sequence's "foundation" slot (see resolveCompletedSequence). */
|
|
8
|
+
completed: Card[];
|
|
9
|
+
/** One entry per completed run, same order/index as `completed` - the full 13-card run (King
|
|
10
|
+
* first, Ace last), captured before resolveCompletedSequence's splice discards everything but
|
|
11
|
+
* the King. Never read by any game rule, only by the win-cascade animation (see
|
|
12
|
+
* components/winning/), which needs the whole run to chain through, not just its King. */
|
|
13
|
+
completedRuns: Card[][];
|
|
14
|
+
}
|
|
15
|
+
/** A deal needs a card under every column - unless the tableau holds fewer cards than there are columns, when that can never
|
|
16
|
+
* happen (e.g. 7 runs cleared with the last packet still in the stock): the stock would then be locked for good, and the game
|
|
17
|
+
* unwinnable with no way to know it. The usual relaxation (Microsoft's Spider among others) deals anyway. */
|
|
18
|
+
declare function canDealStock(state: SpiderState): boolean;
|
|
19
|
+
declare function createSpiderController(numSuits: 1 | 2 | 4): GameController<SpiderState>;
|
|
20
|
+
|
|
21
|
+
export { canDealStock, createSpiderController };
|
|
22
|
+
export type { SpiderState };
|
package/dist/spider.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkZMNGTXU5js = require('./chunk-ZMNGTXU5.js');
|
|
5
|
+
require('./chunk-B56TRALO.js');
|
|
6
|
+
require('./chunk-XV5OUPIW.js');
|
|
7
|
+
require('./chunk-W5CPH6TD.js');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.canDealStock = _chunkZMNGTXU5js.canDealStock; exports.createSpiderController = _chunkZMNGTXU5js.createSpiderController;
|
package/dist/spider.mjs
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Card, PileRef, GameController } from './index.mjs';
|
|
2
|
+
|
|
3
|
+
interface TriPeaksState {
|
|
4
|
+
/** Flat 28-slot board across 4 rows (widths 3,6,9,10 - see ROW_STARTS); `null` once removed. */
|
|
5
|
+
tableau: (Card | null)[];
|
|
6
|
+
/** The single build pile - top card is the current target rank. Starts with 1 card. */
|
|
7
|
+
waste: Card[];
|
|
8
|
+
/** Face-down draw pile, 23 cards at deal. No recycling once empty. */
|
|
9
|
+
stock: Card[];
|
|
10
|
+
}
|
|
11
|
+
declare const ROW_WIDTHS: number[];
|
|
12
|
+
/** Flat array index for the card at (row, col), 0-indexed, col from 0..ROW_WIDTHS[row]-1. */
|
|
13
|
+
declare function flatIndex(row: number, col: number): number;
|
|
14
|
+
/** Inverse of flatIndex: which (row, col) a flat index corresponds to. */
|
|
15
|
+
declare function rowColOf(index: number): {
|
|
16
|
+
row: number;
|
|
17
|
+
col: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The two flat indices of the cards directly beneath (row, col) that must both be removed before
|
|
21
|
+
* it's exposed - null for row 3 (the base row), which has nothing beneath it. Row 0 -> row 1 and
|
|
22
|
+
* row 1 -> row 2 stay within one peak's own 1/2/3-wide mini-pyramid (peak = col / thisRowWidthPerPeak);
|
|
23
|
+
* row 2 -> row 3 lands in that same peak's 4-wide base slice, which starts 3 columns (not 4) into
|
|
24
|
+
* the shared base row - the source of the 1-column overlap between adjacent peaks' bases. Exported
|
|
25
|
+
* so TriPeaksScreen.tsx can lay out each card at the horizontal midpoint of its own two children
|
|
26
|
+
* (recursively, bottom-up from the base row) using this exact same adjacency, rather than a second,
|
|
27
|
+
* independently-derived copy of the same peak math that could silently drift out of sync with it.
|
|
28
|
+
*/
|
|
29
|
+
declare function childIndices(row: number, col: number): [number, number] | null;
|
|
30
|
+
/**
|
|
31
|
+
* A tableau card at (row, col) is exposed (removable, and rendered face up) once both cards
|
|
32
|
+
* resting on it in the row below have been removed. Row 3 (the base row) is always exposed if
|
|
33
|
+
* occupied - nothing rests on it.
|
|
34
|
+
*/
|
|
35
|
+
declare function isExposed(tableau: (Card | null)[], row: number, col: number): boolean;
|
|
36
|
+
declare function cardAt(state: TriPeaksState, ref: PileRef): Card | null;
|
|
37
|
+
/** Closes over `wrapAceKing` (settings.tripeaksRankWrap) - the only rule this game's move logic
|
|
38
|
+
* varies by, so only the functions that actually consult isAdjacentRank move inside this factory;
|
|
39
|
+
* newGame/drawStock/isWon are wrap-independent and stay as plain module-level functions above. */
|
|
40
|
+
declare function createTriPeaksController(wrapAceKing: boolean): GameController<TriPeaksState>;
|
|
41
|
+
|
|
42
|
+
export { ROW_WIDTHS, cardAt, childIndices, createTriPeaksController, flatIndex, isExposed, rowColOf };
|
|
43
|
+
export type { TriPeaksState };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Card, PileRef, GameController } from './index.js';
|
|
2
|
+
|
|
3
|
+
interface TriPeaksState {
|
|
4
|
+
/** Flat 28-slot board across 4 rows (widths 3,6,9,10 - see ROW_STARTS); `null` once removed. */
|
|
5
|
+
tableau: (Card | null)[];
|
|
6
|
+
/** The single build pile - top card is the current target rank. Starts with 1 card. */
|
|
7
|
+
waste: Card[];
|
|
8
|
+
/** Face-down draw pile, 23 cards at deal. No recycling once empty. */
|
|
9
|
+
stock: Card[];
|
|
10
|
+
}
|
|
11
|
+
declare const ROW_WIDTHS: number[];
|
|
12
|
+
/** Flat array index for the card at (row, col), 0-indexed, col from 0..ROW_WIDTHS[row]-1. */
|
|
13
|
+
declare function flatIndex(row: number, col: number): number;
|
|
14
|
+
/** Inverse of flatIndex: which (row, col) a flat index corresponds to. */
|
|
15
|
+
declare function rowColOf(index: number): {
|
|
16
|
+
row: number;
|
|
17
|
+
col: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The two flat indices of the cards directly beneath (row, col) that must both be removed before
|
|
21
|
+
* it's exposed - null for row 3 (the base row), which has nothing beneath it. Row 0 -> row 1 and
|
|
22
|
+
* row 1 -> row 2 stay within one peak's own 1/2/3-wide mini-pyramid (peak = col / thisRowWidthPerPeak);
|
|
23
|
+
* row 2 -> row 3 lands in that same peak's 4-wide base slice, which starts 3 columns (not 4) into
|
|
24
|
+
* the shared base row - the source of the 1-column overlap between adjacent peaks' bases. Exported
|
|
25
|
+
* so TriPeaksScreen.tsx can lay out each card at the horizontal midpoint of its own two children
|
|
26
|
+
* (recursively, bottom-up from the base row) using this exact same adjacency, rather than a second,
|
|
27
|
+
* independently-derived copy of the same peak math that could silently drift out of sync with it.
|
|
28
|
+
*/
|
|
29
|
+
declare function childIndices(row: number, col: number): [number, number] | null;
|
|
30
|
+
/**
|
|
31
|
+
* A tableau card at (row, col) is exposed (removable, and rendered face up) once both cards
|
|
32
|
+
* resting on it in the row below have been removed. Row 3 (the base row) is always exposed if
|
|
33
|
+
* occupied - nothing rests on it.
|
|
34
|
+
*/
|
|
35
|
+
declare function isExposed(tableau: (Card | null)[], row: number, col: number): boolean;
|
|
36
|
+
declare function cardAt(state: TriPeaksState, ref: PileRef): Card | null;
|
|
37
|
+
/** Closes over `wrapAceKing` (settings.tripeaksRankWrap) - the only rule this game's move logic
|
|
38
|
+
* varies by, so only the functions that actually consult isAdjacentRank move inside this factory;
|
|
39
|
+
* newGame/drawStock/isWon are wrap-independent and stay as plain module-level functions above. */
|
|
40
|
+
declare function createTriPeaksController(wrapAceKing: boolean): GameController<TriPeaksState>;
|
|
41
|
+
|
|
42
|
+
export { ROW_WIDTHS, cardAt, childIndices, createTriPeaksController, flatIndex, isExposed, rowColOf };
|
|
43
|
+
export type { TriPeaksState };
|
package/dist/tripeaks.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkLH3UZP7Djs = require('./chunk-LH3UZP7D.js');
|
|
10
|
+
require('./chunk-W5CPH6TD.js');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
exports.ROW_WIDTHS = _chunkLH3UZP7Djs.ROW_WIDTHS; exports.cardAt = _chunkLH3UZP7Djs.cardAt; exports.childIndices = _chunkLH3UZP7Djs.childIndices; exports.createTriPeaksController = _chunkLH3UZP7Djs.createTriPeaksController; exports.flatIndex = _chunkLH3UZP7Djs.flatIndex; exports.isExposed = _chunkLH3UZP7Djs.isExposed; exports.rowColOf = _chunkLH3UZP7Djs.rowColOf;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ROW_WIDTHS,
|
|
3
|
+
cardAt,
|
|
4
|
+
childIndices,
|
|
5
|
+
createTriPeaksController,
|
|
6
|
+
flatIndex,
|
|
7
|
+
isExposed,
|
|
8
|
+
rowColOf
|
|
9
|
+
} from "./chunk-M37CNJHF.mjs";
|
|
10
|
+
import "./chunk-XSS5M6C7.mjs";
|
|
11
|
+
export {
|
|
12
|
+
ROW_WIDTHS,
|
|
13
|
+
cardAt,
|
|
14
|
+
childIndices,
|
|
15
|
+
createTriPeaksController,
|
|
16
|
+
flatIndex,
|
|
17
|
+
isExposed,
|
|
18
|
+
rowColOf
|
|
19
|
+
};
|
package/dist/yukon.d.mts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FinishMove } from './index.mjs';
|
|
2
|
+
import { Card, GameController } from './index.mjs';
|
|
3
|
+
|
|
4
|
+
interface YukonState {
|
|
5
|
+
/** 7 tableau columns. */
|
|
6
|
+
tableau: Card[][];
|
|
7
|
+
/** 4 foundation piles, indexed to match engine/foundation's FOUNDATION_SUITS order (spades, diamonds, clubs, hearts). */
|
|
8
|
+
foundation: Card[][];
|
|
9
|
+
}
|
|
10
|
+
declare function createYukonController(): GameController<YukonState>;
|
|
11
|
+
/**
|
|
12
|
+
* True once the board is SOLVED - what lets the finish (games/shared/useAutoFinish) file the rest away on its own:
|
|
13
|
+
* not won yet, nothing hidden (every tableau card face up; Yukon has no stock, waste or reserve), and every remaining
|
|
14
|
+
* card able to go up by foundation moves alone. Each clause matters: isFullyAutoCompletable is true on a won board
|
|
15
|
+
* (there is nothing left to do), and it PEEKS - its simulated moves turn each card they uncover face up, so on its own
|
|
16
|
+
* it can say yes while face-down cards remain, and starting the finish then would give away what is under them.
|
|
17
|
+
* `controller` is the screen's own (createYukonController).
|
|
18
|
+
*/
|
|
19
|
+
declare function canAutoFinish(controller: GameController<YukonState>, state: YukonState): boolean;
|
|
20
|
+
/** The next card the finish sends up, and its own suit's foundation - or null if there is none (won, or not solved). */
|
|
21
|
+
declare function nextFinishMove(controller: GameController<YukonState>, state: YukonState): FinishMove | null;
|
|
22
|
+
|
|
23
|
+
export { canAutoFinish, createYukonController, nextFinishMove };
|
|
24
|
+
export type { YukonState };
|
package/dist/yukon.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FinishMove } from './index.js';
|
|
2
|
+
import { Card, GameController } from './index.js';
|
|
3
|
+
|
|
4
|
+
interface YukonState {
|
|
5
|
+
/** 7 tableau columns. */
|
|
6
|
+
tableau: Card[][];
|
|
7
|
+
/** 4 foundation piles, indexed to match engine/foundation's FOUNDATION_SUITS order (spades, diamonds, clubs, hearts). */
|
|
8
|
+
foundation: Card[][];
|
|
9
|
+
}
|
|
10
|
+
declare function createYukonController(): GameController<YukonState>;
|
|
11
|
+
/**
|
|
12
|
+
* True once the board is SOLVED - what lets the finish (games/shared/useAutoFinish) file the rest away on its own:
|
|
13
|
+
* not won yet, nothing hidden (every tableau card face up; Yukon has no stock, waste or reserve), and every remaining
|
|
14
|
+
* card able to go up by foundation moves alone. Each clause matters: isFullyAutoCompletable is true on a won board
|
|
15
|
+
* (there is nothing left to do), and it PEEKS - its simulated moves turn each card they uncover face up, so on its own
|
|
16
|
+
* it can say yes while face-down cards remain, and starting the finish then would give away what is under them.
|
|
17
|
+
* `controller` is the screen's own (createYukonController).
|
|
18
|
+
*/
|
|
19
|
+
declare function canAutoFinish(controller: GameController<YukonState>, state: YukonState): boolean;
|
|
20
|
+
/** The next card the finish sends up, and its own suit's foundation - or null if there is none (won, or not solved). */
|
|
21
|
+
declare function nextFinishMove(controller: GameController<YukonState>, state: YukonState): FinishMove | null;
|
|
22
|
+
|
|
23
|
+
export { canAutoFinish, createYukonController, nextFinishMove };
|
|
24
|
+
export type { YukonState };
|
package/dist/yukon.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkXTHDUWJFjs = require('./chunk-XTHDUWJF.js');
|
|
6
|
+
require('./chunk-22DC2YH6.js');
|
|
7
|
+
require('./chunk-LSS44UKH.js');
|
|
8
|
+
require('./chunk-B56TRALO.js');
|
|
9
|
+
require('./chunk-XV5OUPIW.js');
|
|
10
|
+
require('./chunk-W5CPH6TD.js');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
exports.canAutoFinish = _chunkXTHDUWJFjs.canAutoFinish; exports.createYukonController = _chunkXTHDUWJFjs.createYukonController; exports.nextFinishMove = _chunkXTHDUWJFjs.nextFinishMove;
|
package/dist/yukon.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
canAutoFinish,
|
|
3
|
+
createYukonController,
|
|
4
|
+
nextFinishMove
|
|
5
|
+
} from "./chunk-5266UC2Q.mjs";
|
|
6
|
+
import "./chunk-3BMUGHKQ.mjs";
|
|
7
|
+
import "./chunk-SDZPP3HI.mjs";
|
|
8
|
+
import "./chunk-GFP5NUYK.mjs";
|
|
9
|
+
import "./chunk-FDHHAPZA.mjs";
|
|
10
|
+
import "./chunk-XSS5M6C7.mjs";
|
|
11
|
+
export {
|
|
12
|
+
canAutoFinish,
|
|
13
|
+
createYukonController,
|
|
14
|
+
nextFinishMove
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,189 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tastic/cardtastic-engine",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "CardTastic's solitaire rules (the eleven games, their deals and moves) and a replay that checks a played deal, shared by the app and the game server",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"solitaire",
|
|
7
|
+
"klondike",
|
|
8
|
+
"spider",
|
|
9
|
+
"freecell",
|
|
10
|
+
"card-games",
|
|
11
|
+
"game-engine",
|
|
12
|
+
"typescript"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/jayrdeaton/CardTastic-Engine#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/jayrdeaton/CardTastic-Engine/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/jayrdeaton/CardTastic-Engine.git"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": "Jay Deaton",
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"type": "commonjs",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"import": {
|
|
29
|
+
"types": "./dist/index.d.mts",
|
|
30
|
+
"default": "./dist/index.mjs"
|
|
31
|
+
},
|
|
32
|
+
"require": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"default": "./dist/index.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"./acesup": {
|
|
38
|
+
"import": {
|
|
39
|
+
"types": "./dist/acesup.d.mts",
|
|
40
|
+
"default": "./dist/acesup.mjs"
|
|
41
|
+
},
|
|
42
|
+
"require": {
|
|
43
|
+
"types": "./dist/acesup.d.ts",
|
|
44
|
+
"default": "./dist/acesup.js"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"./canfield": {
|
|
48
|
+
"import": {
|
|
49
|
+
"types": "./dist/canfield.d.mts",
|
|
50
|
+
"default": "./dist/canfield.mjs"
|
|
51
|
+
},
|
|
52
|
+
"require": {
|
|
53
|
+
"types": "./dist/canfield.d.ts",
|
|
54
|
+
"default": "./dist/canfield.js"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"./fortythieves": {
|
|
58
|
+
"import": {
|
|
59
|
+
"types": "./dist/fortythieves.d.mts",
|
|
60
|
+
"default": "./dist/fortythieves.mjs"
|
|
61
|
+
},
|
|
62
|
+
"require": {
|
|
63
|
+
"types": "./dist/fortythieves.d.ts",
|
|
64
|
+
"default": "./dist/fortythieves.js"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"./freecell": {
|
|
68
|
+
"import": {
|
|
69
|
+
"types": "./dist/freecell.d.mts",
|
|
70
|
+
"default": "./dist/freecell.mjs"
|
|
71
|
+
},
|
|
72
|
+
"require": {
|
|
73
|
+
"types": "./dist/freecell.d.ts",
|
|
74
|
+
"default": "./dist/freecell.js"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"./golf": {
|
|
78
|
+
"import": {
|
|
79
|
+
"types": "./dist/golf.d.mts",
|
|
80
|
+
"default": "./dist/golf.mjs"
|
|
81
|
+
},
|
|
82
|
+
"require": {
|
|
83
|
+
"types": "./dist/golf.d.ts",
|
|
84
|
+
"default": "./dist/golf.js"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"./klondike": {
|
|
88
|
+
"import": {
|
|
89
|
+
"types": "./dist/klondike.d.mts",
|
|
90
|
+
"default": "./dist/klondike.mjs"
|
|
91
|
+
},
|
|
92
|
+
"require": {
|
|
93
|
+
"types": "./dist/klondike.d.ts",
|
|
94
|
+
"default": "./dist/klondike.js"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"./package.json": "./package.json",
|
|
98
|
+
"./pyramid": {
|
|
99
|
+
"import": {
|
|
100
|
+
"types": "./dist/pyramid.d.mts",
|
|
101
|
+
"default": "./dist/pyramid.mjs"
|
|
102
|
+
},
|
|
103
|
+
"require": {
|
|
104
|
+
"types": "./dist/pyramid.d.ts",
|
|
105
|
+
"default": "./dist/pyramid.js"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"./scorpion": {
|
|
109
|
+
"import": {
|
|
110
|
+
"types": "./dist/scorpion.d.mts",
|
|
111
|
+
"default": "./dist/scorpion.mjs"
|
|
112
|
+
},
|
|
113
|
+
"require": {
|
|
114
|
+
"types": "./dist/scorpion.d.ts",
|
|
115
|
+
"default": "./dist/scorpion.js"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"./spider": {
|
|
119
|
+
"import": {
|
|
120
|
+
"types": "./dist/spider.d.mts",
|
|
121
|
+
"default": "./dist/spider.mjs"
|
|
122
|
+
},
|
|
123
|
+
"require": {
|
|
124
|
+
"types": "./dist/spider.d.ts",
|
|
125
|
+
"default": "./dist/spider.js"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"./tripeaks": {
|
|
129
|
+
"import": {
|
|
130
|
+
"types": "./dist/tripeaks.d.mts",
|
|
131
|
+
"default": "./dist/tripeaks.mjs"
|
|
132
|
+
},
|
|
133
|
+
"require": {
|
|
134
|
+
"types": "./dist/tripeaks.d.ts",
|
|
135
|
+
"default": "./dist/tripeaks.js"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"./yukon": {
|
|
139
|
+
"import": {
|
|
140
|
+
"types": "./dist/yukon.d.mts",
|
|
141
|
+
"default": "./dist/yukon.mjs"
|
|
142
|
+
},
|
|
143
|
+
"require": {
|
|
144
|
+
"types": "./dist/yukon.d.ts",
|
|
145
|
+
"default": "./dist/yukon.js"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"main": "./dist/index.js",
|
|
150
|
+
"module": "./dist/index.mjs",
|
|
151
|
+
"types": "./dist/index.d.ts",
|
|
152
|
+
"files": [
|
|
153
|
+
"dist"
|
|
154
|
+
],
|
|
155
|
+
"scripts": {
|
|
156
|
+
"build": "tsup",
|
|
157
|
+
"build:watch": "tsup --watch",
|
|
158
|
+
"clean": "rm -rf dist coverage",
|
|
159
|
+
"fix": "eslint . --fix",
|
|
160
|
+
"lint": "eslint .",
|
|
161
|
+
"prepublishOnly": "npm run build",
|
|
162
|
+
"release": "git push --follow-tags",
|
|
163
|
+
"release:major": "npm version major && npm run release",
|
|
164
|
+
"release:minor": "npm version minor && npm run release",
|
|
165
|
+
"release:patch": "npm version patch && npm run release",
|
|
166
|
+
"test": "jest",
|
|
167
|
+
"test:watch": "jest --watchAll --coverage=false",
|
|
168
|
+
"typecheck": "tsc --noEmit",
|
|
169
|
+
"verify": "npm run lint && npm test && npm run typecheck && npm run build",
|
|
170
|
+
"preversion": "npm run verify",
|
|
171
|
+
"version": "node scripts/sync-rules-version.cjs && git add src/version.ts"
|
|
172
|
+
},
|
|
173
|
+
"prettier": "@infinitetoken/eslint-config/prettier",
|
|
174
|
+
"devDependencies": {
|
|
175
|
+
"@infinitetoken/eslint-config": "^0.2.1",
|
|
176
|
+
"@infinitetoken/jest-config": "^0.5.2",
|
|
177
|
+
"@infinitetoken/tsconfig": "^0.7.0",
|
|
178
|
+
"@types/jest": "^30.0.0",
|
|
179
|
+
"@types/node": "^26.6.6",
|
|
180
|
+
"eslint": "^10.15.0",
|
|
181
|
+
"jest": "^30.5.2",
|
|
182
|
+
"prettier": "^3.10.1",
|
|
183
|
+
"tsup": "^9.0.0",
|
|
184
|
+
"typescript": "~6.0.3"
|
|
185
|
+
},
|
|
186
|
+
"publishConfig": {
|
|
187
|
+
"access": "public"
|
|
188
|
+
}
|
|
189
|
+
}
|