triangles refactored

Thank you Github app
If you want to learn the Sandi Metz way for avoiding this if/else and making your code more Open-Closed, come talk to me. Otherwise ignore this comment