@hellacardgames/speed 0.7.0 → 0.8.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.
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.mts +2 -2
- package/dist/{index-BRtLpRz1.d.mts → index-CVbiOmI3.d.mts} +2 -2
- package/dist/{index-BRtLpRz1.d.mts.map → index-CVbiOmI3.d.mts.map} +1 -1
- package/dist/{index-BvZyhFek.d.cts → index-DOimW07r.d.cts} +2 -2
- package/dist/{index-BvZyhFek.d.cts.map → index-DOimW07r.d.cts.map} +1 -1
- package/dist/{index-xmcja9Bl.d.cts → index-DlRknHKq.d.cts} +39 -39
- package/dist/index-DlRknHKq.d.cts.map +1 -0
- package/dist/{index-xmcja9Bl.d.mts → index-DlRknHKq.d.mts} +39 -39
- package/dist/index-DlRknHKq.d.mts.map +1 -0
- package/dist/manager/index.cjs +1 -1
- package/dist/manager/index.d.cts +1 -1
- package/dist/manager/index.d.mts +1 -1
- package/dist/manager/index.mjs +1 -1
- package/dist/manager-0r8lvLRR.cjs +907 -0
- package/dist/manager-0r8lvLRR.cjs.map +1 -0
- package/dist/manager-B32oi0dB.mjs +902 -0
- package/dist/manager-B32oi0dB.mjs.map +1 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +2 -2
- package/dist/server/index.d.mts +2 -2
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/index-xmcja9Bl.d.cts.map +0 -1
- package/dist/index-xmcja9Bl.d.mts.map +0 -1
- package/dist/manager-8x5AFyzq.mjs +0 -790
- package/dist/manager-8x5AFyzq.mjs.map +0 -1
- package/dist/manager-BxLMVu_o.cjs +0 -795
- package/dist/manager-BxLMVu_o.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager-B32oi0dB.mjs","names":["emitEvent","getEventsAndClearAcknowledged","doGetEventsAndClearAcknowledged","getEventsAndClearAcknowledged"],"sources":["../src/game/constants.ts","../src/game/actions/createGame.ts","../src/game/lib/emitEvent.ts","../src/game/lib/emitEventToPlayer.ts","../src/game/actions/drawCard.ts","../src/game/actions/getClientStateAndClearEvents.ts","../src/game/actions/getEventsAndClearAcknowledged.ts","../src/game/actions/joinGame.ts","../src/game/actions/leaveGame.ts","../src/game/lib/isCardPlayable.ts","../src/game/lib/hasPlayableCard.ts","../src/game/actions/playCard.ts","../src/game/lib/shuffleCards.ts","../src/game/actions/reportNoPlayableCards.ts","../src/game/actions/sendChat.ts","../src/game/actions/startGame.ts","../src/manager/Manager.ts"],"sourcesContent":["import type { Card } from \"./types/Card.js\";\n\nexport const EXPIRY_EXTENSION_MS = 300000; // 5 minutes\nexport const MIN_PLAYERS = 2;\nexport const MAX_PLAYERS = 2;\nexport const MAX_HAND_SIZE = 5;\nexport const CAN_PLAY_AT_DELAY_MS = 3000;\n\nexport const CARDS: readonly Card[] = [\n { id: crypto.randomUUID(), rank: 2, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 3, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 4, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 5, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 6, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 7, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 8, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 9, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 10, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 11, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 12, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 13, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 14, suite: \"clubs\" },\n { id: crypto.randomUUID(), rank: 2, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 3, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 4, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 5, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 6, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 7, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 8, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 9, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 10, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 11, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 12, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 13, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 14, suite: \"diamonds\" },\n { id: crypto.randomUUID(), rank: 2, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 3, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 4, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 5, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 6, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 7, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 8, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 9, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 10, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 11, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 12, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 13, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 14, suite: \"hearts\" },\n { id: crypto.randomUUID(), rank: 2, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 3, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 4, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 5, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 6, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 7, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 8, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 9, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 10, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 11, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 12, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 13, suite: \"spades\" },\n { id: crypto.randomUUID(), rank: 14, suite: \"spades\" },\n];\n","import { EXPIRY_EXTENSION_MS } from \"../constants.js\";\nimport type { CreatedGame } from \"../types/Game.js\";\nimport type { Player } from \"../types/Player.js\";\n\ntype CreateGameResult = {\n readonly game: CreatedGame;\n readonly playerId: string;\n};\n\nexport function createGame(userId: string, username: string): CreateGameResult {\n const player: Player = {\n id: crypto.randomUUID(),\n userId,\n username,\n events: [],\n hand: [],\n drawPile: [],\n sidePile: [],\n centerPile: [],\n hasNoPlayableCards: false,\n };\n\n const createdAt = Date.now();\n\n const game: CreatedGame = {\n status: \"created\",\n id: crypto.randomUUID(),\n createdAt,\n expiresAt: createdAt + EXPIRY_EXTENSION_MS,\n chatMessages: [],\n players: [player],\n };\n\n return { game, playerId: player.id };\n}\n","type Game = {\n readonly players: {\n readonly events: { readonly id: string }[];\n }[];\n};\n\ntype OmitId<T> = T extends unknown ? Omit<T, \"id\"> : never;\n\nexport function emitEvent<T extends Game>(\n game: T,\n data: OmitId<T[\"players\"][number][\"events\"][number]>,\n): void {\n const event = { ...data, id: crypto.randomUUID() };\n for (const p of game.players) {\n p.events.push(event);\n }\n}\n","type Player = {\n readonly events: { readonly id: string }[];\n};\n\ntype OmitId<T> = T extends unknown ? Omit<T, \"id\"> : never;\n\nexport function emitEventToPlayer<T extends Player>(\n player: T,\n data: OmitId<T[\"events\"][number]>,\n): void {\n player.events.push({ ...data, id: crypto.randomUUID() });\n}\n","import { emitEvent } from \"../lib/emitEvent.js\";\nimport { emitEventToPlayer } from \"../lib/emitEventToPlayer.js\";\nimport { EXPIRY_EXTENSION_MS, MAX_HAND_SIZE } from \"../constants.js\";\nimport type { StartedGame } from \"../types/Game.js\";\n\ntype DrawCardResult =\n | {\n readonly success: true;\n readonly game: StartedGame;\n }\n | {\n readonly success: false;\n readonly error:\n \"playerNotFound\" | \"canPlayAtNotReached\" | \"handFull\" | \"drawPileEmpty\";\n };\n\nexport function drawCard(game: StartedGame, playerId: string): DrawCardResult {\n const player = game.players.find((p) => p.id === playerId);\n if (!player) {\n return { success: false, error: \"playerNotFound\" };\n }\n if (Date.now() < game.canPlayAt) {\n return { success: false, error: \"canPlayAtNotReached\" };\n }\n if (player.hand.length >= MAX_HAND_SIZE) {\n return { success: false, error: \"handFull\" };\n }\n if (player.drawPile.length === 0) {\n return { success: false, error: \"drawPileEmpty\" };\n }\n game.expiresAt = Date.now() + EXPIRY_EXTENSION_MS;\n emitEvent(game, { type: \"expirationUpdated\", expiresAt: game.expiresAt });\n const card = player.drawPile.pop()!;\n player.hand.push(card);\n emitEventToPlayer(player, { type: \"drewCard\", card });\n emitEvent(game, { type: \"playerDrewCard\", username: player.username });\n return { success: true, game };\n}\n","import type { ClientState } from \"../types/ClientState.js\";\nimport type { Game } from \"../types/Game.js\";\n\ntype GetClientStateAndClearEventsResult =\n | {\n readonly success: true;\n readonly state: ClientState;\n readonly game: Game;\n }\n | {\n readonly success: false;\n readonly error: \"playerNotFound\";\n };\n\nexport function getClientStateAndClearEvents(\n game: Game,\n playerId: string,\n): GetClientStateAndClearEventsResult {\n const player = game.players.find((p) => p.id === playerId);\n if (!player) {\n return { success: false, error: \"playerNotFound\" };\n }\n const state: ClientState = {\n status: game.status,\n gameId: game.id,\n playerId,\n username: player.username,\n players: game.players.map((p) => ({\n username: p.username,\n handSize: p.hand.length,\n drawPileSize: p.drawPile.length,\n sidePileSize: p.sidePile.length,\n centerPileTopCard: p.centerPile.length\n ? p.centerPile[p.centerPile.length - 1]!\n : null,\n })),\n expiresAt: game.expiresAt,\n chatMessages: game.chatMessages,\n hand: player.hand,\n canPlayAt: game.status === \"started\" ? game.canPlayAt : null,\n };\n player.events.length = 0;\n return { success: true, state, game };\n}\n","import { getEventsAndClearAcknowledged as doGetEventsAndClearAcknowledged } from \"@hellacardgames/lib\";\nimport type { Game } from \"../types/Game.js\";\nimport type { GameEvent } from \"../types/GameEvent.js\";\n\ntype GetEventsAndClearAcknowledgedResult =\n | {\n readonly success: true;\n readonly events: readonly GameEvent[];\n readonly game: Game;\n }\n | {\n readonly success: false;\n readonly error: \"playerNotFound\";\n };\n\nexport function getEventsAndClearAcknowledged(\n game: Game,\n playerId: string,\n lastReadId: string | null,\n): GetEventsAndClearAcknowledgedResult {\n const player = game.players.find((p) => p.id === playerId);\n if (!player) {\n return { success: false, error: \"playerNotFound\" };\n }\n\n const result = doGetEventsAndClearAcknowledged(game, player.id, lastReadId);\n\n return {\n success: true,\n events: result.events,\n game: result.game,\n };\n}\n","import { emitEvent } from \"../lib/emitEvent.js\";\nimport { MAX_PLAYERS } from \"../constants.js\";\nimport type { CreatedGame } from \"../types/Game.js\";\nimport type { Player } from \"../types/Player.js\";\n\ntype JoinGameResult =\n | {\n readonly success: true;\n readonly game: CreatedGame;\n readonly playerId: string;\n }\n | {\n readonly success: false;\n readonly error: \"maxPlayersReached\" | \"alreadyInGame\";\n };\n\nexport function joinGame(\n game: CreatedGame,\n userId: string,\n username: string,\n): JoinGameResult {\n if (game.players.length === MAX_PLAYERS) {\n return { success: false, error: \"maxPlayersReached\" };\n }\n if (game.players.find((p) => p.userId === userId)) {\n return { success: false, error: \"alreadyInGame\" };\n }\n const player: Player = {\n id: crypto.randomUUID(),\n userId,\n username,\n events: [],\n hand: [],\n drawPile: [],\n sidePile: [],\n centerPile: [],\n hasNoPlayableCards: false,\n };\n game.players.push(player);\n emitEvent(game, { type: \"playerJoined\", username });\n return { success: true, game, playerId: player.id };\n}\n","import { emitEvent } from \"../lib/emitEvent.js\";\nimport { EXPIRY_EXTENSION_MS, MIN_PLAYERS } from \"../constants.js\";\nimport type { Game } from \"../types/Game.js\";\n\ntype LeaveGameResult =\n | {\n readonly success: true;\n readonly game: Game;\n }\n | {\n readonly success: false;\n readonly error: \"playerNotFound\";\n };\n\nexport function leaveGame(game: Game, playerId: string): LeaveGameResult {\n const playerIndex = game.players.findIndex((p) => p.id === playerId);\n if (playerIndex === -1) {\n return { success: false, error: \"playerNotFound\" };\n }\n\n const player = game.players[playerIndex]!;\n emitEvent(game, { type: \"playerLeft\", username: player.username });\n\n game.players.splice(playerIndex, 1);\n\n if (game.status === \"started\" && game.players.length < MIN_PLAYERS) {\n const forfeitedGame: Game = {\n ...game,\n status: \"forfeited\",\n expiresAt: Date.now() + EXPIRY_EXTENSION_MS,\n };\n // this.games.set(game.id, forfeitedGame);\n emitEvent(forfeitedGame, { type: \"gameForfeited\" });\n emitEvent(forfeitedGame, {\n type: \"expirationUpdated\",\n expiresAt: forfeitedGame.expiresAt,\n });\n }\n return { success: true, game };\n}\n","import type { Card } from \"../types/Card.js\";\n\nexport function isCardPlayable(card: Card, targetPile: Card[]) {\n const targetCard = targetPile[targetPile.length - 1]!;\n const diff = Math.abs(card.rank - targetCard.rank) % 11;\n return diff === 1;\n}\n","import { isCardPlayable } from \"./isCardPlayable.js\";\nimport type { Game } from \"../types/Game.js\";\nimport type { Player } from \"../types/Player.js\";\n\nexport function hasPlayableCard(player: Player, game: Game) {\n const otherPlayer = game.players.find((p) => p !== player)!;\n const targetPile1 = player.centerPile;\n const targetPile2 = otherPlayer.centerPile;\n for (const card of player.hand) {\n if (\n isCardPlayable(card, targetPile1) ||\n isCardPlayable(card, targetPile2)\n ) {\n return true;\n }\n }\n return false;\n}\n","import { emitEvent } from \"../lib/emitEvent.js\";\nimport { EXPIRY_EXTENSION_MS } from \"../constants.js\";\nimport { hasPlayableCard } from \"../lib/hasPlayableCard.js\";\nimport { isCardPlayable } from \"../lib/isCardPlayable.js\";\nimport type { CompletedGame, StartedGame } from \"../types/Game.js\";\n\ntype PlayCardResult =\n | {\n readonly success: true;\n readonly game: StartedGame | CompletedGame;\n }\n | {\n readonly success: false;\n readonly error:\n | \"playerNotFound\"\n | \"canPlayAtNotReached\"\n | \"cardNotFound\"\n | \"cardNotPlayable\";\n };\n\nexport function playCard(\n game: StartedGame,\n playerId: string,\n cardId: string,\n isForOtherPlayerPile: boolean,\n): PlayCardResult {\n const player = game.players.find((p) => p.id === playerId);\n if (!player) {\n return { success: false, error: \"playerNotFound\" };\n }\n if (Date.now() < game.canPlayAt) {\n return { success: false, error: \"canPlayAtNotReached\" };\n }\n const cardIndex = player.hand.findIndex((c) => c.id === cardId);\n if (cardIndex === -1) {\n return { success: false, error: \"cardNotFound\" };\n }\n const otherPlayer = game.players.find((p) => p !== player)!;\n const targetPile = isForOtherPlayerPile\n ? otherPlayer.centerPile\n : player.centerPile;\n const card = player.hand[cardIndex]!;\n if (!isCardPlayable(card, targetPile)) {\n return { success: false, error: \"cardNotPlayable\" };\n }\n\n game.expiresAt = Date.now() + EXPIRY_EXTENSION_MS;\n emitEvent(game, { type: \"expirationUpdated\", expiresAt: game.expiresAt });\n\n player.hand.splice(cardIndex, 1);\n targetPile.push(card);\n emitEvent(game, {\n type: \"cardPlayed\",\n username: player.username,\n card,\n isForOtherPlayerPile,\n });\n\n if (otherPlayer.hasNoPlayableCards && hasPlayableCard(otherPlayer, game)) {\n otherPlayer.hasNoPlayableCards = false;\n }\n\n if (player.hand.length === 0 && player.drawPile.length === 0) {\n emitEvent(game, { type: \"gameCompleted\" });\n const completedGame: CompletedGame = {\n ...game,\n status: \"completed\",\n };\n return { success: true, game: completedGame };\n }\n\n return { success: true, game };\n}\n","type Card = { readonly id: string };\n\nexport function shuffleCards<T extends Card>(cards: T[]): void {\n for (let i = cards.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [cards[i], cards[j]] = [cards[j]!, cards[i]!];\n }\n}\n","import { emitEvent } from \"../lib/emitEvent.js\";\nimport { shuffleCards } from \"../lib/shuffleCards.js\";\nimport {\n CAN_PLAY_AT_DELAY_MS,\n EXPIRY_EXTENSION_MS,\n MAX_HAND_SIZE,\n} from \"../constants.js\";\nimport { hasPlayableCard } from \"../lib/hasPlayableCard.js\";\nimport type { StartedGame } from \"../types/Game.js\";\n\ntype ReportNoPlayableCardsResult =\n | {\n readonly success: true;\n readonly game: StartedGame;\n }\n | {\n readonly success: false;\n readonly error:\n | \"playerNotFound\"\n | \"canPlayAtNotReached\"\n | \"alreadyReported\"\n | \"hasPlayableCard\"\n | \"canDraw\";\n };\n\nexport function reportNoPlayableCards(\n game: StartedGame,\n playerId: string,\n): ReportNoPlayableCardsResult {\n const player = game.players.find((p) => p.id === playerId);\n if (!player) {\n return { success: false, error: \"playerNotFound\" };\n }\n if (Date.now() < game.canPlayAt) {\n return { success: false, error: \"canPlayAtNotReached\" };\n }\n if (player.hasNoPlayableCards) {\n return { success: false, error: \"alreadyReported\" };\n }\n if (hasPlayableCard(player, game)) {\n return { success: false, error: \"hasPlayableCard\" };\n }\n if (player.drawPile.length > 0 && player.hand.length < MAX_HAND_SIZE) {\n return { success: false, error: \"canDraw\" };\n }\n\n game.expiresAt = Date.now() + EXPIRY_EXTENSION_MS;\n emitEvent(game, { type: \"expirationUpdated\", expiresAt: game.expiresAt });\n\n player.hasNoPlayableCards = true;\n\n const otherPlayer = game.players.find((p) => p !== player)!;\n if (otherPlayer.hasNoPlayableCards) {\n if (player.sidePile.length === 0 && otherPlayer.sidePile.length === 0) {\n const cards = [...player.centerPile, ...otherPlayer.centerPile];\n shuffleCards(cards);\n player.sidePile.push(...cards.splice(0, 5));\n emitEvent(game, {\n type: \"playerSidePileInitialized\",\n username: player.username,\n numCards: player.sidePile.length,\n });\n player.centerPile.push(...cards.splice(0, 1));\n emitEvent(game, {\n type: \"playerCenterPileInitialized\",\n username: player.username,\n card: player.centerPile[player.centerPile.length - 1]!,\n });\n otherPlayer.centerPile.push(...cards.splice(0, 1));\n emitEvent(game, {\n type: \"playerCenterPileInitialized\",\n username: otherPlayer.username,\n card: otherPlayer.centerPile[otherPlayer.centerPile.length - 1]!,\n });\n otherPlayer.sidePile.push(...cards.splice(0, 5));\n emitEvent(game, {\n type: \"playerSidePileInitialized\",\n username: otherPlayer.username,\n numCards: otherPlayer.sidePile.length,\n });\n } else {\n const playerSidePileCard = player.sidePile.pop()!;\n player.centerPile.push(playerSidePileCard);\n emitEvent(game, {\n type: \"cardDrawnFromSidePileToCenterPile\",\n username: player.username,\n card: playerSidePileCard,\n });\n const otherPlayerSidePileCard = otherPlayer.sidePile.pop()!;\n otherPlayer.centerPile.push(otherPlayerSidePileCard);\n emitEvent(game, {\n type: \"cardDrawnFromSidePileToCenterPile\",\n username: otherPlayer.username,\n card: otherPlayerSidePileCard,\n });\n }\n player.hasNoPlayableCards = false;\n otherPlayer.hasNoPlayableCards = false;\n game.canPlayAt = Date.now() + CAN_PLAY_AT_DELAY_MS;\n emitEvent(game, {\n type: \"canPlayAtUpdated\",\n canPlayAt: game.canPlayAt,\n });\n }\n\n return { success: true, game };\n}\n","import { addItemToCollection, emitEvent } from \"@hellacardgames/lib\";\nimport type { ChatMessage } from \"../types/ChatMessage.js\";\nimport type { Game } from \"../types/Game.js\";\n\ntype SendChatResult =\n | {\n readonly success: true;\n readonly game: Game;\n }\n | {\n readonly success: false;\n readonly error: \"playerNotFound\";\n };\n\nexport function sendChat(\n game: Game,\n playerId: string,\n text: string,\n): SendChatResult {\n const player = game.players.find((p) => p.id === playerId);\n if (!player) {\n return { success: false, error: \"playerNotFound\" };\n }\n\n const message: ChatMessage = {\n id: crypto.randomUUID(),\n username: player.username,\n text,\n };\n\n game = {\n ...game,\n chatMessages: addItemToCollection(game.chatMessages, message),\n };\n\n game = emitEvent(game, { type: \"chat\", message });\n\n return { success: true, game };\n}\n","import { emitEvent } from \"../lib/emitEvent.js\";\nimport { emitEventToPlayer } from \"../lib/emitEventToPlayer.js\";\nimport { shuffleCards } from \"../lib/shuffleCards.js\";\nimport {\n CAN_PLAY_AT_DELAY_MS,\n CARDS,\n EXPIRY_EXTENSION_MS,\n MIN_PLAYERS,\n} from \"../constants.js\";\nimport type { CreatedGame, StartedGame } from \"../types/Game.js\";\n\ntype StartGameResult =\n | {\n readonly success: true;\n readonly game: StartedGame;\n }\n | {\n readonly success: false;\n readonly error:\n \"playerNotFound\" | \"playerNotAdmin\" | \"minPlayersNotReached\";\n };\n\nexport function startGame(\n game: CreatedGame,\n playerId: string,\n): StartGameResult {\n const player = game.players.find((p) => p.id === playerId);\n if (!player) {\n return { success: false, error: \"playerNotFound\" };\n }\n if (game.players.indexOf(player) !== 0) {\n return { success: false, error: \"playerNotAdmin\" };\n }\n if (game.players.length < MIN_PLAYERS) {\n return { success: false, error: \"minPlayersNotReached\" };\n }\n const otherPlayer = game.players[1]!;\n const cards = [...CARDS];\n shuffleCards(cards);\n\n player.sidePile.push(...cards.splice(0, 5));\n emitEvent(game, {\n type: \"playerSidePileInitialized\",\n username: player.username,\n numCards: player.sidePile.length,\n });\n\n player.centerPile.push(...cards.splice(0, 1));\n emitEvent(game, {\n type: \"playerCenterPileInitialized\",\n username: player.username,\n card: player.centerPile[player.centerPile.length - 1]!,\n });\n\n otherPlayer.centerPile.push(...cards.splice(0, 1));\n emitEvent(game, {\n type: \"playerCenterPileInitialized\",\n username: otherPlayer.username,\n card: otherPlayer.centerPile[otherPlayer.centerPile.length - 1]!,\n });\n\n otherPlayer.sidePile.push(...cards.splice(0, 5));\n emitEvent(game, {\n type: \"playerSidePileInitialized\",\n username: otherPlayer.username,\n numCards: otherPlayer.sidePile.length,\n });\n\n player.drawPile.push(...cards.splice(0, 15));\n emitEvent(game, {\n type: \"playerDrawPileInitialized\",\n username: player.username,\n numCards: player.drawPile.length,\n });\n\n player.hand.push(...cards.splice(0, 5));\n emitEventToPlayer(player, { type: \"handInitialized\", cards: player.hand });\n emitEvent(game, {\n type: \"playerHandInitialized\",\n username: player.username,\n numCards: player.hand.length,\n });\n\n otherPlayer.drawPile.push(...cards.splice(0, 15));\n emitEvent(game, {\n type: \"playerDrawPileInitialized\",\n username: otherPlayer.username,\n numCards: otherPlayer.drawPile.length,\n });\n\n otherPlayer.hand.push(...cards.splice(0, 5));\n emitEventToPlayer(otherPlayer, {\n type: \"handInitialized\",\n cards: otherPlayer.hand,\n });\n emitEvent(game, {\n type: \"playerHandInitialized\",\n username: otherPlayer.username,\n numCards: otherPlayer.hand.length,\n });\n\n const startedGame: StartedGame = {\n ...game,\n status: \"started\",\n expiresAt: Date.now() + EXPIRY_EXTENSION_MS,\n canPlayAt: Date.now() + CAN_PLAY_AT_DELAY_MS,\n };\n // this.games.set(game.id, startedGame);\n emitEvent(startedGame, { type: \"gameStarted\" });\n emitEvent(startedGame, {\n type: \"expirationUpdated\",\n expiresAt: startedGame.expiresAt,\n });\n emitEvent(startedGame, {\n type: \"canPlayAtUpdated\",\n canPlayAt: startedGame.canPlayAt,\n });\n return { success: true, game: startedGame };\n}\n","import { ManagerBase } from \"@hellacardgames/lib\";\nimport {\n createGame,\n drawCard,\n getClientStateAndClearEvents,\n getEventsAndClearAcknowledged,\n joinGame,\n leaveGame,\n MAX_PLAYERS,\n playCard,\n reportNoPlayableCards,\n sendChat,\n startGame,\n} from \"../game/index.js\";\nimport type { ClientState, Game, GameEvent } from \"../game/index.js\";\n\nexport type CreateGameResult =\n | {\n readonly success: true;\n readonly gameId: string;\n readonly playerId: string;\n }\n | {\n readonly success: false;\n readonly error: \"maxGamesReached\";\n };\n\nexport type DrawCardResult =\n | {\n readonly success: true;\n }\n | {\n readonly success: false;\n readonly error:\n | \"gameNotFound\"\n | \"playerNotFound\"\n | \"invalidStatus\"\n | \"canPlayAtNotReached\"\n | \"handFull\"\n | \"drawPileEmpty\";\n };\n\nexport type GetClientStateAndClearEventsResult =\n | {\n readonly success: true;\n readonly state: ClientState;\n }\n | {\n readonly success: false;\n readonly error: \"gameNotFound\" | \"playerNotFound\";\n };\n\nexport type GetEventsAndClearAcknowledgedResult =\n | {\n readonly success: true;\n readonly events: readonly GameEvent[];\n }\n | {\n readonly success: false;\n readonly error: \"gameNotFound\" | \"playerNotFound\";\n };\n\nexport type GetJoinableGamesResult = {\n readonly games: readonly {\n readonly id: string;\n readonly numPlayers: number;\n }[];\n};\n\nexport type JoinGameResult =\n | {\n readonly success: true;\n readonly playerId: string;\n }\n | {\n readonly success: false;\n readonly error:\n | \"gameNotFound\"\n | \"invalidStatus\"\n | \"maxPlayersReached\"\n | \"alreadyInGame\";\n };\n\nexport type LeaveGameResult =\n | {\n readonly success: true;\n }\n | {\n readonly success: false;\n readonly error: \"gameNotFound\" | \"playerNotFound\";\n };\n\nexport type PlayCardResult =\n | {\n readonly success: true;\n }\n | {\n readonly success: false;\n readonly error:\n | \"gameNotFound\"\n | \"playerNotFound\"\n | \"invalidStatus\"\n | \"canPlayAtNotReached\"\n | \"cardNotFound\"\n | \"cardNotPlayable\";\n };\n\nexport type ReportNoPlayableCardsResult =\n | {\n readonly success: true;\n }\n | {\n readonly success: false;\n readonly error:\n | \"gameNotFound\"\n | \"playerNotFound\"\n | \"invalidStatus\"\n | \"canPlayAtNotReached\"\n | \"alreadyReported\"\n | \"hasPlayableCard\"\n | \"canDraw\";\n };\n\nexport type SendChatResult =\n | {\n readonly success: true;\n }\n | {\n readonly success: false;\n readonly error: \"gameNotFound\" | \"playerNotFound\";\n };\n\nexport type StartGameResult =\n | {\n readonly success: true;\n }\n | {\n readonly success: false;\n readonly error:\n | \"gameNotFound\"\n | \"invalidStatus\"\n | \"playerNotFound\"\n | \"playerNotAdmin\"\n | \"minPlayersNotReached\";\n };\n\nexport class Manager extends ManagerBase<Game> {\n createGame(userId: string, username: string): CreateGameResult {\n if (this.games.size === this.maxGames) {\n return { success: false, error: \"maxGamesReached\" };\n }\n const result = createGame(userId, username);\n this.games.set(result.game.id, result.game);\n return { success: true, gameId: result.game.id, playerId: result.playerId };\n }\n\n drawCard(gameId: string, playerId: string): DrawCardResult {\n const game = this.games.get(gameId);\n if (!game) {\n return { success: false, error: \"gameNotFound\" };\n }\n if (game.status !== \"started\") {\n return { success: false, error: \"invalidStatus\" };\n }\n const result = drawCard(game, playerId);\n if (!result.success) {\n return result;\n }\n this.games.set(gameId, result.game);\n return { success: true };\n }\n\n getClientStateAndClearEvents(\n gameId: string,\n playerId: string,\n ): GetClientStateAndClearEventsResult {\n const game = this.games.get(gameId);\n if (!game) {\n return { success: false, error: \"gameNotFound\" };\n }\n const result = getClientStateAndClearEvents(game, playerId);\n if (!result.success) {\n return result;\n }\n this.games.set(gameId, result.game);\n return { success: true, state: result.state };\n }\n\n getEventsAndClearAcknowledged(\n gameId: string,\n playerId: string,\n lastReadId: string | null,\n ): GetEventsAndClearAcknowledgedResult {\n const game = this.games.get(gameId);\n if (!game) {\n return { success: false, error: \"gameNotFound\" };\n }\n const result = getEventsAndClearAcknowledged(game, playerId, lastReadId);\n if (!result.success) {\n return result;\n }\n this.games.set(gameId, result.game);\n return { success: true, events: result.events };\n }\n\n getJoinableGames(): GetJoinableGamesResult {\n return {\n games: Array.from(this.games.values())\n .filter((g) => g.status === \"created\" && g.players.length < MAX_PLAYERS)\n .map((g) => ({\n id: g.id,\n numPlayers: g.players.length,\n })),\n };\n }\n\n joinGame(gameId: string, userId: string, username: string): JoinGameResult {\n const game = this.games.get(gameId);\n if (!game) {\n return { success: false, error: \"gameNotFound\" };\n }\n if (game.status !== \"created\") {\n return { success: false, error: \"invalidStatus\" };\n }\n const result = joinGame(game, userId, username);\n if (!result.success) {\n return result;\n }\n this.games.set(gameId, result.game);\n return { success: true, playerId: result.playerId };\n }\n\n leaveGame(gameId: string, playerId: string): LeaveGameResult {\n const game = this.games.get(gameId);\n if (!game) {\n return { success: false, error: \"gameNotFound\" };\n }\n const result = leaveGame(game, playerId);\n if (!result.success) {\n return result;\n }\n if (result.game.players.length > 0) {\n this.games.set(gameId, result.game);\n } else {\n this.games.delete(gameId);\n }\n return { success: true };\n }\n\n playCard(\n gameId: string,\n playerId: string,\n cardId: string,\n isForOtherPlayerPile: boolean,\n ): PlayCardResult {\n const game = this.games.get(gameId);\n if (!game) {\n return { success: false, error: \"gameNotFound\" };\n }\n if (game.status !== \"started\") {\n return { success: false, error: \"invalidStatus\" };\n }\n const result = playCard(game, playerId, cardId, isForOtherPlayerPile);\n if (!result.success) {\n return result;\n }\n this.games.set(gameId, result.game);\n return { success: true };\n }\n\n reportNoPlayableCards(\n gameId: string,\n playerId: string,\n ): ReportNoPlayableCardsResult {\n const game = this.games.get(gameId);\n if (!game) {\n return { success: false, error: \"gameNotFound\" };\n }\n if (game.status !== \"started\") {\n return { success: false, error: \"invalidStatus\" };\n }\n const result = reportNoPlayableCards(game, playerId);\n if (!result.success) {\n return result;\n }\n this.games.set(gameId, result.game);\n return { success: true };\n }\n\n sendChat(gameId: string, playerId: string, text: string): SendChatResult {\n const game = this.games.get(gameId);\n if (!game) {\n return { success: false, error: \"gameNotFound\" };\n }\n const result = sendChat(game, playerId, text);\n if (!result.success) {\n return result;\n }\n this.games.set(gameId, result.game);\n return { success: true };\n }\n\n startGame(gameId: string, playerId: string): StartGameResult {\n const game = this.games.get(gameId);\n if (!game) {\n return { success: false, error: \"gameNotFound\" };\n }\n if (game.status !== \"created\") {\n return { success: false, error: \"invalidStatus\" };\n }\n const result = startGame(game, playerId);\n if (!result.success) {\n return result;\n }\n this.games.set(gameId, result.game);\n return { success: true };\n }\n}\n"],"mappings":";;AAEA,MAAa,sBAAsB;AAInC,MAAa,uBAAuB;AAEpC,MAAa,QAAyB;CACpC;EAAE,IAAI,OAAO,WAAW;EAAG,MAAM;EAAG,OAAO;CAAQ;CACnD;EAAE,IAAI,OAAO,WAAW;EAAG,MAAM;EAAG,OAAO;CAAQ;CACnD;EAAE,IAAI,OAAO,WAAW;EAAG,MAAM;EAAG,OAAO;CAAQ;CACnD;EAAE,IAAI,OAAO,WAAW;EAAG,MAAM;EAAG,OAAO;CAAQ;CACnD;EAAE,IAAI,OAAO,WAAW;EAAG,MAAM;EAAG,OAAO;CAAQ;CACnD;EAAE,IAAI,OAAO,WAAW;EAAG,MAAM;EAAG,OAAO;CAAQ;CACnD;EAAE,IAAI,OAAO,WAAW;EAAG,MAAM;EAAG,OAAO;CAAQ;CACnD;EAAE,IAAI,OAAO,WAAW;EAAG,MAAM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C,MACH,OAAO;GAAE,SAAS;GAAO,OAAO;EAAe;EAEjD,IAAI,KAAK,WAAW,WAClB,OAAO;GAAE,SAAS;GAAO,OAAO;EAAgB;EAElD,MAAM,SAAS,sBAAsB,MAAM,QAAQ;EACnD,IAAI,CAAC,OAAO,SACV,OAAO;EAET,KAAK,MAAM,IAAI,QAAQ,OAAO,IAAI;EAClC,OAAO,EAAE,SAAS,KAAK;CACzB;CAEA,SAAS,QAAgB,UAAkB,MAA8B;EACvE,MAAM,OAAO,KAAK,MAAM,IAAI,MAAM;EAClC,IAAI,CAAC,MACH,OAAO;GAAE,SAAS;GAAO,OAAO;EAAe;EAEjD,MAAM,SAAS,SAAS,MAAM,UAAU,IAAI;EAC5C,IAAI,CAAC,OAAO,SACV,OAAO;EAET,KAAK,MAAM,IAAI,QAAQ,OAAO,IAAI;EAClC,OAAO,EAAE,SAAS,KAAK;CACzB;CAEA,UAAU,QAAgB,UAAmC;EAC3D,MAAM,OAAO,KAAK,MAAM,IAAI,MAAM;EAClC,IAAI,CAAC,MACH,OAAO;GAAE,SAAS;GAAO,OAAO;EAAe;EAEjD,IAAI,KAAK,WAAW,WAClB,OAAO;GAAE,SAAS;GAAO,OAAO;EAAgB;EAElD,MAAM,SAAS,UAAU,MAAM,QAAQ;EACvC,IAAI,CAAC,OAAO,SACV,OAAO;EAET,KAAK,MAAM,IAAI,QAAQ,OAAO,IAAI;EAClC,OAAO,EAAE,SAAS,KAAK;CACzB;AACF"}
|
package/dist/server/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_manager = require("../manager-
|
|
2
|
+
const require_manager = require("../manager-0r8lvLRR.cjs");
|
|
3
3
|
let zod = require("zod");
|
|
4
4
|
//#region src/server/Server.ts
|
|
5
5
|
const drawCardInputSchema = zod.z.object({
|
package/dist/server/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { g as Card, h as ChatMessage, m as
|
|
2
|
-
import { a as GetJoinableGamesResult, c as PlayCardResult, d as Server, f as StartGameResult, i as GetEventsAndClearAcknowledgedResult, l as ReportNoPlayableCardsResult, n as DrawCardResult, o as JoinGameResult, r as GetClientStateAndClearEventsResult, s as LeaveGameResult, t as CreateGameResult, u as SendChatResult } from "../index-
|
|
1
|
+
import { g as Card, h as ChatMessage, m as GameEvent, p as ClientState } from "../index-DlRknHKq.cjs";
|
|
2
|
+
import { a as GetJoinableGamesResult, c as PlayCardResult, d as Server, f as StartGameResult, i as GetEventsAndClearAcknowledgedResult, l as ReportNoPlayableCardsResult, n as DrawCardResult, o as JoinGameResult, r as GetClientStateAndClearEventsResult, s as LeaveGameResult, t as CreateGameResult, u as SendChatResult } from "../index-DOimW07r.cjs";
|
|
3
3
|
export { type Card, type ChatMessage, type ClientState, type CreateGameResult, type DrawCardResult, type GameEvent, type GetClientStateAndClearEventsResult, type GetEventsAndClearAcknowledgedResult, type GetJoinableGamesResult, type JoinGameResult, type LeaveGameResult, type PlayCardResult, type ReportNoPlayableCardsResult, type SendChatResult, Server, type StartGameResult };
|
package/dist/server/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { g as Card, h as ChatMessage, m as
|
|
2
|
-
import { a as GetJoinableGamesResult, c as PlayCardResult, d as Server, f as StartGameResult, i as GetEventsAndClearAcknowledgedResult, l as ReportNoPlayableCardsResult, n as DrawCardResult, o as JoinGameResult, r as GetClientStateAndClearEventsResult, s as LeaveGameResult, t as CreateGameResult, u as SendChatResult } from "../index-
|
|
1
|
+
import { g as Card, h as ChatMessage, m as GameEvent, p as ClientState } from "../index-DlRknHKq.mjs";
|
|
2
|
+
import { a as GetJoinableGamesResult, c as PlayCardResult, d as Server, f as StartGameResult, i as GetEventsAndClearAcknowledgedResult, l as ReportNoPlayableCardsResult, n as DrawCardResult, o as JoinGameResult, r as GetClientStateAndClearEventsResult, s as LeaveGameResult, t as CreateGameResult, u as SendChatResult } from "../index-CVbiOmI3.mjs";
|
|
3
3
|
export { type Card, type ChatMessage, type ClientState, type CreateGameResult, type DrawCardResult, type GameEvent, type GetClientStateAndClearEventsResult, type GetEventsAndClearAcknowledgedResult, type GetJoinableGamesResult, type JoinGameResult, type LeaveGameResult, type PlayCardResult, type ReportNoPlayableCardsResult, type SendChatResult, Server, type StartGameResult };
|
package/dist/server/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-xmcja9Bl.d.cts","names":[],"sources":["../src/manager/types/Card.ts","../src/manager/types/ChatMessage.ts","../src/manager/types/ClientState.ts","../src/manager/types/GameEvent.ts","../src/manager/types/Player.ts","../src/manager/types/Game.ts","../src/manager/Manager.ts"],"mappings":";;KAAY;WACD;WACA;WACA;;;;KCHC;WACD;WACA;WACA;;;;KCAC;WACD;WACA;WACA;WACA;WACA,kBAAkB;WAClB;WACA,uBAAuB;WACvB,eAAe;WACf;;KAGN;WACM;WACA;WACA;WACA;WACA,mBAAmB;;;;KCjBlB;WAEG;WACA;WACA;;WAGA;WACA;WACA;WACA,MAAM;;WAGN;WACA;WACA;WACA,MAAM;WACN;;WAGA;WACA;WACA,SAAS;;WAGT;WACA;WACA,MAAM;;WAGN;WACA;WACA;;WAGA;WACA;;WAGA;WACA;;WAGA;WACA;;WAGA;WACA;WACA,gBAAgB;;WAGhB;WACA;WACA;WACA,MAAM;;WAGN;WACA;WACA;WACA;;WAGA;WACA;WACA;;WAGA;WACA;WACA;WACA;;WAGA;WACA;WACA;;WAGA;WACA;WACA;;WAGA;WACA;WACA;WACA;;;;KCxFH;WACD;WACA;WACA;WACA,QAAQ;WACR,MAAM;WACN,UAAU;WACV,UAAU;WACV,YAAY;EACrB;;;;KCTU,OAAO,WAAW,cAAc,gBAAgB;KAEvD;WACM;WACA;WACA;WACA;WACA,cAAc;WACd,SAAS;;KAGf;WACM;WACA;WACA;EACT;WACS,cAAc;WACd,SAAS;EAClB;;KAGG;WACM;WACA;WACA;WACA;WACA,cAAc;WACd,SAAS;;KAGf;WACM;WACA;WACA;WACA;WACA,cAAc;WACd,SAAS;;;;KCnBR;WAEG;WACA;WACA;;WAGA;WACA;;KAGH;WAEG;;WAGA;WACA;;KASH;WAEG;WACA,OAAO;;WAGP;WACA;;KAGH;WAEG;WACA,iBAAiB;;WAGjB;WACA;;KAGH;WACD;aACE;aACA;;;KAID;WAEG;WACA;;WAGA;WACA;;KAOH;WAEG;;WAGA;WACA;;KAGH;WAEG;;WAGA;WACA;;KASH;WAEG;;WAGA;WACA;;KAUH;WAEG;;WAGA;WACA;;KAGH;WAEG;;WAGA;WACA;;cAQF,gBAAgB,YAAY;EACvC,WAAW,gBAAgB,mBAAmB;EA4B9C,SAAS,gBAAgB,mBAAmB;EA8B5C,6BACE,gBACA,mBACC;EAgCH,8BACE,gBACA,kBACA,4BACC;EAgBH,oBAAoB;EAWpB,SAAS,gBAAgB,gBAAgB,mBAAmB;EA8B5D,UAAU,gBAAgB,mBAAmB;EAkC7C,SACE,gBACA,kBACA,gBACA,gCACC;EAwDH,sBACE,gBACA,mBACC;EAuFH,SAAS,gBAAgB,kBAAkB,eAAe;EAmB1D,UAAU,gBAAgB,mBAAmB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-xmcja9Bl.d.mts","names":[],"sources":["../src/manager/types/Card.ts","../src/manager/types/ChatMessage.ts","../src/manager/types/ClientState.ts","../src/manager/types/GameEvent.ts","../src/manager/types/Player.ts","../src/manager/types/Game.ts","../src/manager/Manager.ts"],"mappings":";;KAAY;WACD;WACA;WACA;;;;KCHC;WACD;WACA;WACA;;;;KCAC;WACD;WACA;WACA;WACA;WACA,kBAAkB;WAClB;WACA,uBAAuB;WACvB,eAAe;WACf;;KAGN;WACM;WACA;WACA;WACA;WACA,mBAAmB;;;;KCjBlB;WAEG;WACA;WACA;;WAGA;WACA;WACA;WACA,MAAM;;WAGN;WACA;WACA;WACA,MAAM;WACN;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