{"action":"created","comment":{"url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/comments/65875936","id":65875936,"diff_hunk":"@@ -873,41 +873,272 @@ var bot = window.bot = (function() {\n                 bot.snakeWidth * bot.speedMult\n             );\n         },\n-\n         // Main bot\n         go: function() {\n             bot.every();\n \n-            if (bot.checkCollision()) {\n-                bot.lookForFood = false;\n-                if (bot.foodTimeout) {\n-                    window.clearTimeout(bot.foodTimeout);\n-                    bot.foodTimeout = window.setTimeout(\n-                        bot.foodTimer, 1000 / bot.opt.targetFps * bot.opt.foodFrames);\n-                }\n-            } else {\n-                bot.lookForFood = true;\n-                if (bot.foodTimeout === undefined) {\n-                    bot.foodTimeout = window.setTimeout(\n-                        bot.foodTimer, 1000 / bot.opt.targetFps * bot.opt.foodFrames);\n+            scheduler.executeTasks();\n+\n+        }\n+\n+\n+    };\n+})();\n+\n+var scheduler = window.scheduler = (function() {\n+    return {\n+        tasks: [],\n+\n+        init: function() {\n+            this.tasks = [\n+                {\n+                    id: 'AvoidCollisionEnemySnake',\n+                    active: true,\n+                    description: 'Avoid collision with other (enemy) snakes',\n+\n+                    getPriority: function () {\n+                        if (bot.checkCollision()) {\n+                            return 500;\n+                        }\n+                        else {\n+                            return 0;\n+                        }\n+                    },\n+                    execute: function () {\n+                        // NOP\n+                        // TODO: checkCollision() needs refactoring; it should return but not set direction\n+                    }\n+                },\n+                {\n+                    id: 'Eat',\n+                    active: true,\n+                    description: 'Eat what is detected by CheckForFood',\n+\n+                    getPriority: function () {\n+                        return 300;\n+                    },\n+                    execute: function () {\n+                        if (bot.currentFood) {\n+                            window.setAcceleration(bot.foodAccel());\n+                        }\n+\n+                        window.goalCoordinates = bot.currentFood;\n+                        canvasUtil.setMouseCoordinates(canvasUtil.mapToMouse(window.goalCoordinates));\n+                    }\n+                },\n+                {\n+                    id: 'CheckForFood',\n+                    active: true,\n+                    description: 'Trigger food scan',\n+\n+                    // We don't want to block other task so let priority change from\n+                    startPriority: 200,\n+                    // to maximum priority\n+                    triggerPriority: 400,\n+\n+                    getPriority: function () {\n+                        var currentPriority = this.priority;\n+\n+                        if (this.priority < this.triggerPriority) {\n+                            // Increment priority to trigger bot.computeFoodGoal\n+                            var step = (this.triggerPriority - this.startPriority) / bot.opt.targetFps * bot.opt.foodFrames;\n+                            return Math.round(this.priority + step);\n+                        }\n+                        return this.startPriority;\n+                    },\n+                    execute: function () {\n+                        bot.computeFoodGoal();\n+                        if (bot.currentFood) {\n+                            window.setAcceleration(bot.foodAccel());\n+                        }\n+\n+                        window.goalCoordinates = bot.currentFood;\n+                        canvasUtil.setMouseCoordinates(canvasUtil.mapToMouse(window.goalCoordinates));\n+                    }\n+                },\n+                {\n+                    id: 'MoveToXY',\n+                    active: false,\n+                    description: 'Move to the given way point',\n+\n+                    // Value is somewhat related to CheckForFood priorities\n+                    defaultPriority: 300,\n+\n+                    // Where to move\n+                    point: {\n+                        x: 20000,\n+                        y: 20000\n+                    },\n+\n+                    getPriority: function () {\n+                        if (canvasUtil.getDistance2(window.snake.xx, window.snake.yy, this.point.x, this.point.y) > 1000) {\n+                            return this.defaultPriority;\n+                        }\n+                        else {\n+                            this.active = false;\n+                        }\n+                    },\n+                    execute: function () {\n+                        window.goalCoordinates = this.point;\n+                        canvasUtil.setMouseCoordinates(canvasUtil.mapToMouse(window.goalCoordinates));\n+                    }\n+                },\n+                {\n+                    id: '_default',\n+                    active: true,\n+                    description: 'This is the default task which cannot be deactivated.',\n+\n+                    getPriority: function () {\n+                        // Always active\n+                        this.active = true;\n+\n+                        // Lowest priority\n+                        return 0;\n+                    },\n+                    execute: function () {\n+                        window.log(this.id, 'nothing to do');\n+                    }\n                 }\n-                window.setAcceleration(bot.foodAccel());\n+\n+            ];\n+        },\n+\n+        /**\n+         * Lists the current tasks.\n+         *\n+         * Helper function for task developers.\n+         *\n+         * Example:\n+         *   window.scheduler.listTasks();\n+         */\n+        listTasks: function() {\n+            scheduler.tasks.forEach(function (v, i, l) {\n+                console.log(v.id, 'Active:', v.active, 'Priority:', v.priority, v.description);\n+            });\n+        },\n+\n+        /**\n+         * Utility to create a task.\n+         *\n+         * @param id\n+         * @returns {{active: boolean, id: *, description: string, example: string, getPriority: getPriority, execute: execute}}\n+         */\n+        newTask: function(id) {\n+          return {\n+              // Only active task will be checked.\n+              active: false,\n+              // ID is required and must differ from existing task\n+              id: id,\n+              // used when dumping all tasks\n+              description: 'Description of ' + id,\n+              example: 'Example of ' + id,\n+              getPriority: function() {\n+                  console.log('Task ' + id + ' should have an implementation for \"getPriority\"');\n+                  return 0;\n+              },\n+              execute: function() {\n+                  console.log('Task ' + id + ' should have an implementation for \"execute\"');\n+              }\n+          }\n+        },\n+\n+        /**\n+         * Add task with unique ID to scheduler.\n+         *\n+         * @param task\n+         */\n+        addTask: function(task) {\n+            if (scheduler.getTask(task.id) === undefined) {\n+                scheduler.tasks.push(task);\n+            }\n+            else {\n+                console.log('Cannot add task with same ID: ' + task.id);\n             }\n         },\n \n-        // Timer version of food check\n-        foodTimer: function() {\n-            if (window.playing && bot.lookForFood &&\n-                window.snake !== null && window.snake.alive_amt === 1) {\n-                bot.computeFoodGoal();\n-                window.goalCoordinates = bot.currentFood;\n-                canvasUtil.setMouseCoordinates(canvasUtil.mapToMouse(window.goalCoordinates));\n+        /**\n+         * Get the task for give ID.\n+         *\n+         * @param id\n+         * @returns {*}\n+         */\n+        getTask: function(id) {\n+            var index = scheduler.tasks.findIndex(function (v, i, l) {\n+                return v.id === id;\n+            });\n+\n+            if (index !== -1) {\n+                return scheduler.tasks[index];\n             }\n-            bot.foodTimeout = undefined;\n+\n+            console.log('Task ' + id + ' not found');\n+\n+        },\n+\n+        /**\n+         * Delete task for given ID.\n+         * @param id\n+         */\n+        deleteTask: function(id) {\n+            var index = scheduler.tasks.findIndex(function (v, i, l) {","path":"bot.user.js","position":233,"original_position":233,"commit_id":"c16a4dbb5950bd1d7c73f1f0b20c7f91b75ec3d5","original_commit_id":"c16a4dbb5950bd1d7c73f1f0b20c7f91b75ec3d5","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Unexpected space before function parentheses.<br>'l' is defined but never used","created_at":"2016-06-06T11:39:33Z","updated_at":"2016-06-06T11:39:33Z","html_url":"https://github.com/ErmiyaEskandary/Slither.io-bot/pull/292#discussion_r65875936","pull_request_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/292","_links":{"self":{"href":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/comments/65875936"},"html":{"href":"https://github.com/ErmiyaEskandary/Slither.io-bot/pull/292#discussion_r65875936"},"pull_request":{"href":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/292"}}},"pull_request":{"url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/292","id":72624313,"html_url":"https://github.com/ErmiyaEskandary/Slither.io-bot/pull/292","diff_url":"https://github.com/ErmiyaEskandary/Slither.io-bot/pull/292.diff","patch_url":"https://github.com/ErmiyaEskandary/Slither.io-bot/pull/292.patch","issue_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/issues/292","number":292,"state":"open","locked":false,"title":"Feature/task execution","user":{"login":"clemens-tolboom","id":371014,"avatar_url":"https://avatars.githubusercontent.com/u/371014?v=3","gravatar_id":"","url":"https://api.github.com/users/clemens-tolboom","html_url":"https://github.com/clemens-tolboom","followers_url":"https://api.github.com/users/clemens-tolboom/followers","following_url":"https://api.github.com/users/clemens-tolboom/following{/other_user}","gists_url":"https://api.github.com/users/clemens-tolboom/gists{/gist_id}","starred_url":"https://api.github.com/users/clemens-tolboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clemens-tolboom/subscriptions","organizations_url":"https://api.github.com/users/clemens-tolboom/orgs","repos_url":"https://api.github.com/users/clemens-tolboom/repos","events_url":"https://api.github.com/users/clemens-tolboom/events{/privacy}","received_events_url":"https://api.github.com/users/clemens-tolboom/received_events","type":"User","site_admin":false},"body":"As I changed my PR #273 into a branch it deserves an issue\r\n\r\n## Branch\r\n\r\nhttps://github.com/ErmiyaEskandary/Slither.io-bot/tree/feature/task-execution\r\n\r\n<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\n\r\nAs discussed in #266 but not completed yet here is my first stab.\r\n\r\nMy basic implementation uses a tasks list with priorities. I have added a few task\r\n\r\n- CheckForFood: Trigger food scan. It has a changing priority to allow other tasks to be performed.\r\n- MoveToXY move to the given waypoint\r\n- AvoidCollisionEnemySnake: Avoid collision with other (enemy) snakes. It using existing code.\r\n- ListTasks: List the current set of tasks. Has lowest priority\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\n\r\n### Problem\r\n\r\nAdding new behaviour is difficult as this is __hard coded__. With A* it was still coded but easier to add new behavior. Furthermore we have a check for food triggered by a window timer which makes it harder too. It is not possible to add behaviour by another user script either.\r\n\r\n### Solution\r\n\r\nThis branch decouples the code\r\n```\r\n// Main bot\r\ngo: function() {\r\n```\r\n\r\nby replacing the parts mentioned above into a task scheduler. This allows for prioritise / (de)activate / adding tasks so the behaviour is more dynamic and alterable from outside this project (ie console).\r\n\r\nIt adds menu entries to toggle tasks to test particular behaviour.\r\n\r\n### Features\r\n\r\n```javascript\r\n// Activate task\r\nwindow.scheduler.getTask('MoveToXY').active = true;\r\n\r\n// Set new point\r\nwindow.scheduler.getTask('MoveToXY').point = {x: 21600, y: 21600};\r\n\r\n// Prepare a new Task\r\nvar newTask = window.scheduler.newTask('dummy')\r\n\r\n// Add new task\r\nwindow.scheduler.addTask(newTask);\r\n\r\n// Cannot add duplicate task ID\r\nwindow.scheduler.addTask(window.scheduler.newTask('dummy'));\r\n\r\n// Delete task\r\nwindow.scheduler.deleteTask('dummy');\r\n\r\n// Report on tasks\r\nwindow.scheduler.getTask('ListTasks').execute();\r\n```\r\n\r\n#### Task list\r\n\r\n```\r\nwindow.scheduler.listTasks()\r\n\r\nCheckForFood Active: true Priority: 397 Trigger food scan\r\nAvoidCollisionEnemySnake Active: true Priority: 0 Avoid collision with other (enemy) snakes\r\n_default Active: true Priority: 0 This is the default task which cannot be deactivated.\r\nMoveToXY Active: false Priority: 300 Move to the given way point\r\n```\r\n## Screenshots (if appropriate):\r\n\r\n### Menu\r\n\r\n![slither_io](https://cloud.githubusercontent.com/assets/371014/15781445/72fb355e-29a6-11e6-89c0-33d59a4c7425.png)\r\n\r\n### MoveToXY\r\n\r\n![slither_io](https://cloud.githubusercontent.com/assets/371014/15740974/ab2f37b2-28b7-11e6-9f5d-0abcf6356157.png)\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] **My code adheres to the code style of this project but most importantly of all to the things mentioned in CONTRIBUTING.md and PULL_REQUEST_TEMPLATE.md.**\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n\r\n## TODOs\r\n\r\n- [x] Fix priority for MoveToXY (stop when reached; lower priority when nearing P(x,y)?\r\n- [x] MoveToXY is now hard coded as move to center and never looses priority. It makes the bot reaching center.\r\n- [x] ~~Add surround algorithm from A* branch~~\r\n- [x] ~~Add more from A* branch~~\r\n- [x] ~~Receive lots of feedback~~\r\n- [x] Provide task getter function getTaskByID\r\n- [x] Add default task\r\n- [x] Remove ListTasks as that is no actual task\r\n- [x] Add task.active boolean\r\n- [x] Check task structure so far.\r\n- [x] Add `schedule.init()` when entering game\r\n- [x] #285 Create issue when PR lands regarding __ AvoidCollisionEnemySnake __ as mentioned in https://github.com/ErmiyaEskandary/Slither.io-bot/issues/275#issuecomment-223595741\r\n- [x] #284 Create issue when PR lands to split collision snake and wall","created_at":"2016-06-05T08:57:40Z","updated_at":"2016-06-06T11:39:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33e5beae7bb88b6d4423d2dae4dc5ace12f9fe8f","assignee":{"login":"clemens-tolboom","id":371014,"avatar_url":"https://avatars.githubusercontent.com/u/371014?v=3","gravatar_id":"","url":"https://api.github.com/users/clemens-tolboom","html_url":"https://github.com/clemens-tolboom","followers_url":"https://api.github.com/users/clemens-tolboom/followers","following_url":"https://api.github.com/users/clemens-tolboom/following{/other_user}","gists_url":"https://api.github.com/users/clemens-tolboom/gists{/gist_id}","starred_url":"https://api.github.com/users/clemens-tolboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clemens-tolboom/subscriptions","organizations_url":"https://api.github.com/users/clemens-tolboom/orgs","repos_url":"https://api.github.com/users/clemens-tolboom/repos","events_url":"https://api.github.com/users/clemens-tolboom/events{/privacy}","received_events_url":"https://api.github.com/users/clemens-tolboom/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/milestones/1","html_url":"https://github.com/ErmiyaEskandary/Slither.io-bot/milestones/Task%20Execution","labels_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/milestones/1/labels","id":1809922,"number":1,"title":"Task Execution","description":"clemens-tolboom's implementation of tasks, prioritized by a scheduler","creator":{"login":"ChadSki","id":1082566,"avatar_url":"https://avatars.githubusercontent.com/u/1082566?v=3","gravatar_id":"","url":"https://api.github.com/users/ChadSki","html_url":"https://github.com/ChadSki","followers_url":"https://api.github.com/users/ChadSki/followers","following_url":"https://api.github.com/users/ChadSki/following{/other_user}","gists_url":"https://api.github.com/users/ChadSki/gists{/gist_id}","starred_url":"https://api.github.com/users/ChadSki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChadSki/subscriptions","organizations_url":"https://api.github.com/users/ChadSki/orgs","repos_url":"https://api.github.com/users/ChadSki/repos","events_url":"https://api.github.com/users/ChadSki/events{/privacy}","received_events_url":"https://api.github.com/users/ChadSki/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2016-06-06T06:18:07Z","updated_at":"2016-06-06T07:09:22Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/292/commits","review_comments_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/292/comments","review_comment_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/issues/292/comments","statuses_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/statuses/c16a4dbb5950bd1d7c73f1f0b20c7f91b75ec3d5","head":{"label":"ErmiyaEskandary:feature/task-execution","ref":"feature/task-execution","sha":"c16a4dbb5950bd1d7c73f1f0b20c7f91b75ec3d5","user":{"login":"ErmiyaEskandary","id":18369104,"avatar_url":"https://avatars.githubusercontent.com/u/18369104?v=3","gravatar_id":"","url":"https://api.github.com/users/ErmiyaEskandary","html_url":"https://github.com/ErmiyaEskandary","followers_url":"https://api.github.com/users/ErmiyaEskandary/followers","following_url":"https://api.github.com/users/ErmiyaEskandary/following{/other_user}","gists_url":"https://api.github.com/users/ErmiyaEskandary/gists{/gist_id}","starred_url":"https://api.github.com/users/ErmiyaEskandary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErmiyaEskandary/subscriptions","organizations_url":"https://api.github.com/users/ErmiyaEskandary/orgs","repos_url":"https://api.github.com/users/ErmiyaEskandary/repos","events_url":"https://api.github.com/users/ErmiyaEskandary/events{/privacy}","received_events_url":"https://api.github.com/users/ErmiyaEskandary/received_events","type":"User","site_admin":false},"repo":{"id":56799884,"name":"Slither.io-bot","full_name":"ErmiyaEskandary/Slither.io-bot","owner":{"login":"ErmiyaEskandary","id":18369104,"avatar_url":"https://avatars.githubusercontent.com/u/18369104?v=3","gravatar_id":"","url":"https://api.github.com/users/ErmiyaEskandary","html_url":"https://github.com/ErmiyaEskandary","followers_url":"https://api.github.com/users/ErmiyaEskandary/followers","following_url":"https://api.github.com/users/ErmiyaEskandary/following{/other_user}","gists_url":"https://api.github.com/users/ErmiyaEskandary/gists{/gist_id}","starred_url":"https://api.github.com/users/ErmiyaEskandary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErmiyaEskandary/subscriptions","organizations_url":"https://api.github.com/users/ErmiyaEskandary/orgs","repos_url":"https://api.github.com/users/ErmiyaEskandary/repos","events_url":"https://api.github.com/users/ErmiyaEskandary/events{/privacy}","received_events_url":"https://api.github.com/users/ErmiyaEskandary/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ErmiyaEskandary/Slither.io-bot","description":"Just for AI. This is a project which the aim is to make a computer play against humans inside a human-driven game, which is in this case Slither.io. The goal is to make the snake live and get as long as possible.","fork":false,"url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot","forks_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/forks","keys_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/teams","hooks_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/hooks","issue_events_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/issues/events{/number}","events_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/events","assignees_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/assignees{/user}","branches_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/branches{/branch}","tags_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/tags","blobs_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/languages","stargazers_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/stargazers","contributors_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/contributors","subscribers_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/subscribers","subscription_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/subscription","commits_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/contents/{+path}","compare_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/merges","archive_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/downloads","issues_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/issues{/number}","pulls_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/labels{/name}","releases_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/releases{/id}","deployments_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/deployments","created_at":"2016-04-21T19:21:23Z","updated_at":"2016-06-04T19:09:46Z","pushed_at":"2016-06-06T11:39:25Z","git_url":"git://github.com/ErmiyaEskandary/Slither.io-bot.git","ssh_url":"git@github.com:ErmiyaEskandary/Slither.io-bot.git","clone_url":"https://github.com/ErmiyaEskandary/Slither.io-bot.git","svn_url":"https://github.com/ErmiyaEskandary/Slither.io-bot","homepage":"","size":1177,"stargazers_count":76,"watchers_count":76,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":39,"forks":57,"open_issues":39,"watchers":76,"default_branch":"develop"}},"base":{"label":"ErmiyaEskandary:develop","ref":"develop","sha":"32b9fa59afe3b39011b7530cde444bd06cb1db90","user":{"login":"ErmiyaEskandary","id":18369104,"avatar_url":"https://avatars.githubusercontent.com/u/18369104?v=3","gravatar_id":"","url":"https://api.github.com/users/ErmiyaEskandary","html_url":"https://github.com/ErmiyaEskandary","followers_url":"https://api.github.com/users/ErmiyaEskandary/followers","following_url":"https://api.github.com/users/ErmiyaEskandary/following{/other_user}","gists_url":"https://api.github.com/users/ErmiyaEskandary/gists{/gist_id}","starred_url":"https://api.github.com/users/ErmiyaEskandary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErmiyaEskandary/subscriptions","organizations_url":"https://api.github.com/users/ErmiyaEskandary/orgs","repos_url":"https://api.github.com/users/ErmiyaEskandary/repos","events_url":"https://api.github.com/users/ErmiyaEskandary/events{/privacy}","received_events_url":"https://api.github.com/users/ErmiyaEskandary/received_events","type":"User","site_admin":false},"repo":{"id":56799884,"name":"Slither.io-bot","full_name":"ErmiyaEskandary/Slither.io-bot","owner":{"login":"ErmiyaEskandary","id":18369104,"avatar_url":"https://avatars.githubusercontent.com/u/18369104?v=3","gravatar_id":"","url":"https://api.github.com/users/ErmiyaEskandary","html_url":"https://github.com/ErmiyaEskandary","followers_url":"https://api.github.com/users/ErmiyaEskandary/followers","following_url":"https://api.github.com/users/ErmiyaEskandary/following{/other_user}","gists_url":"https://api.github.com/users/ErmiyaEskandary/gists{/gist_id}","starred_url":"https://api.github.com/users/ErmiyaEskandary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErmiyaEskandary/subscriptions","organizations_url":"https://api.github.com/users/ErmiyaEskandary/orgs","repos_url":"https://api.github.com/users/ErmiyaEskandary/repos","events_url":"https://api.github.com/users/ErmiyaEskandary/events{/privacy}","received_events_url":"https://api.github.com/users/ErmiyaEskandary/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ErmiyaEskandary/Slither.io-bot","description":"Just for AI. This is a project which the aim is to make a computer play against humans inside a human-driven game, which is in this case Slither.io. The goal is to make the snake live and get as long as possible.","fork":false,"url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot","forks_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/forks","keys_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/teams","hooks_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/hooks","issue_events_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/issues/events{/number}","events_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/events","assignees_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/assignees{/user}","branches_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/branches{/branch}","tags_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/tags","blobs_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/languages","stargazers_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/stargazers","contributors_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/contributors","subscribers_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/subscribers","subscription_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/subscription","commits_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/contents/{+path}","compare_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/merges","archive_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/downloads","issues_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/issues{/number}","pulls_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/labels{/name}","releases_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/releases{/id}","deployments_url":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/deployments","created_at":"2016-04-21T19:21:23Z","updated_at":"2016-06-04T19:09:46Z","pushed_at":"2016-06-06T11:39:25Z","git_url":"git://github.com/ErmiyaEskandary/Slither.io-bot.git","ssh_url":"git@github.com:ErmiyaEskandary/Slither.io-bot.git","clone_url":"https://github.com/ErmiyaEskandary/Slither.io-bot.git","svn_url":"https://github.com/ErmiyaEskandary/Slither.io-bot","homepage":"","size":1177,"stargazers_count":76,"watchers_count":76,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":39,"forks":57,"open_issues":39,"watchers":76,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/292"},"html":{"href":"https://github.com/ErmiyaEskandary/Slither.io-bot/pull/292"},"issue":{"href":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/issues/292"},"comments":{"href":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/issues/292/comments"},"review_comments":{"href":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/292/comments"},"review_comment":{"href":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/pulls/292/commits"},"statuses":{"href":"https://api.github.com/repos/ErmiyaEskandary/Slither.io-bot/statuses/c16a4dbb5950bd1d7c73f1f0b20c7f91b75ec3d5"}}}}
{"actor":{"display_login":"houndci-bot"}}