Refactor game state handling

Signed-off-by: Piotr Bocheński <bochenski.piotr@gmail.com>