From 036a9545a7058da11f6c4a47a8646e93c0b8fb8d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 11 Mar 2021 14:25:25 +0000 Subject: [PATCH] hidden: Do not permute pieces for players with Visible view Signed-off-by: Ian Jackson --- src/hidden.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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) { -- 2.30.2