/*
 * MyRand.java
 *
 * Created on 27. listopad 2005, 10:35
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package cz.pcland.ga;
import java.util.*;
/**
 *
 * @author petr
 */
public class MyRand {
    static Random rand = null;
    
    public static int getInt() {
        if(rand == null) {
            rand = new Random();
        }
         
        return rand.nextInt();   
    }
    
    public static boolean getBoolean() {
        if(rand == null) {
            rand = new Random();
        }
         
        return rand.nextBoolean(); 
    }
    /** Creates a new instance of MyRand */
    public MyRand() {
    }
    
}
