Beispiel #1
0
        public Zabawka(int szybkosc, int wysokosc, int glebokosc, int wiek, Wartosc wartoscBazowa)
        {
            this.szybkosc  = szybkosc;
            this.wysokosc  = wysokosc;
            this.glebokosc = glebokosc;

            this.wiek = wiek;

            this.wartoscBazowa = wartoscBazowa;
        }
Beispiel #2
0
        private static void test3(ToyRoom toyRoom)
        {
            Wartosc wartosc = new Wartosc(3, 5);
            FlyingToy samolot = new FlyingToy(2, 3, 5, wartosc);

            for(int i = 0; i < 10; i++)
            {
                toyRoom.dodajZabawke(samolot);

            }
            toyRoom.wyswietlPokoj();
            toyRoom.changeSpeedForAll(50);

            Console.WriteLine("Koniec testu 3");
            Console.WriteLine("---------------------------------");
        }
Beispiel #3
0
        private static void test2(ToyRoom toyRoom)
        {
            Wartosc wartosc = new Wartosc(3, 5);

            FlyingToy samolot = new FlyingToy(3, 5, 10, wartosc);

            for (int i = 0; i < 10; i++)
            {
                toyRoom.dodajZabawke(samolot);
            }

            toyRoom.wyswietlPokoj();

            Console.WriteLine("Wartosc aktualna zabawki: " + samolot.WartoscAktualna);

            Console.WriteLine("Koniec testu 2");
            Console.WriteLine("---------------------------------");
        }
Beispiel #4
0
        private static void test1(ToyRoom toyRoom)
        {
            Wartosc wartosc = new Wartosc(1, 4);

            FlyingToy samolot = new FlyingToy(3, 5, 10, wartosc);
            WaterToy zaglowka = new WaterToy(9, 1, wartosc);
            GroundToy mis = new GroundToy(50, wartosc);
            //samolot.showToyInfo();

            toyRoom.dodajZabawke(samolot);
            toyRoom.dodajZabawke(zaglowka);
            //pokojZabawek.dodajZabawke(mis);

            toyRoom.wyswietlPokoj();

            toyRoom.changeDepthForAll(666);
            toyRoom.wyswietlPokoj();

            Console.WriteLine("Koniec testu 1");
            Console.WriteLine("---------------------------------");
        }
Beispiel #5
0
 public Toy(int age, Wartosc wartoscBazowa)
 {
     this.age           = age;
     this.wartoscBazowa = wartoscBazowa;
 }
Beispiel #6
0
 public GroundToy(int age, Wartosc value) : base(age, value)
 {
 }
Beispiel #7
0
 public FlyingToy(int speed, int height, int age, Wartosc value) : base(age, value)
 {
     this.speed  = speed;
     this.height = height;
 }
Beispiel #8
0
 public WaterToy(int depth, int age, Wartosc value) : base(age, value)
 {
     this.depth = depth;
 }