예제 #1
0
 /// <summary>
 /// Instances needed classes and passes a reference to each of the instances for persistance.
 /// </summary>
 private void InitializeReferences()
 {
     ManagingPlayer = new ManagingPlayer();
     ManagingPlayer.InitializeCollections();
     ButtonBindings = ButtonBindings.Instance;
     CommunityChest = new CommunityChest();
 }
 public CommunityChestTests()
 {
     contentTest       = WindowContent.GetWindowContent();
     communityChestRef = WindowContent.GetWindowContent().CommunityChest;
     testPlayer        = new PlayerViewModel(new PlayerModel()
     {
         CurrentPosition = 0, AmountHotels = 0, AmountHouses = 0, FirstThrow = 0, PlayerCash = 2000, PlayerID = 0, PlayerName = "Test", PrisonRoll = 7
     });
     WindowContent.GetWindowContent().ManagingPlayer.AddPlayer(testPlayer);
     WindowContent.GetWindowContent().ManagingPlayer.SetAllPlayerCollection();
 }
 public void Setup()
 {
     _communityChest = new CommunityChest();
     _player         = new TestPlayer(0);
     _boardCursor    = new BoardCursor(
         new Board(),
         new PlayerCursor(
             new List <Player>
     {
         _player
     },
             new Dice()));
 }
        /// <summary>
        /// Ход игрока
        /// </summary>
        /// <param name="user"></param>
        public void NewMove(User user)
        {
            int[] dices;

            int prisonCounter = 0;

            //Для дублей
            do
            {
                if (user.IsInPrison)
                {
                    if (user.IdleCount == 0 || user.JailReleasePermisson)
                    {
                        JailRelease?.Invoke(user);
                        if (user.JailReleasePermisson)
                        {
                            Console.WriteLine("Вы воспользовались освобождением из тюрьмы");
                            user.JailReleasePermisson = false;
                            return;
                        }
                        else
                        {
                            Console.WriteLine("Вы особождены по истечению срока");
                        }
                        user.IsInPrison = false;

                        return;
                    }
                    if (BuybackFromPrison?.Invoke(user) == true)
                    {
                        if (user.Money < 50)
                        {
                            NoEnoughMoney?.Invoke(user);
                            Console.WriteLine("Нет денег");
                            return;
                        }
                        else
                        {
                            Console.WriteLine("Вы освобождены");
                        }
                        user.Money     -= 50;
                        user.IdleCount  = 0;
                        user.IsInPrison = false;
                        JailRelease?.Invoke(user);
                        return;
                    }
                    else
                    {
                        if (user.IdleCount > 0)
                        {
                            user.IdleCount--;
                        }
                        return;
                    }
                }

                Console.WriteLine($"\n{user.Name} старая позиция {user.Position}");
                Console.WriteLine("{0} бросает кубики", user.Name);
                dices = DiceRoll();
                Console.WriteLine("Первый кубик - {0}, второй - {1}", dices[0], dices[1]);
                int move_count = dices[0] + dices[1];
                Dice?.Invoke(user, dices[0], dices[1]);
                int curr_position;

                user.Position += move_count;
                curr_position  = user.Position;

                if (curr_position > 39)
                {
                    user.Position = curr_position - 39;
                    user.Money   += 200;
                }

                //Зацикливание


                //test
                //user.position = 5;
                //заглушка для полей, которых еще нет
                //if (user.position > 10)
                //{
                //    console.writeline("больше 10");
                //    return;
                //}

                var Cell = Cells.Find(c => c.ID == user.Position);

                Console.WriteLine("Вы находитесь на {0}", Cell.Name);
                CurrentCell?.Invoke(user, Cell);

                Console.WriteLine(Cell.GetType().Name);

                //Клетку тюрьмы
                prisonCounter++;
                if (prisonCounter == 3 || Cell is Prison)
                {
                    if (!user.IsInPrison && !user.JailReleasePermisson)
                    {
                        var prison = Cell as Prison;
                        user.Position   = Cells.Find(c => c.ID == 10).ID;
                        user.IsInPrison = true;
                        user.IdleCount  = 2;
                        SetPrison?.Invoke(user);
                        Console.WriteLine("Вы в тюрьме");
                    }
                    return;
                }

                //Попадание на клетку шанса\общественной казны
                if (Cell is CardPick)
                {
                    var CardPickCard = Cell as CardPick;
                    GetCardPick?.Invoke(user, CardPickCard);
                    int  r;
                    Card chanceCard;
                    switch (CardPickCard.Type)
                    {
                    case Models.Cells.Type.CommunityChest:
                        r          = random.Next(1, CommunityChest.Count);
                        chanceCard = CommunityChest.Find(c => c.Id == r);
                        //if(chanceCard != null)
                        //Console.WriteLine($"{user.Name} попал на клетку общественной казны '{chanceCard.Name}'");
                        break;

                    default:
                        r          = random.Next(1, Chances.Count);
                        chanceCard = Chances.Find(c => c.Id == r);
                        //if (chanceCard != null)
                        //Console.WriteLine($"{user.Name} попал на клетку Шанс'{chanceCard.Name}'");
                        break;
                    }
                    if (chanceCard != null)
                    {
                        Console.WriteLine($"{user.Name} попал на клетку {CardPickCard.Type} '{chanceCard.Name}'");
                    }
                    if (chanceCard is Motion)
                    {
                        var motion = chanceCard as Motion;
                        Console.WriteLine($"{motion.Name}");
                        user.Position = motion.Position;

                        var newPosition = Cells.Find(c => c.ID == user.Position);
                        CurrentCell?.Invoke(user, newPosition);
                        if (Cells.Find(c => c.ID == user.Position) != null)
                        {
                            Console.WriteLine($"{user.Name} перемещается на клетку {newPosition.Name}");
                        }
                        return;
                    }
                    if (chanceCard is Transaction)
                    {
                        var transaction = chanceCard as Transaction;
                        if (transaction != null)
                        {
                            Console.WriteLine($"{transaction.Name}");
                        }
                        int previousAmount = user.Money;
                        Console.WriteLine($"{user.Name} старое количество денег - {previousAmount}");
                        if (user.Money < Math.Abs(transaction.Cost))
                        {
                            NoEnoughMoney?.Invoke(user);
                            RemoveFromGame?.Invoke(user);
                            Console.WriteLine("У вас недостаточно денег!");
                            return;
                        }

                        user.Money += transaction.Cost;
                        Transaction?.Invoke(user, previousAmount, user.Money);
                    }
                    if (chanceCard is PrisonCard)
                    {
                        var prison = Cell as Prison;
                        if (prison != null)
                        {
                            user.Position = Cells.Find(c => c == prison).ID;
                        }
                        user.IsInPrison = true;
                        user.IdleCount  = 2;
                        SetPrison?.Invoke(user);
                        return;
                    }
                    if (chanceCard is JailRelease)
                    {
                        user.JailReleasePermisson = true;
                        Console.WriteLine($"{chanceCard.Name}");
                    }
                    if (chanceCard is MoveCard)
                    {
                        var first_postion = user.Position;
                        var move          = chanceCard as MoveCard;
                        user.Position = first_postion + move.MoveOn;
                        var newPosition = Cells.Find(c => c.ID == user.Position);
                        CurrentCell?.Invoke(user, newPosition);
                        if (Cells.Find(c => c.ID == user.Position) != null)
                        {
                            Console.WriteLine($"{user.Name} перемещается на клетку {newPosition.Name}");
                        }
                        return;
                    }
                }
                //Клетка газопровод
                if (Cell is Utilities)
                {
                    var utility = Cell as Utilities;
                    if (utility.Owner == null)
                    {
                        if (Buy?.Invoke(user) == true)
                        {
                            if (user.Money < utility.Cost)
                            {
                                NoEnoughMoney?.Invoke(user);
                                Console.WriteLine("Нет денег");
                                return;
                            }
                            user.Money   -= utility.Cost;
                            utility.Owner = user;
                        }
                    }
                    else
                    {
                        if (utility.Owner == user)
                        {
                            return;
                        }
                        List <Utilities> utilitiesOfOwner;
                        int cost;
                        utilitiesOfOwner = Cells.Where(a => a is Utilities).Select(a =>
                        {
                            if (a is Utilities)
                            {
                                return(a as Utilities);
                            }
                            return(null as Utilities);
                        }).Where(a => a.Owner == utility.Owner).ToList();

                        switch (utilitiesOfOwner.Count)
                        {
                        case 1:
                            cost = 4 * move_count;
                            break;

                        case 2:
                            cost = 10 * move_count;
                            break;

                        default:
                            return;
                        }
                        if (user.Money < cost)
                        {
                            NoEnoughMoney?.Invoke(user);
                            RemoveFromGame?.Invoke(user);
                            Console.WriteLine("Нет денег");
                            return;
                        }
                        int previousAmount = user.Money;
                        user.Money -= cost;
                        Transaction?.Invoke(user, previousAmount, user.Money);
                        int previousOwnersAmount = utility.Owner.Money;
                        utility.Owner.Money += cost;
                        Transaction?.Invoke(utility.Owner, previousOwnersAmount, utility.Owner.Money);
                    }
                }

                //Клетка налога
                if (Cell is Tax)
                {
                    var Tax = Cell as Tax;
                    if (user.Money < Tax.Amount)
                    {
                        NoEnoughMoney?.Invoke(user);
                        RemoveFromGame?.Invoke(user);
                        Console.WriteLine("У вас недостаточно денег");
                        return;
                    }
                    int previousAmount = user.Money;
                    user.Money -= Tax.Amount;
                    Transaction?.Invoke(user, previousAmount, user.Money);
                }

                //Клетка Railway
                if (Cell is Railway)
                {
                    var RailwayStation = Cell as Railway;
                    if (RailwayStation.Owner == null)
                    {
                        if (Buy?.Invoke(user) == true)
                        {
                            if (user.Money < RailwayStation.Cost)
                            {
                                NoEnoughMoney?.Invoke(user);
                                Console.WriteLine("Нет денег");
                                return;
                            }
                            user.Money          -= RailwayStation.Cost;
                            RailwayStation.Owner = user;
                        }
                    }

                    else
                    {
                        if (RailwayStation.Owner == user)
                        {
                            return;
                        }
                        List <Railway> ownerOfRailways;
                        ownerOfRailways = Cells.Where(a => a is Railway).Select(a =>
                        {
                            if (a is Railway)
                            {
                                return(a as Railway);
                            }
                            return(null as Railway);
                        }).Where(a => a.Owner == RailwayStation.Owner).ToList();
                        int cost;
                        switch (ownerOfRailways.Count)
                        {
                        case 1:
                            cost = 25;
                            break;

                        case 2:
                            cost = 50;
                            break;

                        case 3:
                            cost = 100;
                            break;

                        case 4:
                            cost = 200;
                            break;

                        default:
                            return;
                        }
                        if (user.Money < cost)
                        {
                            NoEnoughMoney?.Invoke(user);
                            RemoveFromGame?.Invoke(user);
                            Console.WriteLine("Вам нехватает денег");
                            return;
                        }
                        int previousUserMoney = user.Money;
                        user.Money -= cost;
                        Transaction?.Invoke(user, previousUserMoney, user.Money);
                        int previousOwnerMoney = RailwayStation.Owner.Money;
                        RailwayStation.Owner.Money += cost;
                        Transaction?.Invoke(RailwayStation.Owner, previousOwnerMoney, RailwayStation.Owner.Money);
                    }
                }

                //Попадания на клетку недвижимости
                if (Cell is Property)
                {
                    var Location = Cell as Property;
                    if (Location.Owner == null)
                    {
                        if (Buy?.Invoke(user) == true)
                        {
                            if (user.Money < Location.Price)
                            {
                                NoEnoughMoney?.Invoke(user);
                                Console.WriteLine("Нет денег");
                                return;
                            }
                            user.Money    -= Location.Price;
                            Location.Owner = user;

                            user.Properties.Add(Location);

                            var needed = Monopolies
                                         .Where(m => m.PropertiesInMonopoly.Contains(Location.ID))
                                         .ToArray()[0].PropertiesInMonopoly;
                            var have = user.Properties.Select(s => s.ID).ToArray();



                            GetUsersProperties?.Invoke(user);

                            if (!needed.Except(have).Any())
                            {
                                Console.WriteLine("У вас монополия");
                                user.Properties.ForEach(i =>
                                {
                                    i.InMonopoly = true;
                                });
                            }
                        }
                        //Логика торгов
                    }

                    else
                    {
                        if (Location.Owner == user)
                        {
                            return;
                        }
                        if (!Location.InMonopoly)
                        {
                            if (user.Money < Location.PropertyOnly)
                            {
                                NoEnoughMoney?.Invoke(user);
                                RemoveFromGame?.Invoke(user);
                                Console.WriteLine("Недостаточно денег");
                                return;
                            }
                            //user.Money -= Location.PropertyOnly;
                            //Location.Owner.Money += Location.PropertyOnly;
                            int previousUserMoney = user.Money;
                            user.Money -= Location.PropertyOnly;
                            Transaction?.Invoke(user, previousUserMoney, user.Money);
                            int previousOwnerMoney = Location.Owner.Money;
                            Location.Owner.Money += Location.PropertyOnly;
                            Transaction?.Invoke(Location.Owner, previousOwnerMoney, Location.Owner.Money);
                        }
                        else
                        {
                            int cost;
                            switch (Location.Houses)
                            {
                            case 1:
                                cost = Location.OneHouse;
                                break;

                            case 2:
                                cost = Location.TwoHouses;
                                break;

                            case 3:
                                cost = Location.ThreeHouses;
                                break;

                            case 4:
                                cost = Location.FourHouses;
                                break;

                            default:
                                return;
                            }
                            if (Location.InMonopoly)
                            {
                                cost = Location.Hotel;
                            }
                            if (user.Money < cost)
                            {
                                NoEnoughMoney?.Invoke(user);
                                RemoveFromGame?.Invoke(user);
                                Console.WriteLine("Недостаточно денег");
                                return;
                            }

                            int previousUserMoney = user.Money;
                            user.Money -= cost;
                            Transaction?.Invoke(user, previousUserMoney, user.Money);
                            int previousOwnerMoney = Location.Owner.Money;
                            Location.Owner.Money += cost;
                            Transaction?.Invoke(Location.Owner, previousOwnerMoney, Location.Owner.Money);
                        }
                    }
                }
            }while (dices[0] == dices[1] && !user.IsInPrison);
        }
예제 #5
0
        protected override void CreateBoardComponents()
        {
            var go = new Go(GoLocation, GoSalaryBonus);
            var mediterraneanAvenue  = new Property(MediterraneanAvenueLocation, MediterraneanAvenuePrice, MediterraneanAvenueRent);
            var communityChestOne    = new CommunityChest(CommunityChestOneLocation);
            var balticAvenue         = new Property(BalticAvenueLocation, BalticAvenuePrice, BalticAvenueRent);
            var incomeTax            = new IncomeTax(IncomeTaxLocation, IncomeTaxPercentage, MaximumIncomeTaxPaymentAmount);
            var readingRailrod       = new Property(ReadingRailroadLocation, RailroadPrice, BaseRailroadRent);
            var orientalAvenue       = new Property(OrientalAvenueLocation, OrientalAvenuePrice, OrientalAvenueRent);
            var chanceOne            = new Chance(ChanceOneLocation);
            var vermontAvenue        = new Property(VermontAvenueLocation, VermontAvenuePrice, VermontAvenueRent);
            var connecticutAvenue    = new Property(ConnecticutAvenueLocation, ConnecticutAvenuePrice, ConnecticutAvenueRent);
            var justVisiting         = new Location(JustVisitingLocation);
            var stCharlesPlace       = new Property(StCharlesPlaceLocation, StCharlesPlacePrice, StCharlesPlaceRent);
            var electricCompany      = new Property(ElectricCompanyLocation, UtilityPrice, 0);
            var statesAvenue         = new Property(StatesAvenueLocation, StatesAvenuePrice, StatesAvenueRent);
            var virginiaAvenue       = new Property(VirginiaAvenueLocation, VirginiaAvenuePrice, VirginiaAvenueRent);
            var pennsylvaniaRailroad = new Property(PennsylvaniaRailroadLocation, RailroadPrice, BaseRailroadRent);
            var stJamesPlace         = new Property(StJamesPlaceLocation, StJamesPlacePrice, StJamesPlaceRent);
            var communityChestTwo    = new CommunityChest(CommunityChestTwoLocation);
            var tennesseeAvenue      = new Property(TennesseeAvenueLocation, TennesseeAvenuePrice, TennesseeAvenueRent);
            var newYorkAvenue        = new Property(NewYorkAvenueLocation, NewYorkAvenuePrice, NewYorkAvenueRent);
            var freeParking          = new Location(FreeParkingLocation);
            var kentuckyAvenue       = new Property(KentuckyAvenueLocation, KentuckyAvenuePrice, KentuckyAvenueRent);
            var chanceTwo            = new Chance(ChanceTwoLocation);
            var indianaAvenue        = new Property(IndianaAvenueLocation, IndianaAvenuePrice, IndianaAvenueRent);
            var illinoisAvenue       = new Property(IllinoisAvenueLocation, IllinoisAvenuePrice, IllinoisAvenueRent);
            var boRailroad           = new Property(BORailroadLocation, RailroadPrice, BaseRailroadRent);
            var atlanticAvenue       = new Property(AtlanticAvenueLocation, AtlanticAvenuePrice, AtlanticAvenueRent);
            var ventnorAvenue        = new Property(VentnorAvenueLocation, VentnorAvenuePrice, VentnorAvenueRent);
            var waterWorks           = new Property(WaterWorksLocation, UtilityPrice, 0);
            var marvinGardens        = new Property(MarvinGardensLocation, MarvinGardensPrice, MarvinGardensRent);
            var goToJail             = new GoToJail(GoToJailLocation, JustVisitingLocation);
            var pacificAvenue        = new Property(PacificAvenueLocation, PacificAvenuePrice, PacificAvenueRent);
            var northCarolinaAvenue  = new Property(NorthCarolinaAvenueLocation, NorthCarolinaAvenuePrice, NorthCarolinaAvenueRent);
            var communityChestThree  = new CommunityChest(CommunityChestThreeLocation);
            var pennsylvaniaAvenue   = new Property(PennsylvaniaAvenueLocation, PennsylvaniaAvenuePrice, PennsylvaniaAvenueRent);
            var shortLine            = new Property(ShortLineLocation, RailroadPrice, BaseRailroadRent);
            var chanceThree          = new Chance(ChanceThreeLocation);
            var parkPlace            = new Property(ParkPlaceLocation, ParkPlacePrice, ParkPlaceRent);
            var luxuryTax            = new LuxuryTax(LuxuryTaxLocation, LuxuryTaxPaymentAmount);
            var boardwalk            = new Property(BoardwalkLocation, BoardwalkPrice, BoardwalkRent);

            var classicPropertyRentStrategy = new ClassicPropertyRentStrategy();

            var purpleGroup    = new PropertyGroup(classicPropertyRentStrategy, mediterraneanAvenue, balticAvenue);
            var lightBlueGroup = new PropertyGroup(classicPropertyRentStrategy, orientalAvenue, vermontAvenue, connecticutAvenue);
            var violetGroup    = new PropertyGroup(classicPropertyRentStrategy, stCharlesPlace, statesAvenue, virginiaAvenue);
            var orangeGroup    = new PropertyGroup(classicPropertyRentStrategy, stJamesPlace, tennesseeAvenue, newYorkAvenue);
            var redGroup       = new PropertyGroup(classicPropertyRentStrategy, kentuckyAvenue, indianaAvenue, illinoisAvenue);
            var yellowGroup    = new PropertyGroup(classicPropertyRentStrategy, atlanticAvenue, ventnorAvenue, marvinGardens);
            var darkGreenGroup = new PropertyGroup(classicPropertyRentStrategy, pacificAvenue, northCarolinaAvenue, pennsylvaniaAvenue);
            var darkBlueGroup  = new PropertyGroup(classicPropertyRentStrategy, parkPlace, boardwalk);
            var railroadGroup  = new PropertyGroup(new ClassicRailroadRentStrategy(), readingRailrod, pennsylvaniaRailroad, boRailroad, shortLine);
            var utilityGroup   = new PropertyGroup(new ClassicUtilityRentStrategy(), electricCompany, waterWorks);

            boardComponents = new List <BoardComponent>();
            boardComponents.Add(purpleGroup);
            boardComponents.Add(lightBlueGroup);
            boardComponents.Add(violetGroup);
            boardComponents.Add(orangeGroup);
            boardComponents.Add(redGroup);
            boardComponents.Add(yellowGroup);
            boardComponents.Add(darkGreenGroup);
            boardComponents.Add(darkBlueGroup);
            boardComponents.Add(railroadGroup);
            boardComponents.Add(utilityGroup);
            boardComponents.Add(go);
            boardComponents.Add(goToJail);
            boardComponents.Add(incomeTax);
            boardComponents.Add(luxuryTax);
            boardComponents.Add(justVisiting);
            boardComponents.Add(freeParking);
            boardComponents.Add(communityChestOne);
            boardComponents.Add(communityChestTwo);
            boardComponents.Add(communityChestThree);
            boardComponents.Add(chanceOne);
            boardComponents.Add(chanceTwo);
            boardComponents.Add(chanceThree);
        }
예제 #6
0
    // Pulls a community chest card and does the action.
    private IEnumerator CommunityChestHandler(Player player)
    {
        int            random = Random.Range(0, 8);
        CommunityChest chest  = communityChests[random];

        commUI.communityString = chest.chestAction;
        commUI.gameObject.SetActive(true);
        yield return(new WaitForSeconds(4));

        commUI.gameObject.SetActive(false);

        switch (chest.chestId)
        {
        case 1:
            GameObject goTileObj = GameObject.FindGameObjectWithTag("Go");
            Tile       goTile    = goTileObj.GetComponent <Tile>();
            player.currentTile        = goTile;
            player.transform.position = goTile.transform.position;
            player.money += 200;
            break;

        case 2:
            player.money += 50;
            break;

        case 3:
            player.money += 200;
            break;

        case 4:
            player.money += 20;
            break;

        case 5:
            player.money -= 50;
            break;

        case 6:
            player.money -= 50;
            break;

        case 7:
            player.money -= 40 * player.houseCount;
            break;

        case 8:
            player.money += 100;
            break;
        }

        yield return(new WaitForSeconds(1));

        if (doubleRoll == true)
        {
            StartCoroutine(RollAgain());
        }
        else
        {
            IsDoneInteraction = true;
        }
    }
예제 #7
0
        protected override void CreateBoardComponents()
        {
            var go = new Go(GoLocation, GoSalaryBonus);
            var mediterraneanAvenue = new Property(MediterraneanAvenueLocation, MediterraneanAvenuePrice, MediterraneanAvenueRent);
            var communityChestOne = new CommunityChest(CommunityChestOneLocation);
            var balticAvenue = new Property(BalticAvenueLocation, BalticAvenuePrice, BalticAvenueRent);
            var incomeTax = new IncomeTax(IncomeTaxLocation, IncomeTaxPercentage, MaximumIncomeTaxPaymentAmount);
            var readingRailrod = new Property(ReadingRailroadLocation, RailroadPrice, BaseRailroadRent);
            var orientalAvenue = new Property(OrientalAvenueLocation, OrientalAvenuePrice, OrientalAvenueRent);
            var chanceOne = new Chance(ChanceOneLocation);
            var vermontAvenue = new Property(VermontAvenueLocation, VermontAvenuePrice, VermontAvenueRent);
            var connecticutAvenue = new Property(ConnecticutAvenueLocation, ConnecticutAvenuePrice, ConnecticutAvenueRent);
            var justVisiting = new Location(JustVisitingLocation);
            var stCharlesPlace = new Property(StCharlesPlaceLocation, StCharlesPlacePrice, StCharlesPlaceRent);
            var electricCompany = new Property(ElectricCompanyLocation, UtilityPrice, 0);
            var statesAvenue = new Property(StatesAvenueLocation, StatesAvenuePrice, StatesAvenueRent);
            var virginiaAvenue = new Property(VirginiaAvenueLocation, VirginiaAvenuePrice, VirginiaAvenueRent);
            var pennsylvaniaRailroad = new Property(PennsylvaniaRailroadLocation, RailroadPrice, BaseRailroadRent);
            var stJamesPlace = new Property(StJamesPlaceLocation, StJamesPlacePrice, StJamesPlaceRent);
            var communityChestTwo = new CommunityChest(CommunityChestTwoLocation);
            var tennesseeAvenue = new Property(TennesseeAvenueLocation, TennesseeAvenuePrice, TennesseeAvenueRent);
            var newYorkAvenue = new Property(NewYorkAvenueLocation, NewYorkAvenuePrice, NewYorkAvenueRent);
            var freeParking = new Location(FreeParkingLocation);
            var kentuckyAvenue = new Property(KentuckyAvenueLocation, KentuckyAvenuePrice, KentuckyAvenueRent);
            var chanceTwo = new Chance(ChanceTwoLocation);
            var indianaAvenue = new Property(IndianaAvenueLocation, IndianaAvenuePrice, IndianaAvenueRent);
            var illinoisAvenue = new Property(IllinoisAvenueLocation, IllinoisAvenuePrice, IllinoisAvenueRent);
            var boRailroad = new Property(BORailroadLocation, RailroadPrice, BaseRailroadRent);
            var atlanticAvenue = new Property(AtlanticAvenueLocation, AtlanticAvenuePrice, AtlanticAvenueRent);
            var ventnorAvenue = new Property(VentnorAvenueLocation, VentnorAvenuePrice, VentnorAvenueRent);
            var waterWorks = new Property(WaterWorksLocation, UtilityPrice, 0);
            var marvinGardens = new Property(MarvinGardensLocation, MarvinGardensPrice, MarvinGardensRent);
            var goToJail = new GoToJail(GoToJailLocation, JustVisitingLocation);
            var pacificAvenue = new Property(PacificAvenueLocation, PacificAvenuePrice, PacificAvenueRent);
            var northCarolinaAvenue = new Property(NorthCarolinaAvenueLocation, NorthCarolinaAvenuePrice, NorthCarolinaAvenueRent);
            var communityChestThree = new CommunityChest(CommunityChestThreeLocation);
            var pennsylvaniaAvenue = new Property(PennsylvaniaAvenueLocation, PennsylvaniaAvenuePrice, PennsylvaniaAvenueRent);
            var shortLine = new Property(ShortLineLocation, RailroadPrice, BaseRailroadRent);
            var chanceThree = new Chance(ChanceThreeLocation);
            var parkPlace = new Property(ParkPlaceLocation, ParkPlacePrice, ParkPlaceRent);
            var luxuryTax = new LuxuryTax(LuxuryTaxLocation, LuxuryTaxPaymentAmount);
            var boardwalk = new Property(BoardwalkLocation, BoardwalkPrice, BoardwalkRent);

            var classicPropertyRentStrategy = new ClassicPropertyRentStrategy();

            var purpleGroup = new PropertyGroup(classicPropertyRentStrategy, mediterraneanAvenue, balticAvenue);
            var lightBlueGroup = new PropertyGroup(classicPropertyRentStrategy, orientalAvenue, vermontAvenue, connecticutAvenue);
            var violetGroup = new PropertyGroup(classicPropertyRentStrategy, stCharlesPlace, statesAvenue, virginiaAvenue);
            var orangeGroup = new PropertyGroup(classicPropertyRentStrategy, stJamesPlace, tennesseeAvenue, newYorkAvenue);
            var redGroup = new PropertyGroup(classicPropertyRentStrategy, kentuckyAvenue, indianaAvenue, illinoisAvenue);
            var yellowGroup = new PropertyGroup(classicPropertyRentStrategy, atlanticAvenue, ventnorAvenue, marvinGardens);
            var darkGreenGroup = new PropertyGroup(classicPropertyRentStrategy, pacificAvenue, northCarolinaAvenue, pennsylvaniaAvenue);
            var darkBlueGroup = new PropertyGroup(classicPropertyRentStrategy, parkPlace, boardwalk);
            var railroadGroup = new PropertyGroup(new ClassicRailroadRentStrategy(), readingRailrod, pennsylvaniaRailroad, boRailroad, shortLine);
            var utilityGroup = new PropertyGroup(new ClassicUtilityRentStrategy(), electricCompany, waterWorks);

            boardComponents = new List<BoardComponent>();
            boardComponents.Add(purpleGroup);
            boardComponents.Add(lightBlueGroup);
            boardComponents.Add(violetGroup);
            boardComponents.Add(orangeGroup);
            boardComponents.Add(redGroup);
            boardComponents.Add(yellowGroup);
            boardComponents.Add(darkGreenGroup);
            boardComponents.Add(darkBlueGroup);
            boardComponents.Add(railroadGroup);
            boardComponents.Add(utilityGroup);
            boardComponents.Add(go);
            boardComponents.Add(goToJail);
            boardComponents.Add(incomeTax);
            boardComponents.Add(luxuryTax);
            boardComponents.Add(justVisiting);
            boardComponents.Add(freeParking);
            boardComponents.Add(communityChestOne);
            boardComponents.Add(communityChestTwo);
            boardComponents.Add(communityChestThree);
            boardComponents.Add(chanceOne);
            boardComponents.Add(chanceTwo);
            boardComponents.Add(chanceThree);
        }