summaryrefslogtreecommitdiffstats
path: root/src/js/chair.js
blob: ceed88c254402a1d71df1ed64318e6b4a7798267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var left = 0;
var right = 0;

module.exports = {
    update_left: function() {
        document.getElementById('LeftChair').setAttribute('value', left);
    },
    left: function() {
        left = (left + 1) % 3;
        this.update_left();
    },
    update_right: function() {
        document.getElementById('RightChair').setAttribute('value', right);
    },
    right: function() {
        right = (right + 1) % 3;
        this.update_right();
    },
}