//TODO: this is really pretty terrible private void RemoveExcessTiles() { while (m_tiles.Count > m_maxTiles) { IVector3 position = m_tiles[0].center; // Remove tile 0 and unlink it from neighbors for (int i = 1; i < m_tiles.Count; i++) { SelectionTile tmp = m_tiles[i]; tmp.RemoveNeighbor(position); m_tiles[i] = tmp; } m_tiles.RemoveAt(0); } }