extract the grid to its own class
[2048.git] / js / html_actuator.js
blob:a/js/html_actuator.js -> blob:b/js/html_actuator.js
function HTMLActuator() { function HTMLActuator() {
   
} }
   
HTMLActuator.prototype.update = function (grid) { HTMLActuator.prototype.actuate = function (grid) {
// Temporary debug visualizer // Temporary debug visualizer
grid.forEach(function (row) { grid.cells.forEach(function (row) {
var mapped = row.map(function (tile) { var mapped = row.map(function (tile) {
return tile ? tile.value : " "; return tile ? tile.value : " ";
}).join(" | "); }).join(" | ");
console.log(mapped); console.log(mapped);
}); });
}; };
   
comments