Skip to content

Commit 6056f7a

Browse files
Randomize button, other improvements, more data, infrastructure for confetti
1 parent 7431706 commit 6056f7a

8 files changed

+87
-9
lines changed

modules/QuestionHandler.js

+4
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ export class QuestionHandler {
9191
return total;
9292
}
9393

94+
randomize() {
95+
this.questions.sort(() => Math.random() - 0.5);
96+
}
97+
9498
get correct() {
9599
return this.__correct;
96100
}

modules/StatusIndicatorHandler.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export class StatusIndicatorHandler {
1414
return this.__current;
1515
}
1616
set current(value){
17+
//this.statusIndicator.scrollTo
1718
this.__current = value;
1819
this.__update__();
1920
}

modules/confetti.min.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

script.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ function createHintListeners(){
8383
});
8484
}
8585

86-
//await load("test-1")
87-
//await load("irverbs")
86+
await load("test-1")
87+
await load("irverbs")
88+
await load("places")
8889
await load("stupid-french")
8990
.then(createHintListeners);
9091

@@ -97,7 +98,8 @@ loadButton.addEventListener("click", event => {
9798

9899
let randomizeButton = document.getElementById("random-button");
99100
randomizeButton.addEventListener("click", event => {
100-
101+
questionHandler.randomize();
102+
questionHandler.current = questionHandler.current;
101103
});
102104

103105

sets/passé-composé.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
{
3+
"name": "French 2",
4+
"questions": [
5+
"[Je suis arrivé](I have arrived)",
6+
"[Je suis allé](I have gone)",
7+
"[]()"
8+
]
9+
}

sets/places.json

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
{
3+
"name": "French 2: stupide voyage",
4+
"questions": [
5+
"[un aéroport](an airport)",
6+
"[un avion](a plane)",
7+
"[un vol](a flight)",
8+
"[un départ](a departure)",
9+
"[un arrivée](an arrival)",
10+
"[un billet d'avion](a plane ticket)",
11+
"[un billet aller-retour](a round trip ticket)",
12+
"[un billet aller simple](a one-way ticket)",
13+
"[rouler en voiture](drive a car)",
14+
"[prendre un train](take a train)",
15+
"[prendre le métro](take the metro)",
16+
"[un billet de train](a train ticket)",
17+
"[un ticket de métro](a metro ticket)",
18+
"[un ticket de bus](a bus ticket)",
19+
"[une gare](a train station)",
20+
"[une gare routière](a bus station)",
21+
"[un arrêt d'autobus](a bus stop)",
22+
"[une station de métro](a metro station)",
23+
"[un jour de congé](a day off)",
24+
"[les vacances](vacation)",
25+
"[partir en vacances](to part on vacation)",
26+
"[faire les valises](to pack a suitcase)",
27+
"[une station de ski](ski station)",
28+
"[la plage](the beach)",
29+
"[la mer](the sea)",
30+
"[la campagne](the countryside)",
31+
"[faire un séjour](to spend time somewhere)",
32+
"[à l'étranger](abrod)",
33+
"[une douane](a customs)",
34+
"[un passport](a passport)",
35+
"[une sortie](an exit)",
36+
"[un pays](a country)",
37+
"[utiliser un plan](a plan/map)",
38+
"[une carte](a map)",
39+
"[la capitale](a capitol)",
40+
"[la France](france)",
41+
"[l'Angleterre](britian) (feminine)",
42+
"[l'Espagne](spain) (feminine)",
43+
"[l'Italie](italy) (feminine)",
44+
"[le Mexique](mexico)",
45+
"[le Cambodge](cambodia)",
46+
"[les pays-bas](the netherlands)"
47+
]
48+
}

sets/stupid-french.json

+19-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"[perdre](to lose)",
99
"[perdre son temps](to waste time)",
1010
"[rendre](return/give back)",
11-
"[rendre visité à](visit a person)",
11+
"[rendre visite à](visit a person)",
1212
"[répondre à](to respond to)",
1313
"[vendre](sell)",
1414

@@ -56,7 +56,7 @@
5656
"Ils [rient](laugh)",
5757
"J'ai [ri](laugh) (past participle)",
5858

59-
"[poser un question à](ask/pose a question)",
59+
"[poser une question à](ask/pose a question)",
6060
"[demander à](ask)",
6161
"[donner à](give)",
6262
"[écrire à](write)",
@@ -88,14 +88,29 @@
8888
"Il [lit](read)",
8989
"Nous [lisons](read)",
9090
"Vous [lisez](read)",
91-
"Ils [lient](read)",
91+
"Ils [lisent](read)",
9292
"J'ai [lu](read) (past participle)",
9393

9494
"I speak to her = [Je lui parle]",
9595
"I don't speak to her = [Je ne lui parle pas]",
9696
"I am going to speak to her = [Je vais lui parler]",
9797
"I am not going to speak to her = [Je ne vais pas lui parler]",
9898
"I have spoken to her = [Je lui ai parlé]",
99-
"I have not spoken to her = [Je ne lui ai pas parlé]"
99+
"I have not spoken to her = [Je ne lui ai pas parlé]",
100+
101+
"[confortable](comfortable)",
102+
"[gilet](cardigan)",
103+
"[une chemise](a men's dress shirt)",
104+
"[un chemisier](a woman's dress shirt)",
105+
"[un tailleur](a woman's suit)",
106+
"[un costume](a men's suit)",
107+
"[un manteau](an overcoat)",
108+
"[un blouson](a jacket)",
109+
"[un vendeur](a salesman)",
110+
"[une vendeuse](a saleswoman)",
111+
"[chere](expensive masculine) [chère](expensive feminine)",
112+
"[bon marché](cheap)",
113+
"[une taille](a size)",
114+
"[serré](tight masculine) [serrée](tight feminine)"
100115
]
101116
}

study.html

-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737

3838
<button id="random-button" class="orphan button sticky">Randomize</button>
3939
<button id="input-button" class="orphan button sticky">Load</button>
40-
41-
<div id="timer"></div>
4240
</div>
4341

4442
<div id="bar-placeholder"></div>

0 commit comments

Comments
 (0)