2026-10-28 18:45:02 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use App\Game\Map\Continent;
|
|
|
|
|
|
2026-10-29 00:51:37 +00:00
|
|
|
it('names continents by row and column from the top-left, with the world starting at 0|0', function () {
|
|
|
|
|
expect(Continent::of(0, 0))->toBe('K55')
|
|
|
|
|
->and(Continent::of(-1, -1))->toBe('K44')
|
|
|
|
|
->and(Continent::of(-1, 0))->toBe('K54')
|
|
|
|
|
->and(Continent::of(-500, -500))->toBe('K00')
|
|
|
|
|
->and(Continent::of(499, 499))->toBe('K99')
|
|
|
|
|
->and(Continent::of(-377, -44))->toBe('K41');
|
2026-10-28 18:45:02 +00:00
|
|
|
});
|