Added logic to prevent sliding and non sliding pieces from moving into their own pieces and through pieces