From d8d1ab3ab0264520757d549661e26c67c246c987 Mon Sep 17 00:00:00 2001 From: JoseBaezx Date: Mon, 25 Apr 2022 18:01:40 -0400 Subject: [PATCH] Primer commit --- .idea/.gitignore | 8 ++++++++ .idea/misc.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ Carta.java | 16 ++++++++-------- Juego.java | 15 +++++++++++++++ Main.java | 42 ++++++++++++++++++++++++++++++++++++++++++ out/production/poker/.idea/.gitignore | 8 ++++++++ out/production/poker/.idea/misc.xml | 6 ++++++ out/production/poker/.idea/modules.xml | 8 ++++++++ out/production/poker/.idea/vcs.xml | 6 ++++++ out/production/poker/Carta.class | Bin 0 -> 1220 bytes out/production/poker/Juego.class | Bin 0 -> 636 bytes out/production/poker/Main.class | Bin 0 -> 2775 bytes out/production/poker/poker.iml | 11 +++++++++++ poker.iml | 11 +++++++++++ 16 files changed, 143 insertions(+), 8 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 Juego.java create mode 100644 Main.java create mode 100644 out/production/poker/.idea/.gitignore create mode 100644 out/production/poker/.idea/misc.xml create mode 100644 out/production/poker/.idea/modules.xml create mode 100644 out/production/poker/.idea/vcs.xml create mode 100644 out/production/poker/Carta.class create mode 100644 out/production/poker/Juego.class create mode 100644 out/production/poker/Main.class create mode 100644 out/production/poker/poker.iml create mode 100644 poker.iml 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 -- libgit2 0.26.0