refactor: remove custom filter classes
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
I don't think overriding match method in a custom filter class is a good approach for a single card. Better to make a predicate, or rework the logic entirely.
- [ ] DoomCannonFilter
- ThrasherBruteFilter (this is okay, analogous to FilterPermanentThisOrAnother but for team)
- [ ] FilterCoverOfDarkness
- [ ] FilterSteelyResolve
- [ ] WallOfVipersFilter
- [ ] WatchdogFilter
- [ ] BoardedWindowFilter
- [ ] CallousOppressorFilter
A few others that don't need to exist (just use a static filter, or the predicate, where appropriate in the few places needed):
- [x] FilterSpiritOrArcaneCard
- [x] FilterHistoricCard
- [x] FilterHistoricSpell
- [ ] FilterBySubTypeCard
- [x] FilterNoncreatureCard
- [x] FilterArtifactSpell
- [x] FilterInstantSpell
- [x] FilterControlledCreatureOrPlaneswalkerPermanent
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the listed filter classes and their usages, especially DoomCannonFilter, FilterCoverOfDarkness, and the other unchecked items. Compare their overridden match logic with the predicate or static-filter patterns mentioned in the issue; done means the unnecessary custom classes are removed while each card keeps equivalent filtering behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100