Optimizing code for removing lag

I recently completed the battle engine for my game.
But the problem is that it is lagging horribly.
Please suggest ways to optimize the code(because the graphics I’m using are really very basic)

Please tell if you need the code to help.