Browse Source

Solved part1

Piotr Czajkowski 1 week ago
parent
commit
ef4a2aced0
2 changed files with 90 additions and 5 deletions
  1. 19 5
      15/code.go
  2. 71 0
      15/input

+ 19 - 5
15/code.go

@@ -96,20 +96,34 @@ func processMoves(robot *Point, matrix [][]byte, moves []byte) {
 		switch move {
 		case '^':
 			moveRobot(robot, matrix, 0, -1)
-			fmt.Println(robot, matrix)
 		case 'v':
 			moveRobot(robot, matrix, 0, 1)
-			fmt.Println(robot, matrix)
 		case '<':
 			moveRobot(robot, matrix, -1, 0)
-			fmt.Println(robot, matrix)
 		case '>':
 			moveRobot(robot, matrix, 1, 0)
-			fmt.Println(robot, matrix)
 		}
 	}
 }
 
+func calculateBoxes(matrix [][]byte) int {
+	var result int
+	for y := range matrix {
+		for x := range matrix[y] {
+			if matrix[y][x] == 'O' {
+				result += 100*y + x
+			}
+		}
+	}
+
+	return result
+}
+
+func part1(robot *Point, matrix [][]byte, moves []byte) int {
+	processMoves(robot, matrix, moves)
+	return calculateBoxes(matrix)
+}
+
 func main() {
 	if len(os.Args) < 2 {
 		log.Fatal("You need to specify a file!")
@@ -122,5 +136,5 @@ func main() {
 	}
 
 	robot, matrix, moves := readInput(file)
-	processMoves(robot, matrix, moves)
+	fmt.Println("Part1:", part1(robot, matrix, moves))
 }

+ 71 - 0
15/input

@@ -0,0 +1,71 @@
+##################################################
+#..........O...#.OO..#.OO.O...#O..#O......O..O...#
+##O..OO.OOOOO....#.#.#O...#..O....#....O.OOO.....#
+#.O...O.O#..O..OO......O..OO..#O......O.#....O...#
+#..O.O.OO..O..OO#O.O#O............O.O.#O.........#
+#....O..O..O..OO.OO.O.O....O.O.O....O.....O......#
+#.O#.O.OOO..O...O...OO....OO....#...#OO..O..O.#..#
+#..O.O.#..........O..O.O...OO....O...OO#...O.....#
+#O..#...OOO....#....#....##.........O...O........#
+#.#.OO#O..#.O......O.#....O.O.........O#....##O..#
+#.OO.#........OO.O....O........##O......O.....OOO#
+#....O..OO.##................OO...O..O..O.O.O.OOO#
+##...O.......O......OO.O#.....O.O........O....OO.#
+#.#.O.....O..#.O.....O###...O..O.O#..OO.#..O#O#OO#
+#.....O..........O...O.#O.......#...O..O....O....#
+#..#O.#O....#...#.O..#.#O.......O....OO.O..##..O.#
+##..O.O....#.O..#.O..#...O.....##.OO........O....#
+#O.#..#OO.O......O#...O#....#.O.#.O.O....O....O#O#
+#...O..O.O...#.OO................OO......OO.O.OO##
+##O.....OO..O..O.O...........O.......OOOO....O#..#
+#O...#....#OOO....O...O...O....#.OOO..OO....#.OOO#
+#.OO..O.O#OOO.O...OO....O..O.O#O....O#..........O#
+#O..O........OOO.....O.O.......O.OO#.....#O....O.#
+#.#..O.O.O#...O.....#...O......O.O.....#....O.#..#
+#O..OO..O......O.O..O...@O.O...OO...O#..O.O..O..O#
+#.O...O.......#.O...O..O......#O..#.#.......O..O.#
+#.....#O..#.....O..OO#O.......O.O..OO....#.OO....#
+#.OO.OO.#....O...O.#.OO.O..O.O.##.....OOO........#
+#......O...O.O.O.O..........#O....O....OOOO....O.#
+#.OO....OO..O...O...O.O.O.##....OOO...#......O.O.#
+#..OO........O.O..OOO..O..##O......#O.O.O.O.#..OO#
+#..#.#...O#.O#...O#OOO.....O#.....OO...#....OO..##
+#.O..O..O.OO..#O..O..OO.O.O.#.OO......O.#...#..#.#
+#..#.#OO..............O..O......#..O.OO.OO..OO##.#
+#.O.......#..#....OO.#..OOO..O..O..........O.O.O.#
+#.O#....O...#.O.O...O..#..O.O....O#.OO...........#
+#.#..OOO..O.....O....#..O.OOOO....#....#...O..O..#
+#.#..OO.O.O.O....O.........O#.....O.O.O..O....#.O#
+##....O.OO.#.....OO...#..O.O.#.O.OO.......O.O..OO#
+#O#..O........O....O..#.O#...O.#...OOOO#.......O.#
+#..O..#...#O.......##.O..O.O..O.O.O..............#
+#........OO.#.O#.....#..O.O...O#.#....OO#..O.....#
+#...O...O.....#.O.......#..O..O#.#O..O...OOO....##
+#..O.OO....OO.O...O..OO...#.#O...O.......OOO.....#
+#..OO.O.O....#O.O#......O....O#OO.OO......OO...O.#
+##.....#O.OO.#........O.##O.O#..#.........O.....O#
+#O...#OO..##OO...#..........O...O..#.....O....O.O#
+#O#.O.....O..#O....O..O..O.....O#.O........O.O...#
+#.......#.#..O..O.....O......#.O..O#..#....O.....#
+##################################################
+
+<<>>^^>^^><>^vv>>v<^vv^^>>>^<>>v^^<>v^^><>><^v<>v>>v<<<>^v>^^v>><vvv^><<<><<><><<v<<>^>>>vv<<<^>v^<vv>v^^><><vv>^<>^^^^<><^>><^vv<<v<vv<^<^^vvv^^>><v><<>>vv^<v><v^v>><>v<<<vv><^^<^^^<^<<v<>vvv^v>>>vv^<<>>^^<<<^><<<><>>v>^<v^^v<^^^<v>^vv>>><^>^v>^^<v<<^><<<^vv<><^>^>>v^>v^^>><>^^vvv^vv<^v>>><vv>^^><>v>v>vv^v^<v<^v^v<>^^vvv><v^<>^vv><>vv<<<v<vv>vv^<v<vv>>v^^^<>^>^<<<>^v^<<v>>v^>^vv^v<>>^^<<>^<<v>^<>>><<v<^>v<>>v>^^>v<vv<^^>^v<^>>v>v^v>v<vv^<vv^^vv>^^^v^>><^><v^^<<<<v>>vv<>^>v^<<<>>><>^<^><<^<>><v<>vv><<<<<^v^<<<<><<>vv^^>vvvv<^<<v<v^<^>^v<^>^>^>>><^<>v<^v<^^^^<^><^<<<v<<<^<v^^v^>^>>v><<vv^><^v^^^<<^>v^<v<<>vv>^><<^<^<<<^>v^<vvvvv^v>v<^^<><<>^v>^<^><<^v^>^^>v^v^>^<<^<><^v>^^>^^v<^<^<^<^<vvv<>^vv<^^<^^<>v><<vv><^^^^^><><>^<>>>^><vvvv>vv^>^vv^v<v<>vvv<^<<><>^^>><v<<vv^v><^>vv<<v>>v^v><^vv>>v^><<>^^<v<><v^vv<^v^^<<vvv<<>^vv^^^>>v<>^^>v^v<<>v><<<^>^<>^v^><^><<^><<<<<^vv<v<v>^vv^^^><v<v^<v<^><<<v^v^^^v>>>v^<^v<v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