this.checkPoint = function(j,i,mas) { return(i<0 || j< 0 || i>=mas.length ||j>=mas[0].length) ? false : true; }