Add moves count

This commit is contained in:
Anton Vakhrushev 2018-06-24 19:22:11 +03:00
parent 4ffca9dcb8
commit 680bcbdda8
2 changed files with 6 additions and 1 deletions

View File

@ -38,4 +38,8 @@ export default class Predictor {
this.journal.makeMove(value, prediction); this.journal.makeMove(value, prediction);
return prediction; return prediction;
} }
stepCount() {
return this.journal.length;
}
} }

View File

@ -24,7 +24,8 @@ new Vue({
}, },
pass(value) { pass(value) {
const prediction = this.predictor.pass(value); const prediction = this.predictor.pass(value);
console.log('PREDICTED', prediction, 'PASS', value); const step = this.predictor.stepCount();
console.log('STEP', step, 'PREDICTED', prediction, 'PASS', value);
}, },
}, },
}); });