static void Main(string[] args) { Reactions react = new Reactions(); Tourniquet tour = new Tourniquet(react.ReactOnGoodCard, react.ReactOnBadCard); Building TheSecondBuilding = new Building("35 Kremlevskaya st.", tour); Console.ForegroundColor = ConsoleColor.Red; Card card1 = new Card(3); Student VanyaErohin = new Student("Ваня Ерохин", card1); Console.Write(VanyaErohin.GetName + ", "); tour.VerifyCard(card1); Console.ForegroundColor = ConsoleColor.Green; Card card2 = new Card(4); Student SlavaSichev = new Student("\nСлава Сычёв", card2); Console.Write(SlavaSichev.GetName + ", "); tour.VerifyCard(card2); Console.ReadLine(); }
public void HoldCard(Card card, Tourniquet tourniquet) { tourniquet.VerifyCard(card); }
public void VerifyCard(Card card) { if (DataBase.Check(card.ID)) { reactOnGood(); } else { reactOnBad(); } }
public Student(string name, Card card) { this._name = name; card = new Card(card.ID); }