| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- // Template PHP minimal pour neutral
- if (!interface_exists('MapTemplateInterface')) {
- interface MapTemplateInterface
- {
- public static function id(): string;
- public static function applyTemplate($map): void;
- public static function tileDefinitions(): array;
- }
- }
- class NeutralTemplate implements MapTemplateInterface
- {
- public static function id(): string
- {
- return 'neutral';
- }
- public static function applyTemplate($map): void
- {
- // aucun changement, template neutre
- }
- public static function tileDefinitions(): array
- {
- return [
- ['id' => 'empty', 'name' => 'Vide', 'color' => '#eee'],
- ['id' => 'grass', 'name' => 'Herbe', 'color' => '#8fd694']
- ];
- }
- }
|