While you've got your refactoring brain in gear, you might have noticed that the code that updates labelText, showWinScreen/showLossScreen, and Time.timeScale is repeated in the set block of both Lives and Items. Your mission is to write a private utility function that takes parameters for each of the updated variables mentioned and assign them accordingly. Then, replace the repeated code in Lives and Items with a call to the new method. Happy coding!
United States
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Singapore
Hungary
Ukraine
Luxembourg
Estonia
Lithuania
South Korea
Turkey
Switzerland
Colombia
Taiwan
Chile
Norway
Ecuador
Indonesia
New Zealand
Cyprus
Denmark
Finland
Poland
Malta
Czechia
Austria
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Netherlands
Bulgaria
Latvia
South Africa
Malaysia
Japan
Slovakia
Philippines
Mexico
Thailand