Hanabi's situation generator

Forum rules
Please DO NOT POST BUGS on this forum. Please report (and vote) bugs on : https://boardgamearena.com/#!bugs
Post Reply
User avatar
Blacktango
Posts: 433
Joined: 18 April 2015, 12:15

Hanabi's situation generator

Post by Blacktango »

Hi, I created a tool to generate and share hanabi’s situations: https://hanabi.devnotebook.fr.

Feel free to use it and give me some feedback.

You can specify the following information :
- player's hands
- cards played
- cards discarded
- names of the players
- number of cards remaining in the deck

Then, when you click the button, you can see the preview, and copy the link to share the situation (without displaying the form), or even download the generated image.

Here's an example with a basic finesse :

Code: Select all

XX, XX, XX, XX, XX
(G1), XX, XX, XX, XX
XX, !(G2), XX, XX, XX <- G
Link: https://hanabi.devnotebook.fr/display/? ... XX%2C%3C-G

Image:
téléchargement.png
téléchargement.png (7.36 KiB) Viewed 390 times
User avatar
Blacktango
Posts: 433
Joined: 18 April 2015, 12:15

Re: Hanabi's situation generator

Post by Blacktango »

Improvment ideas :

- [DONE] add the colors used outside of BGA (at least Purple and Teal). Then it requires changing the color of the Multi.
- [DONE] handle cards touched by all number clues (ex: known as 3, but actually a 5)
- [DONE] add more color variants referenced by the H-Group (Pink and Brown)
- [DONE] handle BK and K for black cards
- [DONE] handle multiple clues to a same player (! prefix for the first clue, ? for the second)

- add a warning when the situation is invalid (or at least not handled)
- handle multiple notations (ex: parenthesis mean clued)
Last edited by Blacktango on 15 May 2023, 13:46, edited 5 times in total.
ExaltedAngel
Posts: 148
Joined: 16 January 2021, 22:15

Re: Hanabi's situation generator

Post by ExaltedAngel »

I think it's a great idea, if people get used to it could become the standard to talk about situations in the forum
Malo77
Posts: 44
Joined: 24 July 2022, 15:05

Re: Hanabi's situation generator

Post by Malo77 »

Nice!

I suggest 2 little additions:

I see you can show several clues, as shown on your website example, so we would need the clue order:
you could add a little number next to the clue (on far right) to show in which order there were given.
The order can have some meaning.

It would also be nice to allow K / Bk / BK for blacks

What language do you use ? do you share the code ?
User avatar
Blacktango
Posts: 433
Joined: 18 April 2015, 12:15

Re: Hanabi's situation generator

Post by Blacktango »

Hi, thanks for the feedback!

Np to allow more names for blacks, I can easily add color names while there are no duplicates in the initials of color list.

Handling multiple clues seems like a great idea, but this is hard work.

Now, there is no relation between the clue at the end of the line, and the cards marked by the clue.
This means that you can indicate a Y2 is marked by a G clue, without any validation, just by prefixing it with a ! character.

I guess I could allow more prefix characters:

Code: Select all

!(B1), ?(R2), #(M3), @(B3)  <- B, 2, 3, B
!, ?, #, @ would respectively mean 1st, 2nd, 3rd and 4th clue.
But then it should actually be:

Code: Select all

!(B1), ?(R2), #(M3), !#@(B3)  <- B, 2, 3, B
This would complicate the notation and the display (now we need enough space to display more than 1 clue above a card).
Maybe allowing only two clues for the same card would be enough for most situations ? What do you think?

About the code, you can find it here : https://framagit.org/games/hanabi-situation-generator
This is node and basic JavaScript. The main complexity is the regexp part.

EDIT: Multiple clues feature is now implemented (2 clues max)
Attachments
f64acfddc4d9.png
f64acfddc4d9.png (7.64 KiB) Viewed 272 times
Post Reply

Return to “Hanabi”