Added way to check if two pieces have a common attribute