static void Main(string[] args) { Gamer gamer = new Gamer { IdentityNumber = 123456; FirstName = "Doğukan"; LastName = "Orhan"; BirthYear = 1996; }; Game game = new Game { GameName = "Snake"; GamePrice = 10; }; Campaign campaign = new Campaign { CampaignName = "Sales Discount"; CampaignDiscount = 0.50; }; GamerManager gamerManager = new GamerManager(); gamerManager.Add(gamer); SalesManager salesManager = new SalesManager(); salesManager.Add(gamer, game, campaign); }
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) { Game game1 = new Game(); game1.Id = 1; game1.Name = "World Of Warcraft: Shadowlands"; game1.Price = 475; Game game2 = new Game(); game2.Id = 2; game2.Name = "Ori and the Blind Forest"; game2.Price = 31.25; Gamer gamer1 = new Gamer(); gamer1.Id = 1; gamer1.NationalityId = "12345678901"; gamer1.FirstName = "Henry"; gamer1.LastName = "Cavill"; gamer1.DateOfBirth = new DateTime(1983, 5, 5); IGamerService gamerManager1 = new GamerManager(new GamerCheckManager()); gamerManager1.Add(gamer1); Campaign winterSale = new Campaign(); winterSale.Id = 2; winterSale.Name = "Kış indirimi"; winterSale.Discount = 50; ISalesService salesManager = new SalesManager(); salesManager.SalesDiscount(gamer1, game1, winterSale); salesManager.Sales(gamer1, game2); }
static void Main(string[] args) { Gamer gamer1 = new Gamer() { FirstName = "Aysu", LastName = "Gökcen", UserName = "******", IdentityNumber = "53687496148", YearOfBirth = 1999, Password = "******" }; Gamer gamer2 = new Gamer() { FirstName = "Engin", LastName = "DEMİROĞ", UserName = "******", IdentityNumber = "53650145678", YearOfBirth = 1991, Password = "******", Balance = 70 }; Console.WriteLine("----GAME STORE----"); Game game1 = new Game() { GameName = "Counter Strike", GamePrice = 30, Limit = 1996 }; Game game2 = new Game() { GameName = "Call of Duty", GamePrice = 40, Limit = 1996 }; Game game3 = new Game() { GameName = "BattleField", GamePrice = 35, Limit = 1996 }; Game game4 = new Game() { GameName = "Deceit /SELECTED GAME", GamePrice = 20, Limit = 1998 }; Game game5 = new Game() { GameName = "Football Manager /SELECTED GAME", GamePrice = 25, Limit = 2010 }; Game[] games = { game1, game2, game3, game4, game5 }; foreach (Game game in games) { Console.WriteLine(game.GameName + ": $" + game.GamePrice); } Console.WriteLine("\n----SIGN UP / SIGN IN----"); GamerManager gamerManager = new GamerManager(new ConfirmGamerManager()); gamerManager.SignUp(gamer1); gamerManager.SignIn(gamer2); Console.WriteLine("\n ----CAMPAIGN----"); Campaign campaign1 = new Campaign() { CampaignName = "Four-day new member bonus", CampaignPrice = 20 }; Campaign campaign2 = new Campaign() { CampaignName = "Buy one for free in selected games", CampaignPrice = 0 }; Campaign[] campaigns = { campaign1, campaign2 }; foreach (var campaign in campaigns) { Console.WriteLine(campaign.CampaignName + ": $" + campaign.CampaignPrice); } Console.WriteLine("\n----PURCHASE----"); CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1, gamer2, game2); //campaignManager.Delete(campaign1, gamer2, game2); OrderManager orderManager = new OrderManager(); orderManager.AddToBasket(game2, gamer2); //orderManager.TakeOutOfBasket(gamer2, game5); }
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(); }