Moved logic of PieceOptButton to another class to keep away from gui