Beispiel #1
0
        static void Main(string[] args)
        {
            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(new campaign()
            {
                CamGameName = "MTN2", CampaignId = 1, CampaignDiscount = "½20"
            });



            Gamer gamer1 = new Gamer();

            gamer1.Id            = 2;
            gamer1.NationalityId = " 10838990626";
            gamer1.LastName      = "ciritci";
            gamer1.FirstName     = "gizem";
            // gamer1.BirthYear = 1998;


            GamerManager gamerManager = new GamerManager();

            gamerManager.Add(new Gamer {
                BirthYear     = new DateTime(1998, 01, 03),
                FirstName     = "gizem",
                LastName      = "ciritci",
                NationalityId = "10838990626",
                Id            = 2
            });


            Console.WriteLine(gamerManager);

            Game game1 = new Game();

            game1.GameName  = "Grand Theft Auto V";
            game1.GamePrice = 450;

            campaign campaign = new campaign();

            campaign.CamGameName = "black friday";


            GameSellManager gameSellManager = new GameSellManager();

            gameSellManager.Sell(game1, gamer1);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Player player1 = new Player {
                Id            = 1, FirstName = "Mert",
                LastName      = "Akkaya", DateOfBirth = new DateTime(2000, 11, 21),
                NationalityId = "10061591058"
            };
            Game game1 = new Game {
                Id = 1, Name = "The Witcher 3", Cost = "80"
            };
            Campaign campaign1 = new Campaign {
                CampaignId = 1, CampaignDiscountRate = "%70"
            };

            PlayerManager playerManager = new PlayerManager(new MernisPlayerValidateManager());

            playerManager.Register(player1);
            GameSellManager gameSellManager = new GameSellManager();

            gameSellManager.Sell(game1, campaign1, player1);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());
            Gamer        gamer        = new Gamer()
            {
                Id        = 1,
                FirstName = "AHMET",
                LastName  = "ŞENGÜL",
                DogumYılı = 2000,
                TcNo      = "12587456398"
            };

            gamerManager.Add(gamer);

            Campaign campaign = new Campaign()
            {
                Id           = 1,
                CampaignName = "Ağaya Beleş",
                CampaignRate = 0
            };

            Game game = new Game()
            {
                Id       = 1,
                GameName = "Leistok",
                Price    = 50,
            };

            CampaingManager campaignManager = new CampaingManager();

            campaignManager.Add(campaign);

            GameSellManager gameSellManager = new GameSellManager(campaign, game);

            gameSellManager.sell(game, gamer, campaign);



            Console.ReadLine();
        }