static void Main(string[] args) { GamerManager gamerManager = new GamerManager(new GamerCheckManager()); Gamer gamer1 = new Gamer { GamerID = 1, BirthYear = 2000, GamerFirstName = "SENEM", GamerLastName = "SERBEST", NationalIdentity = 1234567890, GamerUserName = "******" }; gamerManager.Add(gamer1); Game game1 = new Game { GameId = 3, GameName = " Disco Elysium ", GamePrice = 33.55 }; Game game2 = new Game { GameId = 4, GameName = " Portal ", GamePrice = 18.50 }; Campaign campaign1 = new Campaign { CampaignName = "New Year Campaign", DiscountRate = 80 }; Campaign campaign2 = new Campaign { CampaignName = "Gaming Festival Campaign", DiscountRate = 50 }; DiscountManager discountManager = new DiscountManager(); discountManager.Discount(game1, gamer1, campaign2); CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign2); campaignManager.Delete(campaign1); }
static void Main(string[] args) { IPlayerService playerManager = new PlayerManager(new PlayerValidationManager()); Player player = new Player { PlayerID = 1, Name = "Berk", Surname = "Şenel", Nickname = "DeuxBach", DateOfBirth = "09.10.1998", CitizenshipNumber = "123456789" }; playerManager.Add(player); Console.WriteLine("******"); IGameService gameManager = new GameManager(); Game game = new Game(); game.GameID = 1; game.Title = "Arma 3"; game.Price = 100; Game game1 = new Game(); game1.GameID = 2; game1.Title = "XCOM 2"; game1.Price = 120; gameManager.Add(game); gameManager.Add(game1); Console.WriteLine("******"); gameManager.Sell(game, player); Console.WriteLine("******"); Game[] games = new Game[] { game, game1 }; IDiscountService discountManager = new DiscountManager(); Discount discount = new Discount(); discount.ID = 1; discount.Percentage = 20; discount.Name = "Winter Sale"; discountManager.Add(discount); Console.WriteLine("******"); discountManager.Discount(games, discount); }