Piotr Czajkowski hai 1 ano
pai
achega
c75cc51f84
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      08/code.go

+ 2 - 1
08/code.go

@@ -83,9 +83,10 @@ func part(network Network, starts []string, goal string) int {
 			break
 		}
 
+		turn := network.moves[index]
 		for i := range starts {
 			d := network.paths[starts[i]]
-			if network.moves[index] == 'L' {
+			if turn == 'L' {
 				starts[i] = d.left
 			} else {
 				starts[i] = d.right