check if pointer hits rect with checkCollision function complete test cases