I added a few more comments and also made it so that if it has no energy to gen more flags, it goes back to base