enum Direction{ UP(1), DOWN(2), LEFT(3), RIGHT(4); private final int val; private Direction(int val){ this.val = val; } }