Carta.java 435 Bytes
Newer Older
1 2
import java.util.Objects;

Oscar committed
3 4 5
public class Carta {
	public String valor;
	public String palo;
Jose Baez committed
6 7

	public Carta() {}
Oscar committed
8
	
Jose Baez committed
9
	public Carta(String completo) {
Oscar committed
10 11 12 13 14 15 16 17
        this.valor = String.valueOf(completo.charAt(0));
        this.palo = String.valueOf(completo.charAt(1));
    }
    
    String valorPalo()
    {
        return this.valor + this.palo;
    }
Jose Baez committed
18 19 20 21 22

    @Override
    public String toString() {
        return "["+palo+valor+"] ";
    }
Oscar committed
23 24
}