/// <summary> /// Game play and payment processing /// </summary> /// <param name="version"></param> public void GamePlay(string version) { ICustomer customer = new Customer(); CardGames cardGames = new CardGames(); CasinoCards casinoCards = new CasinoCards(); IPaymentProcessing paymentProcessing = new Payments(); var checkIfPaid = paymentProcessing.CheckIfPaid(customer, cardGames, casinoCards); if (!checkIfPaid) { // process payment before playing var processPayment = paymentProcessing.ProcessPayment(customer, cardGames, casinoCards); if (processPayment) { Console.WriteLine($"Currently playing {GameName} version {version}. Paid version: {processPayment}"); } } }
public bool CheckIfPaid(ICustomer customer, CardGames cardGames, CasinoCards casinoCards) { return(false); }
public bool ProcessPayment(ICustomer customer, CardGames cardGames, CasinoCards casinoCards) { return(true); }