Moved consonant bias to config, increased slightly to 0.6.

This commit is contained in:
Niels Simenon 2023-04-10 16:34:53 +02:00
parent 77b6ebfb5c
commit 8aef44b2d9
2 changed files with 2 additions and 1 deletions

View File

@ -100,6 +100,7 @@ module.exports = {
letters: {
length: 9,
timeout: 60,
consonantBias: 0.6, // for auto fill
// http://www.thecountdownpage.com/letters.htm
vowels: {
a: 15,

View File

@ -157,7 +157,7 @@ function onCommand(args, context) {
}
if (context.command === 'letsgo' || ['start', 'go', 'auto', 'random'].includes(context.subcommand)) {
start(context, Array.from({ length: config.letters.length }, () => (Math.random() < 0.55 ? 'c' : 'v')).join('')); // a slight bias towards consonants seems to give better boards
start(context, Array.from({ length: config.letters.length }, () => (Math.random() < config.letters.consonantBias ? 'c' : 'v')).join('')); // a slight bias towards consonants seems to give better boards
return;
}