projects
/
westcastle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
50eac46
)
gong at timer start - add a few TODOs
author
Benjamin Auder
<benjamin.auder@somewhere>
Sun, 31 Dec 2017 14:06:57 +0000
(15:06 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Sun, 31 Dec 2017 14:06:57 +0000
(15:06 +0100)
js/index.js
patch
|
blob
|
blame
|
history
diff --git
a/js/index.js
b/js/index.js
index
5f18704
..
d9f4576
100644
(file)
--- a/
js/index.js
+++ b/
js/index.js
@@
-122,6
+122,8
@@
new Vue({
</div>
`,
methods: {
</div>
`,
methods: {
+ // TODO: clic sur "Valider" télécharge la ronde courante
+ // TODO: mémoriser les appariements passés pour éviter que les mêmes joueurs se rencontrent plusieurs fois
doPairings: function() {
// Simple case first: 4 by 4
let tables = [];
doPairings: function() {
// Simple case first: 4 by 4
let tables = [];
@@
-233,6
+235,7
@@
new Vue({
return {
time: 0, //remaining time, in seconds
running: false,
return {
time: 0, //remaining time, in seconds
running: false,
+ initialTime: 5400, //1h30
};
},
template: `
};
},
template: `
@@
-269,7
+272,7
@@
new Vue({
},
reset: function(e) {
this.running = false;
},
reset: function(e) {
this.running = false;
- this.time =
5400; //1:30
+ this.time =
this.initialTime;
},
start: function() {
if (!this.running)
},
start: function() {
if (!this.running)
@@
-280,6
+283,8
@@
new Vue({
this.running = false;
return;
}
this.running = false;
return;
}
+ if (this.time == this.initialTime)
+ new Audio("sounds/gong.mp3").play(); //gong at the beginning
setTimeout(() => {
if (this.running)
this.time--;
setTimeout(() => {
if (this.running)
this.time--;