cleanup and style
This commit is contained in:
parent
f218b4c27e
commit
72767c1ca5
34
src/App.vue
34
src/App.vue
@ -212,7 +212,6 @@ export default {
|
|||||||
this.pattern = []
|
this.pattern = []
|
||||||
this.check = []
|
this.check = []
|
||||||
this.score = 0
|
this.score = 0
|
||||||
//this.generatePattern()
|
|
||||||
this.addToPattern()
|
this.addToPattern()
|
||||||
this.playPattern()
|
this.playPattern()
|
||||||
},
|
},
|
||||||
@ -239,28 +238,6 @@ export default {
|
|||||||
addToPattern() {
|
addToPattern() {
|
||||||
this.pattern.push(Math.floor(Math.random() * 4))
|
this.pattern.push(Math.floor(Math.random() * 4))
|
||||||
},
|
},
|
||||||
|
|
||||||
generatePattern() {
|
|
||||||
let pattern = []
|
|
||||||
|
|
||||||
for(let i = 0; i < this.count; i++ ) {
|
|
||||||
pattern[i] = Math.floor(Math.random() * 4)
|
|
||||||
setTimeout(()=> {
|
|
||||||
setTimeout(()=> {
|
|
||||||
this.blink = pattern[i]
|
|
||||||
|
|
||||||
}, 600)
|
|
||||||
|
|
||||||
setTimeout(()=> {
|
|
||||||
this.blink = null
|
|
||||||
}, 800)
|
|
||||||
}, 600 * (i+1))
|
|
||||||
}
|
|
||||||
|
|
||||||
this.pattern = pattern
|
|
||||||
|
|
||||||
return pattern
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -397,10 +374,11 @@ html, body{
|
|||||||
outline: none;
|
outline: none;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
font-family: monospace;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: darkslategray;
|
background: linear-gradient(45deg, black, transparent);
|
||||||
text-shadow: 0px 0px 3px white;
|
text-shadow: 0px 0px 12px black;
|
||||||
color: black;
|
color: silver;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,6 +386,10 @@ html, body{
|
|||||||
border-radius: 100px 100px 0 0;
|
border-radius: 100px 100px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.start button:disabled {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
.reset button {
|
.reset button {
|
||||||
border-radius: 0 0 100px 100px;
|
border-radius: 0 0 100px 100px;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user