Direction is the enumeration class. You need to switch on a variable that holds the direction.
Ezzaral
null
16,126 posts since May 2007
Reputation Points: 3,294
Solved Threads: 875
Skill Endorsements: 28
You use a variable for the switch, but you need the constants for the cases, as in
switch (dir) {
case Direction.RIGHT: ...
JamesCherrill
... trying to help
8,660 posts since Apr 2008
Reputation Points: 2,636
Solved Threads: 1,475
Skill Endorsements: 33
Did you try following the instruction in the error message and changing it to
switch (dir) {
case RIGHT:
JamesCherrill
... trying to help
8,660 posts since Apr 2008
Reputation Points: 2,636
Solved Threads: 1,475
Skill Endorsements: 33
Question Answered as of 1 Year Ago by
JamesCherrill
and
Ezzaral