https://github.com/wintercms/wn-battlesnake-plugin
WIP playground for building Battlesnakes in Winter CMS
https://github.com/wintercms/wn-battlesnake-plugin
Last synced: 24 days ago
JSON representation
WIP playground for building Battlesnakes in Winter CMS
- Host: GitHub
- URL: https://github.com/wintercms/wn-battlesnake-plugin
- Owner: wintercms
- License: mit
- Created: 2023-12-18T09:46:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-05T20:29:09.000Z (8 months ago)
- Last Synced: 2025-12-07T10:48:08.598Z (8 months ago)
- Language: PHP
- Size: 7.22 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-wintercms - Winter.Battlesnake - WIP plugin for building [Battlesnakes](https://play.battlesnake.com/) in Winter CMS. (Uncategorized / Uncategorized)
README
# Battlesnake Plugin
[](https://github.com/wintercms/wn-battlesnake-plugin/blob/main/LICENSE)
Playground for building & debugging battlesnakes in Winter CMS.
## Installation
This plugin is available for installation via [Composer](http://getcomposer.org/).
```bash
composer require winter/wn-battlesnake-plugin
```
After installing the plugin you will need to run the migrations and (if you are using a [public folder](https://wintercms.com/docs/develop/docs/setup/configuration#using-a-public-folder)) [republish your public directory](https://wintercms.com/docs/develop/docs/console/setup-maintenance#mirror-public-files).
```bash
php artisan migrate
```
## Running Local Games
Run local Battlesnake games using your snake templates with the `battlesnake:play` command:
```bash
# Run a game with specific snakes (by slug)
php artisan battlesnake:play snake1 snake2
# Run multiple instances of the same snake
php artisan battlesnake:play local:3
# Mix snakes and counts
php artisan battlesnake:play snake1 snake2:2 snake3
# Interactive mode (prompts for snake selection)
php artisan battlesnake:play
```
### Options
| Option | Description | Default |
|--------|-------------|---------|
| `-W, --width` | Board width | 11 |
| `-H, --height` | Board height | 11 |
| `-t, --timeout` | Request timeout in milliseconds | 500 |
| `-r, --seed` | Random seed for reproducibility | - |
| `-d, --delay` | Delay between turns in milliseconds | - |
| `-g, --gametype` | Game type (standard, royale, etc.) | standard |
| `-m, --map` | Map to use | standard |
| `-b, --browser` | Open game in browser viewer | - |
| `-o, --output` | Output game log to JSON file | - |
### Examples
```bash
# Quick game with browser viewer
php artisan battlesnake:play local:4 --browser
# Slow game for debugging
php artisan battlesnake:play local:2 --delay=500
# Reproducible game with seed
php artisan battlesnake:play snake1 snake2 --seed=12345
# Large board royale game
php artisan battlesnake:play local:8 -W 19 -H 19 -g royale
# Save game log for replay
php artisan battlesnake:play local:4 -o game.json
```