From 03c1770db3ccd31640758714a3a139ee34a8584f Mon Sep 17 00:00:00 2001 From: JoseBaezx Date: Mon, 25 Apr 2022 09:12:54 -0400 Subject: [PATCH] Se realiza cambio de reglas de validadacion para escalera --- .idea/misc.xml | 2 +- out/production/java-e003-generala.git/Dado.class | Bin 1366 -> 0 bytes out/production/java-e003-generala.git/Generala.class | Bin 2848 -> 0 bytes out/production/java-e003-generala.git/Play.class | Bin 1255 -> 0 bytes src/Dado.java | 11 ++++------- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index fb40be9..07115cd 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/out/production/java-e003-generala.git/Dado.class b/out/production/java-e003-generala.git/Dado.class index f7c2fba..c119f28 100644 Binary files a/out/production/java-e003-generala.git/Dado.class and b/out/production/java-e003-generala.git/Dado.class differ diff --git a/out/production/java-e003-generala.git/Generala.class b/out/production/java-e003-generala.git/Generala.class index 88b6e8d..73c6188 100644 Binary files a/out/production/java-e003-generala.git/Generala.class and b/out/production/java-e003-generala.git/Generala.class differ diff --git a/out/production/java-e003-generala.git/Play.class b/out/production/java-e003-generala.git/Play.class index 898ce2f..5c82c6f 100644 Binary files a/out/production/java-e003-generala.git/Play.class and b/out/production/java-e003-generala.git/Play.class differ diff --git a/src/Dado.java b/src/Dado.java index cc1c621..e3591a3 100644 --- a/src/Dado.java +++ b/src/Dado.java @@ -40,13 +40,10 @@ public class Dado { } } con=0; - for (int i = 0; i < numerosArray.length-1; i++) { - - if (numerosArray[i] != numerosArray[i + 1]) { - con++; - } - - if(con == 4 && (numerosArray[3]+1) == numerosArray[4]) { + String numerosString=""; + for (int i = 0; i < numerosArray.length; i++) { + numerosString += numerosArray[i]; + if(numerosString.equals("12345") || numerosString.equals("23456") || numerosString.equals("13456")) { return "ESCALERA"; } } -- libgit2 0.26.0