added code to prevent taking your own piece