{"id":13693010,"url":"https://github.com/tphummel/bobby-witt","last_synced_at":"2026-02-27T00:33:51.208Z","repository":{"id":44090616,"uuid":"384274232","full_name":"tphummel/bobby-witt","owner":"tphummel","description":"⚔️ 🐍","archived":false,"fork":false,"pushed_at":"2021-10-30T03:17:27.000Z","size":479,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-25T03:08:42.776Z","etag":null,"topics":["battlesnake"],"latest_commit_sha":null,"homepage":"https://play.battlesnake.com/u/tphummel/bobby-witt/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tphummel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-08T23:50:27.000Z","updated_at":"2023-02-27T17:07:01.000Z","dependencies_parsed_at":"2022-09-13T12:02:06.366Z","dependency_job_id":null,"html_url":"https://github.com/tphummel/bobby-witt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tphummel%2Fbobby-witt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tphummel%2Fbobby-witt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tphummel%2Fbobby-witt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tphummel%2Fbobby-witt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tphummel","download_url":"https://codeload.github.com/tphummel/bobby-witt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252108597,"owners_count":21696100,"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"],"created_at":"2024-08-02T17:01:04.461Z","updated_at":"2026-02-27T00:33:51.133Z","avatar_url":"https://github.com/tphummel.png","language":"JavaScript","funding_links":[],"categories":["Battlesnakes"],"sub_categories":[],"readme":"# bobby witt\n\n[Bobby Witt](https://play.battlesnake.com/u/tphummel/bobby-witt/) is my second [battlesnake](https://play.battlesnake.com). (below: light pink with rattler tail)\n\n[![Alt text](/bobby-witt.gif)](https://play.battlesnake.com/g/81bdbe58-0229-49f4-9ef1-cf870b2fc616/)\n\n## \"Features\"\n\n- Will avoid the wall if possible.\n- Will avoid snakes' current position if possible.\n- Will avoid going head to head with a snake. \n- Will look one move ahead to avoid danger. \n- Will avoid hazard sauce. \n- Will eat adjacent food if safe. \n\n## Notable things\n\n- Battlesnake is super cool.\n- I [deployed](https://bobby-witt-battlesnake.tomhummel.com) this snake using [Cloudflare Workers](https://workers.cloudflare.com/)\n- I wrote [unit tests](/test.js) for various scenarios the snake may find itself in and what I expect it to do (or not do)\n- I added the ability to [run the snake locally](/local.js) with node.js. It is very close to the same code which runs in cloudflare.\n\n## Usage\n\nrun locally:\n```\nDEBUG=1 node local.js\n```\n\ncurl example:\n\n```\ncurl --header \"Content-Type: application/json\" \\\n  --request POST \\\n  --data '{\"game\":{\"id\":\"f59488b9-b159-45b0-ae2e-221648b1aa58\",\"timeout\":500},\"turn\":35,\"board\":{\"height\":11,\"width\":11,\"food\":[{\"x\":10,\"y\":4},{\"x\":5,\"y\":5},{\"x\":4,\"y\":4},{\"x\":2,\"y\":5},{\"x\":6,\"y\":2},{\"x\":4,\"y\":2},{\"x\":4,\"y\":0},{\"x\":6,\"y\":6}],\"hazards\":[],\"snakes\":[{\"id\":\"acb1e234-918c-421c-9a48-84f254fcf8bd\",\"name\":\"acb1e234-918c-421c-9a48-84f254fcf8bd\",\"health\":66,\"body\":[{\"x\":1,\"y\":9},{\"x\":1,\"y\":8},{\"x\":1,\"y\":7}],\"latency\":0,\"head\":{\"x\":1,\"y\":9},\"length\":3,\"shout\":\"\",\"squad\":\"\"}]},\"you\":{\"id\":\"acb1e234-918c-421c-9a48-84f254fcf8bd\",\"name\":\"acb1e234-918c-421c-9a48-84f254fcf8bd\",\"health\":66,\"body\":[{\"x\":1,\"y\":9},{\"x\":1,\"y\":8},{\"x\":1,\"y\":7}],\"latency\":0,\"head\":{\"x\":1,\"y\":9},\"length\":3,\"shout\":\"\",\"squad\":\"\"}}' \\\n  http://localhost:8080\n  ```\n\n  play locally against a remote snake using the [battlesnake rules cli](https://github.com/BattlesnakeOfficial/rules):\n  ```\n  battlesnake play --viewmap --gametype duel --name local --url http://localhost:8080 --name cf --url https://battlesnake.tomhummel.com\n  ```\n\n## What does the name mean?\n\n[Bobby Witt](https://www.baseball-reference.com/players/w/wittbo01.shtml) is a professional baseball player who has [walked alot of batters](https://stathead.com/tiny/YZutT). This snake has poor control.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftphummel%2Fbobby-witt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftphummel%2Fbobby-witt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftphummel%2Fbobby-witt/lists"}