Added KeyCombo.progress.

This commit is contained in:
Richard Davey 2017-02-21 23:51:18 +00:00
parent fa69035e4f
commit 226e0b216d

View file

@ -123,4 +123,20 @@ KeyCombo.prototype = {
};
Object.defineProperties(KeyCombo.prototype, {
progress: {
enumerable: true,
// How far complete is this combo? A value between 0 and 1.
get: function ()
{
return this.index / this.size;
}
}
});
module.exports = KeyCombo;