Add pinned piece detection