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.
// classes/interface.js
if(key==='exit'){this.output.write('\u001b[2J\u001b[0;0H');// this through fat arrow function
process.exit();}
Example: Here you can see a leftover snake 🐍 while issuing a new command.
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.
``` javascript
// classes/interface.js
if (key === 'exit') {
this.output.write('\u001b[2J\u001b[0;0H'); // this through fat arrow function
process.exit();
}
```
Example: Here you can see a leftover snake :snake: while issuing a new command.

You can make a pull-request yourself, too, if you want!
@verth: Hey! Thanks for the feedback! 👍
See if this branch works on your machine: https://github.com/mdibaiee/node-games/tree/clear-on-exit
You can make a pull-request yourself, too, if you want!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.
Example: Here you can see a leftover snake 🐍 while issuing a new command.
@verth: Hey! Thanks for the feedback! 👍
See if this branch works on your machine: https://github.com/mdibaiee/node-games/tree/clear-on-exit
You can make a pull-request yourself, too, if you want!
Works like a charm for me, thanks @mdibaiee !
Don't think there is a need to make a pull-request?
@verth:
d3bd75a277Published a new version to npm, thank you!