From ee47329732be2c4c4f3d00e766f70b428f351a85 Mon Sep 17 00:00:00 2001 From: Sacha Ligthert Date: Fri, 1 Dec 2023 23:07:57 +0100 Subject: [PATCH] Clean up of redundant code. --- render.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/render.go b/render.go index 0344d32..10c5ea0 100644 --- a/render.go +++ b/render.go @@ -5,18 +5,12 @@ import "strconv" // drawBox Draw the outline of the box the snake can move in func (g *Game) drawBox(game *Game) { + // Assuming we will always have this x1 := 0 y1 := 0 x2 := 79 y2 := 23 - if y2 < y1 { - y1, y2 = y2, y1 - } - if x2 < x1 { - x1, x2 = x2, x1 - } - // Fill background for row := y1; row <= y2; row++ { for col := x1; col <= x2; col++ {