Java – Finite State Machine (FSM) and Android’s Java

androidfsmjava

I'm willing to develop a soccer game for Android.

Because the complexity of the AI, i really think i need to design it using a FSM (Finite State Machine) and not with a monster switch.

Googling around i found some FSM written in Java, but nothing explicitly compatible with Android: I wonder if there is someone here that used a FSM before for that platform.

Best Answer

I was looking for a FSM for Android a few months ago but couldn't find anything suitable, so had to create my own.

I used it in a few projects by now and quite happy. It makes code much cleaner and is easy to use. If anyone's still looking for a state machine for java, check EasyFlow out.

You can contribute to the project as well.