RICCIARDI-Adrien / Strage

A 2D shoot-them-up with addictive gameplay.
MIT License
5 stars 2 forks source link

Refactor the menu #3

Open codec-abc opened 5 years ago

codec-abc commented 5 years ago

I mean, look at it. You know you want to refactor it. It uses while loop everywhere, and the stack is used to maintain the state which makes the code hard to follow. Also, it uses number to communicate what happen to the caller which is quite error prone (enums would be better).

dcarlus commented 5 years ago

Game state pattern?