[SOLVED] A good way to compress nested "if else" statements?

Use the function switch instead.
https://processing.org/reference/switch.html