summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2013-09-15 16:29:39 +0200
committeremkael <emkael@tlen.pl>2013-09-15 16:29:39 +0200
commit2961410e2329d8adbc9238690ce7f5ad10f0463f (patch)
treebe2bdf8bc66120aa128711b27ae39bcc2c661ba7 /bin
parent31e90d57e7126002c588fd2a1bcfdd9653016c17 (diff)
* usunięcie błędu wyświetlającego "-0" dla poprawek krótkich honorów
Diffstat (limited to 'bin')
-rw-r--r--bin/lib/OsikaEvaluator.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/lib/OsikaEvaluator.php b/bin/lib/OsikaEvaluator.php
index e373536..3e74c7e 100644
--- a/bin/lib/OsikaEvaluator.php
+++ b/bin/lib/OsikaEvaluator.php
@@ -79,6 +79,9 @@ class OsikaEvaluator {
return 0;
}
$count = $this->_countHonors($suit);
+ if (!$count) {
+ return 0;
+ }
// H sec = -1/8 of a trick; Hx = -1/16 of a trick; HH sec = -1/8 of a trick
return $count * (($length === 1) ? -0.125 : -0.0625);
}