Face Generator

  

I had a lot of issues while writing the code for this gif. For example, in my first attempt, when my code runs, the new face that is supposed to stay on the screen would just flick. As I kinda dig deep into my code, I notice that the reason why the new face is flicking is that I put background in my draw function instead of my set up function, therefore every time the code runs, the computer would redraw my background and erase my new face. After solving the first problem, the second one comes up: when my second attempt code runs, my new face would appear on the screen but my old face would be there as well. In order to solve this problem, I change my mouse pressed function so that every time the mouse is pressed, the computer would not redraw the face and instead it would just change the features of the face so that I can get my new face without having the old face appear on the screen. There are times when I get stuck for hours and do not what to do, I would just want to give up or try something easier. However, when I finally solve all the problems I have, I really feel the sense of accomplishment and I also learn a lot from my problems and my mistakes. In the coding world, our best teachers are really the problems we encounter and the mistakes we make.