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

Refactor hitbox algo cache names into an instance property #1793

Merged
merged 5 commits into from
Jun 9, 2023

Conversation

pushfoo
Copy link
Member

@pushfoo pushfoo commented May 22, 2023

Stacks onto #1792 Rebased onto development, no longer depends on that PR.

Changes

  1. Remove name class attribute from hit box algorithm classes
  2. Add cache_name per-instance property
  3. Update tests

Why

Per discord discussion with einarf, the current cache names are from the old caching system:

I think we can drop the name and just use self.class.name, right?
No need to make it complicated

How to test

./make.py test or pytest tests/unit as usual

Follow-up work

Refactor cache class attribute into a cache_points instance property.

@pushfoo pushfoo force-pushed the refactor_hitbox_cache_name branch from fe7dea9 to f4df263 Compare June 6, 2023 00:11
@einarf
Copy link
Member

einarf commented Jun 9, 2023

Much better 👍

@einarf einarf merged commit d16451e into pythonarcade:development Jun 9, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants