djog / tank_battalion

Tank Battalion recreation by DJOG Uno's 2020 in processing.
GNU General Public License v3.0
3 stars 0 forks source link

Create state system #37

Closed rijkvp closed 3 years ago

rijkvp commented 3 years ago

Currently we handle everything in the setup() and draw() functions. As the game gets more complex I think we need some kind of state system / state machine to handle the different kinds of states. I have coded a state system before with a state class: State.js and a state machine class: StateManager.js. Maybe we can use something similar.

rijkvp commented 3 years ago

@richelbilderbeek would you like to check this out?

richelbilderbeek commented 3 years ago

Brilliant! This is exactly what a state design pattern is made for :+1: