Change triangleExists return type, modified main cpp for testing