package hu.unideb.inf.View;

import javafx.animation.ScaleTransition;
import javafx.scene.control.Label;
import javafx.scene.effect.ColorAdjust;
import javafx.scene.paint.Color;
import javafx.util.Duration;

/**
 * The {@code Effect} class implements many effects for a better visual content.
 * @author MJ
 */
public class Effects {

    /**
     * Map t....
     *
     * @param value The value.
     * @param targetStart Start.
     * @return The mapped value.
     */
    private static double map(double value, double targetStart) {
        return targetStart + (1 - targetStart) * (value / 360);
    }

    /** Creates an empty {@link ScaleTransition}. */
    private ScaleTransition st = new ScaleTransition();

    /**
     * Play scale effect on a {@link Label}.
     * @param label A label.
     */
    public void scaleEffect(Label label){
        st.setDuration(Duration.millis(200));
        st.setNode(label);
        st.setFromX(1.0);
        st.setFromY(1.0);
        st.setByX(1.01);
        st.setByY(1.01);
        st.setCycleCount(2);
        st.setAutoReverse(true);
        st.play();
    }

    /**
     * Generates a random {@link ColorAdjust} the a ship.
     * @return The new color for the ship.
     */
    public static ColorAdjust randomColor(){
        ColorAdjust blackout = new ColorAdjust();
        Color color = Color.color(Math.random(), Math.random(), Math.random());
        double hue = map( (color.getHue() + 180) % 360, -1);
        blackout.setHue(hue);
        return blackout;
    }

    /**
     * Generates a random {@link Color}.
     * @return A new color.
     */
    public static Color randomTextColor(){
        Color color = Color.color(Math.random(), Math.random(), Math.random());
        return color;
    }
}

@@ -347,16 +347,108 @@
   * 
-Map t...
+The Color.getHue() returns a value between 0-360.%0A     * This method transform the value between 0-1
 .%0A  
@@ -539,12 +539,17 @@
 The 
-mapp
+transform
 ed v
@@ -1488,32 +1488,92 @@
 Math.random());%0A
+        System.out.println(%22color hue: %22 + color.getHue());%0A
         double h
@@ -1613,24 +1613,67 @@
 %25 360, -1);%0A
+        System.out.println(%22hue: %22 + hue);%0A
         blac

Improve javaDoc.