7_common.ts 459 B

12345678910111213141516171819202122232425
  1. /**
  2. * A hand for a game of Camel Cards
  3. */
  4. export type CamelCardsHand = {
  5. /** The hand the player was dealt */
  6. Hand: string,
  7. /** The amount the player bid on that hand */
  8. Bid: number
  9. /** The ranking of the hand */
  10. Rank: CamelCardRanking,
  11. };
  12. /**
  13. * The ranking of Camel Card hand types
  14. */
  15. export enum CamelCardRanking {
  16. HIGH_CARD,
  17. ONE_PAIR,
  18. TWO_PAIR,
  19. THREE_OF_A_KIND,
  20. FULL_HOUSE,
  21. FOUR_OF_A_KIND,
  22. FIVE_OF_A_KIND,
  23. }