mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 19:38:36 -07:00
Update apps
This commit is contained in:
8
applications/external/blackjack/blackjack.c
vendored
8
applications/external/blackjack/blackjack.c
vendored
@@ -1,6 +1,7 @@
|
||||
|
||||
#include <gui/gui.h>
|
||||
#include <stdlib.h>
|
||||
#include <dolphin/dolphin.h>
|
||||
#include <dialogs/dialogs.h>
|
||||
#include <gui/canvas_i.h>
|
||||
|
||||
@@ -14,6 +15,7 @@
|
||||
#include "ui.h"
|
||||
|
||||
#include "blackjack_icons.h"
|
||||
#include <assets_icons.h>
|
||||
|
||||
#define DEALER_MAX 17
|
||||
|
||||
@@ -275,6 +277,7 @@ void dealer_tick(GameState* game_state) {
|
||||
|
||||
if(dealer_score >= DEALER_MAX) {
|
||||
if(dealer_score > 21 || dealer_score < player_score) {
|
||||
dolphin_deed(DolphinDeedPluginGameWin);
|
||||
enqueue(
|
||||
&(game_state->queue_state),
|
||||
game_state,
|
||||
@@ -568,6 +571,9 @@ int32_t blackjack_app(void* p) {
|
||||
|
||||
AppEvent event;
|
||||
|
||||
// Call dolphin deed on game start
|
||||
dolphin_deed(DolphinDeedPluginGameStart);
|
||||
|
||||
for(bool processing = true; processing;) {
|
||||
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
|
||||
furi_mutex_acquire(game_state->mutex, FuriWaitForever);
|
||||
@@ -625,4 +631,4 @@ free_and_exit:
|
||||
furi_message_queue_free(event_queue);
|
||||
|
||||
return return_code;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user