2014-08-16 20:28:07 +03:00
|
|
|
package com.iluwatar;
|
|
|
|
|
2014-08-31 10:23:14 +03:00
|
|
|
/**
|
2014-10-08 13:42:12 +01:00
|
|
|
*
|
2014-10-07 16:23:37 +01:00
|
|
|
* Proxy (WizardTowerProxy) controls access to the actual object (WizardTower).
|
2014-10-08 13:42:12 +01:00
|
|
|
*
|
2014-08-31 10:23:14 +03:00
|
|
|
*/
|
2014-10-07 16:23:37 +01:00
|
|
|
public class App {
|
|
|
|
|
2014-10-08 13:42:12 +01:00
|
|
|
public static void main(String[] args) {
|
2014-10-07 16:23:37 +01:00
|
|
|
|
2014-10-08 13:42:12 +01:00
|
|
|
WizardTowerProxy tower = new WizardTowerProxy();
|
|
|
|
tower.enter(new Wizard("Red wizard"));
|
|
|
|
tower.enter(new Wizard("White wizard"));
|
|
|
|
tower.enter(new Wizard("Black wizard"));
|
|
|
|
tower.enter(new Wizard("Green wizard"));
|
|
|
|
tower.enter(new Wizard("Brown wizard"));
|
2014-08-16 20:28:07 +03:00
|
|
|
|
2014-10-08 13:42:12 +01:00
|
|
|
}
|
2014-08-16 20:28:07 +03:00
|
|
|
}
|