// usage:
// points = new Points()
// points.push('bar')
// points.push('foo')
// points[0] == 'bar'
// points[1] == 'foo'
// points.length == 2
function Points() {
this.init();
}
Points.prototype = {
init: function () {
this.container = [];
this.current = null;
this.previous = null;
this.length = 0;
},
destroy: function () {},
push: function (item) {
this.container.push(item);
this.length++;
this.previous = this.current;
this.current = item;
}
}