Exemplo n.º 1
0
        private static void InitializeBoard()
        {
            var board   = GameBoard.GetBoard();
            var players = PlayersBuilder.CreatePlayers();

            board.SetPlayerList(players);
        }
Exemplo n.º 2
0
        public static void ShowEntireWorld()
        {
            var board = GameBoard.GetBoard();

            Console.WriteLine("\n\tNumber Territory\t\tContinent\tOccupant\tArmies");
            Console.WriteLine("\t==========================================================================");
            foreach (var territory in board.GetEarth().Territories)
            {
                Console.Write("\t");

                Colour.PrintLand(territory.Continent, territory.TerriroryNumber.ToString());
                Console.Write(GameEngine.BufferBuilder(territory.TerriroryNumber.ToString().Length, 7));

                Colour.PrintLand(territory.Continent, territory.Name);
                Console.Write(GameEngine.BufferBuilder(territory.Name.Length, 21));

                Colour.PrintLand(territory.Continent, "\t" + territory.Continent);
                Console.Write(GameEngine.BufferBuilder(territory.Continent.Length, 13));

                if (territory.Occupant == "Empty")
                {
                    Console.Write("\t" + territory.Occupant);
                }
                else
                {
                    Colour.PrintPlayer(GameEngine.GetPlayerColourIndex(territory.Occupant), "\t" + territory.Occupant);
                }
                Console.Write(GameEngine.BufferBuilder(territory.Occupant.Length, 16));

                Console.Write(territory.Armies + "\n");
            }
            Console.WriteLine("\t==========================================================================");
        }
Exemplo n.º 3
0
        private static void AutoTroopDeploy()
        {
            var allDeployed = false;
            var rnd         = GameBoard.GetBoard().GetRandom();
            var earth       = GameBoard.GetBoard().GetEarth();
            var players     = new List <Player>();

            foreach (var player in GameBoard.GetBoard().GetPlayerList())
            {
                players.Add(player);
            }

            while (allDeployed == false)
            {
                var index     = rnd.Next(0, 41);
                var territory = earth.Territories[index];
                var player    = GameBoard.GetBoard().GetPlayerByName(territory.Occupant);

                if (player.Armies < 1)
                {
                    players.Remove(player);
                }
                else
                {
                    territory.Armies += 1;
                    player.Armies    -= 1;
                }
                if (players.Count < 1)
                {
                    allDeployed = true;
                }
            }
        }
Exemplo n.º 4
0
        public override void InitializeBoard()
        {
            var board   = GameBoard.GetBoard();
            var players = PlayersBuilder.CreatePlayers();

            board.SetPlayerList(players);
        }
Exemplo n.º 5
0
        public static void AutoPopulate()
        {
            var board     = GameBoard.GetBoard();
            var rnd       = board.GetRandom();
            var list      = board.GetEarth();
            var tempEarth = new List <Territory>();

            foreach (var territory in list.Territories)
            {
                tempEarth.Add(territory);
            }

            int n = 42;

            while (n > 1)
            {
                int k = (rnd.Next(0, n) % n);
                n--;
                var value = tempEarth[k];
                tempEarth[k] = tempEarth[n];
                tempEarth[n] = value;
            }
            var queue = new Queue <Territory>(tempEarth);

            while (queue.Count > 0)
            {
                var player    = board.CurrentPlayer;
                var territory = queue.Dequeue();
                territory.Occupant = player.Name;
                territory.Armies   = 1;
                player.Armies     -= 1;
                board.SetCurrentPlayer();
            }
            AutoTroopDeploy();
        }
Exemplo n.º 6
0
        public static void ShowCurrentPlayesTerritories()
        {
            var board  = GameBoard.GetBoard();
            var player = board.CurrentPlayer;

            Console.WriteLine("\n\tNumber Territory\t\tContinent\tOccupant\tArmies");
            Console.WriteLine("\t==========================================================================");
            foreach (var territory in board.GetEarth().Territories)
            {
                if (territory.Occupant == player.Name)
                {
                    Console.Write("\n\t");

                    Colour.PrintLand(territory.Continent, territory.TerriroryNumber.ToString());
                    Console.Write(GameEngine.BufferBuilder(territory.TerriroryNumber.ToString().Length, 7));

                    Colour.PrintLand(territory.Continent, territory.Name);
                    Console.Write(GameEngine.BufferBuilder(territory.Name.Length, 21));

                    Colour.PrintLand(territory.Continent, "\t" + territory.Continent);
                    Console.Write(GameEngine.BufferBuilder(territory.Continent.Length, 13));

                    Colour.PrintPlayer(GameEngine.GetPlayerColourIndex(territory.Occupant), "\t" + territory.Occupant);
                    Console.Write(GameEngine.BufferBuilder(territory.Occupant.Length, 15));

                    Console.Write("\t" + territory.Armies);
                    Console.Write(GameEngine.BufferBuilder(territory.Armies.ToString().Length, 8));
                }
            }
        }
Exemplo n.º 7
0
        private void TroopMovementPhase()
        {
            var player = GameBoard.GetBoard().CurrentPlayer;

            player.GameEntryPoint = 3;
            GameEngine.Timer("Fortification phase about to begin");
            TeritoriesFortification.FortificationMenu();
        }
Exemplo n.º 8
0
        private void BattlePhase()
        {
            var player = GameBoard.GetBoard().CurrentPlayer;

            player.GameEntryPoint = 2;
            GameEngine.Timer("Battle phase about to begin");
            var battle = new Battle();

            battle.BattleMenu();
        }
Exemplo n.º 9
0
        private static void AssignStartingPlayer()
        {
            var starter = GameEngine.HighestRoll(GameBoard.GetBoard().GetPlayerList());

            GameEngine.Timer();
            Colour.PrintPlayer(starter.Colour, "\r\t" + starter.Name);
            Console.Write(" won the roll and will play first.\n");
            Console.WriteLine("\tPress any key to continue.");
            Console.ReadKey();
            GameBoard.GetBoard().SetPlayerTurnQueue(GameEngine.CreateTurnQueue(starter));
        }
Exemplo n.º 10
0
        public static void LoadTerritoryNeighbours()
        {
            var territoryList = GameBoard.GetBoard().GetEarth().Territories;

            foreach (var territory in territoryList)
            {
                territory.Neighbours = new List <Territory>();
                foreach (var neighbour in territory.NeighboursNames)
                {
                    territory.Neighbours.Add(GameBoard.GetBoard().GetTerritoryByName(neighbour));
                }
            }
        }
Exemplo n.º 11
0
        public static Territory FindTerritory(int selection)
        {
            var territories = GameBoard.GetBoard().GetEarth().Territories;

            foreach (var territory in territories)
            {
                if (territory.TerriroryNumber == selection)
                {
                    return(territory);
                }
            }
            return(null);
        }
Exemplo n.º 12
0
        public override void InitializeBoard()
        {
            var board = GameBoard.GetBoard();

            board.SetEarth(_mapper.Earth);
            board.SetGameCards(_mapper.Cards);
            board.SetUsedCards(_mapper.UsedCards);
            board.SetTradedCardSets(_mapper.TradedCardSets);
            board.SetPlayerList(_mapper.Players);
            board.SetPlayerTurnQueue(_mapper.PlayerTurnQueue);
            AssignStartingPlayer();
            BoardBuilder.LoadTerritoryNeighbours();
        }
Exemplo n.º 13
0
        public override void AssignStartingPlayer()
        {
            var board   = GameBoard.GetBoard();
            var starter = GameEngine.HighestRoll(board.GetPlayerList());

            GameEngine.Timer("Rolling dice");
            Colour.PrintPlayer(starter.Colour, "\r\t" + starter.Name);
            Console.Write(" won the roll and will play first.\n");
            Console.WriteLine("\tPress any key to continue.");
            Console.ReadKey();
            board.SetPlayerTurnQueue(GameEngine.CreateTurnQueue(starter));
            board.SetCurrentPlayer();
        }
Exemplo n.º 14
0
        public static int GetPlayerColourIndex(string name)
        {
            var board = GameBoard.GetBoard();
            var index = 0;

            foreach (var player in board.GetPlayerList())
            {
                if (player.Name == name)
                {
                    index = player.Colour;
                }
            }
            return(index);
        }
Exemplo n.º 15
0
        private static int CountPlayersTerritories(Player player)
        {
            var earth = GameBoard.GetBoard().GetEarth();
            var count = 0;

            foreach (var territory in earth.Territories)
            {
                if (territory.Occupant == player.Name)
                {
                    count++;
                }
            }
            return(count);
        }
Exemplo n.º 16
0
        public static int GetPlayerIndex(string name)
        {
            var board = GameBoard.GetBoard();
            var index = 0;

            foreach (var player in board.GetPlayerList())
            {
                if (player.Name == name)
                {
                    return(index);
                }
                index++;
            }
            throw new Exception();
        }
Exemplo n.º 17
0
        private static Territory ChooseAttacker()
        {
            var territory = new Territory();
            var confirmed = false;

            while (confirmed == false)
            {
                var player = GameBoard.GetBoard().CurrentPlayer;
                Console.Clear();
                Colour.SouthAmericaRed("\t     **** Risk! ****\n");
                Console.WriteLine("\t====================================");
                Console.Write("\tCurrently ");
                Colour.PrintPlayer(player.Colour, player.Name + "'s");
                Console.Write(" turn.");
                Console.Write("\n\tPlease select the territory you want to  ");
                Colour.SouthAmericaRed("attack with.\n");

                MapBuilder.ShowEntireWorld();
                Console.WriteLine("\n\tEnter 43 to return to menu.");
                var option = GameEngine.UserInputTest("\t(1-43)>", "\tInvalid input, please try again!", 1, 43);

                if (option != 43)
                {
                    territory = BoardPopulator.FindTerritory(option);
                    if (territory.Occupant != player.Name)
                    {
                        Console.WriteLine("\tTerritory is occupied by another player.");
                        Console.WriteLine("\tPress any key to retry....");
                        Console.ReadKey();
                    }
                    else if (territory.Armies < 2)
                    {
                        Console.WriteLine("\tTerritory must have at least 2 armies to attack with.");
                        Console.WriteLine("\tPress any key to retry....");
                        Console.ReadKey();
                    }
                    else
                    {
                        confirmed = true;
                    }
                }
                else
                {
                    confirmed = true;
                }
            }
            return(territory);
        }
Exemplo n.º 18
0
        private static Territory ChooseDefender(Territory attacker)
        {
            var territory = new Territory();
            var confirmed = false;

            while (confirmed == false)
            {
                Console.Clear();
                var player = GameBoard.GetBoard().CurrentPlayer;
                Colour.SouthAmericaRed("\t     **** Risk! ****\n");
                Console.WriteLine("\t====================================");
                Console.Write("\tCurrently ");
                Colour.PrintPlayer(player.Colour, player.Name + "'s");
                Console.Write(" turn.");
                Console.Write("\n\tPlease select the territory you want to  ");
                Colour.SouthAmericaRed("Attack.\n");

                var numberMap = MapBuilder.ShowTerritoriesNeighbours(attacker);
                var highest   = numberMap.Count + 1;
                Console.WriteLine("\tTo return to the main menu, enter " + highest);

                var prompt = "\n\t(1-" + highest + ")>";
                var option = GameEngine.UserInputTest(prompt, "\tInvalid input, please try again!", 1, highest);

                if (option == highest)
                {
                    confirmed = true;
                }
                else
                {
                    int result;
                    numberMap.TryGetValue(option, out result);
                    territory = BoardPopulator.FindTerritory(result);
                    if (territory != null && territory.Occupant != player.Name)
                    {
                        confirmed = true;
                    }
                    else
                    {
                        Console.WriteLine("\tCannot attack a territory which you occupy!");
                        Console.WriteLine("\tPress any key to continue....");
                        Console.ReadKey();
                    }
                }
            }
            return(territory);
        }
Exemplo n.º 19
0
        private void OnGameCompleted(Object sender, EventArgs e)
        {
            var player = GameBoard.GetBoard().CurrentPlayer;

            Console.Clear();
            Colour.SouthAmericaRed("\t     **** Risk! ****\n");
            Console.WriteLine("\t==========================");
            Console.WriteLine("\t    !!!!!Victory!!!!!");
            Colour.PrintPlayer(player.Colour, "\n\t" + player.Name);
            Console.Write(", You have destroyed your enemies and conquered the world!");
            Console.WriteLine("\n\tCongratulations, you are the Winner!!!");
            Console.WriteLine("\tThank you for playing");
            Console.WriteLine("\tPress any key to continue....");
            Console.ReadKey();

            Environment.Exit(0);
        }
Exemplo n.º 20
0
        public static void PlayerTurnMenu()
        {
            var player = GameBoard.GetBoard().CurrentPlayer;
            var temp   = false;

            while (temp == false)
            {
                Console.Clear();
                Colour.SouthAmericaRed("\t     **** Risk! ****\n");
                Console.WriteLine("\t==========================");
                Console.WriteLine("\t       Game Menu");
                Console.Write("\tCurrently ");
                Colour.PrintPlayer(player.Colour, player.Name + "'s");
                Console.Write(" turn.\n");
                Console.WriteLine("\t1. Return to game");
                Console.WriteLine("\t2. Save Game");
                Console.WriteLine("\t3. Quit Game");
                Console.WriteLine("\t==========================");
                var option = GameEngine.UserInputTest("\t(1-4)>", "\tInvalid input, please try again!", 1, 4);

                switch (option)
                {
                case 1:
                    temp = true;
                    break;

                case 2:
                    var slot = SaveGameMenu("save");
                    if (slot != 7)
                    {
                        GameSaver.SaveGame(slot);
                    }
                    break;

                case 3:
                    Console.WriteLine("\tThank you and goodbye!\n\tPress any key to exit.......");
                    Console.ReadKey();
                    Environment.Exit(0);
                    break;

                default:
                    Console.WriteLine("Error");
                    break;
                }
            }
        }
Exemplo n.º 21
0
        public void Populate()
        {
            var confirmed = false;

            while (confirmed == false)
            {
                var armyCount = GameBoard.GetBoard().GetPlayerByIndex(0).Armies;
                BoardPopulator.AutoPopulate();
                MapBuilder.ShowEntireWorld();
                Console.WriteLine("\n\t==========================");
                Console.WriteLine("\t1. Confirm board layout");
                Console.WriteLine("\t2. Change board layout");
                Console.WriteLine("\t3. Quit Game");
                Console.WriteLine("\t==========================");
                var option = GameEngine.UserInputTest("\t(1-3)>", "\tInvalid input, please try again!", 1, 3);

                switch (option)
                {
                case 1:
                    confirmed = true;
                    break;

                case 2:
                    GameEngine.Timer("Building new board");
                    Console.WriteLine("\r\tPress any key to continue.");
                    Console.ReadKey();
                    foreach (var player in GameBoard.GetBoard().GetPlayerList())
                    {
                        player.Armies = armyCount;
                    }
                    break;

                case 3:
                    Console.Clear();
                    Console.WriteLine("\tThank you and goodbye!\n\tPress any key to exit.......");
                    Console.ReadKey();
                    Environment.Exit(0);
                    break;

                default:
                    Console.WriteLine("Error");
                    break;
                }
            }
        }
Exemplo n.º 22
0
        public void BattleMenu()
        {
            var complete = false;

            while (complete == false)
            {
                var player = GameBoard.GetBoard().CurrentPlayer;
                Console.Clear();
                Colour.SouthAmericaRed("\t     **** Risk! ****\n");
                Console.WriteLine("\t==========================");
                Console.WriteLine("\t       Battle Menu");
                Console.Write("\tCurrently ");
                Colour.PrintPlayer(player.Colour, player.Name + "'s");
                Console.Write(" turn.\n");
                Console.WriteLine("\t1. Select territory to attack");
                Console.WriteLine("\t2. Game Menu");
                Console.WriteLine("\t3. Finish Fighting");
                Console.WriteLine("\t==========================");
                var option = GameEngine.UserInputTest("\t(1-3)>", "\tInvalid input, please try again!", 1, 3);

                switch (option)
                {
                case 1:
                    var attack = BuildBattle();
                    if (attack.AttackingTerritory != null)
                    {
                        var unused = new WorldConquered(this);
                        BeginBattle(attack);
                    }
                    break;

                case 2:
                    GamePlayMenus.PlayerTurnMenu();
                    break;

                case 3:
                    complete = true;
                    break;

                default:
                    Console.WriteLine("Error");
                    break;
                }
            }
        }
Exemplo n.º 23
0
        public void GamePlay()
        {
            var board      = GameBoard.GetBoard();
            var playerList = board.GetPlayerList();

            while (playerList.Count > 1)
            {
                var player = board.CurrentPlayer;
                if (player.GameEntryPoint == 0)
                {
                    player.ConqueredDuringTurn = 0;
                }
                GameEngine.Timer(player.Name + " Your turn is about to begin ");

                if (player.GameEntryPoint != 2 && player.GameEntryPoint != 3)
                {
                    ReinforcementsPhase(board);
                }
                if (player.GameEntryPoint != 3)
                {
                    BattlePhase();
                }
                TroopMovementPhase();

                if (player.ConqueredDuringTurn > 0)
                {
                    GameEngine.Timer("You conquered a territory, receiving a Game Card.");
                    var card = board.GetGameCard();
                    if (player.Cards == null)
                    {
                        player.Cards = new List <Card> {
                            card
                        };
                    }
                    else
                    {
                        player.Cards.Add(card);
                    }
                }

                player.GameEntryPoint = 0;
                board.SetCurrentPlayer();
            }
        }
Exemplo n.º 24
0
        public void UpdateMeta(int slot)
        {
            var dt    = DateTime.Now;
            var date  = $"{dt:g}";
            var count = GameBoard.GetBoard().GetPlayerList().Count;

            switch (slot)
            {
            case 1:
                Meta.Save1Count = count;
                Meta.Save1Date  = date;
                break;

            case 2:
                Meta.Save2Count = count;
                Meta.Save2Date  = date;
                break;

            case 3:
                Meta.Save3Count = count;
                Meta.Save3Date  = date;
                break;

            case 4:
                Meta.Save4Count = count;
                Meta.Save4Date  = date;
                break;

            case 5:
                Meta.Save5Count = count;
                Meta.Save5Date  = date;
                break;

            case 6:
                Meta.Save6Count = count;
                Meta.Save6Date  = date;
                break;

            default:
                Console.WriteLine("Error");
                break;
            }
        }
Exemplo n.º 25
0
        private static void MovementOrders(Territory supplier, Territory receiver)
        {
            Console.Clear();
            var player = GameBoard.GetBoard().CurrentPlayer;

            Colour.SouthAmericaRed("\t     **** Risk! ****\n");
            Console.WriteLine("\t====================================");
            Console.Write("\tCurrently ");
            Colour.PrintPlayer(player.Colour, player.Name + "'s");
            Console.Write(" turn.");
            Console.WriteLine("\n\tSelect the number of armies you wish to move from {0}, to fortify {1}?.",
                              supplier.Name, receiver.Name);
            var armies = supplier.Armies - 1;
            var prompt = "\t(1-" + armies + ")>";
            var option = GameEngine.UserInputTest(prompt, "\tInvalid input, please try again!", 1, armies);

            supplier.Armies -= option;
            receiver.Armies += option;
        }
Exemplo n.º 26
0
        public static void DeployArmies()
        {
            var board    = GameBoard.GetBoard();
            var finished = 0;

            while (finished < board.GetPlayerList().Count)
            {
                var player = board.CurrentPlayer;
                Console.Clear();
                Colour.SouthAmericaRed("\t     **** Risk! ****\n");
                Console.WriteLine("\t====================================");
                Colour.PrintPlayer(player.Colour, "\t" + player.Name);
                Console.WriteLine(" , add one army unit to a territory you occupy");
                Console.Write("\tYou have ");
                Colour.PrintPlayer(player.Colour, player.Armies.ToString());
                Console.Write(" armies left to deploy");

                MapBuilder.ShowEntireWorld();

                var isPlayersTerritory = false;
                while (isPlayersTerritory == false)
                {
                    var selection = GameEngine.UserInputTest("\n\tEnter territory number (1-42)>", "\tInvalid selection!", 1, 42);
                    var country   = FindTerritory(selection);
                    if (country.Occupant == player.Name)
                    {
                        country.Armies    += 1;
                        player.Armies     -= 1;
                        isPlayersTerritory = true;
                    }
                    else
                    {
                        Console.WriteLine("\tYou have selected a territory that is occupied by another player!\n");
                    }
                }

                if (player.Armies == 0)
                {
                    finished++;
                }
                board.SetCurrentPlayer();
            }
        }
Exemplo n.º 27
0
        public static Queue <Player> CreateTurnQueue(Player starter)
        {
            var board    = GameBoard.GetBoard();
            var queue    = new Queue <Player>(board.GetPlayerList());
            var complete = false;

            while (complete == false)
            {
                if (queue.Peek().Name != starter.Name)
                {
                    var swap = queue.Dequeue();
                    queue.Enqueue(swap);
                }
                else
                {
                    complete = true;
                }
            }
            return(queue);
        }
Exemplo n.º 28
0
        private void TerritoryConquered(Attack attack)
        {
            Console.Clear();
            Colour.SouthAmericaRed("\t     **** Risk! ****\n");
            Console.WriteLine("\t==========================");
            Console.WriteLine("\t       Victory!");
            Colour.PrintPlayer(attack.Attacker.Colour, "\t" + attack.Attacker.Name);
            Console.Write(", you have defeated all of the armies in ");
            Colour.PrintLand(attack.DefendingTerritory.Continent, attack.DefendingTerritory.Name);

            attack.DefendingTerritory.Occupant = attack.Attacker.Name;
            var landCount = CountPlayersTerritories(attack.Attacker);

            if (landCount == 42)
            {
                OnGameCompleted();
            }

            if (attack.AttackingTerritory.Armies == 2)
            {
                Console.WriteLine("\n\tOne army has been moved to {0}.", attack.Defender.Name);
                attack.AttackingTerritory.Armies -= 1;
                attack.DefendingTerritory.Armies += 1;
            }
            else
            {
                Console.WriteLine("\n\tSelect the number of armies you wish to move from {0}, to occupy {1} with.",
                                  attack.AttackingTerritory.Name, attack.DefendingTerritory.Name);
                var armies = attack.AttackingTerritory.Armies - 1;
                var prompt = "\t(1-" + armies + ")>";
                var option = GameEngine.UserInputTest(prompt, "\tInvalid input, please try again!", 1, armies);
                attack.AttackingTerritory.Armies -= option;
                attack.DefendingTerritory.Armies += option;
            }
            GameBoard.GetBoard().CurrentPlayer.ConqueredDuringTurn += 1;
            Console.WriteLine("\tPress any key to continue....");
            Console.ReadKey();

            CheckUserHasTerritories(attack.Defender, attack.Attacker);
        }
Exemplo n.º 29
0
        public static void FortificationMenu()
        {
            var complete = false;

            while (complete == false)
            {
                var player = GameBoard.GetBoard().CurrentPlayer;
                Console.Clear();
                Colour.SouthAmericaRed("\t     **** Risk! ****\n");
                Console.WriteLine("\t==========================");
                Console.WriteLine("\t    Fortification Menu");
                Console.Write("\tCurrently ");
                Colour.PrintPlayer(player.Colour, player.Name + "'s");
                Console.Write(" turn.\n");
                Console.WriteLine("\t1. Move Troops");
                Console.WriteLine("\t2. Game Menu");
                Console.WriteLine("\t3. End Turn");
                Console.WriteLine("\t==========================");
                var option = GameEngine.UserInputTest("\t(1-3)>", "\tInvalid input, please try again!", 1, 3);

                switch (option)
                {
                case 1:
                    MoveTroops();
                    break;

                case 2:
                    GamePlayMenus.PlayerTurnMenu();
                    break;

                case 3:
                    complete = true;
                    break;

                default:
                    Console.WriteLine("Error");
                    break;
                }
            }
        }
Exemplo n.º 30
0
        private static Territory PickSupplerTerritory()
        {
            var territory = new Territory();
            var confirmed = false;

            while (confirmed == false)
            {
                var player = GameBoard.GetBoard().CurrentPlayer;
                Console.Clear();
                Colour.SouthAmericaRed("\t     **** Risk! ****\n");
                Console.WriteLine("\t====================================");
                Console.Write("\tCurrently ");
                Colour.PrintPlayer(player.Colour, player.Name + "'s");
                Console.Write(" turn.");
                Console.Write("\n\tPlease select the territory you want to  ");
                Colour.SouthAmericaRed("Move Troops From.\n");

                MapBuilder.ShowEntireWorld();
                var option = GameEngine.UserInputTest("\n\t(1-42)>", "\tInvalid input, please try again!", 1, 42);

                territory = BoardPopulator.FindTerritory(option);
                if (territory.Occupant != player.Name)
                {
                    Console.WriteLine("\tTerritory is occupied by another player.");
                    Console.WriteLine("\tPress any key to retry....");
                    Console.ReadKey();
                }
                else if (territory.Armies == 1)
                {
                    Console.WriteLine("\tTerritory must have more than 1 army.");
                    Console.WriteLine("\tPress any key to retry....");
                    Console.ReadKey();
                }
                else
                {
                    confirmed = true;
                }
            }
            return(territory);
        }