Direction is the enumeration class. You need to switch on a variable that holds the direction.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
You use a variable for the switch, but you need the constants for the cases, as in
switch (dir) {
case Direction.RIGHT: ...
JamesCherrill
Posting Genius
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
Did you try following the instruction in the error message and changing it to
switch (dir) {
case RIGHT:
JamesCherrill
Posting Genius
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073