@@ -668,7 +668,7 @@ private void rebuildRotationOverview(PieceType pieceType) {
668668 final int rotationIndex = i ;
669669 final Piece .Rotation rotation = pieceType .rotationSet .get (i );
670670 String prefix = (rotationIndex == selectedRotationIndex ) ? "> " : "" ;
671- TextButton button = new TextButton (prefix + "R" + rotationIndex + " (" + getFilledCellCount (rotation ) + ")" , engine .uiSkin );
671+ TextButton button = new TextButton (prefix + "R" + rotationIndex + " (" + getFilledCellCount (rotation ) + ", " + getRotationBoundingBox ( rotation ) + " )" , engine .uiSkin );
672672 button .addListener (new ClickListener () {
673673 @ Override
674674 public void clicked (InputEvent event , float x , float y ) {
@@ -687,6 +687,40 @@ private int getFilledCellCount(Piece.Rotation rotation) {
687687 return rotation == null ? 0 : rotation .blockOffsets .size ();
688688 }
689689
690+ private String getRotationSignature (Piece .Rotation rotation ) {
691+ if (rotation == null ) return "empty" ;
692+ java .util .ArrayList <String > coords = new java .util .ArrayList <String >();
693+ for (Piece .BlockOffset offset : rotation .blockOffsets ) {
694+ coords .add (offset .x + "," + offset .y );
695+ }
696+ java .util .Collections .sort (coords );
697+ return String .join ("|" , coords );
698+ }
699+
700+ private String getRotationBoundingBox (Piece .Rotation rotation ) {
701+ if (rotation == null || rotation .blockOffsets .isEmpty ()) return "0x0" ;
702+ int minX = Integer .MAX_VALUE ;
703+ int maxX = Integer .MIN_VALUE ;
704+ int minY = Integer .MAX_VALUE ;
705+ int maxY = Integer .MIN_VALUE ;
706+ for (Piece .BlockOffset offset : rotation .blockOffsets ) {
707+ minX = Math .min (minX , offset .x );
708+ maxX = Math .max (maxX , offset .x );
709+ minY = Math .min (minY , offset .y );
710+ maxY = Math .max (maxY , offset .y );
711+ }
712+ return (maxX - minX + 1 ) + "x" + (maxY - minY + 1 );
713+ }
714+
715+ private int getUniqueRotationCount (PieceType pieceType ) {
716+ if (pieceType == null || pieceType .rotationSet == null ) return 0 ;
717+ java .util .HashSet <String > signatures = new java .util .HashSet <String >();
718+ for (int i = 0 ; i < pieceType .rotationSet .size (); i ++) {
719+ signatures .add (getRotationSignature (pieceType .rotationSet .get (i )));
720+ }
721+ return signatures .size ();
722+ }
723+
690724 private void applyRuleCheckboxes () {
691725 currentGameType .moveDownAllLinesOverBlankSpacesAtOnce = cascadeGravityCheckbox .isChecked ();
692726 currentGameType .gravityRule_onlyMoveDownDisconnectedBlocks = disconnectedGravityCheckbox .isChecked ();
@@ -774,13 +808,17 @@ private void refreshEditorState() {
774808 }
775809
776810 int currentRotationCount = pieceType != null && pieceType .rotationSet != null ? pieceType .rotationSet .size () : 0 ;
811+ int uniqueRotationCount = getUniqueRotationCount (pieceType );
812+ int duplicateRotationCount = Math .max (0 , currentRotationCount - uniqueRotationCount );
777813 summaryLabel .setText (
778814 "Mode: " + currentGameType .gameMode
779815 + " | Grid: " + currentGameType .gridWidth + "x" + currentGameType .gridHeight
780816 + " | Pieces: " + currentGameType .pieceTypes .size ()
781817 + " | Rotations: " + getTotalRotationCount ()
782818 + " | Current piece rotations: " + currentRotationCount
783819 + " | Filled cells in current rotation: " + getFilledCellCount (rotation )
820+ + " | Current bbox: " + getRotationBoundingBox (rotation )
821+ + " | Unique/duplicate rotations: " + uniqueRotationCount + "/" + duplicateRotationCount
784822 + " | Rules: " + getEnabledRuleSummary ()
785823 );
786824 }
0 commit comments