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 #12607

Open
wants to merge 13 commits into
base: master
Choose a base branch
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:
[x] Add an algorithm?
[ ] Fix a bug or typo in an existing algorithm?
[ ] Add or change doctests?
[ ] Documentation change?

Checklist:
[x] I have read CONTRIBUTING.md.
[x] This pull request is all my own work—no plagiarism.
[x] I know that pull requests will not be merged if they fail automated tests.
[x] This PR only changes one algorithm file. Separate PRs will be opened for other algorithms.
[x] The new file is placed in an appropriate directory.
[x] Filenames are in lowercase with no spaces or dashes.
[x] Functions and variables follow Python naming conventions.
[x] Type hints and docstrings are included for clarity.
[x] 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 algorithms-keeper bot added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed tests are failing Do not merge until tests pass labels 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 enhancement This PR modified some existing files tests are failing Do not merge until tests pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant