I'm trying to make a autododge system for a bot that will be in an arena with 15 other bots. Bot can only travel up, down, left, or right. Bullets travel only travel up, down, left, or right. The bullets in the arena are stored in an array bullets. My problem is my current code causes the bot to keep jittering left and right and is not a smooth dodging system. Can anyone please help? I can send the full code if anyone needs but here is the method.
Here is the code for the method and its helper methods: https://sourceb.in/GB86OnjXAq