-class WordMemory {
+class WordMemory extends WordQuiz {
turn(click) {
let target = click.currentTarget;
if (!target.classList.contains('turn')) {
.forEach(card => put(card, '!.turn!.bad'));
}
- constructor() {
+ load(dataurl) {
this.dataurl = '/data/wordpairs.json';
fetch(this.dataurl).then(res => res.json()).then(pairs => {
this.turned = [];
});
}
};
-
-new WordMemory();