refactor: remove registry from Boop and Regicide index files

This commit is contained in:
hyper 2026-04-23 15:29:14 +08:00
parent 2014162819
commit f5df1c26dc
2 changed files with 71 additions and 83 deletions

View File

@ -5,38 +5,30 @@ export type {
WinnerType,
RegionType,
BoopPartMeta,
BoopPart
} from './types';
BoopPart,
} from "./types";
export type {BoopGame} from './types-extensions';
export type { BoopGame } from "./types-extensions";
// Constants
export {
BOARD_SIZE,
MAX_PIECES_PER_PLAYER,
WIN_LENGTH
} from './constants';
export { BOARD_SIZE, MAX_PIECES_PER_PLAYER, WIN_LENGTH } from "./constants";
// State
export {
createInitialState,
type BoopState
} from './state';
export { createInitialState, type BoopState } from "./state";
// Prompts
export {prompts} from './prompts';
export { prompts } from "./prompts";
// Commands
export {
registry,
start,
place as placeCmd,
boop as boopCmd,
checkWin as checkWinCmd,
checkGraduates as checkGraduatesCmd,
checkFullBoard as checkFullBoardCmd,
turn as turnCmd
} from './commands';
turn as turnCmd,
} from "./commands";
// Utils
export {
@ -45,5 +37,5 @@ export {
isCellOccupied,
getNeighborPositions,
findPartInRegion,
findPartAtPosition
} from './utils';
findPartAtPosition,
} from "./utils";

View File

@ -7,8 +7,8 @@ export type {
RegicideCardMeta,
RegicideCard,
Enemy,
GamePhase
} from './types';
GamePhase,
} from "./types";
// Constants
export {
@ -18,21 +18,17 @@ export {
ALL_SUITS,
ALL_RANKS,
FACE_CARDS,
NUMBER_CARDS
} from './constants';
NUMBER_CARDS,
} from "./constants";
// State
export {
createInitialState,
type RegicideState
} from './state';
export { createInitialState, type RegicideState } from "./state";
// Prompts
export {prompts} from './prompts';
export { prompts } from "./prompts";
// Commands
export {
registry,
play as playCmd,
playWithA as playWithACmd,
pass as passCmd,
@ -41,7 +37,7 @@ export {
checkCanPlay as checkCanPlayCmd,
checkTavernDeck as checkTavernDeckCmd,
nextTurn as nextTurnCmd,
} from './commands';
} from "./commands";
// Game
export {
@ -50,8 +46,8 @@ export {
playTurn,
handleCounterattack,
getGameStatus,
type RegicideGame
} from './game';
type RegicideGame,
} from "./game";
// Utils
export {
@ -63,5 +59,5 @@ export {
buildTavernDeck,
drawFromDeck,
isEnemyDefeated,
getPlayerHandRegionId
} from './utils';
getPlayerHandRegionId,
} from "./utils";