{"action":"created","issue":{"url":"https://api.github.com/repos/deifius/inasra/issues/2","repository_url":"https://api.github.com/repos/deifius/inasra","labels_url":"https://api.github.com/repos/deifius/inasra/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/deifius/inasra/issues/2/comments","events_url":"https://api.github.com/repos/deifius/inasra/issues/2/events","html_url":"https://github.com/deifius/inasra/issues/2","id":357045915,"node_id":"MDU6SXNzdWUzNTcwNDU5MTU=","number":2,"title":"(Discussion) Purpose of Boardtrim()","user":{"login":"vdksoda","id":12879372,"node_id":"MDQ6VXNlcjEyODc5Mzcy","avatar_url":"https://avatars1.githubusercontent.com/u/12879372?v=4","gravatar_id":"","url":"https://api.github.com/users/vdksoda","html_url":"https://github.com/vdksoda","followers_url":"https://api.github.com/users/vdksoda/followers","following_url":"https://api.github.com/users/vdksoda/following{/other_user}","gists_url":"https://api.github.com/users/vdksoda/gists{/gist_id}","starred_url":"https://api.github.com/users/vdksoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdksoda/subscriptions","organizations_url":"https://api.github.com/users/vdksoda/orgs","repos_url":"https://api.github.com/users/vdksoda/repos","events_url":"https://api.github.com/users/vdksoda/events{/privacy}","received_events_url":"https://api.github.com/users/vdksoda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-05T02:51:32Z","updated_at":"2018-09-06T18:10:22Z","closed_at":null,"author_association":"NONE","body":"In crystalyzation.py the boardtrim function is as such:\r\n\r\n```python\r\ndef boardtrim(board):\r\n    destroy = 1\r\n    for each in board[-1]:\r\n\r\n        if each is ' ':\r\n            pass\r\n        else:\r\n            destroy = 0\r\n    \r\n    if destroy == 1:\r\n        board.pop(-1)\r\n        boardtrim(board)\r\n    elif destroy == 0:\r\n        print('')\r\n```\r\n\r\n1. The above for loop will set `destroy=0` if there is any non empty string present. We can instead do\r\n```python\r\nif [element for element in board[-1] if element]:\r\n    destroy = 0\r\n```\r\n\r\nOverall what is the purpose of boardtrim() ?\r\n"},"comment":{"url":"https://api.github.com/repos/deifius/inasra/issues/comments/419190174","html_url":"https://github.com/deifius/inasra/issues/2#issuecomment-419190174","issue_url":"https://api.github.com/repos/deifius/inasra/issues/2","id":419190174,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTE5MDE3NA==","user":{"login":"deifius","id":378564,"node_id":"MDQ6VXNlcjM3ODU2NA==","avatar_url":"https://avatars2.githubusercontent.com/u/378564?v=4","gravatar_id":"","url":"https://api.github.com/users/deifius","html_url":"https://github.com/deifius","followers_url":"https://api.github.com/users/deifius/followers","following_url":"https://api.github.com/users/deifius/following{/other_user}","gists_url":"https://api.github.com/users/deifius/gists{/gist_id}","starred_url":"https://api.github.com/users/deifius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deifius/subscriptions","organizations_url":"https://api.github.com/users/deifius/orgs","repos_url":"https://api.github.com/users/deifius/repos","events_url":"https://api.github.com/users/deifius/events{/privacy}","received_events_url":"https://api.github.com/users/deifius/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T18:10:22Z","updated_at":"2018-09-06T18:10:22Z","author_association":"OWNER","body":"Hey there vdksoda,  boardtrim() reduces the crossword field to a minimum size needed to fit the crossword spine.  The user directed process of building the spine in wikichomp will produce a board that is big enough to accommodate the biggest possible word choice.  Then there is additional blank row/columns that boardtrim() trims off before the crystalization process begins.  This keeps the spine as the defining feature of the board."}}
{"actor":{"display_login":"deifius"}}