extract the grid to its own class

This commit is contained in:
Gabriele Cirulli
2014-03-08 13:10:54 +01:00
parent cf31e146aa
commit dca5207fa4
4 changed files with 69 additions and 52 deletions
+2 -2
View File
@@ -2,9 +2,9 @@ function HTMLActuator() {
}
HTMLActuator.prototype.update = function (grid) {
HTMLActuator.prototype.actuate = function (grid) {
// Temporary debug visualizer
grid.forEach(function (row) {
grid.cells.forEach(function (row) {
var mapped = row.map(function (tile) {
return tile ? tile.value : " ";
}).join(" | ");