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.
return (staticCrashCounter++ % 100 == 0 ? true : false);
To improve that, you could get rid of the comment to save space.
void dont() { fuckenNoseDiveLmao(); }
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
Did a Japanese lunar probe write this?
You leaked the code for when it’s out of warranty
Or when your subscription to braking has lapsed.
Love me some clean code. Just please don’t look at the function definition or ever expect me to change my pyramid of abstractions.
That’s what interns are for.