I would like to know if this is a good idea that conforms to best practices that does not lead to obscenely confusing code or major performance hit(s):
- Make my own Collision detection class that extends Rectangle class.
- Then when instantiating that object doing something such as
Collision col = new Rectangle();
<- Should I do that or is that something that should be avoided? I am aware that I 'can' but should I? - I want to extend Rectangle class because of the
contains()
andintersects()
methods; should I be doing that or should I be doing something else for 2D collision detection in Java?