added class and enum to track game state transitions
refactored game state handling into main class
updated lose