{"action":"opened","issue":{"url":"https://api.github.com/repos/tarik56/prog22-5/issues/4","repository_url":"https://api.github.com/repos/tarik56/prog22-5","labels_url":"https://api.github.com/repos/tarik56/prog22-5/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/tarik56/prog22-5/issues/4/comments","events_url":"https://api.github.com/repos/tarik56/prog22-5/issues/4/events","html_url":"https://github.com/tarik56/prog22-5/issues/4","id":325760269,"number":4,"title":"Memory Model","user":{"login":"Kaan1453","id":38841080,"avatar_url":"https://avatars2.githubusercontent.com/u/38841080?v=4","gravatar_id":"","url":"https://api.github.com/users/Kaan1453","html_url":"https://github.com/Kaan1453","followers_url":"https://api.github.com/users/Kaan1453/followers","following_url":"https://api.github.com/users/Kaan1453/following{/other_user}","gists_url":"https://api.github.com/users/Kaan1453/gists{/gist_id}","starred_url":"https://api.github.com/users/Kaan1453/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kaan1453/subscriptions","organizations_url":"https://api.github.com/users/Kaan1453/orgs","repos_url":"https://api.github.com/users/Kaan1453/repos","events_url":"https://api.github.com/users/Kaan1453/events{/privacy}","received_events_url":"https://api.github.com/users/Kaan1453/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-23T15:30:49Z","updated_at":"2018-05-23T15:30:49Z","closed_at":null,"author_association":"COLLABORATOR","body":"import java.util.ArrayList;\r\nimport java.util.Collections;\r\nimport java.util.List;\r\n\r\npublic class Model {\r\n\r\n\tprivate int x;\r\n\tprivate int y;\r\n\tprivate int total = 8;\r\n\tprivate int com[][];\r\n\tprivate int counter;\r\n\tprivate boolean finished;\r\n\r\n\tpublic Model() {\r\n\t\tthis.com = mashUp(new int[4][4]);\r\n\t}\r\n\r\n\tpublic int[][] mashUp(int[][] x) {\r\n\t\tList<Integer> pic = new ArrayList<>();\r\n\t\tfor (int i = 0; i < total; i++) {\r\n\t\t\tpic.add(i);\r\n\t\t\tpic.add(i);\r\n\t\t\t\r\n\r\n\t\t}\r\n\t\tCollections.shuffle(pic);\r\n\t\tfor (int i = 0; i < x.length; i++) {\r\n\t\t\tfor (int a = 0; a < x[i].length; a++) {\r\n\t\t\t\tx[i][a] = pic.remove(0);\r\n\t\t\t\tSystem.out.println(x[i][a]);\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t}\r\n\t\treturn x;\r\n\t}\r\n\r\n\tpublic void incrementCounter() {\r\n\t\tthis.counter++;\r\n\t\tSystem.out.println(this.counter);\r\n\r\n\t}\r\n\r\n\tpublic boolean isFinished() {\r\n\t\treturn this.counter >= this.total;\r\n\t}\r\n\r\n\tpublic int getNumber(int x, int y) {\r\n\t\treturn this.com[x][y];\r\n\t}\r\n\r\n\tpublic void setNumbers(int x[][]) {\r\n\t\tthis.com = x;\r\n\t}\r\n\r\n\tpublic int getY() {\r\n\t\treturn this.y;\r\n\t}\r\n\r\n\tpublic int getX() {\r\n\t\treturn this.x;\r\n\t}\r\n\r\n}\r\n"}}
{"actor":{"display_login":"Kaan1453"}}