add robust fixture rendering

This commit is contained in:
Asraelite 2016-03-30 15:58:06 +01:00
parent ef2d067b38
commit cf4e8024af
13 changed files with 140 additions and 64 deletions

View file

@ -32,9 +32,7 @@ class Player {
updateInputs(data) {
let input = {};
let sanitize = v => {
return v.length ? v.map(a => sanitize(a)) : +v || 0;
}
let sanitize = v => v.length ? v.map(a => sanitize(a)) : +v || 0;
data.forEach((v, i) => input[this.inputInterface[i]] = sanitize(v));
this.ship.updateInputs(input);
this.lastAction = Date.now();