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
180c5a5c
Commit
180c5a5c
authored
Apr 27, 2022
by
Yovan Martinez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Agregado el metodo ganadores
parent
2725fb45
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
Poker.java
+18
-3
No files found.
Poker.java
View file @
180c5a5c
...
@@ -2,12 +2,12 @@ import javax.sound.sampled.Port;
...
@@ -2,12 +2,12 @@ import javax.sound.sampled.Port;
import
javax.lang.model.element.Element
;
import
javax.lang.model.element.Element
;
import
javax.print.DocFlavor.STRING
;
import
javax.print.DocFlavor.STRING
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
public
class
Poker
{
public
class
Poker
{
public
String
suit
=
""
;
public
String
suit
;
public
String
values
=
""
;
public
String
values
;
public
Poker
(){
public
Poker
(){
values
=
""
;
values
=
""
;
suit
=
""
;
suit
=
""
;
...
@@ -101,6 +101,21 @@ public class Poker {
...
@@ -101,6 +101,21 @@ public class Poker {
//Para mejor manejo si no cumple ninguna de las condiciones envia una cadena vacia
//Para mejor manejo si no cumple ninguna de las condiciones envia una cadena vacia
return
""
;
return
""
;
}
}
// este es el único método que tienen que desarrollar
// para hacerlo, pueden hacer uso de otras clases (si es necesario),
// pero la corrección del ejercicio será automática en base a este
// método que está acá
public
String
ganadores
(
List
<
Carta
[]
>
jugadas
){
System
.
out
.
println
(
"Cantidad de jugadas: "
+
jugadas
.
size
());
for
(
Carta
[]
mano
:
jugadas
)
{
System
.
out
.
println
(
"JUGADA ======================"
);
for
(
Carta
c
:
mano
)
{
System
.
out
.
println
(
c
.
valorPalo
());
}
}
return
"0"
;
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
Carta
carta1
=
new
Carta
(
"8S"
);
Carta
carta1
=
new
Carta
(
"8S"
);
...
...
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