Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
poker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yovan Martinez
poker
Commits
c88112da
Commit
c88112da
authored
Apr 26, 2022
by
Yovan Martinez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminado metodo setSuits y codigo repetido
parent
ca7edb6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
Poker.java
+8
-15
No files found.
Poker.java
View file @
c88112da
...
...
@@ -19,10 +19,8 @@ public class Poker {
return
values
;
}
public
void
setValues
(
String
carta
){
values
=
ordenarCadena
(
values
+
carta
);
}
public
void
setSuits
(
String
carta
){
suit
=
ordenarCadena
(
suit
+
carta
);
values
=
ordenarCadena
(
values
+
String
.
valueOf
(
carta
.
charAt
(
0
)));
suit
=
ordenarCadena
(
suit
+
String
.
valueOf
(
carta
.
charAt
(
1
)));
}
//Recibe un string y lo ordena segun orden numerico o alfabetico
public
String
ordenarCadena
(
String
original
){
...
...
@@ -110,18 +108,13 @@ public class Poker {
Carta
carta4
=
new
Carta
(
"7D"
);
Carta
carta5
=
new
Carta
(
"6D"
);
Poker
partida
=
new
Poker
();
//Le paso los palos con el metodo del profe
partida
.
setSuits
(
carta1
.
palo
);
partida
.
setSuits
(
carta2
.
palo
);
partida
.
setSuits
(
carta3
.
palo
);
partida
.
setSuits
(
carta4
.
palo
);
partida
.
setSuits
(
carta5
.
palo
);
//Le paso los valores con el metodo del profe
partida
.
setValues
(
carta1
.
valor
);
partida
.
setValues
(
carta2
.
valor
);
partida
.
setValues
(
carta3
.
valor
);
partida
.
setValues
(
carta4
.
valor
);
partida
.
setValues
(
carta5
.
valor
);
partida
.
setValues
(
carta1
.
valor
Palo
()
);
partida
.
setValues
(
carta2
.
valor
Palo
()
);
partida
.
setValues
(
carta3
.
valor
Palo
()
);
partida
.
setValues
(
carta4
.
valor
Palo
()
);
partida
.
setValues
(
carta5
.
valor
Palo
()
);
if
((
partida
.
controlValor
(
partida
.
getValue
())==
""
)
&&
(
partida
.
controlPalos
(
partida
.
getSuit
())==
""
))
{
System
.
out
.
println
(
"CARTA ALTA"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment