Making game functional