Skip to content
Advertisement

How can I make program a bit cleaner?

I have this pretty ugly program (really cluttered) is there any way I could make it cleaner, less cluttered, etc. Thanks! P.S. (If you want to try to run this program prepare to be amazed.)

JavaScript

Advertisement

Answer

First of all, nice work with the drawing!

Here is my suggestion:

JavaScript

Things for you to try next:

  • Making the elements size relative to the canvas size
  • Formatting the code with black
  • Use Docstrings and type hinting to improve readability
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement