Update piecelogic.py

Remove redundancy