Skip to content

Commit

Permalink
switch to worst accuracy when count >= 30
Browse files Browse the repository at this point in the history
  • Loading branch information
fchabouis committed Jun 28, 2019
1 parent 923855f commit 4d81d95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import axios from "axios";
let ls = window.localStorage;
const average = list => list.reduce((prev, curr) => prev + curr) / list.length;
const average = list => list.reduce((prev, curr) => prev + curr, 0) / list.length;
const timeToWpm = time => Math.round(60 / ((time * 5) / 1000));
Expand Down Expand Up @@ -146,7 +146,7 @@ export default {
const shuffled = response.data
.map(el => el.word)
.sort(() => 0.5 - Math.random());
vm.targetTextList = shuffled.slice(0, 15);
vm.targetTextList = shuffled.slice(0, 2);
})
.catch(function(error) {
vm.targetTextList = [];
Expand Down Expand Up @@ -179,7 +179,7 @@ export default {
return this.targetTextList.join(' ')
},
getTargetKey() {
if (this.smallestCount.count < 100) {
if (this.smallestCount.count < 30) {
return this.smallestCount.key
} else {
return this.worstAccuracy
Expand Down

0 comments on commit 4d81d95

Please sign in to comment.