Commit 233f8cbb by Emanuel Lugo

Correccion de errores

parent c6175c7d
......@@ -55,27 +55,20 @@ public class pokerGame {
}
}
if (valoresIguales == 3 && mano.get(3).getValorInt() != mano.get(4).getValorInt()) {
return resultado = "POKER";
}else if ((valoresIguales == 2 && mano.get(3).getValorInt() == mano.get(4).getValorInt()) || (valoresIguales == 2 && mano.get(0).getValorInt() == mano.get(1).getValorInt()))
}else if ((valoresIguales == 3 && mano.get(3).getValorInt() == mano.get(4).getValorInt()) || (valoresIguales == 3 && mano.get(0).getValorInt() == mano.get(1).getValorInt()))
{
return resultado = "FULL";}
else if (valoresIguales == 2){
else if ((valoresIguales == 2 && mano.get(3).getValorInt() != mano.get(4).getValorInt()) || (valoresIguales == 2 && mano.get(0).getValorInt() != mano.get(1).getValorInt())){
return resultado = "TRIO";
}
if ((valoresIguales == 2 && mano.get(1).getValorInt() != mano.get(2).getValorInt()) || (valoresIguales == 2 && mano.get(2).getValorInt() != mano.get(4).getValorInt())) {
return resultado = "DOBLE DUO";
} else if (valoresIguales ==1 ) return resultado = "DUO" ;
return resultado = "CARTA ALTA";
}
......@@ -86,10 +79,10 @@ public class pokerGame {
int i;
Carta carta1, carta2, carta3, carta4, carta5 ;
ArrayList<Carta> mano = new ArrayList<Carta>();
carta1 = new Carta("AS");
carta2 = new Carta("TS");
carta3 = new Carta("JS");
carta4 = new Carta("QS");
carta1 = new Carta("8S");
carta2 = new Carta("8C");
carta3 = new Carta("7S");
carta4 = new Carta("7C");
carta5 = new Carta("KS");
mano.add(carta5) ;
mano.add(carta4) ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment