MAPG-111 query map area from DB

modify calculations to be in square km (instead of m)
This commit is contained in:
bence committed 2020-06-12 21:55:04 +02:00
1 parent 4d7c86fd1b
commit 7159867db0
6 files changed
+27 -28

No files matched your search

+1 -1
View File
@@ -123,7 +123,7 @@ class GameFlowController
private function calculateScore(float $distance, float $area): int
{
$goodness = 1.0 - ($distance / sqrt($area));
$goodness = 1.0 - ($distance / (sqrt($area) * 1000));
return (int) round(pow(static::MAX_SCORE, $goodness));
}