Exemple #1
0
        private static void Main(string[] args)
        {
            var godPlayer = new PlayerWithSelfHealing(new King("Arthur", new Position(2, 4)));

            Status(godPlayer);

            godPlayer.GetHit(new HitResult(new Farmer("Farmer", new Position(4, 4)), new Axe(3)));

            Status(godPlayer);

            Console.WriteLine("Do self healing!!!");
            godPlayer.SelfHealing();

            Status(godPlayer);

            Console.ReadKey();
        }
Exemple #2
0
 private static void Status(PlayerWithSelfHealing godPlayer)
 {
     Console.WriteLine(godPlayer.ToString());
 }