finished the game implementation