Play.java 488 Bytes
Newer Older
1
public class Play {
2 3
    private int[] numeros;
    private String numerosString="";
4

5
    public int[] getNumeros() {
6 7 8
        return numeros;
    }

9 10 11 12 13 14
    public String getNumerosString() {
        return numerosString;
    }

    public int[] lanzarDados(){
        this.numeros= new int[5];
15
        for (int i=0; i<5;i++){
16 17
            this.numeros[i] = (int) Math.floor(Math.random()*6+1);
            this.numerosString += this.numeros[i];
18 19 20 21 22
        }
        return this.numeros;
    }

}