ugur-akin / algo-robo

0 stars 0 forks source link

Game Manager - Game State #4

Open ugur-akin opened 3 years ago

ugur-akin commented 3 years ago

Once the user selects a level and the level is loaded, game manager should start maintaining information about the game's current state. Game manager should also provide an interface to other components to modify game state (i.e. Command Palette needs a method to insert/delete commands).

Currently, the game can be in 5 states:

ugur-akin commented 3 years ago

Since we'll probably initialize GameManager without awaiting fetching the level (in the future), I think it's best if we initialize it to a LOADING state. We can expose a callback in the interface to indicate the UI is ready, and/or initialize with a promise that resolves into the much needed levelInformation object.