From: Ian Jackson Date: Thu, 11 Mar 2021 14:25:25 +0000 (+0000) Subject: hidden: Do not permute pieces for players with Visible view X-Git-Tag: otter-0.4.0~182 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=036a9545a7058da11f6c4a47a8646e93c0b8fb8d;p=otter.git hidden: Do not permute pieces for players with Visible view Signed-off-by: Ian Jackson --- diff --git a/src/hidden.rs b/src/hidden.rs index 1d2a90c9..03b4ff8f 100644 --- a/src/hidden.rs +++ b/src/hidden.rs @@ -441,8 +441,13 @@ mod vpid { new_notches }; - for gpl in gplayers.values_mut() { - // xxx don't do this for Visible, check occk + for (player, gpl) in gplayers.iter_mut() { + match occ.views.get_kind(player) { + OccK::Visible => continue, + OccK::Scrambled | + OccK::Displaced{..} | + OccK::Invisible => (), + }; let mut fwd_updates = vec![]; for (old, new) in izip!(&occ.notches.table, &new_notches) {