added the game win logic