Commit d8d1ab3a by Jose Baez

Primer commit

parent 883878ed
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/poker.iml" filepath="$PROJECT_DIR$/poker.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
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+"] ";
}
}
import java.util.Arrays;
import java.util.List;
public class Juego {
static List<String> escalera= Arrays.asList("2S", "3S", "4S", "5S", "6S");
public Juego() {
}
public void escalera(){
}
}
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<Carta> 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<String> carta= Arrays.asList("2S", "3S", "4S", "5S", "6S");
for (Carta c: cartas){
if(!c.palo.equals("S")){
valor1=false;
}
}
for (int i = 0; i<cartas.size(); i++) {
String value = String.valueOf(i);
if(cartas.get(i).equals("A")){
valor1=false;
}
if(!cartas.get(i).equals(value)){
valor1=false;
}
}
if(valor1==true){
System.out.println("Escalera Color");
}
}
}
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/poker.iml" filepath="$PROJECT_DIR$/poker.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
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