// Path: core/src/dev/lonami/klooni/actors/Band.java
// public class Band extends Actor {
// 
//     //region Members
// 
//     private final BaseScorer scorer;
//     private final Texture bandTexture;
// 
//     public final Rectangle scoreBounds;
//     public final Rectangle infoBounds;
// 
//     private final Label infoLabel;
//     private final Label scoreLabel;
// 
//     //endregion
// 
//     //region Constructor
// 
//     public Band(final Klooni game, final GameLayout layout, final BaseScorer scorer) {
//         this.scorer = scorer;
//         bandTexture = Theme.getBlankTexture();
// 
//         Label.LabelStyle labelStyle = new Label.LabelStyle();
//         labelStyle.font = game.skin.getFont("font");
// 
//         scoreLabel = new Label("", labelStyle);
//         scoreLabel.setAlignment(Align.center);
//         infoLabel = new Label("pause menu", labelStyle);
//         infoLabel.setAlignment(Align.center);
// 
//         scoreBounds = new Rectangle();
//         infoBounds = new Rectangle();
//         layout.update(this);
//     }
// 
//     //endregion
// 
//     //region Public methods
// 
//     @Override
//     public void draw(Batch batch, float parentAlpha) {
//         // TODO This is not the best way to apply the transformation, but, oh well
//         float x = getParent().getX();
//         float y = getParent().getY();
// 
//         // TODO For some strange reason, the texture coordinates and label coordinates are different
//         Vector2 pos = localToStageCoordinates(new Vector2(x, y));
//         batch.setColor(Klooni.theme.bandColor);
//         batch.draw(bandTexture, pos.x, pos.y, getWidth(), getHeight());
// 
//         scoreLabel.setBounds(x + scoreBounds.x, y + scoreBounds.y, scoreBounds.width, scoreBounds.height);
//         scoreLabel.setText(Integer.toString(scorer.getCurrentScore()));
//         scoreLabel.setColor(Klooni.theme.textColor);
//         scoreLabel.draw(batch, parentAlpha);
// 
//         infoLabel.setBounds(x + infoBounds.x, y + infoBounds.y, infoBounds.width, infoBounds.height);
//         infoLabel.setColor(Klooni.theme.textColor);
//         infoLabel.draw(batch, parentAlpha);
//     }
// 
//     // Once game over is set on the menu, it cannot be reverted
//     public void setMessage(final String message) {
//         if (!message.equals(""))
//             infoLabel.setText(message);
//     }
// 
//     //endregion
// }
// 
// Path: core/src/dev/lonami/klooni/actors/ShopCard.java
// public abstract class ShopCard extends Actor {
// 
//     final Klooni game;
// 
//     private final Label nameLabel;
//     final Label priceLabel;
// 
//     public final Rectangle nameBounds;
//     public final Rectangle priceBounds;
// 
//     public float cellSize;
// 
//     ShopCard(final Klooni game, final GameLayout layout,
//              final String itemName, final Color backgroundColor) {
//         this.game = game;
//         Label.LabelStyle labelStyle = new Label.LabelStyle();
//         labelStyle.font = game.skin.getFont("font_small");
// 
//         priceLabel = new Label("", labelStyle);
//         nameLabel = new Label(itemName, labelStyle);
// 
//         Color labelColor = Theme.shouldUseWhite(backgroundColor) ? Color.WHITE : Color.BLACK;
//         priceLabel.setColor(labelColor);
//         nameLabel.setColor(labelColor);
// 
//         priceBounds = new Rectangle();
//         nameBounds = new Rectangle();
// 
//         layout.update(this);
//     }
// 
//     @Override
//     public void draw(Batch batch, float parentAlpha) {
//         super.draw(batch, parentAlpha);
// 
//         final float x = getX(), y = getY();
//         nameLabel.setBounds(x + nameBounds.x, y + nameBounds.y, nameBounds.width, nameBounds.height);
//         nameLabel.draw(batch, parentAlpha);
// 
//         priceLabel.setBounds(x + priceBounds.x, y + priceBounds.y, priceBounds.width, priceBounds.height);
//         priceLabel.draw(batch, parentAlpha);
//     }
// 
//     // Showcases the current effect (the shop will be showcasing them, one by one)
//     // This method should be called on the same card as long as it returns true.
//     // It should return false once it's done so that the next card can be showcased.
//     public boolean showcase(Batch batch, float yDisplacement) {
//         return false;
//     }
// 
//     public abstract void usedItemUpdated();
// 
//     public abstract void use();
// 
//     public abstract boolean isBought();
// 
//     public abstract boolean isUsed();
// 
//     public abstract float getPrice();
// 
//     public abstract void performBuy();
// }


import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import dev.lonami.klooni.actors.Band;
import dev.lonami.klooni.actors.ShopCard;

    void update(PieceHolder holder) {
        holder.area.set(
                marginWidth, 0f,
                availableWidth, pieceHolderHeight);
    }

    public void update(Band band) {
        final Rectangle area = new Rectangle(
                0, pieceHolderHeight + boardHeight,
                screenWidth, scoreHeight);

        band.setBounds(area.x, area.y, area.width, area.height);
        // Let the band have the following shape:
        // 10% (100) padding
        // 35% (90%) score label
        // 10% (55%) padding
        // 35% (45%) info label
        // 10% (10%) padding
        band.scoreBounds.set(area.x, area.y + area.height * 0.55f, area.width, area.height * 0.35f);
        band.infoBounds.set(area.x, area.y + area.height * 0.10f, area.width, area.height * 0.35f);
    }

    @SuppressWarnings("SuspiciousNameCombination")
    public void update(ShopCard card) {
        card.setSize(availableWidth - marginWidth, shopCardHeight);
        card.cellSize = shopCardHeight * 0.2f;

        // X offset from the cells (5 cells = shopCardHeight)
        card.nameBounds.set(
// Path: core/src/dev/lonami/klooni/actors/Band.java
// public class Band extends Actor {
// 
//     //region Members
// 
//     private final BaseScorer scorer;
//     private final Texture bandTexture;
// 
//     public final Rectangle scoreBounds;
//     public final Rectangle infoBounds;
// 
//     private final Label infoLabel;
//     private final Label scoreLabel;
// 
//     //endregion
// 
//     //region Constructor
// 
//     public Band(final Klooni game, final GameLayout layout, final BaseScorer scorer) {
//         this.scorer = scorer;
//         bandTexture = Theme.getBlankTexture();
// 
//         Label.LabelStyle labelStyle = new Label.LabelStyle();
//         labelStyle.font = game.skin.getFont("font");
// 
//         scoreLabel = new Label("", labelStyle);
//         scoreLabel.setAlignment(Align.center);
//         infoLabel = new Label("pause menu", labelStyle);
//         infoLabel.setAlignment(Align.center);
// 
//         scoreBounds = new Rectangle();
//         infoBounds = new Rectangle();
//         layout.update(this);
//     }
// 
//     //endregion
// 
//     //region Public methods
// 
//     @Override
//     public void draw(Batch batch, float parentAlpha) {
//         // TODO This is not the best way to apply the transformation, but, oh well
//         float x = getParent().getX();
//         float y = getParent().getY();
// 
//         // TODO For some strange reason, the texture coordinates and label coordinates are different
//         Vector2 pos = localToStageCoordinates(new Vector2(x, y));
//         batch.setColor(Klooni.theme.bandColor);
//         batch.draw(bandTexture, pos.x, pos.y, getWidth(), getHeight());
// 
//         scoreLabel.setBounds(x + scoreBounds.x, y + scoreBounds.y, scoreBounds.width, scoreBounds.height);
//         scoreLabel.setText(Integer.toString(scorer.getCurrentScore()));
//         scoreLabel.setColor(Klooni.theme.textColor);
//         scoreLabel.draw(batch, parentAlpha);
// 
//         infoLabel.setBounds(x + infoBounds.x, y + infoBounds.y, infoBounds.width, infoBounds.height);
//         infoLabel.setColor(Klooni.theme.textColor);
//         infoLabel.draw(batch, parentAlpha);
//     }
// 
//     // Once game over is set on the menu, it cannot be reverted
//     public void setMessage(final String message) {
//         if (!message.equals(""))
//             infoLabel.setText(message);
//     }
// 
//     //endregion
// }
// 
// Path: core/src/dev/lonami/klooni/actors/ShopCard.java
// public abstract class ShopCard extends Actor {
// 
//     final Klooni game;
// 
//     private final Label nameLabel;
//     final Label priceLabel;
// 
//     public final Rectangle nameBounds;
//     public final Rectangle priceBounds;
// 
//     public float cellSize;
// 
//     ShopCard(final Klooni game, final GameLayout layout,
//              final String itemName, final Color backgroundColor) {
//         this.game = game;
//         Label.LabelStyle labelStyle = new Label.LabelStyle();
//         labelStyle.font = game.skin.getFont("font_small");
// 
//         priceLabel = new Label("", labelStyle);
//         nameLabel = new Label(itemName, labelStyle);
// 
//         Color labelColor = Theme.shouldUseWhite(backgroundColor) ? Color.WHITE : Color.BLACK;
//         priceLabel.setColor(labelColor);
//         nameLabel.setColor(labelColor);
// 
//         priceBounds = new Rectangle();
//         nameBounds = new Rectangle();
// 
//         layout.update(this);
//     }
// 
//     @Override
//     public void draw(Batch batch, float parentAlpha) {
//         super.draw(batch, parentAlpha);
// 
//         final float x = getX(), y = getY();
//         nameLabel.setBounds(x + nameBounds.x, y + nameBounds.y, nameBounds.width, nameBounds.height);
//         nameLabel.draw(batch, parentAlpha);
// 
//         priceLabel.setBounds(x + priceBounds.x, y + priceBounds.y, priceBounds.width, priceBounds.height);
//         priceLabel.draw(batch, parentAlpha);
//     }
// 
//     // Showcases the current effect (the shop will be showcasing them, one by one)
//     // This method should be called on the same card as long as it returns true.
//     // It should return false once it's done so that the next card can be showcased.
//     public boolean showcase(Batch batch, float yDisplacement) {
//         return false;
//     }
// 
//     public abstract void usedItemUpdated();
// 
//     public abstract void use();
// 
//     public abstract boolean isBought();
// 
//     public abstract boolean isUsed();
// 
//     public abstract float getPrice();
// 
//     public abstract void performBuy();
// }


// Path: core/src/dev/lonami/klooni/game/GameLayout.java
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import dev.lonami.klooni.actors.Band;
import dev.lonami.klooni.actors.ShopCard;


    void update(PieceHolder holder) {
        holder.area.set(
                marginWidth, 0f,
                availableWidth, pieceHolderHeight);
    }

    public void update(Band band) {
        final Rectangle area = new Rectangle(
                0, pieceHolderHeight + boardHeight,
                screenWidth, scoreHeight);

        band.setBounds(area.x, area.y, area.width, area.height);
        // Let the band have the following shape:
        // 10% (100) padding
        // 35% (90%) score label
        // 10% (55%) padding
        // 35% (45%) info label
        // 10% (10%) padding
        band.scoreBounds.set(area.x, area.y + area.height * 0.55f, area.width, area.height * 0.35f);
        band.infoBounds.set(area.x, area.y + area.height * 0.10f, area.width, area.height * 0.35f);
    }

    @SuppressWarnings("SuspiciousNameCombination")
    public void update(ShopCard card) {
        card.setSize(availableWidth - marginWidth, shopCardHeight);
        card.cellSize = shopCardHeight * 0.2f;

        // X offset from the cells (5 cells = shopCardHeight)
        card.nameBounds.set(
                shopCardHeight, card.cellSize,