Well I think goingToCrashIntoEachOther needs to return another drone object. Then don’t can take that object. Based on self.serialNo and other.serialNo a mutually beneficial avoiding manoeuvre could be executed.
If you’re about to crash into more than one other drone… Good luck the function specifies “EachOther” meaning just one other drone!
It’s all fun and games until you have to implement
goingToCrashIntoEachOther()
// TODO: needs improvements but works 99% of the time
return false;
This looks good. PR approved.
To improve that, you could get rid of the comment to save space.
return (staticCrashCounter++ % 100 == 0 ? true : false);
You leaked the code for when it’s out of warranty
Or when your subscription to braking has lapsed.
void dont() { fuckenNoseDiveLmao(); }
Did a Japanese lunar probe write this?
Well I think goingToCrashIntoEachOther needs to return another drone object. Then don’t can take that object. Based on self.serialNo and other.serialNo a mutually beneficial avoiding manoeuvre could be executed.
If you’re about to crash into more than one other drone… Good luck the function specifies “EachOther” meaning just one other drone!
this calls for a whiteboard
That’s what interns are for.
Love me some clean code. Just please don’t look at the function definition or ever expect me to change my pyramid of abstractions.