-
Notifications
You must be signed in to change notification settings - Fork 6
Add isTouching() method #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Looks good. Add a test before you merge it. |
Whoops. I was setting the variable with the function rather than calling the function.
Strange... the test only prints "1". |
Now it should be more descriptive.
A really long-named function used exactly one, overly-confusing time.
So we can see what's going on.
The current test prints this:
So I'm not sure |
@BookOwl Some testing later, I find that it keeps returning a value of I thought |
I know what's going on now.
Never mind that. I found the problem, it's that the |
The function works as expected now.
I used a method similar to the |
I'm not sure, but doesn't assigning to a rect's properties move it? |
@BookOwl I'm not sure, I haven't ever bothered to test. 👅 EDIT: By the way, when I run the test everything works fine. It looks exactly the same as when I don't check for touching. |
Nobody's going to see them in that little header in __init__.py.
The isTouchingTest.py file uses python2 style prints... |
I fixed the print statements. Other than that, the test looks good. Merging |
Works as follows:
Uses the
colliderect
method.