[FIX]re-factor codes in player state,
separate ai code and player controller code, part 3