diff --git a/common/renderer.go b/common/renderer.go index 89410c4..ad83823 100644 --- a/common/renderer.go +++ b/common/renderer.go @@ -275,17 +275,17 @@ func (r *Renderer) RenderBlock(block *Block, colors *Colors) (err error) { return } -func (a Area) Contains(x, z int16) bool { +func (a Area) contains(x, z int16) bool { return x >= a.X1 && x <= a.X2 && z >= a.Z1 && z <= a.Z2 } -func (a Area) IsHigher() bool { +func (a Area) higher() bool { return a.Z2-a.Z1 > a.X2-a.X1 } func areasContain(areas []Area, x, z int16) bool { for _, r := range areas { - if r.Contains(x, z) { + if r.contains(x, z) { return true } } @@ -317,7 +317,7 @@ func (r *Renderer) UncoveredAreas(newAreas, oldAreas []Area) []Area { var xFirst bool // Try to extend in the direction with most gain // of blocks. - if area.IsHigher() { // Higher means to win more blocks in x direction. + if area.higher() { // Higher means to win more blocks in x direction. xFirst = true } dirs: