Execute SNUSP/Java: Difference between revisions
Content added Content deleted
m (I hadn't done RAND right) |
m (Forgot to change some things over to the enum) |
||
Line 127: | Line 127: | ||
case '/'://mirror |
case '/'://mirror |
||
switch(dir){ |
switch(dir){ |
||
case RIGHT: |
case Direction.RIGHT: |
||
dir= Direction.UP; |
dir= Direction.UP; |
||
break; |
break; |
||
case DOWN: |
case Direction.DOWN: |
||
dir= Direction.LEFT; |
dir= Direction.LEFT; |
||
break; |
break; |
||
case LEFT: |
case Direction.LEFT: |
||
dir= Direction.DOWN; |
dir= Direction.DOWN; |
||
break; |
break; |
||
case UP: |
case Direction.UP: |
||
dir= Direction.RIGHT; |
dir= Direction.RIGHT; |
||
break; |
break; |
||
Line 144: | Line 144: | ||
case '\\'://mirror |
case '\\'://mirror |
||
switch(dir){ |
switch(dir){ |
||
case RIGHT: |
case Direction.RIGHT: |
||
dir= Direction.DOWN; |
dir= Direction.DOWN; |
||
break; |
break; |
||
case DOWN: |
case Direction.DOWN: |
||
dir= Direction.RIGHT; |
dir= Direction.RIGHT; |
||
break; |
break; |
||
case LEFT: |
case Direction.LEFT: |
||
dir= Direction.UP; |
dir= Direction.UP; |
||
break; |
break; |
||
case UP: |
case Direction.UP: |
||
dir= Direction.LEFT; |
dir= Direction.LEFT; |
||
break; |
break; |
||
Line 191: | Line 191: | ||
final Point retVal= new Point(place); |
final Point retVal= new Point(place); |
||
switch(dir){ |
switch(dir){ |
||
case RIGHT: |
case Direction.RIGHT: |
||
retVal.x++; |
retVal.x++; |
||
break; |
break; |
||
case DOWN: |
case Direction.DOWN: |
||
retVal.y++; |
retVal.y++; |
||
break; |
break; |
||
case LEFT: |
case Direction.LEFT: |
||
retVal.x--; |
retVal.x--; |
||
break; |
break; |
||
case UP: |
case Direction.UP: |
||
retVal.y--; |
retVal.y--; |
||
break; |
break; |