feat: regicide code

This commit is contained in:
hyper
2026-04-10 13:24:29 +08:00
parent 8b271448d2
commit 28e548d3de
7 changed files with 426 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
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'];