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
Emanuel Lugo
poker
Commits
233f8cbb
Commit
233f8cbb
authored
Apr 26, 2022
by
Emanuel Lugo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correccion de errores
parent
c6175c7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
pokerGame.java
+10
-17
No files found.
pokerGame.java
View file @
233f8cbb
...
@@ -54,28 +54,21 @@ public class pokerGame {
...
@@ -54,28 +54,21 @@ public class pokerGame {
valoresIguales
++;
valoresIguales
++;
}
}
}
}
if
(
valoresIguales
==
3
&&
mano
.
get
(
3
).
getValorInt
()
!=
mano
.
get
(
4
).
getValorInt
())
{
if
(
valoresIguales
==
3
&&
mano
.
get
(
3
).
getValorInt
()
!=
mano
.
get
(
4
).
getValorInt
())
{
return
resultado
=
"POKER"
;
return
resultado
=
"POKER"
;
}
else
if
((
valoresIguales
==
2
&&
mano
.
get
(
3
).
getValorInt
()
==
mano
.
get
(
4
).
getValorInt
())
||
(
valoresIguales
==
2
&&
mano
.
get
(
0
).
getValorInt
()
==
mano
.
get
(
1
).
getValorInt
()))
}
else
if
((
valoresIguales
==
3
&&
mano
.
get
(
3
).
getValorInt
()
==
mano
.
get
(
4
).
getValorInt
())
||
(
valoresIguales
==
3
&&
mano
.
get
(
0
).
getValorInt
()
==
mano
.
get
(
1
).
getValorInt
()))
{
{
return
resultado
=
"FULL"
;}
return
resultado
=
"FULL"
;}
else
if
(
valoresIguales
==
2
){
else
if
(
(
valoresIguales
==
2
&&
mano
.
get
(
3
).
getValorInt
()
!=
mano
.
get
(
4
).
getValorInt
())
||
(
valoresIguales
==
2
&&
mano
.
get
(
0
).
getValorInt
()
!=
mano
.
get
(
1
).
getValorInt
())
){
return
resultado
=
"TRIO"
;
return
resultado
=
"TRIO"
;
}
}
if
((
valoresIguales
==
2
&&
mano
.
get
(
1
).
getValorInt
()
!=
mano
.
get
(
2
).
getValorInt
())
||
(
valoresIguales
==
2
&&
mano
.
get
(
2
).
getValorInt
()
!=
mano
.
get
(
4
).
getValorInt
()))
{
return
resultado
=
"DOBLE DUO"
;
}
else
if
(
valoresIguales
==
1
)
return
resultado
=
"DUO"
;
return
resultado
=
"CARTA ALTA"
;
return
resultado
=
"CARTA ALTA"
;
}
}
...
@@ -86,10 +79,10 @@ public class pokerGame {
...
@@ -86,10 +79,10 @@ public class pokerGame {
int
i
;
int
i
;
Carta
carta1
,
carta2
,
carta3
,
carta4
,
carta5
;
Carta
carta1
,
carta2
,
carta3
,
carta4
,
carta5
;
ArrayList
<
Carta
>
mano
=
new
ArrayList
<
Carta
>();
ArrayList
<
Carta
>
mano
=
new
ArrayList
<
Carta
>();
carta1
=
new
Carta
(
"
A
S"
);
carta1
=
new
Carta
(
"
8
S"
);
carta2
=
new
Carta
(
"
TS
"
);
carta2
=
new
Carta
(
"
8C
"
);
carta3
=
new
Carta
(
"
J
S"
);
carta3
=
new
Carta
(
"
7
S"
);
carta4
=
new
Carta
(
"
QS
"
);
carta4
=
new
Carta
(
"
7C
"
);
carta5
=
new
Carta
(
"KS"
);
carta5
=
new
Carta
(
"KS"
);
mano
.
add
(
carta5
)
;
mano
.
add
(
carta5
)
;
mano
.
add
(
carta4
)
;
mano
.
add
(
carta4
)
;
...
...
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