mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 02:27:44 +00:00
Spider: Use a single State enum instead of a series of booleans
This commit is contained in:
parent
5de8b38783
commit
8744e8b561
2 changed files with 20 additions and 16 deletions
|
@ -107,12 +107,17 @@ private:
|
|||
|
||||
bool m_mouse_down { false };
|
||||
|
||||
bool m_waiting_for_new_game { true };
|
||||
bool m_new_game_animation { false };
|
||||
enum class State {
|
||||
WaitingForNewGame,
|
||||
NewGameAnimation,
|
||||
GameInProgress,
|
||||
DrawAnimation,
|
||||
Victory,
|
||||
};
|
||||
State m_state { State::WaitingForNewGame };
|
||||
uint8_t m_new_game_animation_delay { 0 };
|
||||
uint8_t m_new_game_animation_pile { 0 };
|
||||
|
||||
bool m_draw_animation { false };
|
||||
uint8_t m_draw_animation_delay { 0 };
|
||||
uint8_t m_draw_animation_pile { 0 };
|
||||
Gfx::IntRect m_original_stock_rect;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue