April 2017
Beginner to intermediate
376 pages
8h 4m
English
We will use an enum or enumerated type to keep up with each state that we want to switch through. Here, we have an enum structure with multiple states in it, such as SharingInit, ConnectingToServer, SpatialMapping, MapComplete, PlaceSkeeMachine, PlaceSkeeMachineComplete, StartGame, EndGame, and Reset.
The beauty of the enum structure is that while each element, as far as the computer is concerned is elements 1 - 9 ( or 0-8 since I have the = 0 after the first one), but to you or me as a programmer, it can be hard to keep up with which state number 6 is as opposed to PlaceSkeeMachineComplete.

An enum has many uses, and while it is not ...
Read now
Unlock full access