Piotr Czajkowski 1 年之前
父节点
当前提交
352df9f393
共有 1 个文件被更改,包括 0 次插入16 次删除
  1. 0 16
      17/code.go

+ 0 - 16
17/code.go

@@ -58,10 +58,6 @@ func getNorth(board [][]int, height int, width int, lava Destination) []Destinat
 		moves = lava.moves
 	}
 
-	if moves > MaxMoves {
-		return destinations
-	}
-
 	end := lava.pos.y - MaxMoves
 	if end < 0 {
 		end = 0
@@ -88,10 +84,6 @@ func getEast(board [][]int, height int, width int, lava Destination) []Destinati
 		moves = lava.moves
 	}
 
-	if moves > MaxMoves {
-		return destinations
-	}
-
 	end := lava.pos.x + MaxMoves
 	if end >= width {
 		end = width - 1
@@ -121,10 +113,6 @@ func getSouth(board [][]int, height int, width int, lava Destination) []Destinat
 		moves = lava.moves
 	}
 
-	if moves > MaxMoves {
-		return destinations
-	}
-
 	end := lava.pos.y + MaxMoves
 	if end >= height {
 		end = height - 1
@@ -151,10 +139,6 @@ func getWest(board [][]int, height int, width int, lava Destination) []Destinati
 		moves = lava.moves
 	}
 
-	if moves > MaxMoves {
-		return destinations
-	}
-
 	end := lava.pos.x - MaxMoves
 	if end < 0 {
 		end = 0