From: Ian Jackson Date: Tue, 2 Mar 2021 23:14:53 +0000 (+0000) Subject: hidden permute: move to vpid X-Git-Tag: otter-0.4.0~249 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e39c30146424eb29550c998db08f6815222cef6d;p=otter.git hidden permute: move to vpid It's going to need to guddle Signed-off-by: Ian Jackson --- diff --git a/src/hidden.rs b/src/hidden.rs index 55ca8fd6..38a45c23 100644 --- a/src/hidden.rs +++ b/src/hidden.rs @@ -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]