{"action":"opened","issue":{"url":"https://api.github.com/repos/mdibaiee/node-games/issues/4","repository_url":"https://api.github.com/repos/mdibaiee/node-games","labels_url":"https://api.github.com/repos/mdibaiee/node-games/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/mdibaiee/node-games/issues/4/comments","events_url":"https://api.github.com/repos/mdibaiee/node-games/issues/4/events","html_url":"https://github.com/mdibaiee/node-games/issues/4","id":140812001,"number":4,"title":"Clear screen on exit","user":{"login":"verth","id":8117909,"avatar_url":"https://avatars.githubusercontent.com/u/8117909?v=3","gravatar_id":"","url":"https://api.github.com/users/verth","html_url":"https://github.com/verth","followers_url":"https://api.github.com/users/verth/followers","following_url":"https://api.github.com/users/verth/following{/other_user}","gists_url":"https://api.github.com/users/verth/gists{/gist_id}","starred_url":"https://api.github.com/users/verth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verth/subscriptions","organizations_url":"https://api.github.com/users/verth/orgs","repos_url":"https://api.github.com/users/verth/repos","events_url":"https://api.github.com/users/verth/events{/privacy}","received_events_url":"https://api.github.com/users/verth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-14T22:14:18Z","updated_at":"2016-03-14T22:14:18Z","closed_at":null,"body":"Hi, cool games! I was playing around with it a bit and noticed the screen didn't clear when exiting (on Linux and Windows). I think this isn't wanted behaviour? I think clearing one more time on exit could solve this.\r\n\r\n```javascript\r\nif (key === 'exit') {\r\n  this.output.write('\\u001b[2J\\u001b[0;0H'); // this through fat arrow function\r\n  process.exit();\r\n}\r\n```\r\n\r\nExample: Here you can see a leftover snake :snake: while issuing a new command.\r\n\r\n![snakeAfterExit](https://cloud.githubusercontent.com/assets/8117909/13761353/4f078b82-ea38-11e5-887e-5f349e9e1abc.jpg)"}}