Added Unit Tests
This commit is contained in:
@ -72,4 +72,10 @@ uint8_t cardCountPairs(card_t *in, uint8_t inCount, uint8_t number,
|
||||
|
||||
void cardShuffle(card_t *hand, uint8_t length) {
|
||||
arrayShuffle(sizeof(card_t), hand, length);
|
||||
}
|
||||
|
||||
uint8_t cardWriteDeck(card_t *hand) {
|
||||
uint8_t i;
|
||||
for(i = 0; i < CARD_DECK_SIZE; i++) hand[i] = i;
|
||||
return CARD_DECK_SIZE;
|
||||
}
|
@ -194,4 +194,12 @@ uint8_t cardCountPairs(
|
||||
* @param hand Hand to shuffle.
|
||||
* @param length Length of the hand to shuffle.
|
||||
*/
|
||||
void cardShuffle(card_t *hand, uint8_t length);
|
||||
void cardShuffle(card_t *hand, uint8_t length);
|
||||
|
||||
/**
|
||||
* Write an entire deck of cards (in order) to a given hand.
|
||||
*
|
||||
* @param hand Hand to write the deck to.
|
||||
* @return The count of cards in the deck.
|
||||
*/
|
||||
uint8_t cardWriteDeck(card_t *hand);
|
Reference in New Issue
Block a user