game-village-politics-backend/app/Game/Map/Continent.php

18 lines
356 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Game\Map;
/**
* Continents are 100 × 100 blocks named by their y and x hundreds, as in Die Stämme:
* 500|500 lies in K55, 123|456 in K41.
*/
final class Continent
{
public const SIZE = 100;
public static function of(int $x, int $y): string
{
return 'K'.intdiv($y, self::SIZE).intdiv($x, self::SIZE);
}
}