Files
boardgame-core/src/samples/regicide/constants.ts
T
2026-04-10 13:24:29 +08:00

37 lines
847 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import {CardRank, SuitType} from "@/samples/regicide/types";
// 敌人总数
export const ENEMY_COUNT = 12;
// 初始手牌数
export const INITIAL_HAND_SIZE = 6;
// 卡牌面值映射
export const CARD_VALUES: Record<CardRank, number> = {
'A': 1,
'2': 2,
'3': 3,
'4': 4,
'5': 5,
'6': 6,
'7': 7,
'8': 8,
'9': 9,
'10': 10,
'J': 10,
'Q': 15,
'K': 20,
};
// 所有花色
export const ALL_SUITS: SuitType[] = ['spades', 'hearts', 'diamonds', 'clubs'];
// 所有牌面值(不含大小王)
export const ALL_RANKS: CardRank[] = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K'];
// 人头牌(J/Q/K)
export const FACE_CARDS: CardRank[] = ['J', 'Q', 'K'];
// 数字牌(A-10)
export const NUMBER_CARDS: CardRank[] = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10'];