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 RPG
- {
- class Program
- {
- static void Main(string[] args)
- {
- Wojownik Leonidas = new Wojownik("Leonidas",1000,3,4,"Miecz","Pełna Tarcza");
- Mag Geralt = new Mag("Geralt", 1000, 2, 5, 10, "Rzucanie zaklęć");
- do
- {
- double atakGeralta = Geralt.MocAtaku();
- double atakLeonidasa = Leonidas.MocAtaku();
- Geralt.OdejmijZycie(atakLeonidasa);
- Leonidas.OdejmijZycie(atakGeralta);
- Console.WriteLine("Zycie Geralta: {0}", Geralt.punktyZycia);
- Console.WriteLine("Zycie Leonidasa: {0}", Leonidas.punktyZycia);
- }while (Geralt.punktyZycia >0 && Leonidas.punktyZycia >0);
- if(Geralt.punktyZycia > Leonidas.punktyZycia)
- {
- Console.WriteLine("Wygral Geralt!");
- }
- else if (Geralt.punktyZycia < Leonidas.punktyZycia)
- {
- Console.WriteLine("wygrał Leonidas!");
- }
- else
- {
- Console.WriteLine("remis!");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment