Skip to content

Commit a0cb7b8

Browse files
committed
2023.07.01
1 parent a0cac90 commit a0cb7b8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

php/2023/07/01.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private function determineSortScore(): void
6969
return;
7070
}
7171

72-
// fullHouse -- cards are ordered, they are the same if first and penultimate have the same value
72+
// fullHouse
7373
if (($this->cards[0] === $this->cards[1] && $this->cards[2] === $this->cards[4]) || ($this->cards[0] === $this->cards[2] && $this->cards[3] === $this->cards[4])) {
7474
$this->sortScore += self::SORT_SCORES['fullHouse'];
7575
return;
@@ -82,7 +82,11 @@ private function determineSortScore(): void
8282
}
8383

8484
// twoPair
85-
if (($this->cards[0] === $this->cards[1] && $this->cards[2] === $this->cards[3]) || ($this->cards[1] === $this->cards[2] && $this->cards[3] === $this->cards[4])) {
85+
if (
86+
($this->cards[0] === $this->cards[1] && $this->cards[2] === $this->cards[3])
87+
|| ($this->cards[1] === $this->cards[2] && $this->cards[3] === $this->cards[4])
88+
|| ($this->cards[0] === $this->cards[1] && $this->cards[3] === $this->cards[4])
89+
) {
8690
$this->sortScore += self::SORT_SCORES['twoPair'];
8791
return;
8892
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy