UNPKG

binmat

Version:
42 lines (41 loc) 1.72 kB
var CardModifier = { Trap: "@", Wild: "*", Bounce: "?", Break: ">" }, CardSuit = { Form: "&", Kin: "%", Data: "+", Chaos: "!", Void: "^", Choice: "#" }, MoveKind = { Draw: 0, Play: 1, PlayFaceUp: 2, Combat: 3, Discard: 4, Pass: 5 } const AttackerDeck = 6, AttackerDiscardPile = 6 var StatusCode = { Ok: 0, DefenderWin: 1, AttackerWin: 2, MadeMoveOnFinishedGame: 3, DefenderDrewFromAttackerDeck: 4, AttackerDrewFromBlockedLane: 5, PlayedUnownedCard: 6, PlayedBreakToEmptyStack: 7, DefenderInitiatedCombat: 8, AttackerInitiatedCombatWithEmptyStack: 9, DiscardedToOpponentDiscardPile: 10, AttackerDiscardedToEmptyDiscardAndDeck: 11, AttackerDrewFromEmptyDiscardAndDeck: 12, PlayedCardFacedWrongWay: 13, DefenderPlayedFaceUpBreakToStackWithBreak: 14 } const StatusCodeMessages = [ "okay", "defender won", "attacker won", "tried to make a move on a finished game", "the defender tried to draw from the attacker's deck", "the attacker tried to drawn from a blocked lane deck", "tried to play a card not in hand", "tried to play a break card to an empty stack", "the defender tried to initiate combat", "the attacker tried to initiate combat with an empty attacker stack", "tried to discard to opponent's discard pile", "attacker tried to discard when the attacker discard pile and attacker deck are empty", "attacker tried to draw from attacker deck when it and the attacker discard pile are empty", "tried to play card faced incorrectly", "the defender tried to play a face up break to a stack that already contains a break card" ] var Role = { Defender: 1, Attacker: 2 } export { AttackerDeck, AttackerDiscardPile, CardModifier, CardSuit, MoveKind, Role, StatusCode, StatusCodeMessages }