{"action":"opened","number":1103,"pull_request":{"url":"https://api.github.com/repos/magefree/mage/pulls/1103","id":39529943,"html_url":"https://github.com/magefree/mage/pull/1103","diff_url":"https://github.com/magefree/mage/pull/1103.diff","patch_url":"https://github.com/magefree/mage/pull/1103.patch","issue_url":"https://api.github.com/repos/magefree/mage/issues/1103","number":1103,"state":"open","locked":false,"title":"Overhaul and fix of random deck generation.","user":{"login":"Simown","id":1081915,"avatar_url":"https://avatars.githubusercontent.com/u/1081915?v=3","gravatar_id":"","url":"https://api.github.com/users/Simown","html_url":"https://github.com/Simown","followers_url":"https://api.github.com/users/Simown/followers","following_url":"https://api.github.com/users/Simown/following{/other_user}","gists_url":"https://api.github.com/users/Simown/gists{/gist_id}","starred_url":"https://api.github.com/users/Simown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simown/subscriptions","organizations_url":"https://api.github.com/users/Simown/orgs","repos_url":"https://api.github.com/users/Simown/repos","events_url":"https://api.github.com/users/Simown/events{/privacy}","received_events_url":"https://api.github.com/users/Simown/received_events","type":"User","site_admin":false},"body":"Overhaul of the deck generation mechanism. Looks fairly similar on the surface apart from the addition of 3 checkboxes but the internals have changed considerably. Took a lot longer than expected, but has been tested a lot over the past month with tweaks to constants and different aspects of the generation. \r\n\r\n#### Features/Improvements\r\n* Generates a 40 or 60 card deck for a block/set/format\r\n* All cards are compared against a CMC curve to ensure the deck is playable and not just a random selection of cards.\r\n* Creatures and non-creatures are retrieved and added separately according to the mana curve\r\n* Option to use singleton, artifact and dual/tri lands in generated deck, and saved preferences of these.\r\n* Basic lands are balanced according to the percentage of mana symbols in each of the cards.\r\n* Separated the code for the UI and the generation and made it generally nicer\r\n* Optimizations to stop repeated unnecessary loops and database accesses.\r\n* Removed dependency on DeckBuilder, so deck generation is self contained. \r\n\r\n#### Work in Progress\r\n* Add fetchlands, but this needs a little more work to verify there will be basic lands to fetch\r\n* Ability to change the CMC curve for aggro/midrange/high-end decks\r\n* Option to set the ratio of creatures/non-creatures/land in a generated deck \r\n\r\nShould be a good tool in testing new sets/formats without having to generate the deck manually, or just playing quick casual games which I tend to prefer. It's probably not perfect but it should generate a balanced deck with creatures and non-creatures, which is a big improvement over the old version. \r\n\r\nThanks.","created_at":"2015-07-08T22:18:49Z","updated_at":"2015-07-08T22:18:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/magefree/mage/pulls/1103/commits","review_comments_url":"https://api.github.com/repos/magefree/mage/pulls/1103/comments","review_comment_url":"https://api.github.com/repos/magefree/mage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/magefree/mage/issues/1103/comments","statuses_url":"https://api.github.com/repos/magefree/mage/statuses/a1fd4e91f0b2b567b44a42d839327d2eafe49b1c","head":{"label":"Simown:deck-generation-fix","ref":"deck-generation-fix","sha":"a1fd4e91f0b2b567b44a42d839327d2eafe49b1c","user":{"login":"Simown","id":1081915,"avatar_url":"https://avatars.githubusercontent.com/u/1081915?v=3","gravatar_id":"","url":"https://api.github.com/users/Simown","html_url":"https://github.com/Simown","followers_url":"https://api.github.com/users/Simown/followers","following_url":"https://api.github.com/users/Simown/following{/other_user}","gists_url":"https://api.github.com/users/Simown/gists{/gist_id}","starred_url":"https://api.github.com/users/Simown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simown/subscriptions","organizations_url":"https://api.github.com/users/Simown/orgs","repos_url":"https://api.github.com/users/Simown/repos","events_url":"https://api.github.com/users/Simown/events{/privacy}","received_events_url":"https://api.github.com/users/Simown/received_events","type":"User","site_admin":false},"repo":{"id":30122804,"name":"mage","full_name":"Simown/mage","owner":{"login":"Simown","id":1081915,"avatar_url":"https://avatars.githubusercontent.com/u/1081915?v=3","gravatar_id":"","url":"https://api.github.com/users/Simown","html_url":"https://github.com/Simown","followers_url":"https://api.github.com/users/Simown/followers","following_url":"https://api.github.com/users/Simown/following{/other_user}","gists_url":"https://api.github.com/users/Simown/gists{/gist_id}","starred_url":"https://api.github.com/users/Simown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simown/subscriptions","organizations_url":"https://api.github.com/users/Simown/orgs","repos_url":"https://api.github.com/users/Simown/repos","events_url":"https://api.github.com/users/Simown/events{/privacy}","received_events_url":"https://api.github.com/users/Simown/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Simown/mage","description":"Magic Another Game Engine","fork":true,"url":"https://api.github.com/repos/Simown/mage","forks_url":"https://api.github.com/repos/Simown/mage/forks","keys_url":"https://api.github.com/repos/Simown/mage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Simown/mage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Simown/mage/teams","hooks_url":"https://api.github.com/repos/Simown/mage/hooks","issue_events_url":"https://api.github.com/repos/Simown/mage/issues/events{/number}","events_url":"https://api.github.com/repos/Simown/mage/events","assignees_url":"https://api.github.com/repos/Simown/mage/assignees{/user}","branches_url":"https://api.github.com/repos/Simown/mage/branches{/branch}","tags_url":"https://api.github.com/repos/Simown/mage/tags","blobs_url":"https://api.github.com/repos/Simown/mage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Simown/mage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Simown/mage/git/refs{/sha}","trees_url":"https://api.github.com/repos/Simown/mage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Simown/mage/statuses/{sha}","languages_url":"https://api.github.com/repos/Simown/mage/languages","stargazers_url":"https://api.github.com/repos/Simown/mage/stargazers","contributors_url":"https://api.github.com/repos/Simown/mage/contributors","subscribers_url":"https://api.github.com/repos/Simown/mage/subscribers","subscription_url":"https://api.github.com/repos/Simown/mage/subscription","commits_url":"https://api.github.com/repos/Simown/mage/commits{/sha}","git_commits_url":"https://api.github.com/repos/Simown/mage/git/commits{/sha}","comments_url":"https://api.github.com/repos/Simown/mage/comments{/number}","issue_comment_url":"https://api.github.com/repos/Simown/mage/issues/comments{/number}","contents_url":"https://api.github.com/repos/Simown/mage/contents/{+path}","compare_url":"https://api.github.com/repos/Simown/mage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Simown/mage/merges","archive_url":"https://api.github.com/repos/Simown/mage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Simown/mage/downloads","issues_url":"https://api.github.com/repos/Simown/mage/issues{/number}","pulls_url":"https://api.github.com/repos/Simown/mage/pulls{/number}","milestones_url":"https://api.github.com/repos/Simown/mage/milestones{/number}","notifications_url":"https://api.github.com/repos/Simown/mage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Simown/mage/labels{/name}","releases_url":"https://api.github.com/repos/Simown/mage/releases{/id}","created_at":"2015-01-31T19:07:15Z","updated_at":"2015-04-24T18:41:52Z","pushed_at":"2015-07-08T22:13:31Z","git_url":"git://github.com/Simown/mage.git","ssh_url":"git@github.com:Simown/mage.git","clone_url":"https://github.com/Simown/mage.git","svn_url":"https://github.com/Simown/mage","homepage":"http://www.slightlymagic.net/forum/viewforum.php?f=70","size":390124,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"magefree:master","ref":"master","sha":"77b3706c9fc01c08c54981ae8c508a50e84857a3","user":{"login":"magefree","id":1705456,"avatar_url":"https://avatars.githubusercontent.com/u/1705456?v=3","gravatar_id":"","url":"https://api.github.com/users/magefree","html_url":"https://github.com/magefree","followers_url":"https://api.github.com/users/magefree/followers","following_url":"https://api.github.com/users/magefree/following{/other_user}","gists_url":"https://api.github.com/users/magefree/gists{/gist_id}","starred_url":"https://api.github.com/users/magefree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magefree/subscriptions","organizations_url":"https://api.github.com/users/magefree/orgs","repos_url":"https://api.github.com/users/magefree/repos","events_url":"https://api.github.com/users/magefree/events{/privacy}","received_events_url":"https://api.github.com/users/magefree/received_events","type":"Organization","site_admin":false},"repo":{"id":4158448,"name":"mage","full_name":"magefree/mage","owner":{"login":"magefree","id":1705456,"avatar_url":"https://avatars.githubusercontent.com/u/1705456?v=3","gravatar_id":"","url":"https://api.github.com/users/magefree","html_url":"https://github.com/magefree","followers_url":"https://api.github.com/users/magefree/followers","following_url":"https://api.github.com/users/magefree/following{/other_user}","gists_url":"https://api.github.com/users/magefree/gists{/gist_id}","starred_url":"https://api.github.com/users/magefree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magefree/subscriptions","organizations_url":"https://api.github.com/users/magefree/orgs","repos_url":"https://api.github.com/users/magefree/repos","events_url":"https://api.github.com/users/magefree/events{/privacy}","received_events_url":"https://api.github.com/users/magefree/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/magefree/mage","description":"Magic Another Game Engine","fork":false,"url":"https://api.github.com/repos/magefree/mage","forks_url":"https://api.github.com/repos/magefree/mage/forks","keys_url":"https://api.github.com/repos/magefree/mage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magefree/mage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magefree/mage/teams","hooks_url":"https://api.github.com/repos/magefree/mage/hooks","issue_events_url":"https://api.github.com/repos/magefree/mage/issues/events{/number}","events_url":"https://api.github.com/repos/magefree/mage/events","assignees_url":"https://api.github.com/repos/magefree/mage/assignees{/user}","branches_url":"https://api.github.com/repos/magefree/mage/branches{/branch}","tags_url":"https://api.github.com/repos/magefree/mage/tags","blobs_url":"https://api.github.com/repos/magefree/mage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magefree/mage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magefree/mage/git/refs{/sha}","trees_url":"https://api.github.com/repos/magefree/mage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magefree/mage/statuses/{sha}","languages_url":"https://api.github.com/repos/magefree/mage/languages","stargazers_url":"https://api.github.com/repos/magefree/mage/stargazers","contributors_url":"https://api.github.com/repos/magefree/mage/contributors","subscribers_url":"https://api.github.com/repos/magefree/mage/subscribers","subscription_url":"https://api.github.com/repos/magefree/mage/subscription","commits_url":"https://api.github.com/repos/magefree/mage/commits{/sha}","git_commits_url":"https://api.github.com/repos/magefree/mage/git/commits{/sha}","comments_url":"https://api.github.com/repos/magefree/mage/comments{/number}","issue_comment_url":"https://api.github.com/repos/magefree/mage/issues/comments{/number}","contents_url":"https://api.github.com/repos/magefree/mage/contents/{+path}","compare_url":"https://api.github.com/repos/magefree/mage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magefree/mage/merges","archive_url":"https://api.github.com/repos/magefree/mage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magefree/mage/downloads","issues_url":"https://api.github.com/repos/magefree/mage/issues{/number}","pulls_url":"https://api.github.com/repos/magefree/mage/pulls{/number}","milestones_url":"https://api.github.com/repos/magefree/mage/milestones{/number}","notifications_url":"https://api.github.com/repos/magefree/mage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magefree/mage/labels{/name}","releases_url":"https://api.github.com/repos/magefree/mage/releases{/id}","created_at":"2012-04-27T13:18:34Z","updated_at":"2015-07-07T16:11:02Z","pushed_at":"2015-07-08T22:18:49Z","git_url":"git://github.com/magefree/mage.git","ssh_url":"git@github.com:magefree/mage.git","clone_url":"https://github.com/magefree/mage.git","svn_url":"https://github.com/magefree/mage","homepage":"http://xmage.de","size":421704,"stargazers_count":160,"watchers_count":160,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":133,"mirror_url":null,"open_issues_count":173,"forks":133,"open_issues":173,"watchers":160,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/magefree/mage/pulls/1103"},"html":{"href":"https://github.com/magefree/mage/pull/1103"},"issue":{"href":"https://api.github.com/repos/magefree/mage/issues/1103"},"comments":{"href":"https://api.github.com/repos/magefree/mage/issues/1103/comments"},"review_comments":{"href":"https://api.github.com/repos/magefree/mage/pulls/1103/comments"},"review_comment":{"href":"https://api.github.com/repos/magefree/mage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/magefree/mage/pulls/1103/commits"},"statuses":{"href":"https://api.github.com/repos/magefree/mage/statuses/a1fd4e91f0b2b567b44a42d839327d2eafe49b1c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1013,"deletions":322,"changed_files":5}}