{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/comments/236040335","pull_request_review_id":178048684,"id":236040335,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjA0MDMzNQ==","diff_hunk":"@@ -0,0 +1,429 @@\n+'use strict';\n+var NUMBER_OF_IMAGES = 8;\n+var NUMBER_OF_ADS = 8;\n+var RUBLE_CURRENCY = '\\u20BD';\n+var MAX_ROOMS = 5;\n+var MIN_ROOMS = 1;\n+var MAX_GUESTS = 5;\n+var MIN_GUESTS = 1;\n+var MAX_X_LOCATION = 1199;\n+var MIN_X_LOCATION = 0;\n+var MAX_Y_LOCATION = 630;\n+var MIN_Y_LOCATION = 130;\n+var MIN_X_ADDRESS = 0;\n+var MAX_X_ADDRESS = 1200;\n+var MIN_Y_ADDRESS = 0;\n+var MAX_Y_ADDRESS = 600;\n+var OFFER_TITLES = ['Большая уютная квартира', 'Маленькая неуютная квартира', 'Огромный прекрасный дворец', 'Маленький ужасный дворец', 'Красивый гостевой домик', 'Некрасивый негостеприимный домик','Уютное бунгало далеко от моря', 'Неуютное бунгало по колено в воде'];\n+var TYPES_OF_DWELLING = {'palace': 'Дворец', 'flat': 'Квартира', 'house': 'Дом', 'bungalo': 'Бунгало'};\n+var MIN_PRICE = 1000;\n+var MAX_PRICE = 1000000;\n+var TIMES_OF_REGISTRATION = ['12:00', '13:00', '14:00'];\n+var OFFER_FEATURES = ['wifi', 'dishwasher', 'parking', 'washer', 'elevator', 'conditioner'];\n+var OFFER_PHOTOS = ['http://o0.github.io/assets/images/tokyo/hotel1.jpg', 'http://o0.github.io/assets/images/tokyo/hotel2.jpg', 'http://o0.github.io/assets/images/tokyo/hotel3.jpg'];\n+\n+var map = document.querySelector('.map');\n+\n+// Функция возращает случайный элемент из массива\n+/* var getRandomElementOfArray = function (array) {\n+  var randomElement = array[Math.floor(Math.random() * array.length)];\n+  return randomElement;\n+}; */\n+\n+//  Функция возращает случайное целое число между min и max - включительно\n+var getRandomInteger = function (min, max) {\n+  return Math.round(Math.random() * (max - min)) + min;\n+};\n+\n+//  Функция возращает случайный элемент массива\n+var getRendomItemOfArray = function (array) {\n+  return array[getRandomInteger(0, array.length - 1)];\n+};\n+\n+//  Функция вырезает случайный элемент массива\n+var cutRandomElementOfArray = function (array) {\n+  return array.splice(getRandomInteger(0, array.length - 1), 1).join();\n+};\n+\n+//  Функция перемешивает элементы массива\n+var jumbleElemetsOfArray = function (array) {\n+  var j;\n+  var temp;\n+  for (var i = array.length - 1; i > 0; i--) {\n+    j = Math.floor(Math.random() * (i + 1));\n+    temp = array[j];\n+    array[j] = array[i];\n+    array[i] = temp;\n+  }\n+  return array.slice();","path":"js/map.js","position":58,"original_position":58,"commit_id":"08484cc815165c8a4e5fee0403031834e057ed0d","original_commit_id":"08484cc815165c8a4e5fee0403031834e057ed0d","user":{"login":"BekoBou","id":128654,"node_id":"MDQ6VXNlcjEyODY1NA==","avatar_url":"https://avatars3.githubusercontent.com/u/128654?v=4","gravatar_id":"","url":"https://api.github.com/users/BekoBou","html_url":"https://github.com/BekoBou","followers_url":"https://api.github.com/users/BekoBou/followers","following_url":"https://api.github.com/users/BekoBou/following{/other_user}","gists_url":"https://api.github.com/users/BekoBou/gists{/gist_id}","starred_url":"https://api.github.com/users/BekoBou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BekoBou/subscriptions","organizations_url":"https://api.github.com/users/BekoBou/orgs","repos_url":"https://api.github.com/users/BekoBou/repos","events_url":"https://api.github.com/users/BekoBou/events{/privacy}","received_events_url":"https://api.github.com/users/BekoBou/received_events","type":"User","site_admin":false},"body":"Сначала `.slice()`, а потом перемешиваешь. Иначе ты ломаешь изначальный массив.","created_at":"2018-11-24T11:55:16Z","updated_at":"2018-11-24T11:55:16Z","html_url":"https://github.com/htmlacademy-javascript/235995-keksobooking/pull/2#discussion_r236040335","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/2","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/comments/236040335"},"html":{"href":"https://github.com/htmlacademy-javascript/235995-keksobooking/pull/2#discussion_r236040335"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/2","id":233315385,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzMzE1Mzg1","html_url":"https://github.com/htmlacademy-javascript/235995-keksobooking/pull/2","diff_url":"https://github.com/htmlacademy-javascript/235995-keksobooking/pull/2.diff","patch_url":"https://github.com/htmlacademy-javascript/235995-keksobooking/pull/2.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/issues/2","number":2,"state":"open","locked":false,"title":"Личный проект: пока все дома","user":{"login":"sasstr","id":17186513,"node_id":"MDQ6VXNlcjE3MTg2NTEz","avatar_url":"https://avatars3.githubusercontent.com/u/17186513?v=4","gravatar_id":"","url":"https://api.github.com/users/sasstr","html_url":"https://github.com/sasstr","followers_url":"https://api.github.com/users/sasstr/followers","following_url":"https://api.github.com/users/sasstr/following{/other_user}","gists_url":"https://api.github.com/users/sasstr/gists{/gist_id}","starred_url":"https://api.github.com/users/sasstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sasstr/subscriptions","organizations_url":"https://api.github.com/users/sasstr/orgs","repos_url":"https://api.github.com/users/sasstr/repos","events_url":"https://api.github.com/users/sasstr/events{/privacy}","received_events_url":"https://api.github.com/users/sasstr/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Личный проект: пока все дома](https://up.htmlacademy.ru/javascript/16/user/235995/tasks/13)","created_at":"2018-11-24T11:44:05Z","updated_at":"2018-11-24T11:55:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb23b1df5f210a1a5d5773d6d3523bd14cd4f5f5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/2/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/2/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/issues/2/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/statuses/08484cc815165c8a4e5fee0403031834e057ed0d","head":{"label":"sasstr:module3-task1","ref":"module3-task1","sha":"08484cc815165c8a4e5fee0403031834e057ed0d","user":{"login":"sasstr","id":17186513,"node_id":"MDQ6VXNlcjE3MTg2NTEz","avatar_url":"https://avatars3.githubusercontent.com/u/17186513?v=4","gravatar_id":"","url":"https://api.github.com/users/sasstr","html_url":"https://github.com/sasstr","followers_url":"https://api.github.com/users/sasstr/followers","following_url":"https://api.github.com/users/sasstr/following{/other_user}","gists_url":"https://api.github.com/users/sasstr/gists{/gist_id}","starred_url":"https://api.github.com/users/sasstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sasstr/subscriptions","organizations_url":"https://api.github.com/users/sasstr/orgs","repos_url":"https://api.github.com/users/sasstr/repos","events_url":"https://api.github.com/users/sasstr/events{/privacy}","received_events_url":"https://api.github.com/users/sasstr/received_events","type":"User","site_admin":false},"repo":{"id":157431662,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc0MzE2NjI=","name":"235995-keksobooking","full_name":"sasstr/235995-keksobooking","private":false,"owner":{"login":"sasstr","id":17186513,"node_id":"MDQ6VXNlcjE3MTg2NTEz","avatar_url":"https://avatars3.githubusercontent.com/u/17186513?v=4","gravatar_id":"","url":"https://api.github.com/users/sasstr","html_url":"https://github.com/sasstr","followers_url":"https://api.github.com/users/sasstr/followers","following_url":"https://api.github.com/users/sasstr/following{/other_user}","gists_url":"https://api.github.com/users/sasstr/gists{/gist_id}","starred_url":"https://api.github.com/users/sasstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sasstr/subscriptions","organizations_url":"https://api.github.com/users/sasstr/orgs","repos_url":"https://api.github.com/users/sasstr/repos","events_url":"https://api.github.com/users/sasstr/events{/privacy}","received_events_url":"https://api.github.com/users/sasstr/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sasstr/235995-keksobooking","description":"Alexander Strakhovenko","fork":true,"url":"https://api.github.com/repos/sasstr/235995-keksobooking","forks_url":"https://api.github.com/repos/sasstr/235995-keksobooking/forks","keys_url":"https://api.github.com/repos/sasstr/235995-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sasstr/235995-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sasstr/235995-keksobooking/teams","hooks_url":"https://api.github.com/repos/sasstr/235995-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/sasstr/235995-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/sasstr/235995-keksobooking/events","assignees_url":"https://api.github.com/repos/sasstr/235995-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/sasstr/235995-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/sasstr/235995-keksobooking/tags","blobs_url":"https://api.github.com/repos/sasstr/235995-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sasstr/235995-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sasstr/235995-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/sasstr/235995-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sasstr/235995-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/sasstr/235995-keksobooking/languages","stargazers_url":"https://api.github.com/repos/sasstr/235995-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/sasstr/235995-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/sasstr/235995-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/sasstr/235995-keksobooking/subscription","commits_url":"https://api.github.com/repos/sasstr/235995-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/sasstr/235995-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/sasstr/235995-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/sasstr/235995-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/sasstr/235995-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/sasstr/235995-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sasstr/235995-keksobooking/merges","archive_url":"https://api.github.com/repos/sasstr/235995-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sasstr/235995-keksobooking/downloads","issues_url":"https://api.github.com/repos/sasstr/235995-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/sasstr/235995-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/sasstr/235995-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/sasstr/235995-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sasstr/235995-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/sasstr/235995-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/sasstr/235995-keksobooking/deployments","created_at":"2018-11-13T19:06:08Z","updated_at":"2018-11-21T18:15:50Z","pushed_at":"2018-11-24T00:15:55Z","git_url":"git://github.com/sasstr/235995-keksobooking.git","ssh_url":"git@github.com:sasstr/235995-keksobooking.git","clone_url":"https://github.com/sasstr/235995-keksobooking.git","svn_url":"https://github.com/sasstr/235995-keksobooking","homepage":null,"size":893,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"htmlacademy-javascript:master","ref":"master","sha":"fdfc07b414e04c6ba699165c93a6cb7bace0e7e5","user":{"login":"htmlacademy-javascript","id":14179712,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc5NzEy","avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"repo":{"id":157430444,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc0MzA0NDQ=","name":"235995-keksobooking","full_name":"htmlacademy-javascript/235995-keksobooking","private":false,"owner":{"login":"htmlacademy-javascript","id":14179712,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc5NzEy","avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/htmlacademy-javascript/235995-keksobooking","description":"Alexander Strakhovenko","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking","forks_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/deployments","created_at":"2018-11-13T18:56:26Z","updated_at":"2018-11-13T22:29:23Z","pushed_at":"2018-11-24T11:44:06Z","git_url":"git://github.com/htmlacademy-javascript/235995-keksobooking.git","ssh_url":"git@github.com:htmlacademy-javascript/235995-keksobooking.git","clone_url":"https://github.com/htmlacademy-javascript/235995-keksobooking.git","svn_url":"https://github.com/htmlacademy-javascript/235995-keksobooking","homepage":"https://github.com/sasstr/235995-keksobooking","size":875,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/2"},"html":{"href":"https://github.com/htmlacademy-javascript/235995-keksobooking/pull/2"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/issues/2"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/235995-keksobooking/statuses/08484cc815165c8a4e5fee0403031834e057ed0d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"BekoBou"}}