Im trying to implement a finite state machine to handle the AI of my game's AI. Ive implemented finite state machine in c++ before using function pointers but i do not know how to do it in java due to lack of these. If you could help, please pm me or message me on skype: imomniscient
|
Java
Finite State Machine Help! |
|
Im a bit busy at the moment, but i just found this which might be of interest to you:
http://stackoverflow.com/questions/13221...ne-in-java You could use an enum of states, and each AI can base its actions on the State it is in. (Mar 17, 2014 03:34 AM)Ben121 Wrote: You can replicate function pointers with lambdas or interfaces. You can only use lambdas if you are using java 8 🙂 |
|
|

