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

Add metadata to moderator script #33

Open
mamodom opened this issue Jan 19, 2017 · 7 comments
Open

Add metadata to moderator script #33

mamodom opened this issue Jan 19, 2017 · 7 comments
Assignees

Comments

@mamodom
Copy link
Collaborator

mamodom commented Jan 19, 2017

Return an object with metadata instead of a string

@vetom
Copy link
Member

vetom commented Jan 19, 2017

Does anyone have an idea about how this object should look?

@mamodom
Copy link
Collaborator Author

mamodom commented Jan 19, 2017

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'

@wovalle
Copy link
Member

wovalle commented Jan 19, 2017

@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

@mamodom
Copy link
Collaborator Author

mamodom commented Jan 19, 2017

  1. Cool
  2. Cool
  3. It's the script as if all the cards in the deck were in play (Imagine a deck where there are ww, vg, and a seer, in the case that the created game didn't include a seer, as the moderator, you might want to keep calling the seer at night to confuse the players and/or to not reveal there is no seer)

@vetom
Copy link
Member

vetom commented Jan 19, 2017

@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!

@mamodom
Copy link
Collaborator Author

mamodom commented Jan 19, 2017

@wovalle I don't understand what would be the usage of a first class support of said filter. (The 4th point)

@vetom
Copy link
Member

vetom commented Feb 7, 2017

Should I include the metadata to the cards file or create another one dedicated to metadata?

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

No branches or pull requests

3 participants