Загрузка данных


using System;
using System.Collections.Generic;
using Engine;

namespace Game
{
    public class Handler
    {
        private static void Main()
        {
            WindowCreate();
            Console.SetCursorPosition(0, 21);
            Console.Write("Введите название партии: ");
            Party party = new Party(Console.ReadLine());

            Console.SetCursorPosition(1, 1);
            Console.Write(
                $"Ваша партия:" +
                $"\nНазвание: {party.NameParty}" +
                $"\nПопулярность: {party.Popularity}%" +
                $"\nБюджет: {party.Budget} руб."
            );
        }

        public static void WindowCreate()
        {
            CASH cash = new CASH();
            Window win = new Window(20, 60);
            int height = win.winFrame.GetLength(0);
            int width = win.winFrame.GetLength(1);
            string newLine;

            for (int y = 0; y < height; y++)
            {
                newLine = "";
                for (int x = 0; x < width; x++)
                {
                    if (y == 0 || y == height - 1 || x == 0 || x == width - 1)
                        Console.BackgroundColor = ConsoleColor.Gray;
                    else
                        Console.BackgroundColor = ConsoleColor.DarkRed;
                    Console.Write(win.winFrame[y, x]);
                    newLine += win.winFrame[y, x];
                }
                cash.mapMemory.Add(newLine);
                Console.WriteLine();
            }
            Console.ResetColor();
        }
    }
}

namespace Engine
{
    public class GameWorld
    {
        public int Turn { get; set; }
        public GameWorld()
        {
            Turn = 0;
        }
    }

    public class Party
    {
        public string NameParty { get; set; }
        public double Popularity { get; set; }
        public int MembersCount { get; set; }
        public double Budget { get; set; }

        public Party(string name)
        {
            NameParty = name;
            Popularity = 4.0;
            MembersCount = 10;
            Budget = 30_000_000;
        }
    }

    public class Player
    {
        public string NamePlayer { get; set; }
        public Player(string name)
        {
            NamePlayer = name;
        }
    }

    public class Window
    {
        public char[,] winFrame { get; set; }

        public Window(int height, int width)
        {
            winFrame = new char[height, width];

            for (int h = 0; h < height; h++)
            {
                for (int w = 0; w < width; w++)
                {
                    winFrame[h, w] = ' ';
                }
            }
        }
    }

    public class CASH
    {
        public List<string> mapMemory = new List<string>();
    }
}