{"id":13600526,"url":"https://github.com/BattlesnakeOfficial/rules","last_synced_at":"2025-04-11T00:31:26.410Z","repository":{"id":36980750,"uuid":"231176049","full_name":"BattlesnakeOfficial/rules","owner":"BattlesnakeOfficial","description":"Battlesnake Game Rules and Logic","archived":false,"fork":false,"pushed_at":"2024-07-05T19:43:42.000Z","size":510,"stargazers_count":101,"open_issues_count":4,"forks_count":54,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-06T06:30:48.903Z","etag":null,"topics":["battlesnake","cli","game-logic","game-rules"],"latest_commit_sha":null,"homepage":"https://play.battlesnake.com","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BattlesnakeOfficial.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-01T04:42:27.000Z","updated_at":"2025-02-23T21:37:20.000Z","dependencies_parsed_at":"2023-09-29T04:05:39.521Z","dependency_job_id":"b2a96bc6-8be1-4783-b0f5-f8995a87caf0","html_url":"https://github.com/BattlesnakeOfficial/rules","commit_stats":null,"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BattlesnakeOfficial%2Frules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BattlesnakeOfficial%2Frules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BattlesnakeOfficial%2Frules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BattlesnakeOfficial%2Frules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BattlesnakeOfficial","download_url":"https://codeload.github.com/BattlesnakeOfficial/rules/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322266,"owners_count":21084334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["battlesnake","cli","game-logic","game-rules"],"created_at":"2024-08-01T18:00:41.388Z","updated_at":"2025-04-11T00:31:25.631Z","avatar_url":"https://github.com/BattlesnakeOfficial.png","language":"Go","funding_links":[],"categories":["Go","Game Rules and Logic"],"sub_categories":[],"readme":"# BattlesnakeOfficial/rules\n\n[![codecov](https://codecov.io/gh/BattlesnakeOfficial/rules/branch/master/graph/badge.svg)](https://codecov.io/gh/BattlesnakeOfficial/rules)\n\n[Battlesnake](https://play.battlesnake.com) rules and game logic, implemented as a Go module. This code is used in production at [play.battlesnake.com](https://play.battlesnake.com). Issues and contributions welcome!\n\n\n## CLI for Running Battlesnake Games Locally\n\nThis repo provides a simple CLI tool to run games locally against your dev environment.\n\n### Installation\n\nDownload precompiled binaries here: \u003cbr\u003e\n[https://github.com/BattlesnakeOfficial/rules/releases](https://github.com/BattlesnakeOfficial/rules/releases)\n\nInstall as a Go package. Requires Go 1.18 or higher. [[Download](https://golang.org/dl/)]\n```\ngo install github.com/BattlesnakeOfficial/rules/cli/battlesnake@latest\n```\n\nCompile from source. Also requires Go 1.18 or higher.\n```\ngit clone git@github.com:BattlesnakeOfficial/rules.git\ncd rules\ngo build -o battlesnake ./cli/battlesnake/main.go\n```\n\n### Usage\n\nExample command to run a game locally:\n```\nbattlesnake play -W 11 -H 11 --name \u003cSNAKE_NAME\u003e --url \u003cSNAKE_URL\u003e -g solo -v\n```\n\nFor more details, see the [CLI README](cli/README.md).\n\n\n## FAQ\n\n### Can I run games locally?\n\nYes! [See the included CLI](cli/README.md).\n\n### How is this different from the old Battlesnake engine?\n\nThe [old game engine](https://github.com/battlesnakeio/engine) was re-written in early 2020 to handle a higher volume of concurrent games. As part of that rebuild we moved the game logic into a separate Go module that gets compiled into the production engine.\n\nThis provides two benefits: it makes it much simpler/easier to build new game modes, and it allows the community to get more involved in game development (without the maintenance overhead of the entire game engine).\n\n### Feedback\n\n* **Do you have an issue or suggestions for this repository?** Head over to our [Feedback Repository](https://play.battlesnake.com/feedback) today and let us know!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBattlesnakeOfficial%2Frules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBattlesnakeOfficial%2Frules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBattlesnakeOfficial%2Frules/lists"}