Пример #1
0
        public static void BuildMap(ZoneMap map)
        {
            for (int x = 0; x < map.MapWidth; x++)
            {
                var result = string.Empty;

                for (int y = 0; y < map.MapHeight; y++)
                {
                    var tile = map.GetTile(x, y);
                    if (tile == null)
                    {
                        result += "[ ]";
                    }
                    else
                    {
                        if (tile.OccupyingUnit == Player.Instance.CurrentGladiator)
                        {
                            //change color here somehow
                            result += "[*]";
                        }
                        else
                        {
                            result += $"[{tile.OccupyingUnit.Name[0]}]";
                        }
                    }
                }

                Text.WriteLine(ConsoleSide.Left, x, result);
            }
        }