mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-06-07 20:53:30 +02:00
updated util packages
This commit is contained in:
@@ -9,12 +9,15 @@ Robot struct houses an Intcode computer and its RecursiveMove method populates a
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/alexchao26/advent-of-code-go/util"
|
||||
"fmt"
|
||||
"log"
|
||||
"math"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/alexchao26/advent-of-code-go/algos"
|
||||
"github.com/alexchao26/advent-of-code-go/mathutil"
|
||||
"github.com/alexchao26/advent-of-code-go/util"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -333,7 +336,7 @@ func Draw(mapCoordsToType map[string]int) [][]int {
|
||||
}
|
||||
|
||||
// Determine the bounds of the grid
|
||||
edgeLength := 2 * util.MaxInts(-lowY, -lowX, highY, highX)
|
||||
edgeLength := 2 * mathutil.MaxInt(-lowY, -lowX, highY, highX)
|
||||
|
||||
grid := make([][]int, edgeLength)
|
||||
for i := 0; i < edgeLength; i++ {
|
||||
@@ -359,7 +362,7 @@ func Draw(mapCoordsToType map[string]int) [][]int {
|
||||
// trim off due to making the initial grid too large
|
||||
grid = trim(grid)
|
||||
// rotate it because of how I coded up the robot's coordinates :/
|
||||
grid = util.RotateGridInts(grid)
|
||||
grid = algos.RotateIntGrid(grid)
|
||||
// retrim
|
||||
grid = trim(grid)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user