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)
- {
- Player player1 = new Player(1, "owly", 1, false);
- Player player2 = new Player(2, "shadowdemon1999rus_pro", 1, false);
- Player player3 = new Player(3, "vasya_skilluha", 1, false);
- player1.PlayerBan();
- player1.PlayerUnban();
- player3.DeletePlayer(player3);
- }
- }
- 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 Player()
- {
- PlayerNum = 0;
- Nickname = null;
- Level = 0;
- Restrict = false;
- }
- public bool PlayerBan()
- {
- Restrict = true;
- return Restrict;
- }
- public bool PlayerUnban()
- {
- Restrict = false;
- return Restrict;
- }
- public void DeletePlayer(Player tempPlayer)
- {
- tempPlayer = new Player();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement