Open mamodom opened 7 years ago
Does anyone have an idea about how this object should look?
Maybe something like this. This way it's up to the client to filter, eg:
moderator.getScriptFromDeck(deck, selectedLanguage).filter(call => call.inGame === true)
and/or we could add another param called scope, eg:
moderator.getScriptFromDeck(deck, selectedLanguage, scope)
scope
being 'game' | 'deck' | 'all'
@mamodom awesome! a couple of notes:
1- Instead of receiving selectedLanguage
and scope
I would receive a hash options
in case we want to extend that later
2- Scope should have 'game' as default value
3- What's scope.deck
?
4- Also, options
should receive a value firstNight : bool
(with true as default) in case we want to directly filter the roles are only called on the first night
@wOvalle keep in mind that the firstNight
property is for tell the user that this call has to be made the first night only.
@mamodom nice example!
@wOvalle I don't understand what would be the usage of a first class support of said filter. (The 4th point)
Should I include the metadata to the cards file or create another one dedicated to metadata?
Return an object with metadata instead of a string