Piotr Czajkowski 1 gadu atpakaļ
vecāks
revīzija
352df9f393
1 mainītis faili ar 0 papildinājumiem un 16 dzēšanām
  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