Skip to content

Commit

Permalink
removed octordle
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuval Ben-Hayun authored and Yuval Ben-Hayun committed Nov 12, 2022
1 parent ca35c6c commit 4d2991f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 63 deletions.
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
<script type = "text/javascript" src = "word_lists/officialanswers.js"></script>
<script type = "text/javascript" src = "word_lists/officialguesses.js"></script>
<script type = "text/javascript" src = "word_lists/rankings.js"></script>

<script type = "text/javascript" src = "js/setup.js"></script>
<script type = "text/javascript" src = "js/class.js"></script>
<script type = "text/javascript" src = "js/main.js"></script>
<script type = "text/javascript" src = "js/bot.js"></script>
<script type = "text/javascript" src = "../general.js"></script>
<title>WordleBot</title>
</head>
<body>
Expand Down Expand Up @@ -78,7 +79,7 @@ <h3 class="mini-header">Choose Your Bot</h3>
<option value="Thirdle" class = "Thirdle">Thirdle</option>
<option value="Dordle" class = "Dordle">Dordle</option>
<option value="Quordle" class = "Quordle">Quordle</option>
<option value="Octordle" class = "Octordle">Octordle</option>
<!-- <option value="Octordle" class = "Octordle">Octordle</option> -->
</select>
</p>
</div>
Expand Down
2 changes: 0 additions & 2 deletions js/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,7 @@ function antiRecursion(word, difference, wrong_letters, diff_list, i) {
}

if (wrong_letters.includes(word.charAt(i)) && difference.charAt(i) != CORRECT) {
// if (difference.charAt(i) != CORRECT) {
antiRecursion(word, replaceAt(difference, CORRECT, i), wrong_letters, diff_list, i+1);
// }

if (difference.charAt(i) != INCORRECT) {
antiRecursion(word, replaceAt(difference, INCORRECT, i), wrong_letters, diff_list, i+1);
Expand Down
11 changes: 0 additions & 11 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,17 +873,6 @@ function couldBeAnswer(guess) {
return true;
}

function replace(old_string, old_char, new_char) {
let regex = new RegExp(old_char,'g'); // correct way
let new_string = old_string.replace(regex, new_char); // it works

return new_string;
}

function replaceAt(old_string, char, index) {
old_string = old_string.slice(0, index) + char + old_string.slice(index+1);
return old_string;
}
/* SORT FUNCTIONS */

// sorts the list based on which words have the most common letters
Expand Down
49 changes: 1 addition & 48 deletions js/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,59 +177,12 @@ function createMaxGuesses(div) {
}

const EXAMPLE_LIST =
// {
[
// "Wordle": [
{word: 'BLOKE', score: '2.188 guesses left', wrong: '96.77% solve rate'},
{word: 'YOLKS', score: '2.250 guesses left'},
{word: 'KOELS', score: '2.250 guesses left'},
{word: 'KYLOE', score: '2.250 guesses left'}
// ]
// ,
// "Woodle": [
// {word: 'LEAST', score: '3.652 guesses left', wrong: '96.77% solve rate'},
// {word: 'STALE', score: '3.661 guesses left'},
// {word: 'SPATE', score: '3.665 guesses left'},
// {word: 'BEARD', score: '3.674 guesses left'}
// ],
// "W-Peaks": [
// {word: 'THREE', score: '2.111 guesses left', wrong: '96.77% solve rate'},
// {word: 'TIRED', score: '2.222 guesses left'},
// {word: 'TOPEE', score: '2.222 guesses left'},
// {word: 'TOPEK', score: '2.222 guesses left'}
// ],
// "Antiwordle": [
// {word: 'TAZZA', score: '9.000 guesses left', wrong: '96.77% solve rate'},
// {word: 'THUJA', score: '8.813 guesses left'},
// {word: 'TAPPA', score: '8.813 guesses left'},
// {word: 'TAXED', score: '8.500 guesses left'}
// ],
// "Thirdle": [
// {word: 'LEAST', score: '3.652 guesses left', wrong: '96.77% solve rate'},
// {word: 'STALE', score: '3.661 guesses left'},
// {word: 'SPATE', score: '3.665 guesses left'},
// {word: 'BEARD', score: '3.674 guesses left'}
// ],
// "Xordle": [
// {word: 'SOLDE', score: '3.227 guesses left', wrong: '96.77% solve rate'},
// {word: 'POULE', score: '3.228 guesses left'},
// {word: 'SOCLE', score: '3.238 guesses left'},
// {word: 'SLOPE', score: '3.255 guesses left'},
// ],
// "Fibble": [
// {word: "PALET", score: '2.932 guesses left', wrong: '96.77% solve rate'},
// {word: "SALET", score: "2.935 guesses left"},
// {word: "LACET", score: "2.952 guesses left"},
// {word: "CAPLE", score: "2.952 guesses left"}
// ],
// "Hardle": [
// {word: "BEALS", score: '2.500 guesses left', wrong: '96.77% solve rate'},
// {word: "BELTS", score: "2.519 guesses left"},
// {word: "SOCLE", score: "2.537 guesses left"},
// {word: "HEALS", score: "2.537 guesses left"}
// ]
// }
]
];

function createExample() {
let example_row = createRow('TRAIN', 'dummy');
Expand Down

0 comments on commit 4d2991f

Please sign in to comment.