Пример #1
0
        public void PlaceTile(TileHandler tile)
        {
            if (_tile == null)
            {
                var temp = this.TileGateModel;
                this._tileGateModel = tile._tileGateModel;
                this._tileGateModel.isCertainSouth = temp.isCertainSouth;
                this._tileGateModel.isCertainEast  = temp.isCertainEast;
                this._tileGateModel.isCertainNorth = temp.isCertainNorth;
                this._tileGateModel.isCertainWest  = temp.isCertainWest;

                this._tile = tile._tile;
                IsPlaced   = true;
                Explored   = false;
            }
        }
Пример #2
0
        public TileHandler(int E, int W, int S, int N, bool initialSet)
        {
            TileGateModel _gate = new TileGateModel(N, S, E, W, initialSet);

            this._tileGateModel = _gate;
            if (!initialSet)
            {
                var possibleMatches = _tiles.ToList().FindAll(op => op._tileGateModel.northGate == _tileGateModel.northGate &&
                                                              op._tileGateModel.eastGate == _tileGateModel.eastGate &&
                                                              op._tileGateModel.southGate == _tileGateModel.southGate &&
                                                              op._tileGateModel.westGate == _tileGateModel.westGate).ToList();
                possibleMatches.Shuffle();

                this._tile = possibleMatches[0]._tile;
                IsPlaced   = true;
            }
        }
Пример #3
0
 public TileHandler(TileGateModel gate)
 {
     this._tileGateModel = gate;
     this.IsPlaced       = false;
 }