Ref: Made game state-based.