Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Dynamic;
- namespace PlayerDataBase
- {
- class Program
- {
- static void Main(string[] args)
- {
- }
- class Player
- {
- public string Nickname { get; private set; }
- private int _playerNum;
- protected bool _restriction;
- private int _level;
- public Player(int playerNum, string nickname, int level, bool restriction)
- {
- _playerNum = playerNum;
- Nickname = nickname;
- _level = level;
- _restriction = restriction;
- }
- protected void BanPlayer(List<Player> players, int playerNumber)
- {
- players[playerNumber]._restriction = true;
- }
- protected void UnbanPlayer(List<Player> players, int playerNumber)
- {
- players[playerNumber]._restriction = false;
- }
- }
- class PlayerList
- {
- List<Player> Players = new List<Player>();
- public PlayerList(List<Player> players)
- {
- Players = players;
- }
- private void AddPlayer(List<Player> playerList, int playerNum, string nickname, int level, bool restriction)
- {
- Player newPlayer = new Player(playerNum, nickname, level, restriction);
- playerList.Add(newPlayer);
- }
- private void RemovePlayer(int playerNumber, List<Player> playerList)
- {
- playerList.RemoveAt(playerNumber + 1);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement