Found answer to enum as array subscript problem in Matthijs's Candy Crush tutorial: toRaw() converts enum value to integer