Browse Source

Cosmetics

Piotr Czajkowski 1 năm trước cách đây
mục cha
commit
c75cc51f84
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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