Skip to content

Instantly share code, notes, and snippets.

@jeesay
Created November 20, 2014 08:44
class Row for marchingSquareNoDoubles.js
// class Row for marchingSquareNoDoubles.js
// Jean-Christophe Taveau
// http://crazybiocomputing.blogspot.com
// Nov. 2014
function Row() {
this.squares = [];
this.count = 0;
}
Row.prototype.reset_count = function () {
this.count=0;
}
Row.prototype.push = function (a_square) {
row[this.count++] = a_square;
}
Row.prototype.previous = function () {
return row[this.count - 1];
}
Row.prototype.above = function () {
return row[this.count];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment