{"id":16330045,"url":"https://github.com/luin/codegame","last_synced_at":"2025-04-07T06:13:43.815Z","repository":{"id":22531767,"uuid":"25872408","full_name":"luin/CodeGame","owner":"luin","description":"🎮 JavaScript AI tank game","archived":false,"fork":false,"pushed_at":"2020-08-09T08:11:24.000Z","size":2134,"stargazers_count":349,"open_issues_count":18,"forks_count":74,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-03-31T05:06:41.528Z","etag":null,"topics":["ai","game","mysql","nodejs"],"latest_commit_sha":null,"homepage":"http://zihua.li/2014/11/talk-about-codegame/","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/luin.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":"2014-10-28T14:09:32.000Z","updated_at":"2025-03-22T22:27:33.000Z","dependencies_parsed_at":"2022-08-21T06:30:27.175Z","dependency_job_id":null,"html_url":"https://github.com/luin/CodeGame","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luin%2FCodeGame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luin%2FCodeGame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luin%2FCodeGame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luin%2FCodeGame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luin","download_url":"https://codeload.github.com/luin/CodeGame/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601449,"owners_count":20964864,"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":["ai","game","mysql","nodejs"],"created_at":"2024-10-10T23:18:18.094Z","updated_at":"2025-04-07T06:13:43.794Z","avatar_url":"https://github.com/luin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code Game\n\nCode GAME 是一个通过编写 AI 脚本控制坦克进行比赛的游戏。\n\n娱乐第一，请点右上角 star！\n\n## 安装\n\n    $ npm install\n    $ npm run build\n    $ cp config/_sample.json config/development.json\n    $ vim config/development.json\n    $ node app\n\n需要软件版本：\n\nNode v0.11.12 或更高版本\nRedis v2.4 或更高版本\nMySQL\n\n## 配置\n\n1. GitHub 配置\n    在 GitHub [创建新应用](https://github.com/settings/applications/new)，在 Authorization callback URL 栏目填写 http://127.0.0.1:3000/account/github/callback。 然后将应用的 key 和 secret 填到 config/development.json 里的相应位置\n\n2. 地图\n    地图信息存储在数据库的 Maps 表中，其中 data 为地图信息，x 表示石头，o 表示草坪，. 表示空地。abcd 表示玩家 1 的出生点（分别对应初始朝向 上 右 下 左），ABCD 表示玩家 2 的出生点。以 | 分隔每行。默认的地图为：\n\n        xxxxxxxxxxxxxxxxxxx|xooo..............x|xoax.....x........x|xxxx.....x........x|x........x........x|x..xxxxxxxxxxx....x|x....ooxoooooo....x|x....ooooooooo....x|x....ooooooxoo....x|x....xxxxxxxxxxx..x|x........x........x|x........x.....xxxx|x........x.....xCox|x..............ooox|xxxxxxxxxxxxxxxxxxx\n\n## 计算排行\n\n    node services/calc_rank.js\n\n## 技术栈\n\nNode.js, MySQL\n\n## 介绍文章\n\n[Code Game 对技术的选取——兼谈为何不应该用 CoffeeScript 与 Less](http://zihua.li/2014/11/talk-about-codegame/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluin%2Fcodegame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluin%2Fcodegame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluin%2Fcodegame/lists"}