public Direction getTurnDirection(Direction current, boolean isRightTurn) {
        Direction result = Direction.N;
        if (current != null) {
            switch (current) {
                case N:
                    if (isRightTurn) {
                        result = Direction.E;
                    } else {
                        result = Direction.W;
                    }
                    break;
                case E:
                    if (isRightTurn) {
                        result = Direction.S;
                    } else {
                        result = Direction.N;
                    }
                    break;
                case S:
                    if (isRightTurn) {
                        result = Direction.W;
                    } else {
                        result = Direction.E;
                    }
                    break;
                case W:
                    if (isRightTurn) {
                        result = Direction.N;
                    } else {
                        result = Direction.S;
                    }
                    break;

                default:
                    break;
            }
        }
        return result;
    }