Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace BazaDannihIgrokov
- {
- class Program
- {
- static void Main(string[] args)
- {
- bool isOpen = true;
- while (isOpen)
- {
- Console.WriteLine("База данных игроков");
- Console.WriteLine("\nДобавить игрока - 1\nЗабанить игрока - 2\nРазбанить игрока - 3\nExit -4");
- int input = Convert.ToInt32(Console.ReadLine());
- switch (input)
- {
- case 1:
- Player.CreatePlayer();
- break;
- case 2:
- Console.WriteLine("Введи номер игрока:");
- break;
- case 3:
- Console.WriteLine("Введи номер игрока:");
- break;
- case 4:
- isOpen = false;
- break;
- }
- }
- }
- }
- class Player
- {
- public int PlayerNum;
- public string Nickname;
- public bool Restrict;
- public int Level;
- public Player(int playerNum, string nickname, int level, bool restrict)
- {
- PlayerNum = playerNum;
- Nickname = nickname;
- Level = level;
- Restrict = restrict;
- }
- public static void CreatePlayer()
- {
- int userNum = 1;
- Console.WriteLine("Введи имя:");
- string userInput = Convert.ToString(Console.ReadLine());
- Player player1 = new Player(userNum, userInput, 1, false);
- userNum++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement