Skip to content
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

feat:added collision detection #12606

Closed
wants to merge 8 commits into from

Conversation

parikshit2111
Copy link
Contributor

Added AABB Collision Detection with Pygame

Implemented AABB (Axis-Aligned Bounding Box) collision detection for two moving boxes.
Boxes bounce back upon collision while a counter tracks the number of collisions (excluding wall bounces).
Used Pygame for visualization and animation.
Ensured PEP 8 compliance with proper import sorting.
Added docstrings and structured comments for readability.
Verified functionality through testing.
Describe your change:
[✅] Add an algorithm?
[ ] Fix a bug or typo in an existing algorithm?
[ ] Add or change doctests?
[ ] Documentation change?

Checklist:
[✅] I have read CONTRIBUTING.md.
[✅] This pull request is all my own work—no plagiarism.
[✅] I know that pull requests will not be merged if they fail automated tests.
[✅] This PR only changes one algorithm file. Separate PRs will be opened for other algorithms.
[✅] The new file is placed in an appropriate directory.
[✅] Filenames are in lowercase with no spaces or dashes.
[✅] Functions and variables follow Python naming conventions.
[✅] Type hints and docstrings are included for clarity.
[✅] The algorithm works as expected and follows best practices.

parikshit2111 and others added 8 commits March 2, 2025 11:02
- Added PCA implementation with dataset standardization.
- Used Singular Value Decomposition (SVD) for computing principal components.
- Fixed import sorting to comply with PEP 8 (Ruff I001).
- Ensured type hints and docstrings for better readability.
- Added doctests to validate correctness.
- Passed all Ruff checks and automated tests.
* collision_detection initial commit


---------

Co-authored-by: parikshit2111 <parikshit2111@users.noreply.github.com>
@algorithms-keeper
Copy link

Closing this pull request as invalid

@parikshit2111, this pull request is being closed as none of the checkboxes have been marked. It is important that you go through the checklist and mark the ones relevant to this pull request. Please read the Contributing guidelines.

If you're facing any problem on how to mark a checkbox, please read the following instructions:

  • Read a point one at a time and think if it is relevant to the pull request or not.
  • If it is, then mark it by putting a x between the square bracket like so: [x]

NOTE: Only [x] is supported so if you have put any other letter or symbol between the brackets, that will be marked as invalid. If that is the case then please open a new pull request with the appropriate changes.

@algorithms-keeper algorithms-keeper bot closed this Mar 5, 2025
@algorithms-keeper algorithms-keeper bot added the awaiting reviews This PR is ready to be reviewed label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reviews This PR is ready to be reviewed invalid
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant