Commit c55e99ea authored by SpinShare's avatar SpinShare

code clarity

parent fbba4a32
......@@ -43,22 +43,22 @@
'hasXDDifficulty'
],
mounted: function() {
var difficultyObject = [
let difficultyObject = [
{difficulty: 0, value: this.$props.hasEasyDifficulty},
{difficulty: 1, value: this.$props.hasNormalDifficulty},
{difficulty: 2, value: this.$props.hasHardDifficulty},
{difficulty: 3, value: this.$props.hasExpertDifficulty},
{difficulty: 4, value: this.$props.hasXDDifficulty}
]
var trueCount = 0;
var singleDiff = {};
let trueCount = 0;
let singleDiff = {};
difficultyObject.forEach(e => {
if (e['value'] == true) {
trueCount++
singleDiff == e
}
});
if (trueCount == 1) {this.play(singleDiff.difficulty)}
if (trueCount == 1) this.play(singleDiff.difficulty);
ipcRenderer.on("overlays-close", () => {
this.close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment