Thank you for your feedback!
Yes, I made the function but forgot to call because I was so sleepy and in a rush to submit.
I have updated the game to v1.1 to fix the boss AI.