コード例 #1
0
ファイル: Program.cs プロジェクト: FiammaV/AulasLP2
        static void Main(string[] args)
        {
            FNPlayer p1 = new FNPlayer();
            FNPlayer p2 = new FNPlayer(100, 50);

            Console.WriteLine("P2's health before: " + p2.GetHealth());
            p1.Attack(p2);
            Console.WriteLine("P2's health after: " + p2.GetHealth());
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: Insoel/LP2Aulas
        static void Main(string[] args)
        {
            FNPlayer player1 = new FNPlayer();
            FNPlayer player2 = new FNPlayer("MachineGun", 100, 100);

            Console.WriteLine("Shield before: " + player2.GetShield());
            player1.Attack(player2);
            Console.WriteLine("Shield after: " + player2.GetShield());

            Console.WriteLine("Shield before: " + player1.GetShield());
            player1.SetShield(50);
            Console.WriteLine("Shield after: " + player1.GetShield());
        }
コード例 #3
0
        static void Main(string[] args)
        {
            FNPlayer player  = new FNPlayer();
            FNPlayer player2 = new FNPlayer(100, 50);

            Console.WriteLine("HP" + player.GetHealth());
            Console.WriteLine("HP" + player2.GetHealth());

            player.Attack(player2);

            Console.WriteLine("HP" + player.GetHealth());
            Console.WriteLine("HP" + player2.GetHealth());
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: AndreRosa22/LP2Aulas
        static void Main(string[] args)
        {
            FNPlayer player1 = new FNPlayer();
            FNPlayer player2 = new FNPlayer("MachineGun", 100, 100);

            Console.WriteLine("P2 Shield Before: " + player2.GetShield());
            Console.WriteLine("P2 HP Before: " + player2.GetShield());

            player1.Attack(player2);
            Console.WriteLine();
            Console.WriteLine("****************");
            Console.WriteLine("*P1 PICKAXED P2*");
            Console.WriteLine("****************");
            Console.WriteLine();

            Console.WriteLine("P2 Shield after: " + player2.GetShield());
            Console.WriteLine("P2 HP after: " + player2.GetShield());

            Console.WriteLine();
            Console.WriteLine("P1 Shield after: " + player1.GetShield());
            player1.SetShield(50);
            Console.WriteLine("P2 Shield after: " + player1.GetShield());
        }