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; } }
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; } }
public TileHandler(TileGateModel gate) { this._tileGateModel = gate; this.IsPlaced = false; }