Add starters/php/ with complete starter kit for AI Code Battle: - index.php: HTTP server with HMAC verification, routing for /turn and /health - strategy.php: Stub compute_moves() function with example energy-seeking logic - game.php: Game state types (GameState, Position, VisibleBot, etc.) and grid utilities (toroidal_manhattan, toroidal_chebyshev, bfs, neighbors, cardinal_steps) - Dockerfile: Alpine-based PHP 8.4 container - README.md: Quickstart documentation with local/Docker run instructions - composer.json: Minimal composer config (no external dependencies) Follows same contract as other starters: - Listens on port 8080 (BOT_PORT env var) - POST /turn: Receives game state JSON, returns moves JSON - GET /health: Health check endpoint - HMAC-SHA256 signature verification on requests/responses Reference implementation: bots/guardian/ (GuardianBot in PHP) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
14 lines
272 B
JSON
14 lines
272 B
JSON
{
|
|
"name": "acb-starter-php",
|
|
"description": "PHP starter kit for AI Code Battle",
|
|
"type": "project",
|
|
"require": {
|
|
"php": ">=8.4"
|
|
},
|
|
"license": "MIT",
|
|
"autoload": {
|
|
"psr-4": {
|
|
"AcbStarter\\": "src/"
|
|
}
|
|
}
|
|
}
|