private void DisplayNextPiece(TetrisPiece oldPiece, TetrisPiece newPiece) { DisplayNextPieceText(); bool arePiecesDifferent = (oldPiece == null && newPiece != null) || (oldPiece != null && newPiece == null) || (oldPiece != null && newPiece != null && !oldPiece.Equals(newPiece)); if (arePiecesDifferent && oldPiece != null) { DeleteNextPiece(oldPiece); } if (arePiecesDifferent && newPiece != null) { Coordinates coord = new Coordinates(NextPieceLine, NextPieceText.Length); PieceRender.Display(newPiece, coord); } }