diff --git a/pokerGame.java b/pokerGame.java index 1576f4b..d84e604 100644 --- a/pokerGame.java +++ b/pokerGame.java @@ -54,28 +54,21 @@ public class pokerGame { valoresIguales++; } } + 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 mano = new ArrayList(); - 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) ;