From 53922bcd9120a20deb5475b9e1d74cc04364b825 Mon Sep 17 00:00:00 2001 From: "Elijah C. Voigt" Date: Mon, 20 May 2024 21:29:29 -0700 Subject: [PATCH] its a total hack but this is better! --- src/display3d.rs | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/display3d.rs b/src/display3d.rs index ef9130e..2bfc686 100644 --- a/src/display3d.rs +++ b/src/display3d.rs @@ -89,19 +89,14 @@ impl Plugin for Display3dPlugin { .run_if(in_state(ai::PlayState::Human)), vantage_point .run_if(in_state(GameState::Play)) - .run_if( - in_state(PlayState::Human) - .and_then(not(state_changed::)) - ) - // Do not run if it is the opponents turn while playing against AI - .run_if( - in_state(PlayState::AiBogo) - .and_then(not(in_state(TurnState(Side::A))) - ) - ) - .run_if(any_component_added::() - .or_else(any_component_removed::()) - ), + .run_if(in_state(PlayState::AiBogo)) + .run_if(in_state(TurnState(Side::B))) + .run_if(any_component_added::().or_else(any_component_removed::())), + vantage_point + .run_if(in_state(GameState::Play)) + .run_if(in_state(PlayState::Human)) + .run_if(not(state_changed::)) + .run_if(any_component_added::().or_else(any_component_removed::())), update_pieces .run_if(resource_exists::) .run_if(in_state(GameState::Play))