{"action":"closed","issue":{"url":"https://api.github.com/repos/weka-2016/weka-2016/issues/968","repository_url":"https://api.github.com/repos/weka-2016/weka-2016","labels_url":"https://api.github.com/repos/weka-2016/weka-2016/issues/968/labels{/name}","comments_url":"https://api.github.com/repos/weka-2016/weka-2016/issues/968/comments","events_url":"https://api.github.com/repos/weka-2016/weka-2016/issues/968/events","html_url":"https://github.com/weka-2016/weka-2016/issues/968","id":186158747,"number":968,"title":"6.1 Minesweeper: objects and arrays","user":{"login":"eda-waffler","id":19367633,"avatar_url":"https://avatars.githubusercontent.com/u/19367633?v=3","gravatar_id":"","url":"https://api.github.com/users/eda-waffler","html_url":"https://github.com/eda-waffler","followers_url":"https://api.github.com/users/eda-waffler/followers","following_url":"https://api.github.com/users/eda-waffler/following{/other_user}","gists_url":"https://api.github.com/users/eda-waffler/gists{/gist_id}","starred_url":"https://api.github.com/users/eda-waffler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eda-waffler/subscriptions","organizations_url":"https://api.github.com/users/eda-waffler/orgs","repos_url":"https://api.github.com/users/eda-waffler/repos","events_url":"https://api.github.com/users/eda-waffler/events{/privacy}","received_events_url":"https://api.github.com/users/eda-waffler/received_events","type":"User","site_admin":false},"labels":[{"id":449531597,"url":"https://api.github.com/repos/weka-2016/weka-2016/labels/sprint-6","name":"sprint-6","color":"66ff8c","default":false}],"state":"closed","locked":false,"assignee":{"login":"MeghanHughes","id":22287063,"avatar_url":"https://avatars.githubusercontent.com/u/22287063?v=3","gravatar_id":"","url":"https://api.github.com/users/MeghanHughes","html_url":"https://github.com/MeghanHughes","followers_url":"https://api.github.com/users/MeghanHughes/followers","following_url":"https://api.github.com/users/MeghanHughes/following{/other_user}","gists_url":"https://api.github.com/users/MeghanHughes/gists{/gist_id}","starred_url":"https://api.github.com/users/MeghanHughes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeghanHughes/subscriptions","organizations_url":"https://api.github.com/users/MeghanHughes/orgs","repos_url":"https://api.github.com/users/MeghanHughes/repos","events_url":"https://api.github.com/users/MeghanHughes/events{/privacy}","received_events_url":"https://api.github.com/users/MeghanHughes/received_events","type":"User","site_admin":false},"assignees":[{"login":"MeghanHughes","id":22287063,"avatar_url":"https://avatars.githubusercontent.com/u/22287063?v=3","gravatar_id":"","url":"https://api.github.com/users/MeghanHughes","html_url":"https://github.com/MeghanHughes","followers_url":"https://api.github.com/users/MeghanHughes/followers","following_url":"https://api.github.com/users/MeghanHughes/following{/other_user}","gists_url":"https://api.github.com/users/MeghanHughes/gists{/gist_id}","starred_url":"https://api.github.com/users/MeghanHughes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeghanHughes/subscriptions","organizations_url":"https://api.github.com/users/MeghanHughes/orgs","repos_url":"https://api.github.com/users/MeghanHughes/repos","events_url":"https://api.github.com/users/MeghanHughes/events{/privacy}","received_events_url":"https://api.github.com/users/MeghanHughes/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-10-30T19:56:51Z","updated_at":"2016-11-03T03:46:58Z","closed_at":"2016-11-03T03:46:58Z","body":"#6.1 Minesweeper: objects and arrays\n\nOk, so we have a game board! (If you're not doing these in order, you need to: make sure you complete 6.0 first, or this will make no sense at all!) Now we need to show how many mines are in surrounding squares as we reveal more of the board.\n\nIf you've never played Minesweeper, maybe you should play a couple of games to get the hang of it at this point. Timebox it though: don't get addicted! There's a pretty solid version [here](https://cardgames.io/minesweeper/).\n\nIn 6.0 we created a `board` object. If we were describing our object in English, we'd say something like: \"This is an object that contains an array of objects.\"\n\n``` js\nvar board = {\n  cells: [\n    {\n      row: 0,\n      col: 0\n      // ...\n    },\n    {\n      row: 0,\n      col: 1\n      // ...\n    }\n  ]\n}\n```\n\n**Tip:** if you're not sure if the `board` object you're creating is correct, open your browser's developer tools and type `board`. In Chrome at least, this will show the object's structure and you can expand the `cells` array to see its contents.\n- [x] In bootcamp you're going to need to access objects and arrays like this all the time! Getting familiar with them is crucial. Be sure that you understand the following before going onto the next assignment:\n  - [x] `cells` is an _object property_.\n  - [x] You can _access_ (get) a property on an object by using either _dot notation_ (`board.cells`) or _bracket notation_ (`board['cells']`).\n  - [x] The value inside the brackets in bracket notation can be a string variable: (`board[propertyName]`).\n  - [x] You can access the first object inside the `cells` array using dot and array notation (`board.cells[0]`) or bracket and array notation (`board['cells'][0]`).\n  - [x] You can access a property on _that_ object using dot and array notation (`board.cells[0].row`).\n- [x] If you're not clear on any of these things, this is a really good time to reach out and seek clarification! Ask your cohort in Slack, ask in #code-help-desk, ask a teacher. Most importantly, _practise_. Sometimes the best way is just to try it, either in the browser development tools or using an online tool like [JSFiddle](https://jsfiddle.net)."}}
{"actor":{"display_login":"josephquested"}}