瀏覽代碼

Cosmetics

Piotr Czajkowski 1 年之前
父節點
當前提交
ca24f46f0e
共有 1 個文件被更改,包括 1 次插入8 次删除
  1. 1 8
      14/code.go

+ 1 - 8
14/code.go

@@ -91,8 +91,7 @@ func tiltPlatform(platform [][]byte, direction func([][]byte, int, int, int, int
 }
 
 func tiltPlatformFromBottom(platform [][]byte, direction func([][]byte, int, int, int, int), height int, width int) {
-	y := height - 1
-	for ; y >= 0; y-- {
+	for y := height - 1; y >= 0; y-- {
 		for x := range platform[y] {
 			if platform[y][x] == 'O' {
 				direction(platform, y, x, height, width)
@@ -141,12 +140,6 @@ func copyPlatform(platform [][]byte) [][]byte {
 	return newPlatform
 }
 
-func printPlatform(platform [][]byte) {
-	for y := range platform {
-		fmt.Println(string(platform[y]))
-	}
-}
-
 func part2(platform [][]byte, cycles int) int {
 	height := len(platform)
 	width := len(platform[0])