Completed the game functionality