diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..a818314 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b70d104 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Carta.java b/Carta.java index 2e2ff7d..2852040 100644 --- a/Carta.java +++ b/Carta.java @@ -1,13 +1,10 @@ public class Carta { public String valor; public String palo; - public Carta() - { - - } + + public Carta() {} - public Carta(String completo) - { + public Carta(String completo) { this.valor = String.valueOf(completo.charAt(0)); this.palo = String.valueOf(completo.charAt(1)); } @@ -16,7 +13,10 @@ public class Carta { { return this.valor + this.palo; } - - + + @Override + public String toString() { + return "["+palo+valor+"] "; + } } diff --git a/Juego.java b/Juego.java new file mode 100644 index 0000000..6153fd4 --- /dev/null +++ b/Juego.java @@ -0,0 +1,15 @@ +import java.util.Arrays; +import java.util.List; + +public class Juego { + static List escalera= Arrays.asList("2S", "3S", "4S", "5S", "6S"); + + public Juego() { + } + + + public void escalera(){ + + } + +} diff --git a/Main.java b/Main.java new file mode 100644 index 0000000..b4b91b5 --- /dev/null +++ b/Main.java @@ -0,0 +1,42 @@ +import java.util.*; +import java.util.stream.Collectors; + +public class Main { + public static void main(String[] args) { + Juego g = new Juego(); + + boolean valor1 = true; + List cartas = new ArrayList<>(); + cartas = Arrays.asList( + new Carta("AS"), + new Carta("2S"), + new Carta("3S"), + new Carta("4S"), + new Carta("5S") + ); + cartas.stream().collect(Collectors.toList()); + cartas.forEach(System.out::print); + System.out.println(); + + List carta= Arrays.asList("2S", "3S", "4S", "5S", "6S"); + for (Carta c: cartas){ + if(!c.palo.equals("S")){ + valor1=false; + } + } + for (int i = 0; i + + + + + \ No newline at end of file diff --git a/out/production/poker/.idea/modules.xml b/out/production/poker/.idea/modules.xml new file mode 100644 index 0000000..b70d104 --- /dev/null +++ b/out/production/poker/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/out/production/poker/.idea/vcs.xml b/out/production/poker/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/out/production/poker/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/out/production/poker/Carta.class b/out/production/poker/Carta.class new file mode 100644 index 0000000..6098b16 Binary files /dev/null and b/out/production/poker/Carta.class differ diff --git a/out/production/poker/Juego.class b/out/production/poker/Juego.class new file mode 100644 index 0000000..2768e94 Binary files /dev/null and b/out/production/poker/Juego.class differ diff --git a/out/production/poker/Main.class b/out/production/poker/Main.class new file mode 100644 index 0000000..99b5424 Binary files /dev/null and b/out/production/poker/Main.class differ diff --git a/out/production/poker/poker.iml b/out/production/poker/poker.iml new file mode 100644 index 0000000..b107a2d --- /dev/null +++ b/out/production/poker/poker.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/poker.iml b/poker.iml new file mode 100644 index 0000000..b107a2d --- /dev/null +++ b/poker.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file