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 support for crowns as a charge #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

antoineluong
Copy link

'dovetailed',
'ducal',
'embattled',
];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing a as const as the end of this declaration

Copy link
Owner

@blemoine blemoine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much, at runtime it works perfectly :)

But I didn't setup a CI (yet ?) , so I have to run manually npm run test, which is showing me some errors:

  • can you run prettier on all committed code ? ( prettier --write src/ )
  • can you fix the type errors (can be seen with npm run typecheck)
    you will need to add in arbitraries.ts in createChargeArb something like
 else if (chargeName === 'crown') {
      return fc.record<Crown>({
        name: fc.constant(chargeName),
        tincture: tinctureArb,
        countAndDisposition: countAndDistionArb,
        type: fc.constantFrom(...crownTypes),
      });
    } 

Aside from that, It's good for me. When fixed, I'll merge.

Thank you again!

@antoineluong
Copy link
Author

Thanks for the review. I have two questions about that:

  • where should the adjective be placed (embattled crown or crown embattled)?
  • for future additions, as the possibilities of charge types are quite large, what about a system of plugins with some kind of inheritance to simplify the process?

@blemoine
Copy link
Owner

blemoine commented Apr 1, 2020

It's a good question, as it will make the change far more complicated:

  • dancetty and embattled are after the crown,
  • ducal is before the crown.

Here the quick fix could to just not support ducal in the first version, as the parser will need some tweak to be able to support the 2 possible positions

A plugin system is definitely something we could do, but it will take quite a lot a time to implement , so don't expect it very soon...

@antoineluong
Copy link
Author

A plugin system is definitely something we could do, but it will take quite a lot a time to implement , so don't expect it very soon...

I could start working on it, if that's OK with you.

@blemoine
Copy link
Owner

It's open source, you don't need my permission to work on it :)
On my side, I'm working on another side project right now, so every contribution on this one are more than welcome.

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

Successfully merging this pull request may close these issues.

2 participants