private void UpdateCards() { foreach (PlayingCard C in Cards) { C.UnityCard.transform.SetParent(null, false); } for (int i = 0; i < TheCardGameState.Players.Length; i++) { foreach (Entities.Entity E in TheCardGameState.Players[i].mGraveyard.Cards) { UpdateCard(E, null); } foreach (Effects.EffectNode EN in TheCardGameState.SharedEffects.Nodes) { UpdateCard(EN.GetEntity(), SharedEffects.transform); } foreach (Effects.EffectNode EN in TheCardGameState.Players[i].mEffects.Nodes) { UpdateCard(EN.GetEntity(), Effects[i].transform); } foreach (Entities.Entity E in TheCardGameState.Players[i].mHand.Cards) { UpdateCard(E, Hands[i].transform); } for (int k = 0; k < TheCardGameState.Players[i].mBoard.RangeZones.Length; k++) { foreach (Entities.Entity E in TheCardGameState.Players[i].mBoard.RangeZones[k].List.Cards) { UpdateCard(E, BoardAreas[i][k].transform); } } } }
private List <Actions.ActionOrder> GetAvailableActions(TurnInfo turnInfo, CardGameState gameState) { List <Actions.ActionOrder> availableActions = new List <Actions.ActionOrder>(); foreach (Entity E in mHand.Cards) { availableActions.AddRange(E.GetAIActions(gameState, turnInfo)); } foreach (Effects.EffectNode EN in mEffects.Nodes) { availableActions.AddRange(EN.GetEntity().GetAIActions(gameState, turnInfo)); } foreach (Effects.EffectNode EN in gameState.SharedEffects.Nodes) { availableActions.AddRange(EN.GetEntity().GetAIActions(gameState, turnInfo)); } foreach (CardZone CZ in mBoard.RangeZones) { foreach (Entity E in CZ.List.Cards) { availableActions.AddRange(E.GetAIActions(gameState, turnInfo)); } } return(availableActions); }