chiark / gitweb /
hidden permute: move to vpid
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 2 Mar 2021 23:14:53 +0000 (23:14 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 2 Mar 2021 23:14:53 +0000 (23:14 +0000)
It's going to need to guddle

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/hidden.rs

index 55ca8fd6d34266f78da1e5413658e7596d82ac58..38a45c235cea24cb9425cf41bd1d1081453f3dbf 100644 (file)
@@ -369,9 +369,26 @@ mod vpid {
 
     st.recurse();
   }                                        
+
+  #[allow(unused_variables)]
+  pub fn permute(occid: OccId,
+                 occ: &mut Occultation,
+                 gplayers: &GPlayers,
+                 gpieces: &mut GPieces,
+                 ipieces: &IPieces) {
+    // We must permute for if we have any views that are scrambled
+    // or displaced obviously.  For invisible too, so that when they
+    // reappear the ids have been permuted.  And that's all the
+    // non-Visible views which an occultation ought to have at least
+    // one of...
+    //
+    // We choose a single permutation of the pieces in the
+    // Occultation::notches.
+
+  }
 }
 
-pub use vpid::*;
+pub use vpid::{PerPlayerIdMap, NotchNumber, Notch, Notches};
 
 // ========== public entrypoints ==========
 
@@ -721,33 +738,15 @@ mod recompute {
                      ipieces: &IPieces) -> Implemented {
       for occid in self.outdated.drain() {
         if let Some(occ) = goccults.occults.get_mut(occid) {
-          permute(occid, occ, gplayers, gpieces, ipieces);
+          vpid::permute(occid, occ, gplayers, gpieces, ipieces);
         }
       }
 
       Implemented { }
     }
   }
-
-  #[allow(unused_variables)]
-  fn permute(occid: OccId,
-             occ: &mut Occultation,
-             gplayers: &GPlayers,
-             gpieces: &mut GPieces,
-             ipieces: &IPieces) {
-    // We must permute for if we have any views that are scrambled
-    // or displaced obviously.  For invisible too, so that when they
-    // reappear the ids have been permuted.  And that's all the
-    // non-Visible views which an occultation ought to have at least
-    // one of...
-    //
-    // We choose a single permutation of the pieces in the
-    // Occultation::notches.
-
-      
-
-  }
 }
+
 use recompute::*;
 
 #[must_use]