Skip to content

Noticed this in gamemap.js in the floodFill function #3

@F0x1

Description

@F0x1

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions