示例#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();
        }
        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>();
 }