// ======= THEME PICKER RIGGING TOOL =======
// List of 40 animal options to test
const animalOptions = [
"Lion", "Tiger", "Bear", "Wolf", "Fox",
"Eagle", "Hawk", "Falcon", "Owl", "Raven",
"Shark", "Dolphin", "Whale", "Octopus", "Squid",
"Snake", "Lizard", "Turtle", "Crocodile", "Alligator",
"Elephant", "Giraffe", "Rhino", "Hippo", "Zebra",
"Monkey", "Gorilla", "Chimpanzee", "Orangutan", "Baboon",
"Kangaroo", "Koala", "Platypus", "Wombat", "Tasmanian Devil",
"Penguin", "Flamingo", "Peacock", "Parrot", "Toucan"
];
// Implementing the same algorithm from the original code
function predictWinner(seed, entries) {
const a = 1664525;
const c = 1013904223;
const m = Math.pow(2, 32);
let totalScore = 0;
for (let i = 0; i < entries.length; i++) {
let entryScore = 0;
for (let j = 0; j < entries[i].length; j++) {
entryScore += entries[i].codePointAt(j);
}
entryScore *= (i + 1); // Position is important in the algorithm
totalScore += entryScore;
}
// Scale totalScore to match seed digits
const seedDigits = seed.toString().length;
const totalScoreDigits = totalScore.toString().length;
if (totalScoreDigits < seedDigits) {
const digitDifference = seedDigits - totalScoreDigits;
totalScore *= Math.pow(10, digitDifference);
}
// Use the same LCG calculation as the original
let randomNumber = (a * (seed + totalScore) + c) % m;
randomNumber = (randomNumber % entries.length) + 1;
return randomNumber;
}
// Function to find which animal will win if you add it
function findWinningAnimals(seed, currentEntries) {
const results = [];
// Test each animal option
for (const animal of animalOptions) {
// Create a new entries array with the animal added at the end
const testEntries = [...currentEntries, animal];
// Predict the winner
const winningIndex = predictWinner(seed, testEntries);
// If our animal would win (it would be the last entry)
if (winningIndex === testEntries.length) {
results.push(animal);
}
}
return results;
}
// Main function to analyze and recommend animals to suggest
function analyzeOptions(seed, currentEntries) {
console.log("=== THEME PICKER RIGGING ANALYSIS ===");
console.log(`Post number (seed): ${seed}`);
console.log(`Current entries: ${currentEntries.join(", ")}`);
// Find animals that would win if added
const winningAnimals = findWinningAnimals(seed, currentEntries);
if (winningAnimals.length > 0) {
console.log("\nš ANIMALS YOU CAN SUGGEST THAT WOULD WIN:");
winningAnimals.forEach(animal => console.log(`- ${animal}`));
console.log("\nSuggesting any of these animals will ensure it gets picked!");
} else {
console.log("\nā None of the tested animals would win if suggested.");
// Check what would happen with just current entries
if (currentEntries.length > 0) {
const currentWinnerIndex = predictWinner(seed, currentEntries);
console.log(`With current entries only, the winner would be: ${currentEntries[currentWinnerIndex - 1]}`);
}
}
}
// Example usage:
// Copy everything above and paste it into your browser's console
// Then run this function with your specific values:
// analyzeOptions(123456789, ["Option A", "Option B", "Option C"]);