readability improvement
This commit is contained in:
parent
bff06901be
commit
22548a4339
@ -29,7 +29,7 @@ type(Hand, 2) :- count_hand(Hand, 2, 4).
|
|||||||
type(Hand, 1) :- count_hand(Hand, 1, _).
|
type(Hand, 1) :- count_hand(Hand, 1, _).
|
||||||
|
|
||||||
count_hand(Hand, NMaxCard, NUniqueCards) :-
|
count_hand(Hand, NMaxCard, NUniqueCards) :-
|
||||||
convlist([X, X]>>(X =\= 1), Hand, NoJokerHand),
|
exclude(=:=(1), Hand, NoJokerHand),
|
||||||
maplist(count(NoJokerHand), NoJokerHand, Counts),
|
maplist(count(NoJokerHand), NoJokerHand, Counts),
|
||||||
max_member(MaxCountNoJoker, Counts),
|
max_member(MaxCountNoJoker, Counts),
|
||||||
count(Hand, 1, NJokers),
|
count(Hand, 1, NJokers),
|
||||||
|
Loading…
Reference in New Issue
Block a user