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
ca7edb6f
Commit
ca7edb6f
authored
Apr 26, 2022
by
Yovan Martinez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Agregado de comentarios y eliminacion de codigo basura
parent
76983e8f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Poker.java
+7
-7
No files found.
Poker.java
View file @
ca7edb6f
...
...
@@ -12,14 +12,12 @@ public class Poker {
values
=
""
;
suit
=
""
;
}
public
String
getSuit
(){
return
suit
;
}
public
String
getValue
(){
return
values
;
}
public
void
setValues
(
String
carta
){
values
=
ordenarCadena
(
values
+
carta
);
}
...
...
@@ -48,6 +46,7 @@ public class Poker {
if
(
contador
==
25
)
{
return
"COLOR"
;
}
else
{
//Para mejor manejo si no cumple ninguna de las condiciones envia una cadena vacia
return
""
;
}
}
...
...
@@ -100,15 +99,16 @@ public class Poker {
}
else
if
(
contador
==
7
){
return
"PAR"
;
}
//Para mejor manejo si no cumple ninguna de las condiciones envia una cadena vacia
return
""
;
}
public
static
void
main
(
String
[]
args
)
{
Carta
carta1
=
new
Carta
(
"2D"
);
Carta
carta2
=
new
Carta
(
"3
S
"
);
Carta
carta3
=
new
Carta
(
"4
C
"
);
Carta
carta4
=
new
Carta
(
"7
H
"
);
Carta
carta5
=
new
Carta
(
"6
H
"
);
Carta
carta2
=
new
Carta
(
"3
D
"
);
Carta
carta3
=
new
Carta
(
"4
D
"
);
Carta
carta4
=
new
Carta
(
"7
D
"
);
Carta
carta5
=
new
Carta
(
"6
D
"
);
Poker
partida
=
new
Poker
();
//Le paso los palos con el metodo del profe
partida
.
setSuits
(
carta1
.
palo
);
...
...
@@ -123,7 +123,7 @@ public class Poker {
partida
.
setValues
(
carta4
.
valor
);
partida
.
setValues
(
carta5
.
valor
);
if
((
partida
.
controlValor
(
partida
.
getValue
()
==
""
)
&&
(
partida
.
controlPalos
(
partida
.
getSuit
())==
""
)
))
{
if
((
partida
.
controlValor
(
partida
.
getValue
()
)==
""
)
&&
(
partida
.
controlPalos
(
partida
.
getSuit
())==
""
))
{
System
.
out
.
println
(
"CARTA ALTA"
);
}
else
{
System
.
out
.
println
(
partida
.
controlValor
(
partida
.
getValue
())
+
" "
+
partida
.
controlPalos
(
partida
.
getSuit
()));
...
...
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