chiark / gitweb /
hidden: permute: Update passive notch too
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 13 Mar 2021 19:40:58 +0000 (19:40 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 13 Mar 2021 19:52:08 +0000 (19:52 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/hidden.rs

index 579984afd70376fef9b16d9104129f03722755cd..9e2601e9b1e8a27d957dcf55c5430c88907068a9 100644 (file)
@@ -444,6 +444,10 @@ mod vpid {
 
         for (notch, new_piece) in itertools::zip_eq(notches, permu) {
           new_notches[notch] = NR::Piece(new_piece);
+          gpieces.get_mut(new_piece).unwrap()
+            .occult.passive.as_mut().unwrap()
+            .1
+            = notch;
         }
       }