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

function update(node, value){
    node.setAttribute('value', value);
}

module.exports = {
    left: function(node) {
        left = (left + 1) % 3;
        update(node, left);
    },
    right: function(node) {
        right = (right + 1) % 3;
        update(node, right);
    },
}