Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace PlayerDataBase
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<Player> playerList = new List<Player>();
- }
- class Player
- {
- public int PlayerNum;
- public string Nickname;
- public bool Restriction;
- public int Level;
- public Player(int playerNum, string nickname, int level, bool restriction)
- {
- PlayerNum = playerNum;
- Nickname = nickname;
- Level = level;
- Restriction = restriction;
- }
- 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 BanPlayer(int playerNumber, List<Player> playerList)
- {
- playerList[playerNumber - 1].Restriction = true;
- }
- private void UnbanPlayer(int playerNumber, List<Player> playerList)
- {
- playerList[playerNumber - 1].Restriction = false;
- }
- private void RemovePlayer(int playerNumber, List<Player> playerList)
- {
- playerList.RemoveAt(playerNumber + 1);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement