How to store multiple requirements with OR and AND?
- by Cano
Well I'm working on a personal project that needs to check if a user has met certain requirements, and they come in a form of
Requirement: [c1 OR c2] AND [d1 OR d2]
Requirement: [c1 AND c2] OR [d1 AND d2]
Requirement: c1 AND any dn(n can be any integer)
I'm just not sure how to store these sorts of requirements, I'm thinking of using another object to hold c1,c2,d1,d2....dn and OR, but that seems like a roundabout way of doing things. Is there a better method?