public bool containsSpecificInfectionCard(City c) { foreach (PlayerCard card in handCard) { if (card.getType() == CardType.InfectionCard) { InfectionCard aCityCard = (InfectionCard)card; if (aCityCard.getCity() == c) { return(true); } } } return(false); }
public void bioDirectFlightButtonClicked() { bioDriveButton.GetComponent <Button>().interactable = false; bioDirectFlightButton.GetComponent <Button>().interactable = false; bioCharterFlightButton.GetComponent <Button>().interactable = false; currentPlayer = game.getCurrentPlayer(); City currentCity = currentPlayer.getPlayerPawn().getCity(); foreach (PlayerCard card in currentPlayer.getHand()) { if (card.getType() == CardType.InfectionCard) { InfectionCard infectionCard = (InfectionCard)card; City infectionCity = infectionCard.getCity(); if (infectionCity != currentCity) { infectionCity.displayButton(); } } } moveStatus = Status.BIODIRECTFLIGHT; }