public static Direction parse(String str){
            return
                str.equalsIgnoreCase("north") ? Direction.NORTH :
                str.equalsIgnoreCase("east") ? Direction.EAST :
                str.equalsIgnoreCase("south") ? Direction.SOUTH :
                str.equalsIgnoreCase("west") ? Direction.WEST :
                str.equalsIgnoreCase("up") ? Direction.UP :
                str.equalsIgnoreCase("down") ? Direction.DOWN :
                null;
        }