1
0
Fork 0

Reorganized files into www/ directory.

feature/save-game
Daniel Perelman 5 years ago
parent f931ec0af4
commit 87ea2d1f6e

@ -1,10 +0,0 @@
CACHE MANIFEST
mastermind.html
main.css
mastermind.js
wordlist.js
en_50k.txt
typo/typo.js
typo/dictionaries/en_US/en_US.aff
typo/dictionaries/en_US/en_US.dic

@ -1 +0,0 @@
../../../Typo.js/typo/dictionaries/en_US/en_US.aff

@ -1 +0,0 @@
../../../Typo.js/typo/dictionaries/en_US/en_US.dic

@ -1 +0,0 @@
../Typo.js/typo/typo.js

@ -0,0 +1,10 @@
CACHE MANIFEST
index.html
main.css
mastermind.js
../wordlist/wordlist.js
../wordlist/en_50k.txt
../wordlist/typo.js
../wordlist/dictionaries/en_US/en_US.aff
../wordlist/dictionaries/en_US/en_US.dic

@ -4,8 +4,8 @@
<title>Anagram Mastermind (non-functional prototype)</title> <title>Anagram Mastermind (non-functional prototype)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="main.css" /> <link rel="stylesheet" type="text/css" href="main.css" />
<script type="text/javascript" src="typo/typo.js"></script> <script type="text/javascript" src="../wordlist/typo.js"></script>
<script src="./wordlist.js"></script> <script src="../wordlist/wordlist.js"></script>
<script src="./mastermind.js"></script> <script src="./mastermind.js"></script>
<script > <script >
// From https://stackoverflow.com/a/2450976 // From https://stackoverflow.com/a/2450976

@ -0,0 +1 @@
../../../../Typo.js/typo/dictionaries/en_US/../../../../Typo.js/typo/dictionaries/en_US/en_US.aff

@ -0,0 +1 @@
../../../../Typo.js/typo/dictionaries/en_US/../../../../Typo.js/typo/dictionaries/en_US/en_US.dic

@ -0,0 +1 @@
../../Typo.js/typo/typo.js

@ -1,16 +1,16 @@
var dictionary; var dictionary;
var topWords; var topWords;
const dictionaryPromise = fetch('typo/dictionaries/en_US/en_US.aff') const dictionaryPromise = fetch('../wordlist/dictionaries/en_US/en_US.aff')
.then(response => response.text()) .then(response => response.text())
.then(aff => fetch('typo/dictionaries/en_US/en_US.dic') .then(aff => fetch('../wordlist/dictionaries/en_US/en_US.dic')
.then(response => response.text()) .then(response => response.text())
.then(dic => { .then(dic => {
dictionary = new Typo('en_US', aff, dic); dictionary = new Typo('en_US', aff, dic);
})) }))
.catch(error => console.log(error)); .catch(error => console.log(error));
const topWordsPromise = fetch('en_50k.txt') const topWordsPromise = fetch('../wordlist/en_50k.txt')
.then(response => response.text()) .then(response => response.text())
.then(text => { .then(text => {
topWords = text.split('\n').map(line => { topWords = text.split('\n').map(line => {
Loading…
Cancel
Save