static void Main(string[] args) { Gamer gamer = new Gamer() { GamerName = "Aslıhan", GamerBirthDate = "27.07.2001", GamerTC = "11111111111" }; GamerManager gamerManager = new GamerManager(); EDevletInfo eDevletInfo = new EDevletInfo() { TC = "11111111111" }; if (eDevletInfo.TC == gamer.GamerTC) { gamerManager.Add(gamer); } else { Console.WriteLine("kullanıcı bulunamadı"); } //gamerManager.Add(gamer); gamerManager.Update(gamer); gamerManager.Delete(gamer); Campaign campaign = new Campaign() { Id = 1, CampaignName = "Yeni Yıl İndirimi" }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign); campaignManager.Update(campaign); campaignManager.Delete(campaign); SaleManager saleManager = new SaleManager(); saleManager.Selling(gamer); saleManager.CampaignSelling(campaign, gamer); Console.ReadKey(); }
static void Main(string[] args) { IPlayer player1 = new Player() { Id = 1, Name = "Dilara", LastName = "Yavuz", BirthDate = "13/12/2000", games = { }, UserName = "******", Password = "******" }; IPlayer player2 = new Player() { Id = 2, Name = "Mert", LastName = "Taş", BirthDate = "06/02/1998", games = { }, UserName = "******", Password = "******" }; IGame game1 = new Game() { Id = 1, Name = "Valorant" }; IGame game2 = new Game() { Id = 2, Name = "Rocker League" }; IPlayerManager playerManager = new PlayerManager(); IGameManager gameManager = new GameManager(); ICampaignManager campaignManager = new CampaignManager(); Console.WriteLine("MENU"); Console.WriteLine("1-Kayit ol."); Console.WriteLine("2-Kayit duzenle."); Console.WriteLine("3-Kayit sil."); Console.WriteLine("4-Oyun ekle."); Console.WriteLine("5-Oyun guncelle."); Console.WriteLine("6-Oyunc sil."); Console.WriteLine("4-Kampanya ekle."); Console.WriteLine("5-Kampanya guncelle."); Console.WriteLine("6-Kampanya sil."); Console.WriteLine("7-Oyun satin al."); int islem = Convert.ToInt32(Console.ReadLine()); switch (islem) { case 1: Console.WriteLine("========== OYUNCU KAYIT ISLEMI=========="); playerManager.Add(player1); playerManager.Add(player2); break; case 2: Console.WriteLine("========== OYUNCU KAYIT DUZENLEME ============"); playerManager.Update(player1); break; case 3: Console.WriteLine("========== OYUNCU SILME ISLEMI=========="); playerManager.Delete(player2); break; case 4: Console.WriteLine("========== OYUN EKLEME ISLEMI=========="); gameManager.Add(game1); gameManager.Add(game2); break; case 5: Console.WriteLine("========== OYUN GUNCELLEME ISLEMI=========="); gameManager.Update(game1); break; case 6: Console.WriteLine("========== OYUN SILME ISLEMI=========="); gameManager.Delete(game2); break; case 7: Console.WriteLine("========== KAMPANYA EKLEME ISLEMI=========="); campaignManager.Add(game1); gameManager.Add(game2); break; case 8: Console.WriteLine("========== KAMPANYA GUNCELLEME ISLEMI=========="); campaignManager.Update(game1); break; case 9: Console.WriteLine("========== KAMPANYA SILME ISLEMI=========="); campaignManager.Delete(game2); break; case 10: Console.WriteLine("========== OYUN SATIN ALMA ISLEMI=========="); gameManager.GetGame(player1, game2); break; } }
static void Main(string[] args) { GamerManager gamerManager = new GamerManager(); CampaignManager campaignManager = new CampaignManager(); GamerVerificationManager gamerVerificationManager = new GamerVerificationManager(); Gamer gamer1 = new Gamer(); gamer1.Id = 1; gamer1.Name = "Fatih"; gamer1.Surname = "Kırık"; gamer1.TcNo = "12345678910"; gamer1.DateOfBirth = "30/07/2000"; Gamer gamer2 = new Gamer(); gamer2.Id = 1; gamer2.Name = "Mehmet"; gamer2.Surname = "Yılmaz"; gamer2.TcNo = "94973675710"; gamer2.DateOfBirth = "10/08/1995"; Gamer eStateGamer = new Gamer(); eStateGamer.Id = 1; eStateGamer.Name = "Fatih"; eStateGamer.Surname = "Kırık"; eStateGamer.TcNo = "12345678910"; eStateGamer.DateOfBirth = "30/07/2000"; Game game1 = new Game(); game1.Id = 1; game1.Name = "CyberPunk 2077"; game1.Point = 8; game1.Price = 300; game1.ReleaseDate = "10 Aralık 2020"; Campaign campaign1 = new Campaign(); campaign1.Id = 1; campaign1.Name = "Yeni yıl kampanyası"; campaign1.RateOfCampaign = 20; Campaign campaign2 = new Campaign(); campaign2.Id = 1; campaign2.Name = "Cadılar bayramı kampanyası"; campaign2.RateOfCampaign = 20; //KAYIT VE DOĞRULAMA İŞLEMİ gamerManager.Register(gamer1, eStateGamer, gamerVerificationManager); Console.WriteLine(); //GİRİŞ İŞLEMİ gamerManager.Login(gamer1); Console.WriteLine(); //KULLANICI BİLGİSİ GÜNCELLEME İŞLEMİ gamerManager.Update(gamer2,gamer1); Console.WriteLine(); //ÇIKIŞ İŞLEMİ gamerManager.LogOut(gamer1); Console.WriteLine(); //KULLANICI SİLME gamerManager.Delete(gamer1); Console.WriteLine(); //KAMPANYA EKLEME İŞLEMİ campaignManager.Add(campaign1); Console.WriteLine(); //KAMPANYA GÜNCELLEME İŞLEMİ campaignManager.Update(campaign2, campaign1); Console.WriteLine(); //KAMPANYA SİLME İŞLEMİ campaignManager.Delete(campaign1); Console.WriteLine(); //KAMPANYALI OYUN SATIŞ İŞLEMİ gamerManager.SellGameCampaign(gamer1, game1, campaign1); Console.WriteLine(); //KAMPANYASIZ OYUN SATIŞ IŞLEMİ gamerManager.SellGame(gamer1, game1); Console.WriteLine(); }