Exemple #1
0
 public Controller()
 {
     this.civilPlayers  = new List <IPlayer>();
     this.gunFactory    = new GunFactory();
     this.guns          = new List <IGun>();
     this.mainPlayer    = new MainPlayer();
     this.neighbourhood = new GangNeighbourhood();
 }
Exemple #2
0
 public Controller()
 {
     mainPlayer     = new MainPlayer();
     _gunFactory    = new GunFactory();
     guns           = new Queue <IGun>();
     civilPlayers   = new List <IPlayer>();
     _neighbourhood = new GangNeighbourhood();
 }
        public Controller(
            IPlayer mainPlayer,
            INeighbourhood neighbourhood,
            IGunFactory gunFactory)
        {
            this.mainPlayer    = mainPlayer;
            this.neighbourhood = neighbourhood;
            this.gunFactory    = gunFactory;

            this.civilPlayers = new List <IPlayer>();
            this.guns         = new Queue <IGun>();
        }
 public GunFactory(GunRequirements requirements)
 {
     _factory      = requirements.Size ? (IGunFactory) new PistolFactory() : new RifleFactory();
     _requirements = requirements;
 }
Exemple #5
0
 public PlayerSetup(IGunFactory gunFactory)
 {
     this.gunFactory = gunFactory;
 }