Left + Right - Pause menu (press Left and Right at the same time).
To upload a new game, hold Up while powering on your Arduboy to enter flashlight mode.
Gameplay
During the bet round, use Up or Down to increase or decrease your bet. The minimum bet is $5 and the maximum is $100. Press B to deal the cards. Select cards using Left or Right. Press A to toggle Hold on the selected card. Press B to exchange unheld cards for new ones from the deck.
The code you are pointing to seems to still reference the Gamebuino library. Excuse my ignorance but is this a hacked version that runs on the Arduboy?
Edit: The image placeholder seems to have disappeared.
The video is great though. Can you post it into this forum?
Hey @filmote, thanks for your reply! I originally wrote this game for the Gamebuino Classic / MAKERbuino and ported it over using @akkera102’s Gamebuino Library for Arduboy. Sorry about the large size of the animated gif screenshot, I compressed it and resized it so hopefully this works:
I like it! (just one note - the Arduboy2 library uses the first 16 bytes of EEPROM for system settings, so if you write there then it can mess up those settings for other sketches that use it…)
Just in case you didn’t know, the typedef is completely redundant here:
typedef struct CARD_S
{
byte suit; // CLUBS, DIAMONDS, HEARTS, or SPADES
byte value; // 2-10, J, Q, K, or A
byte state; // INDECK, DRAWN, HELD, or DISCARDED
int flipTimer; // Timer for flipping card
} Card;
This could have been written as:
struct Card
{
byte suit; // CLUBS, DIAMONDS, HEARTS, or SPADES
byte value; // 2-10, J, Q, K, or A
byte state; // INDECK, DRAWN, HELD, or DISCARDED
int flipTimer; // Timer for flipping card
};
And it would have had the exact same effect.
The typedef struct thing is only (sort of) needed in C,
in C++ it’s redundant because of the different rules for refering to structs.
Good catch @Pharap, you are 100% correct! Guilty as charged - I come from a C game engine development background-- I guess the saying old habits die hard is relevant in this situation