Skip to content

added >.< and mutations#39

Open
DrTexx wants to merge 1 commit intozuzak:mainfrom
DrTexx:master
Open

added >.< and mutations#39
DrTexx wants to merge 1 commit intozuzak:mainfrom
DrTexx:master

Conversation

@DrTexx
Copy link

@DrTexx DrTexx commented Oct 27, 2020

No description provided.

@zuzak
Copy link
Owner

zuzak commented Oct 27, 2020

Thanks for the pull request!
If I merge this now, approximately 15% of the time it'll pick one of >.> and friends.
Every twenty transformations we'd expect one of these to occur about least three times.
I'm worried 15% is too high, and it'll get overly repetitive?

What do you think?

@DrTexx
Copy link
Author

DrTexx commented Oct 28, 2020

Hmm yeah, that's a good point.

I know it makes things rather more complicated, but what if we were to group all the mutations for a given face, and then instead pick one of those mutations?

For instance, first we randomly decide on a suffix group with a 1/n chance of selecting a given group, then we randomly select a mutation from said group.

For the sake of example, a 2-dimensional array something like this:

const suffixes = [
  ["<.<", ">.<", ">.>"],
  ["xD", "xP", "x3"]
  // ...
]

Also, if we have a suffix that's fairly unique, we could either:

  1. Put each unique suffix into it's own 1 item array; or
  2. Leave it as a string instead of an array, but add a condition before substituting to check if the choice is an array first (and then pick an item within it if it is).

Option 1 is certainly easier for other contributors to understand since a clear pattern is set, however it's a little redundant.
Option 2 has less redundancy and is probably more fun to code, however is more complex and encourages a less consistent database structure.

@zuzak zuzak added the hacktoberfest-accepted PRs tagged with this label count towards the t-shirt label Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PRs tagged with this label count towards the t-shirt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments