/// <summary>
        /// Parses a list of the opponent's moves every round.
        /// Clears it at the start, so only the moves of this round are stored.
        /// </summary>
        /// <param name="moveInput"></param>
        public void ReadOpponentMoves(string[] moveInput)
        {
            OpponentMoves.Clear();

            for (var i = 1; i < moveInput.Length; i++)
            {
                try
                {
                    Move move;

                    if (moveInput[i + 1].Equals("place_armies"))
                    {
                        var region     = VisibleMap.GetRegion(int.Parse(moveInput[i + 2]));
                        var playerName = moveInput[i];
                        var armies     = int.Parse(moveInput[i + 3]);
                        move = new PlaceArmiesMove(playerName, region, armies);
                        i   += 3;
                    }
                    else if (moveInput[i + 1].Equals("attack/transfer"))
                    {
                        var fromRegion = VisibleMap.GetRegion(int.Parse(moveInput[i + 2]));
                        if (fromRegion == null)
                        {
                            //might happen if the region isn't visible
                            fromRegion = FullMap.GetRegion(int.Parse(moveInput[i + 2]));
                        }

                        var toRegion = VisibleMap.GetRegion(int.Parse(moveInput[i + 3]));
                        if (toRegion == null)
                        {
                            //might happen if the region isn't visible
                            toRegion = FullMap.GetRegion(int.Parse(moveInput[i + 3]));
                        }

                        var playerName = moveInput[i];
                        var armies     = int.Parse(moveInput[i + 4]);
                        move = new AttackTransferMove(playerName, fromRegion, toRegion, armies);
                        i   += 4;
                    }
                    else
                    {
                        //never happens
                        continue;
                    }

                    OpponentMoves.Add(move);
                }
                catch (Exception e)
                {
                    Console.Error.WriteLine("Unable to parse Opponent moves " + e.Message);
                }
            }
        }
 /// <summary>
 /// Regions from wich a player is able to pick his preferred starting region.
 /// </summary>
 /// <param name="input"></param>
 public void SetPickableStartingRegions(string[] input)
 {
     PickableStartingRegions = new List <Region>();
     for (var i = 2; i < input.Length; i++)
     {
         try
         {
             var regionId       = int.Parse(input[i]);
             var pickableRegion = FullMap.GetRegion(regionId);
             PickableStartingRegions.Add(pickableRegion);
         }
         catch (Exception e)
         {
             Console.Error.WriteLine("Unable to parse pickable regions " + e.Message);
         }
     }
 }
        /// <summary>
        /// Initial map is given to the bot with all the information except for player and armies info.
        /// </summary>
        /// <param name="mapInput"></param>
        public void SetupMap(string[] mapInput)
        {
            int i, regionId, superRegionId, wastelandId, reward;

            if (mapInput[1].Equals("super_regions"))
            {
                for (i = 2; i < mapInput.Length; i++)
                {
                    try
                    {
                        superRegionId = int.Parse(mapInput[i]);
                        i++;
                        reward = int.Parse(mapInput[i]);
                        FullMap.Add(new SuperRegion(superRegionId, reward));
                    }
                    catch (Exception e)
                    {
                        Console.Error.WriteLine("Unable to parse SuperRegions " + e.Message);
                    }
                }
            }
            else if (mapInput[1].Equals("regions"))
            {
                for (i = 2; i < mapInput.Length; i++)
                {
                    try
                    {
                        regionId = int.Parse(mapInput[i]);
                        i++;
                        superRegionId = int.Parse(mapInput[i]);
                        var superRegion = FullMap.GetSuperRegion(superRegionId);
                        FullMap.Add(new Region(regionId, superRegion));
                    }
                    catch (Exception e)
                    {
                        Console.Error.WriteLine("Unable to parse Regions " + e.Message);
                    }
                }
            }
            else if (mapInput[1].Equals("neighbors"))
            {
                for (i = 2; i < mapInput.Length; i++)
                {
                    try
                    {
                        var region = FullMap.GetRegion(int.Parse(mapInput[i]));
                        i++;
                        var neighborIds = mapInput[i].Split(',');

                        for (var j = 0; j < neighborIds.Length; j++)
                        {
                            var neighbor = FullMap.GetRegion(int.Parse(neighborIds[j]));
                            region.AddNeighbor(neighbor);
                        }
                    }
                    catch (Exception e)
                    {
                        Console.Error.WriteLine("Unable to parse Neighbors " + e.Message);
                    }
                }
            }
            else if (mapInput[1].Equals("wastelands"))
            {
                Wastelands = new List <Region>();
                for (i = 2; i < mapInput.Length; i++)
                {
                    try
                    {
                        wastelandId = int.Parse(mapInput[i]);
                        Wastelands.Add(FullMap.GetRegion(wastelandId));
                    }
                    catch (Exception e)
                    {
                        Console.Error.WriteLine("Unable to parse wastelands " + e.Message);
                    }
                }
            }
        }