예제 #1
0
        public Controller()
        {
            this.gunRepository    = new GunRepository();
            this.playerRepository = new PlayerRepository();

            this.gangNeighbourhood = new GangNeighbourhood();
        }
예제 #2
0
 public Controller()
 {
     this.gun    = new GunRepository();
     this.player = new PlayerRepository();
     this.map    = new Map();
     this.sb     = new StringBuilder();
 }
예제 #3
0
 public Controller()
 {
     this.PlayersList       = new List <IPlayer>();
     this.gunRepository     = new GunRepository();
     this.mainPlayer        = new MainPlayer();
     this.gangNeighbourhood = new GangNeighbourhood();
 }
예제 #4
0
 public Controller()
 {
     this.players = new List <IPlayer>();
     this.players.Add(new MainPlayer());
     this.gunRepository     = new GunRepository();
     this.gangNeighbourhood = new GangNeighbourhood();
 }
예제 #5
0
 public Controller()
 {
     mainPlayer             = new MainPlayer();
     this.gunRepository     = new GunRepository();
     this.civilPlayers      = new List <Player>();
     this.gangNeighbourhood = new GangNeighbourhood();
 }
예제 #6
0
        protected Player(string name, int lifePoints)
        {
            this.Name       = name;
            this.LifePoints = lifePoints;

            this.gunRepository = new GunRepository();
        }
예제 #7
0
 public Controller()
 {
     this.gunRepository = new GunRepository(
         );
     this.playerRepository = new PlayerRepository();
     this.map = new Map();
 }
예제 #8
0
 public Controller()
 {
     this.civilPlayers  = new List <IPlayer>();
     this.guns          = new GunRepository();
     this.mainPlayer    = new MainPlayer();
     this.neighbourhood = new Neighbourhood();
 }
예제 #9
0
 public Controller()
 {
     this.player   = new MainPlayer();
     gunRepository = new GunRepository();
     players       = new List <IPlayer>();
     neighbourhood = new GangNeighbourhood();
 }
예제 #10
0
 public Controller()
 {
     mainPlayer    = new MainPlayer();
     civilPlayers  = new List <IPlayer>();
     gunRepository = new GunRepository();
     deadPlayers   = new List <IPlayer>();
     neighbourhood = new GangNeighbourhood();
 }
예제 #11
0
        public Controller()
        {
            this.livePlayers = new List <IPlayer>();

            this.guns    = new GunRepository();
            this.players = new PlayerRepository();
            this.map     = new Map();
        }
예제 #12
0
        public Controller()
        {
            IPlayer mainPlayer = new MainPlayer();

            this.players        = new List <IPlayer>();
            this.gunsRepository = new GunRepository();
            this.neighbourhood  = new GangNeighbourhood();
            this.players.Add(mainPlayer);
        }
예제 #13
0
        public Controller()
        {
            this.mainPlayer = new MainPlayer();

            this.mainPlayer.GunRepository = new GunRepository();

            this.gunRepository     = new GunRepository();
            this.gangNeighbourhood = new GangNeighbourhood();
            this.players           = new List <IPlayer>();
            this.guns = new Queue <IGun>();
        }
예제 #14
0
        //----------- Constructors ------------
        //GunRepository<IGun> gunRepository, GunFactory gunFactory, INeighbourhood neighbourhood
        public Controller()
        {
            this.gunRepository = new GunRepository <IGun>();
            this.gunFactory    = new GunFactory();
            this.neighbourhood = new GangNeighbourhood();

            this.mainPlayer = new MainPlayer();
            this.players    = new Dictionary <string, IPlayer>();

            this.gunQueue = new Queue <IGun>();
        }
예제 #15
0
        public Engine()
        {
            this.reader = new Reader();
            this.writer = new Writer();

            this.gunRepository = new GunRepository <IGun>();
            this.gunFactory    = new GunFactory();
            this.neighbourhood = new GangNeighbourhood();

            //gunRepository, gunFactory, neighbourhood
            this.controller = new Controller();
        }
예제 #16
0
        public string AddGun(string type, string name, int bulletsCount)
        {
            sb.Clear();
            if (type != "Pistol" && type != "Rifle")
            {
                throw new ArgumentException("Invalid gun type.");
            }
            IGun gun = null;

            if (type == "Pistol")
            {
                gun = new Pistol(name, bulletsCount);
            }
            else if (type == "Rifle")
            {
                gun = new Rifle(name, bulletsCount);
            }
            this.gun.Add(gun);
            sb.Append($"Successfully added gun {gun.Name}.");
            return(sb.ToString().TrimEnd());
        }
예제 #17
0
 public SimpleGuns(GunRepository repository, Validator validator, IdGenerator idGenerator)
 {
     this.repository  = repository;
     this.validator   = validator;
     this.idGenerator = idGenerator;
 }
예제 #18
0
 public Player(string name, int lifePoints)
 {
     Name          = name;
     LifePoints    = lifePoints;
     GunRepository = new GunRepository();
 }
예제 #19
0
 public Player(string name, int lifePoints)
 {
     this.Name       = name;
     this.LifePoints = lifePoints;
     gunRepository   = new GunRepository();
 }
예제 #20
0
 public Controller()
 {
     gunRepository    = new GunRepository();
     playerRepository = new PlayerRepository();
     map = new Map();
 }
예제 #21
0
 public Controller()
 {
     _guns    = new GunRepository();
     _players = new PlayerRepository();
     _game    = new Map();
 }
예제 #22
0
 public Controller()
 {
     gunRepo      = new GunRepository();
     civilPlayers = new List <IPlayer>();
 }
예제 #23
0
 public GunDAO()
 {
     repoGuns = GunRepository.Instance;
 }
예제 #24
0
 public Controller()
 {
     this.players       = new List <IPlayer>();
     this.gunRepository = new GunRepository();
 }
예제 #25
0
 public CachedGunRepository(GunRepository origin)
 {
     this.origin = origin;
     cachedGuns  = new Dictionary <string, Gun>();
 }