| @@ 236-246 (lines=11) @@ | ||
| 233 | } |
|
| 234 | } |
|
| 235 | ||
| 236 | public function fourOfAKind($type): void |
|
| 237 | { |
|
| 238 | if ($this->notScoredYet == true) { |
|
| 239 | // 4 OF A KIND |
|
| 240 | if (in_array(4, $this->occurrencesValues)) { |
|
| 241 | session()->put('score' . $type, ['score' => 50, 'feedback' => 'FOUR OF A KIND']); |
|
| 242 | session()->put('count.fourofakind', session('count.fourofakind') + 1); |
|
| 243 | $this->notScoredYet = false; |
|
| 244 | } |
|
| 245 | } |
|
| 246 | } |
|
| 247 | public function fullHouse($type): void |
|
| 248 | { |
|
| 249 | if ($this->notScoredYet == true) { |
|
| @@ 247-257 (lines=11) @@ | ||
| 244 | } |
|
| 245 | } |
|
| 246 | } |
|
| 247 | public function fullHouse($type): void |
|
| 248 | { |
|
| 249 | if ($this->notScoredYet == true) { |
|
| 250 | // FULL HOUSE |
|
| 251 | if (in_array(3, $this->occurrencesValues) && in_array(2, $this->occurrencesValues)) { |
|
| 252 | session()->put('score' . $type, ['score' => 25, 'feedback' => 'FULL HOUSE']); |
|
| 253 | session()->put('count.fullhouse', session('count.fullhouse') + 1); |
|
| 254 | $this->notScoredYet = false; |
|
| 255 | } |
|
| 256 | } |
|
| 257 | } |
|
| 258 | ||
| 259 | public function threeOfAKind($type): void |
|
| 260 | { |
|
| @@ 259-269 (lines=11) @@ | ||
| 256 | } |
|
| 257 | } |
|
| 258 | ||
| 259 | public function threeOfAKind($type): void |
|
| 260 | { |
|
| 261 | if ($this->notScoredYet == true) { |
|
| 262 | // 3 OF A KIND |
|
| 263 | if (in_array(3, $this->occurrencesValues) && in_array(1, $this->occurrencesValues)) { |
|
| 264 | session()->put('score' . $type, ['score' => 10, 'feedback' => 'THREE OF A KIND']); |
|
| 265 | session()->put('count.threeofakind', session('count.threeofakind') + 1); |
|
| 266 | $this->notScoredYet = false; |
|
| 267 | } |
|
| 268 | } |
|
| 269 | } |
|
| 270 | ||
| 271 | public function twoPairsOrPair($type): void |
|
| 272 | { |
|