package com.mycompany.app;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Carta {
    private Float numero;
    private Float valor;
    private Boolean figura;

    public static Carta getCartaRandom() {
        Carta carta = new Carta();
        int n = (int) (Math.random() * (13 - 1)) + 1;
        carta.setNumero(Float.valueOf(n));
        carta.setValor(Float.valueOf(n));
        if(n == 11 || n == 12 || n == 13) {
            carta.setFigura(true);
        }
        return carta;
    }
}
