Add large word list

This commit is contained in:
Quantum 2018-12-04 18:50:30 -05:00
parent 3123b9ac5c
commit 110efa414e
7 changed files with 4108 additions and 8 deletions

View file

@ -3,7 +3,7 @@ const digits = '0123456789'
const symbols = '`~!@#$%^&*()_+-=,./<>?;:|' const symbols = '`~!@#$%^&*()_+-=,./<>?;:|'
function getWordList (name) { function getWordList (name) {
if (['small', 'medium'].includes(name)) { if (['small', 'medium', 'large'].includes(name)) {
return words[name] return words[name]
} }
throw new Error(`Invalid word list: ${name}`) throw new Error(`Invalid word list: ${name}`)

View file

@ -58,7 +58,7 @@
<select id="word-list" class="form-control custom-select" name="list"> <select id="word-list" class="form-control custom-select" name="list">
<option value="small">2048 words (11 bits/word)</option> <option value="small">2048 words (11 bits/word)</option>
<option value="medium">4096 words (12 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> </select>
</div> </div>
</div> </div>

View file

@ -352,6 +352,7 @@ module.exports = [
'confidence', 'confidence',
'conflict', 'conflict',
'confusion', 'confusion',
'congratulate',
'connection', 'connection',
'conscience', 'conscience',
'conscious', 'conscious',
@ -762,7 +763,6 @@ module.exports = [
'generous', 'generous',
'genius', 'genius',
'gentle', 'gentle',
'gentleman',
'genuine', 'genuine',
'george', 'george',
'gesture', 'gesture',

View file

@ -89,6 +89,7 @@ module.exports = require('./2048').concat(
'appetite', 'appetite',
'applause', 'applause',
'apple', 'apple',
'appoint',
'appointment', 'appointment',
'appreciate', 'appreciate',
'appreciation', 'appreciation',
@ -276,7 +277,6 @@ module.exports = require('./2048').concat(
'cell', 'cell',
'cellar', 'cellar',
'censure', 'censure',
'center',
'certainty', 'certainty',
'challenge', 'challenge',
'champagne', 'champagne',
@ -307,12 +307,10 @@ module.exports = require('./2048').concat(
'clause', 'clause',
'clay', 'clay',
'clergy', 'clergy',
'clergyman',
'cliff', 'cliff',
'climate', 'climate',
'closet', 'closet',
'clumsy', 'clumsy',
'coachman',
'coal', 'coal',
'coarse', 'coarse',
'code', 'code',
@ -369,6 +367,7 @@ module.exports = require('./2048').concat(
'confession', 'confession',
'confident', 'confident',
'confidential', 'confidential',
'confine',
'confinement', 'confinement',
'confirm', 'confirm',
'confirmation', 'confirmation',
@ -999,6 +998,7 @@ module.exports = require('./2048').concat(
'inspire', 'inspire',
'institution', 'institution',
'insult', 'insult',
'insurance',
'insurrection', 'insurrection',
'integrity', 'integrity',
'intelligible', 'intelligible',
@ -1498,6 +1498,7 @@ module.exports = require('./2048').concat(
'recollect', 'recollect',
'recollection', 'recollection',
'recommend', 'recommend',
'reconcile',
'recourse', 'recourse',
'recover', 'recover',
'recovery', 'recovery',
@ -1739,7 +1740,6 @@ module.exports = require('./2048').concat(
'stamp', 'stamp',
'stare', 'stare',
'starve', 'starve',
'statesman',
'statue', 'statue',
'stature', 'stature',
'stead', 'stead',

4098
src/words/8192.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,5 @@
module.exports = { module.exports = {
small: require('./2048'), small: require('./2048'),
medium: require('./4096'), medium: require('./4096'),
large: require('./8192'),
} }

View file

@ -2,11 +2,12 @@ const assert = require('assert').strict
const words = require('../src/words') const words = require('../src/words')
describe('Word List Tests', () => { describe('Word List Tests', () => {
const lists = ['small', 'medium'] const lists = ['small', 'medium', 'large']
it('length', () => { it('length', () => {
assert.equal(words.small.length, 2048, 'small list size incorrect') assert.equal(words.small.length, 2048, 'small list size incorrect')
assert.equal(words.medium.length, 4096, 'medium 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 => { lists.forEach(name => {