Because you're using the revealing pattern to set your prototype, all instances of Frog (and Pond) are using the same data. For example, if you set the id of frog 1 to 5, frog 2's id will also be 5. Here's a simplified example of what you have:
function foo () {}
foo.prototype = function () {
var _id = 5;
return {
getId: function() {
return _id;
},
setId: function(id) {
_id = id
}
}
}();
var foo1 = new foo();
var foo2 = new foo();
foo1.setId(1);
console.log(foo2.getId()); //1
foo2.setId(8);
console.log(foo1.getId()); //8
To solve this, don't use the revealing pattern to define the prototype. There are several ways, what i've shown below is just one of them.
function foo () {
var _id = 0;
this.getId = function() {
return _id;
};
this.setId = function(id) {
_id = id
};
}
var foo1 = new foo();
var foo2 = new foo();
foo1.setId(1);
console.log(foo2.getId()); //0
foo2.setId(8);
console.log(foo1.getId()); //1