static void Main(string[] args)
        {
            Unit mu = new MilitaryUnit(2, 100, 50);
            Unit su = new SettlerUnit(5, 25);

            mu.Move(new Vector2(2, -7));
            su.Move(new Vector2(-1, 4));

            Console.WriteLine(mu);
            Console.WriteLine(su);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Random rnd = new Random();

            int movement = rnd.Next();

            Unit u1 = new MilitaryUnit(movement);
            Unit u2 = new SettlerUnit(movement);

            u1.Move();
            Console.WriteLine("Health = " + u1.Health + " Value = " + u1.Value);
            Console.WriteLine();
            u2.Move();
            Console.WriteLine("Health = " + u2.Health + " Value = " + u2.Value);
        }