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
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine