public void RecvSearchedMessage(int srcId, int searchTileId) { SearchTile tile = this.FindTileWithId(this.claimedTiles, searchTileId); if (tile != null) { // if (!WorldStateManager.IsSearched (tile)) { Debug.Log ("ERROR : Received Search Message for something that the World State hasn't had searched yet... But you think is claimed"); } tile.SetAsSearched(); this.MoveTile(tile, this.claimedTiles, this.searchedTiles); return; } tile = this.FindTileWithId(this.tilesInAuction, searchTileId); if (tile != null) { // if (!WorldStateManager.IsSearched (tile)) { Debug.Log ("ERROR : Received Search Message for something that the World State hasn't had searched yet... But you think is in auction"); } tile.SetAsSearched(); this.MoveTile(tile, this.tilesInAuction, this.searchedTiles); return; } tile = this.FindTileWithId(this.openTiles, searchTileId); if (tile != null) { // if (!WorldStateManager.IsSearched (tile)) { Debug.Log ("ERROR : Received Search Message for something that the World State hasn't had searched yet... But you think is open"); } tile.SetAsSearched(); this.MoveTile(tile, this.openTiles, this.searchedTiles); return; } }
public void MarkTileAsSearched(SearchTile tile) { tile.SetAsSearched(); if (this.claimedTiles.Contains(tile)) { this.MoveTile(tile, this.claimedTiles, this.searchedTiles); } else if (this.tilesInAuction.Contains(tile)) { this.MoveTile(tile, this.tilesInAuction, this.searchedTiles); } else if (this.openTiles.Contains(tile)) { this.MoveTile(tile, this.openTiles, this.searchedTiles); } }