From 8aef44b2d95fd2387a88e05b18b2ea4b0d37ddb6 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Mon, 10 Apr 2023 16:34:53 +0200 Subject: [PATCH] Moved consonant bias to config, increased slightly to 0.6. --- config/default.js | 1 + src/games/letters.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/default.js b/config/default.js index 8f8ece1..a09d678 100755 --- a/config/default.js +++ b/config/default.js @@ -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, diff --git a/src/games/letters.js b/src/games/letters.js index 10bf45f..b83bae9 100755 --- a/src/games/letters.js +++ b/src/games/letters.js @@ -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; }