console.log(this.tiles.find(this.findStart))
returns expected results using this code:
findStart: function (value) {
var x = 5, y = 10;
return value.x === x && value.y === y
},
but not this code:
findStart: function (value) {
var x = this.room.startX, y = this.room.startY;
return value.x === x && value.y === y
},
How do I pass the correct “this” value to the second set of code?