Advertisement
OwlyOwl

dzdzd123123

Apr 10th, 2020
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 KB | None | 0 0
  1. using System;
  2.  
  3. namespace BazaDannihIgrokov
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Player player1 = new Player(1, "owly", 1, false);
  10.             player1.PlayerBan();
  11.             player1.PlayerUnban();
  12.             player1.DeletePlayer();
  13.         }
  14.     }
  15.  
  16.     class Player
  17.     {
  18.         public int PlayerNum;
  19.         public string Nickname;
  20.         public bool Restrict;
  21.         public int Level;
  22.  
  23.         public Player(int playerNum, string nickname, int level, bool restrict)
  24.         {
  25.             PlayerNum = playerNum;
  26.             Nickname = nickname;
  27.             Level = level;
  28.             Restrict = restrict;
  29.         }
  30.  
  31.         public Player()
  32.         {
  33.             PlayerNum = 0;
  34.             Nickname = null;
  35.             Level = 0;
  36.             Restrict = false;
  37.         }
  38.  
  39.         public bool PlayerBan()
  40.         {
  41.             Restrict = true;
  42.             return Restrict;
  43.         }
  44.  
  45.         public bool PlayerUnban()
  46.         {
  47.             Restrict = false;
  48.             return Restrict;
  49.         }
  50.  
  51.         public void DeletePlayer()
  52.         {
  53.             Player player1 = new Player();
  54.         }
  55.     }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement