{"action":"opened","issue":{"url":"https://api.github.com/repos/michaelbutler/minesweeper/issues/6","repository_url":"https://api.github.com/repos/michaelbutler/minesweeper","labels_url":"https://api.github.com/repos/michaelbutler/minesweeper/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/michaelbutler/minesweeper/issues/6/comments","events_url":"https://api.github.com/repos/michaelbutler/minesweeper/issues/6/events","html_url":"https://github.com/michaelbutler/minesweeper/issues/6","id":166280700,"number":6,"title":"Suggested improvements","user":{"login":"FixItDik","id":20534047,"avatar_url":"https://avatars.githubusercontent.com/u/20534047?v=3","gravatar_id":"","url":"https://api.github.com/users/FixItDik","html_url":"https://github.com/FixItDik","followers_url":"https://api.github.com/users/FixItDik/followers","following_url":"https://api.github.com/users/FixItDik/following{/other_user}","gists_url":"https://api.github.com/users/FixItDik/gists{/gist_id}","starred_url":"https://api.github.com/users/FixItDik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FixItDik/subscriptions","organizations_url":"https://api.github.com/users/FixItDik/orgs","repos_url":"https://api.github.com/users/FixItDik/repos","events_url":"https://api.github.com/users/FixItDik/events{/privacy}","received_events_url":"https://api.github.com/users/FixItDik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-19T08:58:21Z","updated_at":"2016-07-19T08:58:21Z","closed_at":null,"body":"Hi Michael, since MineSweeper was dropped from Windows I was looking for a close replacement and I came across this one of yours which is probably slightly over-engineered but has introduced me to Workers and other advanced features in JavaScript that I didn't even know were there which makes it by far my favourite implementation.  While looking at the code I did find some areas I thought might stand a little improvement, nothing fundamental you understand but just to bring it closer to the original version.  I will add each as a separate issue so we can tick them off (as I intend to attempt to make the changes myself in a fork as you suggested in our email exchange), so let's start with this: \r\n\r\n**The Custom parameters are not validated nor rationalised** so you can in fact specify a grid that is too large for Java to handle (e.g. 100 x 100 with 9000 mines) causing the code to \"hang\" when you click the first square.  The original version limited the dimensions to be:\r\n\r\nx: between 9 & 30 (I suggest just implementing a maximum of 30, so a minimum of 1)\r\ny: between 9 & 24 (ditto)\r\nmines: the original performs a weird, non-linear calculation to determine a maximum, I suggest a maximum of (number of squares-1) so there is at least one square they can click on\r\n\r\nI suggest the Minesweeper code itself performs this rationalisation in the js file to protect the logic, then the same (or more strict) limits can also be applied in the outer code giving a better user experience."}}
{"actor":{"display_login":"FixItDik"}}