for (temp.i = player.x; temp.i < (player.x + 3); temp.i++) { for (temp.j = player.y; temp.j < (player.y + 3); temp.j++) { if (temp.i in |this.x - 6, this.x + 6| && temp.j in |this.y - 6, this.y + 6|) { // In Box } } }