···4747 const randomWords = wolfNoises[category]; // Get words for the selected category
48484949 let result = "";
5050- let currentSentenceLength = 0;
5151-5252- // Determine whether to generate a shorter post, longer post, or very short post
5353- const shorterPostProbability = 0.7; // 70% chance of generating a shorter or very short post
5454- const generateShorterOrVeryShortPost = Math.random() < shorterPostProbability;
5550 let maxLength;
56515757- if (generateShorterOrVeryShortPost) {
5858- // Determine whether to generate a very short post (1-5 words) or a shorter post (up to 140 or 280 characters)
5959- const veryShortPostProbability = 0.3; // 30% chance of generating a very short post
6060- const generateVeryShortPost = Math.random() < veryShortPostProbability;
6161-6262- if (generateVeryShortPost) {
6363- // Generate a very short post (1-5 words)
6464- const wordCount = getRandomInt(1, 5);
6565- maxLength = wordCount * 10; // Assuming an average word length of 10 characters
6666- } else {
6767- // Generate a shorter post (up to 140 or 280 characters)
6868- maxLength = getRandomInt(70, 140); // For shorter post
6969- // maxLength = getRandomInt(140, 280); // For longer post
7070- }
5252+ if (category === "howl") {
5353+ // For howl, limit to 1 word only
5454+ maxLength = 10; // Assuming an average word length of 10 characters
7155 } else {
7272- // Generate a longer post (up to 280 characters)
7373- maxLength = 280;
5656+ // For other categories, limit to 3-9 words
5757+ const wordCount = getRandomInt(3, 9);
5858+ maxLength = wordCount * 10; // Assuming an average word length of 10 characters
7459 }
75607661 while (result.length < maxLength) {
···8469 result += " ";
8570 }
8671 result += randomWord;
8787- currentSentenceLength += wordLength;
8872 } else {
8973 // Break the loop if adding the word would exceed the maximum length
9074 break;
···10488 }
1058910690 return result.trim(); // Remove any leading/trailing whitespace
107107-}
9191+}