Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CSharpLightTask
- {
- class Program
- {
- static void Main(string[] args)
- {
- Player player = new Player(20, 10, 45);
- player.ShowStats();
- }
- class Player
- {
- public int Health;
- public int Agility;
- public int Power;
- public int Damage;
- public Player(int agility, int power, int damage)
- {
- Health = 100;
- Agility = agility;
- Power = power;
- Damage = damage;
- }
- public void ShowStats()
- {
- Console.WriteLine("Здоровье персонажа - " + Health + "\nЛовкость персонажа - " + Agility +
- "\nСила персонажа - " + Power + "\nУрон персонажа - " + Damage);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement