public Player(Side side) { this.deck = deck; }
/*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(); * } * } * } * }*/ }