Ejemplo n.º 1
0
 /// <summary>
 /// Конструктор, заполняющий словарь соответствий направлений и координат
 /// </summary>
 public ItemMover()
 {
     this.managerOfCells    = new CellsManager();
     this.directionToCoords = new Dictionary <MoveDirection, Tuple <int, int> >();
     this.directionToCoords.Add(MoveDirection.Up, new Tuple <int, int>(0, 1));
     this.directionToCoords.Add(MoveDirection.Down, new Tuple <int, int>(0, -1));
     this.directionToCoords.Add(MoveDirection.Left, new Tuple <int, int>(-1, 0));
     this.directionToCoords.Add(MoveDirection.Right, new Tuple <int, int>(1, 0));
     this.directionToCoords.Add(MoveDirection.NoMove, new Tuple <int, int>(0, 0));
 }
Ejemplo n.º 2
0
 private static void Initialize()
 {
     theMapMaker    = new MapMaker();
     GameField      = new List <Cell>();
     managerOfCells = new CellsManager();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Конструктор
 /// </summary>
 public EnemyMover()
 {
     this.managerOfCells = new CellsManager();
     this.moverOfItems   = new ItemMover();
 }