lijim / monks-and-mages

Monks and Mages is a TCG-game built on React and socket.io
https://www.monksandmages.com
MIT License
17 stars 0 forks source link

Feat: Improve filter cards by resource #437

Closed lijim closed 1 year ago

lijim commented 1 year ago

In the deck builder component, our previous 'strict' and 'loose' filters for resources turned out to be impractical for deckbuilding - for instance, if one wanted to build a blue/green deck, the filters would send them in the direction of any card having at least blue OR green. What we really wanted was a filter to say, give me Blue cards / green cards / blue+green cards.

This overhaul gets rid of the 3 filters (exact, strict, loose) in favor of just exact (all resources selected must match) and loose (the cards must fall under the resources selected, but can be missing some)

Before:

https://user-images.githubusercontent.com/1839462/229257678-1c7319a3-118c-4662-92f3-9d9116b695d3.mov

After:

https://user-images.githubusercontent.com/1839462/229257743-1dafa3e3-c55c-45f8-81ab-b3e2cb315203.mov