Single Responsability Princple
Intro
Single Responsabiltiy Principle refers to keeping the code understandable and readable by making each function have only one responsability
What We Learned
We did this by adding comments before the lines of code we added, so people could understand the reasoning behind our logic.
Application
const tolerance = 10; // Adjust as needed
// Determine if this object's bottom exactly aligns with the other object's top
const onTopofPlatform = Math.abs(thisBottom - otherRect.top) <= tolerance;