Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- internal class Program
- {
- static void Main(string[] args)
- {
- Player player = new Player("Роман", 100, 5);
- player.ShowInfo();
- }
- class Player
- {
- private string _name;
- private int _healhs;
- private int _damage;
- public Player(string name, int healhs, int damage)
- {
- _name = name;
- _healhs = healhs;
- _damage = damage;
- }
- public void ShowInfo()
- {
- Console.WriteLine($"Имя - {_name}\nЗдоровье - {_healhs}\nУрон - {_damage}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement