Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //05. Character Stats
- string name = Console.ReadLine();
- int currentHealth = int.Parse(Console.ReadLine());
- int maxHealth = int.Parse(Console.ReadLine());
- int currentEnergy = int.Parse(Console.ReadLine());
- int maxEnergy = int.Parse(Console.ReadLine());
- int dotsHealth = maxHealth - currentHealth;
- int dotsEnergy = maxEnergy - currentEnergy;
- string health = "|" + new string('|', currentHealth) + new string('.', dotsHealth) + "|";
- string energy = "|" + new string('|', currentEnergy) + new string('.', dotsEnergy) + "|";
- Console.WriteLine($"Name: {name}");
- Console.WriteLine($"Health: {health}");
- Console.WriteLine($"Energy: {energy}");
Advertisement
Add Comment
Please, Sign In to add comment