Пример #1
0
 public Engine(IDisplay display, /*IMainMenu menu, */ IMap map, IPlayerTank playerTank, IEnvironmentFactory environmentFactory, ICollision collision, IKeyboardWraper keyboard, IGameTimer timer, IGameSettings gameSettings, IData data)
 {
     //this.menu = menu;
     this.map                = map ?? throw new NoMapException();
     this.playerTank         = playerTank ?? throw new ArgumentNullException();
     this.environmentFactory = environmentFactory ?? throw new ArgumentNullException();
     this.collision          = collision ?? throw new ArgumentNullException();
     this.keyboard           = keyboard ?? throw new ArgumentNullException();
     this.timer              = timer ?? throw new ArgumentNullException();
     this.gameSettings       = gameSettings ?? throw new ArgumentNullException();
     this.data               = data;
     this.display            = display ?? throw new ArgumentNullException();
 }
Пример #2
0
 public EnemyTank(int row, int col, Direction direction, IMap map, IPlayerTank playerTank, IEnvironmentFactory environmentFactory, ICollision collision, IGameTimer gameTimer) : base(row, col, direction, map, environmentFactory, collision)
 {
     this.Color      = ConsoleColor.Red;
     this.playerTank = playerTank;
     this.gameTimer  = gameTimer ?? throw new ArgumentNullException();
 }