-
Notifications
You must be signed in to change notification settings - Fork 1
/
rps.h
executable file
·52 lines (45 loc) · 1.16 KB
/
rps.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef RPS_H_
#define RPS_H_
typedef enum HandType {
HandTypeRock,
HandTypePaper,
HandTypeScissor,
HandTypeEmpty,
} HandType_t;
typedef enum GameState {
GameStateEnded,
GameStateUserSelect,
GameStateSystemRoll,
GameStateNone,
} GameState_t;
typedef enum HandBoxType {
HandBoxTypeNormal,
HandBoxTypeSelected,
HandBoxTypeFilled,
} HandBoxType_t;
typedef enum GameResult {
GameResultWon,
GameResultLost,
GameResultDraw,
GameResultUnknown,
} GameResult_t;
typedef struct RPSApp {
// Flipper Firmware Variables
FuriMessageQueue* event_queue;
ViewPort* view_port;
Gui* gui;
FuriMutex** mutex;
FuriTimer* roll_timer;
FuriTimer* roll_complete_timer;
// App Variables
HandType_t user_hand;
HandType_t system_hand;
GameState_t game_state;
HandBoxType_t system_hand_box;
HandBoxType_t user_hand_box;
char* click_message;
char* middle_message;
uint16_t system_score;
uint16_t user_score;
} RPSApp_t;
#endif // RPS_H_