-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
not necessarily a bug but for computation sake this.getMinMaxPlayerCoords should only be called only once instead of 4 times so code at bottom is the simplified version of this
var tempMinX = this.getMinMaxPlayerCoords(player.id).minX; tempMinX -= 1; var tempMaxX = this.getMinMaxPlayerCoords(player.id).maxX; tempMaxX += 1; var tempMinY = this.getMinMaxPlayerCoords(player.id).minY; tempMinY -= 1; var tempMaxY = this.getMinMaxPlayerCoords(player.id).maxY; tempMaxY += 1;
var playerCoords = this.getMinMaxPlayerCoords(player.id); var tempMinX = playerCoords.minX - 1; var tempMaxX = playerCoords.maxX + 1; var tempMinY = playerCoords.minY - 1; var tempMaxY = playerCoords.maxY + 1;
tylerolson
Metadata
Metadata
Assignees
Labels
No labels