private void calculateNextRandomDirection()
    {
        int newDirection = randomGenerator.nextInt(4);
        while (!isAValidDirection(newDirection)) {
            newDirection = (newDirection + 1) % 4;
        }
        setDirection(newDirection);
    }