@vankosoft/game-platform 1.1.0 → 1.1.2
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/assets/images/Cards/BridgeBelote/aceclub.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/acediamond.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/aceheart.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/acespade.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/back.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/eightclub.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/eightdiamond.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/eightheart.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/eightspade.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/jackclub.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/jackdiamond.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/jackheart.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/jackspade.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/kingclub.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/kingdiamond.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/kingheart.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/kingspade.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/nineclub.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/ninediamond.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/nineheart.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/ninespade.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/queenclub.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/queendiamond.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/queenheart.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/queenspade.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/sevenclub.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/sevendiamond.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/sevenheart.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/sevenspade.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/tenclub.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/tendiamond.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/tenheart.png +0 -0
- package/dist/assets/images/Cards/BridgeBelote/tenspade.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C10.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C11.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C12.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C13.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C14.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C2.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C3.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C4.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C5.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C6.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C7.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C8.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/C9.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D10.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D11.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D12.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D13.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D14.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D2.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D3.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D4.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D5.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D6.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D7.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D8.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/D9.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H10.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H11.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H12.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H13.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H14.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H2.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H3.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H4.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H5.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H6.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H7.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H8.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/H9.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S10.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S11.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S12.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S13.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S14.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S2.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S3.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S4.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S5.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S6.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S7.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S8.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/S9.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/blue_back.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/gray_back.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/green_back.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/purple_back.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/red_back.png +0 -0
- package/dist/assets/images/Cards/ContractBridge/yellow_back.png +0 -0
- package/dist/cjs/Model/announce.d.ts +1 -0
- package/dist/cjs/Model/pile.d.ts +2 -2
- package/dist/cjs/Type/CardGameAnnounceSymbolModel.d.ts +1 -0
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +25 -4
- package/package.json +1 -1
- package/rollup.config.mjs +1 -2
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CardGameAnnounceSymbolModel } from '../Type/CardGameAnnounceSymbolModel';
|
|
2
2
|
import { BidTrump } from '../Enum/bidTrump';
|
|
3
|
+
export declare function GetTrumps(): Array<CardGameAnnounceSymbolModel>;
|
|
3
4
|
export declare function GetAnnounceSymbols(): Array<CardGameAnnounceSymbolModel>;
|
|
4
5
|
export declare function GetAnnounceSymbol(symbolId: BidTrump): CardGameAnnounceSymbolModel;
|
package/dist/cjs/Model/pile.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IThemes } from './themes';
|
|
2
2
|
import { CardDto } from '../Dto/CardGame/cardDto';
|
|
3
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;
|
|
4
|
+
static drawAsPile(cx: CanvasRenderingContext2D | null, cardImagesPath: string, pile: CardDto[], boardWidth: number, boardHeight: number, cardWidth: number, cardHeight: number, theme: IThemes): void;
|
|
5
|
+
static drawAsRound(cx: CanvasRenderingContext2D | null, cardImagesPath: string, pile: CardDto[], boardWidth: number, boardHeight: number, cardWidth: number, cardHeight: number, theme: IThemes): void;
|
|
6
6
|
}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ export { CheckerArea } from "./Model/checker-area";
|
|
|
109
109
|
export { CheckerDrag } from "./Model/checker-drag";
|
|
110
110
|
export { MoveAnimation } from "./Model/move-animation";
|
|
111
111
|
export { Point } from "./Model/point";
|
|
112
|
-
export { GetAnnounceSymbols, GetAnnounceSymbol } from "./Model/announce";
|
|
112
|
+
export { GetTrumps, GetAnnounceSymbols, GetAnnounceSymbol } from "./Model/announce";
|
|
113
113
|
export { Card } from "./Model/card";
|
|
114
114
|
export { CardArea } from "./Model/card-area";
|
|
115
115
|
export { CardDrag } from "./Model/card-drag";
|
package/dist/cjs/index.js
CHANGED
|
@@ -487,55 +487,72 @@ class AnnounceClover {
|
|
|
487
487
|
key = "btnClover";
|
|
488
488
|
tooltip = "Clover";
|
|
489
489
|
value = '<i class="fi fi-sr-club"></i>';
|
|
490
|
+
htmlEntity = '♣';
|
|
490
491
|
}
|
|
491
492
|
class AnnounceDiamond {
|
|
492
493
|
id = exports.BidTrump.Diamonds;
|
|
493
494
|
key = "btnDiamond";
|
|
494
495
|
tooltip = "Diamond";
|
|
495
496
|
value = '<i class="fi fi-sr-card-diamond"></i>';
|
|
497
|
+
htmlEntity = '♦';
|
|
496
498
|
}
|
|
497
499
|
class AnnounceHeart {
|
|
498
500
|
id = exports.BidTrump.Hearts;
|
|
499
501
|
key = "btnHeart";
|
|
500
502
|
tooltip = "Heart";
|
|
501
503
|
value = '<i class="fi fi-sr-heart"></i>';
|
|
504
|
+
htmlEntity = '♥';
|
|
502
505
|
}
|
|
503
506
|
class AnnounceSpade {
|
|
504
507
|
id = exports.BidTrump.Spades;
|
|
505
508
|
key = "btnSpade";
|
|
506
509
|
tooltip = "Spade";
|
|
507
510
|
value = '<i class="fi fi-sr-spade"></i>';
|
|
511
|
+
htmlEntity = '♠';
|
|
508
512
|
}
|
|
509
513
|
class AnnounceBezKoz {
|
|
510
514
|
id = exports.BidTrump.NoTrumps;
|
|
511
515
|
key = "btnBezKoz";
|
|
512
516
|
tooltip = "Bez Koz";
|
|
513
517
|
value = 'a';
|
|
518
|
+
htmlEntity = 'BA';
|
|
514
519
|
}
|
|
515
520
|
class AnnounceVsichkoKoz {
|
|
516
521
|
id = exports.BidTrump.AllTrumps;
|
|
517
522
|
key = "btnVsichkoKoz";
|
|
518
523
|
tooltip = "Vsichko Koz";
|
|
519
524
|
value = 'j';
|
|
525
|
+
htmlEntity = 'J';
|
|
520
526
|
}
|
|
521
527
|
class AnnounceKontra {
|
|
522
528
|
id = exports.BidTrump.Double;
|
|
523
529
|
key = "btnKontra";
|
|
524
530
|
tooltip = "Kontra";
|
|
525
531
|
value = 'kr';
|
|
532
|
+
htmlEntity = 'KR';
|
|
526
533
|
}
|
|
527
534
|
class AnnounceReKontra {
|
|
528
535
|
id = exports.BidTrump.ReDouble;
|
|
529
536
|
key = "btnReKontra";
|
|
530
537
|
tooltip = "Re-Kontra";
|
|
531
538
|
value = 're-kr';
|
|
539
|
+
htmlEntity = 'REKR';
|
|
532
540
|
}
|
|
533
541
|
class AnnouncePass {
|
|
534
542
|
id = exports.BidTrump.Pass;
|
|
535
543
|
key = "btnPass";
|
|
536
544
|
tooltip = "Pass";
|
|
537
545
|
value = '<span class="announce-button">pass</span>';
|
|
546
|
+
htmlEntity = 'PASS';
|
|
538
547
|
}
|
|
548
|
+
var Trumps = [
|
|
549
|
+
new AnnounceClover(),
|
|
550
|
+
new AnnounceDiamond(),
|
|
551
|
+
new AnnounceHeart(),
|
|
552
|
+
new AnnounceSpade(),
|
|
553
|
+
new AnnounceBezKoz(),
|
|
554
|
+
//new AnnounceVsichkoKoz(),
|
|
555
|
+
];
|
|
539
556
|
var AnnounceSymbols = [
|
|
540
557
|
new AnnounceClover(),
|
|
541
558
|
new AnnounceDiamond(),
|
|
@@ -547,6 +564,9 @@ var AnnounceSymbols = [
|
|
|
547
564
|
new AnnounceReKontra(),
|
|
548
565
|
new AnnouncePass()
|
|
549
566
|
];
|
|
567
|
+
function GetTrumps() {
|
|
568
|
+
return Trumps;
|
|
569
|
+
}
|
|
550
570
|
function GetAnnounceSymbols() {
|
|
551
571
|
return AnnounceSymbols;
|
|
552
572
|
}
|
|
@@ -658,7 +678,7 @@ class CardGamePlayerArea {
|
|
|
658
678
|
}
|
|
659
679
|
|
|
660
680
|
class Pile {
|
|
661
|
-
static drawAsPile(cx, pile, boardWidth, boardHeight, cardWidth, cardHeight, theme) {
|
|
681
|
+
static drawAsPile(cx, cardImagesPath, pile, boardWidth, boardHeight, cardWidth, cardHeight, theme) {
|
|
662
682
|
if (!cx) {
|
|
663
683
|
return;
|
|
664
684
|
}
|
|
@@ -678,7 +698,7 @@ class Pile {
|
|
|
678
698
|
angle = Math.PI / 4;
|
|
679
699
|
}
|
|
680
700
|
image = new Image(cardWidth, cardHeight);
|
|
681
|
-
image.src =
|
|
701
|
+
image.src = `${cardImagesPath}/${pile[c].cardIndex}.png`;
|
|
682
702
|
cx.save();
|
|
683
703
|
cx.translate(cardX, cardY);
|
|
684
704
|
cx.rotate(angle);
|
|
@@ -686,7 +706,7 @@ class Pile {
|
|
|
686
706
|
cx.restore();
|
|
687
707
|
}
|
|
688
708
|
}
|
|
689
|
-
static drawAsRound(cx, pile, boardWidth, boardHeight, cardWidth, cardHeight, theme) {
|
|
709
|
+
static drawAsRound(cx, cardImagesPath, pile, boardWidth, boardHeight, cardWidth, cardHeight, theme) {
|
|
690
710
|
if (!cx) {
|
|
691
711
|
return;
|
|
692
712
|
}
|
|
@@ -707,7 +727,7 @@ class Pile {
|
|
|
707
727
|
angle = Math.PI / 4;
|
|
708
728
|
}
|
|
709
729
|
image = new Image(cardWidth, cardHeight);
|
|
710
|
-
image.src =
|
|
730
|
+
image.src = `${cardImagesPath}/${pile[c].cardIndex}.png`;
|
|
711
731
|
cx.save();
|
|
712
732
|
cx.translate(cardX, cardY);
|
|
713
733
|
cx.rotate(angle);
|
|
@@ -810,6 +830,7 @@ exports.DarkTheme = DarkTheme;
|
|
|
810
830
|
exports.GameVariant = GameVariant;
|
|
811
831
|
exports.GetAnnounceSymbol = GetAnnounceSymbol;
|
|
812
832
|
exports.GetAnnounceSymbols = GetAnnounceSymbols;
|
|
833
|
+
exports.GetTrumps = GetTrumps;
|
|
813
834
|
exports.GreenTheme = GreenTheme;
|
|
814
835
|
exports.Helper = Helper;
|
|
815
836
|
exports.Keys = Keys;
|
package/package.json
CHANGED
package/rollup.config.mjs
CHANGED
|
@@ -8,8 +8,7 @@ const typescriptOptions = {
|
|
|
8
8
|
|
|
9
9
|
const copyOptions = {
|
|
10
10
|
targets: [
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
{ src: 'src/assets/*', dest: 'dist/assets' },
|
|
13
12
|
{ src: 'src/Type/*', dest: 'dist/cjs/Type' },
|
|
14
13
|
{ src: 'src/Dto/*', dest: 'dist/cjs/Dto' },
|
|
15
14
|
]
|