From 93a2a5a5eef056d40c142ff7495181ac83397cc5 Mon Sep 17 00:00:00 2001 From: David Volovskiy Date: Wed, 3 Sep 2025 07:46:38 -0400 Subject: [PATCH] Documented face --- watch-faces/complication/blackjack_face.c | 13 ++++++---- watch-faces/complication/blackjack_face.h | 29 +++++++++++++++++++++++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/watch-faces/complication/blackjack_face.c b/watch-faces/complication/blackjack_face.c index ee490426..c9c7a3cd 100755 --- a/watch-faces/complication/blackjack_face.c +++ b/watch-faces/complication/blackjack_face.c @@ -32,10 +32,10 @@ #include "blackjack_face.h" #include "watch_common_display.h" -#define ACE 13 -#define KING 12 -#define QUEEN 11 -#define JACK 10 +#define ACE 14 +#define KING 13 +#define QUEEN 12 +#define JACK 11 #define MIN_CARD_VALUE 2 #define MAX_CARD_VALUE ACE @@ -180,7 +180,10 @@ static void display_card_at_position(uint8_t card, uint8_t display_position) { watch_display_character('-', display_position); break; case ACE: - watch_display_character('A', display_position); + watch_display_character(watch_get_lcd_type() == WATCH_LCD_TYPE_CUSTOM ? 'A' : 'a', display_position); + break; + case 10: + watch_display_character('0', display_position); break; default: { const char display_char = card + '0'; diff --git a/watch-faces/complication/blackjack_face.h b/watch-faces/complication/blackjack_face.h index ff52d79f..8771561c 100755 --- a/watch-faces/complication/blackjack_face.h +++ b/watch-faces/complication/blackjack_face.h @@ -31,6 +31,35 @@ * Blackjack face * ====================== * + * Simple blackjack game. + * + * Aces are 11 unless you'd but, and if so, they become 1. + * King, Queen, and jack are all 10 points. + * Dealer deals to themselves until they get at least 17. + * The game plays with one shuffled deck that gets reshuffled with every game. + * + * Press either ALARM or LIGHT to begin playing. + * Your score is in the Seconds position. + * The dealer's score is in the Top-Right position. + * The dealer's last-shown card is in the Top-Left position. + * Your cards are in the Bottom row. From left to right, they are oldest to newest. Up to four cards will be dislayed. + * + * To hit, press the ALARM button. + * To stand, press the LIGHT button. + * If you're at 21, you cannoy hit, since we just assume it's a mispress on the button. + * + * Once you stand, the dealer will deal out to themselves once per second (or immidietly when you press the LIGHT or ALARM buttons). + * The game results are: + * WIN: You have a higher score than the dealer, but no more than 21. Or the dealer's score is over 21. + * LOSE: Your score is lower than the dealer's. + * BUST: Your score is above 21. + * TIE: Your score matches the dealer's final score + * + * | Cards | | + * |---------|--------------------------| + * | Value |2|3|4|5|6|7|8|9|10|J|Q|K|A| + * | Display |2|3|4|5|6|7|8|9| 0|-|=|≡|a| + * If you're using a custom display, Ace will display as 'A', not 'a' */