@vankosoft/game-platform 1.0.0 → 1.1.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,5 +1,5 @@
1
1
  import { PlayerPosition } from '../../Enum/playerPosition';
2
- import { BidType } from '../../Enum/bidType';
2
+ import { BidTrump } from '../../Enum/bidTrump';
3
3
 
4
4
  export interface BidDto
5
5
  {
@@ -7,6 +7,6 @@ export interface BidDto
7
7
  KontraPlayer?: PlayerPosition;
8
8
  ReKontraPlayer?: PlayerPosition;
9
9
 
10
- Type: BidType;
10
+ Trump: BidTrump;
11
11
  NextBids: BidDto[];
12
12
  }
@@ -0,0 +1,6 @@
1
+ import { BidDto } from './bidDto';
2
+
3
+ export interface BridgeBeloteBidDto extends BidDto
4
+ {
5
+
6
+ }
@@ -0,0 +1,6 @@
1
+ import { BidDto } from './bidDto';
2
+
3
+ export interface ContractBridgeBidDto extends BidDto
4
+ {
5
+ Value: number;
6
+ }
@@ -1,4 +1,4 @@
1
- export declare enum BidType {
1
+ export declare enum BidTrump {
2
2
  Pass = 0,
3
3
  Clubs = 1,
4
4
  Diamonds = 2,
@@ -1,4 +1,5 @@
1
1
  import { CardGameAnnounceSymbolModel } from '../Type/CardGameAnnounceSymbolModel';
2
- import { BidType } from '../Enum/bidType';
2
+ import { BidTrump } from '../Enum/bidTrump';
3
+ export declare function GetTrumps(): Array<CardGameAnnounceSymbolModel>;
3
4
  export declare function GetAnnounceSymbols(): Array<CardGameAnnounceSymbolModel>;
4
- export declare function GetAnnounceSymbol(symbolId: BidType): CardGameAnnounceSymbolModel;
5
+ export declare function GetAnnounceSymbol(symbolId: BidTrump): CardGameAnnounceSymbolModel;
@@ -1,9 +1,10 @@
1
- import { BidType } from '../Enum/bidType';
1
+ import { BidTrump } from '../Enum/bidTrump';
2
2
 
3
3
  export interface CardGameAnnounceSymbolModel
4
4
  {
5
- id: BidType;
5
+ id: BidTrump;
6
6
  key: string;
7
7
  tooltip: string;
8
8
  value: string;
9
+ htmlEntity: string;
9
10
  }
@@ -16,7 +16,7 @@ export * from "./Enum/cardGameTeam";
16
16
  export * from "./Enum/bridgeBeloteCardType";
17
17
  export * from "./Enum/contractBridgeCardType";
18
18
  export * from "./Enum/cardSuit";
19
- export * from "./Enum/bidType";
19
+ export * from "./Enum/bidTrump";
20
20
  export * from "./Enum/announceType";
21
21
  /**
22
22
  * Interfaces
@@ -62,6 +62,8 @@ export { CardGameDto } from "./Dto/CardGame/gameDto";
62
62
  export { CardGamePlayerDto } from "./Dto/CardGame/playerDto";
63
63
  export { CardDto } from "./Dto/CardGame/cardDto";
64
64
  export { BidDto } from "./Dto/CardGame/bidDto";
65
+ export { BridgeBeloteBidDto } from "./Dto/CardGame/bridgeBeloteBidDto";
66
+ export { ContractBridgeBidDto } from "./Dto/CardGame/contractBridgeBidDto";
65
67
  export { BridgeBeloteScoreDto } from "./Dto/CardGame/bridgeBeloteScoreDto";
66
68
  export { AnnounceDto } from "./Dto/CardGame/announceDto";
67
69
  export { ActionDto } from './Dto/Actions/actionDto';
@@ -107,7 +109,7 @@ export { CheckerArea } from "./Model/checker-area";
107
109
  export { CheckerDrag } from "./Model/checker-drag";
108
110
  export { MoveAnimation } from "./Model/move-animation";
109
111
  export { Point } from "./Model/point";
110
- export { GetAnnounceSymbols, GetAnnounceSymbol } from "./Model/announce";
112
+ export { GetTrumps, GetAnnounceSymbols, GetAnnounceSymbol } from "./Model/announce";
111
113
  export { Card } from "./Model/card";
112
114
  export { CardArea } from "./Model/card-area";
113
115
  export { CardDrag } from "./Model/card-drag";
package/dist/cjs/index.js CHANGED
@@ -266,18 +266,18 @@ exports.CardGameTeam = void 0;
266
266
  CardGameTeam[CardGameTeam["Neither"] = 2] = "Neither";
267
267
  })(exports.CardGameTeam || (exports.CardGameTeam = {}));
268
268
 
269
- exports.BidType = void 0;
270
- (function (BidType) {
271
- BidType[BidType["Pass"] = 0] = "Pass";
272
- BidType[BidType["Clubs"] = 1] = "Clubs";
273
- BidType[BidType["Diamonds"] = 2] = "Diamonds";
274
- BidType[BidType["Hearts"] = 3] = "Hearts";
275
- BidType[BidType["Spades"] = 4] = "Spades";
276
- BidType[BidType["NoTrumps"] = 5] = "NoTrumps";
277
- BidType[BidType["AllTrumps"] = 6] = "AllTrumps";
278
- BidType[BidType["Double"] = 7] = "Double";
279
- BidType[BidType["ReDouble"] = 8] = "ReDouble";
280
- })(exports.BidType || (exports.BidType = {}));
269
+ exports.BidTrump = void 0;
270
+ (function (BidTrump) {
271
+ BidTrump[BidTrump["Pass"] = 0] = "Pass";
272
+ BidTrump[BidTrump["Clubs"] = 1] = "Clubs";
273
+ BidTrump[BidTrump["Diamonds"] = 2] = "Diamonds";
274
+ BidTrump[BidTrump["Hearts"] = 3] = "Hearts";
275
+ BidTrump[BidTrump["Spades"] = 4] = "Spades";
276
+ BidTrump[BidTrump["NoTrumps"] = 5] = "NoTrumps";
277
+ BidTrump[BidTrump["AllTrumps"] = 6] = "AllTrumps";
278
+ BidTrump[BidTrump["Double"] = 7] = "Double";
279
+ BidTrump[BidTrump["ReDouble"] = 8] = "ReDouble";
280
+ })(exports.BidTrump || (exports.BidTrump = {}));
281
281
 
282
282
  exports.AnnounceType = void 0;
283
283
  (function (AnnounceType) {
@@ -483,59 +483,76 @@ class Point {
483
483
  }
484
484
 
485
485
  class AnnounceClover {
486
- id = exports.BidType.Clubs;
486
+ id = exports.BidTrump.Clubs;
487
487
  key = "btnClover";
488
488
  tooltip = "Clover";
489
489
  value = '<i class="fi fi-sr-club"></i>';
490
+ htmlEntity = '&#9827;';
490
491
  }
491
492
  class AnnounceDiamond {
492
- id = exports.BidType.Diamonds;
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 = '&#9830;';
496
498
  }
497
499
  class AnnounceHeart {
498
- id = exports.BidType.Hearts;
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 = '&#9829;';
502
505
  }
503
506
  class AnnounceSpade {
504
- id = exports.BidType.Spades;
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 = '&#9824;';
508
512
  }
509
513
  class AnnounceBezKoz {
510
- id = exports.BidType.NoTrumps;
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
- id = exports.BidType.AllTrumps;
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
- id = exports.BidType.Double;
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
- id = exports.BidType.ReDouble;
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
- id = exports.BidType.Pass;
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
  }
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vankosoft/game-platform",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "Game Platform",
5
5
  "repository": {
6
6
  "type": "git",