Skip to content

Commit

Permalink
Hi-lo: Allow flipped board rendering option
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-E-J-Ellis committed Jul 23, 2023
1 parent a831ed3 commit 739ad64
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions movement/watch_faces/complication/higher_lower_game_face.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#define BOARD_DISPLAY_END 9
#define MIN_CARD_VALUE 2
#define MAX_CARD_VALUE 14
#define FLIP_BOARD_DIRECTION false

typedef struct card_t {
uint8_t value;
Expand Down Expand Up @@ -128,11 +129,13 @@ static void set_segment_at_position(segment_t segment, uint8_t position) {
}

static void render_board_position(size_t board_position) {
const size_t display_position = BOARD_DISPLAY_END - board_position;
size_t display_position = FLIP_BOARD_DIRECTION
? BOARD_DISPLAY_START + board_position
: BOARD_DISPLAY_END - board_position;
const bool revealed = game_board[board_position].revealed;

//// Current position indicator spot
//if (board_position == guess_position) {
// // Current spot
// watch_display_character('-', display_position);
// return;
//}
Expand Down

0 comments on commit 739ad64

Please sign in to comment.