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 = '`~!@#$%^&*()_+-=,./<>?;:|'
function getWordList (name) {
if (['small', 'medium'].includes(name)) {
if (['small', 'medium', 'large'].includes(name)) {
return words[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">
<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>

View file

@ -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',

View file

@ -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

File diff suppressed because it is too large Load diff

View file

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

View file

@ -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 => {