예제 #1
0
 private bool containsReveal(HorizontalContainer container)
 {
     foreach (Card card in container.cardsInContainer)
     {
         if (card.containsReveal())
         {
             return(true);
         }
     }
     return(false);
 }
예제 #2
0
 public virtual void resetIfNoSelection(MouseState mouseState, HorizontalContainer container, Card card, BoardFunctionality boardFunc)
 {
     if (!boardFunc.boardActions.isActive() && mouseState.LeftButton == ButtonState.Released && clickedInCardBox && !container.isWithinModifiedPosition(mouseState, card))
     {
         clickedInCardBox = false;
         card.setRegular();
         card.resetCardSelector();
         boardFunc.SELECTEDCARD      = null;
         boardFunc.ENEMYSELECTEDCARD = null;
         boardFunc.boardPosLogic.updateBoard(boardFunc);
         MouseTransformer.Set(MouseTransformer.State.Reg);
     }
 }
예제 #3
0
 public virtual void resetIfNoSelection(MouseState mouseState, HorizontalContainer container, Card card, BoardFunctionality boardFunc)
 {
     if (card.cardProps.type != CardType.Manuever)
     {
         if (!boardFunc.boardActions.isActive() && mouseState.LeftButton == ButtonState.Released && !container.isWithinModifiedPosition(mouseState, card))
         {
             card.setRegular();
             card.resetCardSelector();
             boardFunc.SELECTEDCARD = null;
             boardFunc.boardPosLogic.updateBoard(boardFunc);
         }
     }
 }
예제 #4
0
        /*private Card targetedCard = null;
         * public Card targetCard()
         * {
         *  return targetedCard;
         * }*/

        //needs testing, may break if selecting a friendly source
        public void SetTargetCard(MouseState mouseState, HorizontalContainer container, Card card, Side side)
        {
            if (mouseState.LeftButton == ButtonState.Pressed && !container.isWithinModifiedPosition(mouseState, card))
            {
                foreach (FunctionalRow row in side.Rows)
                {
                    if (row.revealed)
                    {
                        foreach (Card newCard in row.cardsInContainer)
                        {
                            if (row.isWithinModifiedPosition(mouseState, newCard))
                            {
                                newCard.setSelected();
                            }
                            else
                            {
                                newCard.setRegular();
                            }
                        }
                    }
                }
            }

            /*if(mouseState.LeftButton == ButtonState.Released)
             * {
             *  foreach(FunctionalRow row in side.Rows)
             *  {
             *      if (row.playState == Card.PlayState.Revealed)
             *      {
             *          foreach (Card newCard in row.cardsInContainer)
             *          {
             *                  newCard.setRegular();
             *          }
             *      }
             *  }
             * }*/
        }