示例#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));
 }
示例#2
0
文件: Game.cs 项目: Sairen/PacMan
 private static void Initialize()
 {
     theMapMaker    = new MapMaker();
     GameField      = new List <Cell>();
     managerOfCells = new CellsManager();
 }
示例#3
0
 /// <summary>
 /// Конструктор
 /// </summary>
 public EnemyMover()
 {
     this.managerOfCells = new CellsManager();
     this.moverOfItems   = new ItemMover();
 }