Closed etienneCharignon closed 6 years ago
I'm still working on simplifications. You might want to wait before reviewing.
❤️
I'm finished with this. I've been pretty far into refactoring it but without changing the behaviour (hopefully).
Comments are welcome.
Nice work! I was about to merge this but found something annoying: the code is not compatible with the (Java) Processing PDE. I think we should keep it valid Java, even though the Processing.js transpiler is very tolerant. Hopefully this is not too hard to do.
I just tried to run the original version (before your changes) in Processing and the following changes were needed:
size(800, 600)
line (Processing needs a hardcoded size)main
function to something else (otherwise you get a very strange error: Could not run the sketch (Target VM failed to initialize)
)Other than that it runs fine. When I tried your version a number of things did not even compile (const
does not exist in Java, for example).
👍
This is almost a rewrite of the creature example.
Actually, this has been done through refactoring but arrived to a very different implementation.
I kept the intermediate commits for information but I'm expecting a squash before merging to master.