+ if ($guess == $solution) {
+ if ($first) {
+ return $this->getGuessingSetting('points_exact_first', 1);
+ }
+ return $this->getGuessingSetting('points_exact_other', 1);
+ }
+ $distance = abs(intval($guess) - intval($solution));
+ if ($distance <= $this->getGuessingSetting('points_close_max', 3)) {
+ if ($first) {
+ return $this->getGuessingSetting('points_close_first', 1);
+ }
+ return $this->getGuessingSetting('points_close_other', 1);
+ }
+ return 0;