public void directFlightButtonClicked() { driveButton.GetComponent <Button>().interactable = false; directFlightButton.GetComponent <Button>().interactable = false; charterFlightButton.GetComponent <Button>().interactable = false; shuttleFlightButton.GetComponent <Button>().interactable = false; currentPlayer = game.getCurrentPlayer(); City currentCity = playerToMove.getPlayerPawn().getCity(); List <PlayerCard> cards = currentPlayer.getHand(); foreach (PlayerCard card in cards) { if (card.getType() == CardType.CityCard) { CityCard aCard = (CityCard)card; City city = aCard.getCity(); if (city != currentCity) { city.displayButton(); } } } moveStatus = Status.DIRECTFLIGHT; }
public CityCard getCard(City c) { foreach (PlayerCard card in handCard) { if (card.getType() == CardType.CityCard) { CityCard aCard = (CityCard)card; if (aCard.getCity() == c) { return(aCard); } } } return(null); }
public bool containsSpecificCityCard(City c) { foreach (PlayerCard card in handCard) { if (card.getType() == CardType.CityCard) { CityCard aCityCard = (CityCard)card; if (aCityCard.getCity() == c) { return(true); } } } return(false); }
public void giveCard(Player p1, Player p2, CityCard card) { displayRecord(p1.getRoleKind().ToString() + " gave the City Card: " + card.getCity().getCityName().ToString() + " to " + p2.getRoleKind().ToString()); }
public void takeCard(Player p1, Player p2, CityCard card) { displayRecord(p1.getRoleKind().ToString() + " took the City Card: " + card.getCity().getCityName().ToString() + " from " + p2.getRoleKind().ToString()); }