generalized swap to arbitrary piece shapes (hopefully)