16 for (j = i + 1; j < 40; j++) {
CARDGAME.PRO: the card battle (mode 0x700).
void initCardDrawer(CardDrawer *obj)
Clears a card drawer, gives it its methods and binds it.
@ CARD_PHASE_PLAYS_AFTER
plays after: any kind but 0
@ CARD_PHASE_PLAYS_BEFORE
plays before the cards are put out: kind 2 cards only
s32 CARDGAME_canPlayCard(CardBattle *battle, u8 *points, s32 card)
Whether a card can be played: in CARD_PHASE_PUT_OUT a kind 0x10 card needs as many points of its colo...
s32 CARDGAME_canPlayCardKind(CardBattle *battle, s32 index)
Whether card index can be played in this phase by its kind: any kind but 0 in CARD_PHASE_PLAYS_AFTER,...
void CARDGAME_sortOpponentCards(CardBattle *battle)
Sorts the opponent's cards by opponentDraws[].order, then swaps card effectStep.choice to reserveStar...
The card battle (CARDGAME_createBattle).
s16 cards[250]
card ids, minus one (CARDGAME_loadCardImages)
u8 reserveStart
the first card of the opponent's deck held back (group 7)
CardDraw opponentDraws[40]
by the opponent's deck card
Where a card of the opponent's deck is drawn (CardBattle.opponentDraws): the computer draws the cards...
u8 order
its place in the deck
Draws the cards' images (CardImage), from files 0x7E7-0x7EB.
u8 kind
an index in CARD_KINDS
u8 points
what it adds to its colour
s16 deck[40]
deckTop on are left
s16 deckTop
the index of the deck's top card
s32 choice
the card, slot or answer chosen; -1 for none