You need to sign in or sign up before continuing.
Commit 9261e6a1 by Miguel Do Carmo

arregle bug en la pareja asqskskcts no detectaba ... porque los break no le dejaban llegar a el

parent 483af2ce
......@@ -113,7 +113,16 @@ var noEsColor =true
if (valoresJugados[position] == 4) {
result = "POKER"
break
} else if (valoresJugados[position] == 1 && position <= 9) {
} else {
println("\n${valoresJugados[position]}")
if (valoresJugados[position] == 3) tieneTrio = true
if (valoresJugados[position] == 2) cantDobles++
result = if ((cantDobles == 1) && tieneTrio) "FULL"
else if ((cantDobles == 0) && tieneTrio) "TRIO"
else if (cantDobles == 1) "PAREJA"
else if (cantDobles == 2) "PAREJA DOBLE"
else "CARTA ALTA"
if (valoresJugados[position] == 1) {
if (position < 9) {
if (1 == valoresJugados[position] && 1 == valoresJugados[position + 1] && 1 == valoresJugados[position + 2] && 1 == valoresJugados[position + 3] && 1 == valoresJugados[position + 4]) {
result = "ESCALERA"
......@@ -125,17 +134,9 @@ var noEsColor =true
if (1 == valoresJugados[position] && 1 == valoresJugados[position + 1] && 1 == valoresJugados[position + 2] && 1 == valoresJugados[position + 3] && 1 == valoresJugados[0]) {
result = "ESCALERA FIGURAS"
break
} else break
} else break
} else continue
} else continue
} // Controla para ESCALERA
else {
if (valoresJugados[position] == 3) tieneTrio = true
if (valoresJugados[position] == 2) cantDobles++
result = if ((cantDobles == 1) && tieneTrio) "FULL"
else if ((cantDobles == 0) && tieneTrio) "TRIO"
else if (cantDobles == 1) "PAREJA"
else if (cantDobles == 2) "PAREJA DOBLE"
else "CARTA ALTA"
}
}
}
......
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