refactory game