Lynda Course - Swift 5 Essential Thinking (Part 7)
Last part of the course! I'm going spend around half an hour now on this and the rest tomorrow, if/when needed. Let's do this! Start time - 21:00 Enumerations All of the declaring and creating no problems. I want to see the use of assigning values etc. That bit I'm not so sure about. // Declaring an enum enum GameState { case Completed, Initialzing, LoadingData } // Storing and switching on an enum value var currentState = GameState . Completed switch currentState { case . Completed : print ( "All tasks complete" ) case . Initialzing : print ( "Init in process" ) case . LoadingData : print ( "Data is loading" ) } Raw and Associated Values You can do this - enum NonPlayableCharacters: String { case Villager case Blacksmith case Trader } But no other info - quite limited. Can be access...