mirror of
https://github.com/quantum5/correcthorsebatterystaple.git
synced 2025-04-24 02:01:57 -04:00
Add large word list
This commit is contained in:
parent
3123b9ac5c
commit
110efa414e
|
@ -3,7 +3,7 @@ const digits = '0123456789'
|
|||
const symbols = '`~!@#$%^&*()_+-=,./<>?;:|'
|
||||
|
||||
function getWordList (name) {
|
||||
if (['small', 'medium'].includes(name)) {
|
||||
if (['small', 'medium', 'large'].includes(name)) {
|
||||
return words[name]
|
||||
}
|
||||
throw new Error(`Invalid word list: ${name}`)
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<select id="word-list" class="form-control custom-select" name="list">
|
||||
<option value="small">2048 words (11 bits/word)</option>
|
||||
<option value="medium">4096 words (12 bits/word)</option>
|
||||
<option value="large" disabled>8192 words (13 bits/word)</option>
|
||||
<option value="large">8192 words (13 bits/word)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -352,6 +352,7 @@ module.exports = [
|
|||
'confidence',
|
||||
'conflict',
|
||||
'confusion',
|
||||
'congratulate',
|
||||
'connection',
|
||||
'conscience',
|
||||
'conscious',
|
||||
|
@ -762,7 +763,6 @@ module.exports = [
|
|||
'generous',
|
||||
'genius',
|
||||
'gentle',
|
||||
'gentleman',
|
||||
'genuine',
|
||||
'george',
|
||||
'gesture',
|
||||
|
|
|
@ -89,6 +89,7 @@ module.exports = require('./2048').concat(
|
|||
'appetite',
|
||||
'applause',
|
||||
'apple',
|
||||
'appoint',
|
||||
'appointment',
|
||||
'appreciate',
|
||||
'appreciation',
|
||||
|
@ -276,7 +277,6 @@ module.exports = require('./2048').concat(
|
|||
'cell',
|
||||
'cellar',
|
||||
'censure',
|
||||
'center',
|
||||
'certainty',
|
||||
'challenge',
|
||||
'champagne',
|
||||
|
@ -307,12 +307,10 @@ module.exports = require('./2048').concat(
|
|||
'clause',
|
||||
'clay',
|
||||
'clergy',
|
||||
'clergyman',
|
||||
'cliff',
|
||||
'climate',
|
||||
'closet',
|
||||
'clumsy',
|
||||
'coachman',
|
||||
'coal',
|
||||
'coarse',
|
||||
'code',
|
||||
|
@ -369,6 +367,7 @@ module.exports = require('./2048').concat(
|
|||
'confession',
|
||||
'confident',
|
||||
'confidential',
|
||||
'confine',
|
||||
'confinement',
|
||||
'confirm',
|
||||
'confirmation',
|
||||
|
@ -999,6 +998,7 @@ module.exports = require('./2048').concat(
|
|||
'inspire',
|
||||
'institution',
|
||||
'insult',
|
||||
'insurance',
|
||||
'insurrection',
|
||||
'integrity',
|
||||
'intelligible',
|
||||
|
@ -1498,6 +1498,7 @@ module.exports = require('./2048').concat(
|
|||
'recollect',
|
||||
'recollection',
|
||||
'recommend',
|
||||
'reconcile',
|
||||
'recourse',
|
||||
'recover',
|
||||
'recovery',
|
||||
|
@ -1739,7 +1740,6 @@ module.exports = require('./2048').concat(
|
|||
'stamp',
|
||||
'stare',
|
||||
'starve',
|
||||
'statesman',
|
||||
'statue',
|
||||
'stature',
|
||||
'stead',
|
||||
|
|
4098
src/words/8192.js
Normal file
4098
src/words/8192.js
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,5 @@
|
|||
module.exports = {
|
||||
small: require('./2048'),
|
||||
medium: require('./4096'),
|
||||
large: require('./8192'),
|
||||
}
|
||||
|
|
|
@ -2,11 +2,12 @@ const assert = require('assert').strict
|
|||
const words = require('../src/words')
|
||||
|
||||
describe('Word List Tests', () => {
|
||||
const lists = ['small', 'medium']
|
||||
const lists = ['small', 'medium', 'large']
|
||||
|
||||
it('length', () => {
|
||||
assert.equal(words.small.length, 2048, 'small list size incorrect')
|
||||
assert.equal(words.medium.length, 4096, 'medium list size incorrect')
|
||||
assert.equal(words.large.length, 8192, 'large list size incorrect')
|
||||
})
|
||||
|
||||
lists.forEach(name => {
|
||||
|
|
Loading…
Reference in a new issue