Applied saving score function to the game