I'm trying to revamp an ugly old finite state machine that has lots of if/then and switch statements and I'd like to make it more object oriented. This is what I'm trying to achieve...
"...A more extendible approach is to set up a basic State class, and a set of specific states which inherit
their structure from the basic State class. At any time an AI agent has a state attached to it, when a
transition occurs, the state is replaced with the new state."
In C I would imagine function pointers would do the trick nicely; how can I emulate that using classes in Processing? Any help appreciated (especially in simplest terms
)
"...A more extendible approach is to set up a basic State class, and a set of specific states which inherit
their structure from the basic State class. At any time an AI agent has a state attached to it, when a
transition occurs, the state is replaced with the new state."
In C I would imagine function pointers would do the trick nicely; how can I emulate that using classes in Processing? Any help appreciated (especially in simplest terms

1