public void move() {
        Random generator = new Random();
        double a = generator.nextDouble();
        if (a < 0.25) {
            xCoordinate -= 25;
            if (isOutOfBounds()) {
                xCoordinate += 25;
            }
        } else if (a < 0.5) {
            xCoordinate += 25;
            if (isOutOfBounds()) {
                xCoordinate -= 25;
            }
        } else if (a < 0.75) {
            yCoordinate -= 25;
            if (isOutOfBounds()) {
                yCoordinate += 25;
            }
        } else if (a <= 1) {
            yCoordinate += 25;
            if (isOutOfBounds()) {
                yCoordinate -= 25;
            }
        }
    }