// Path: core/src/dev/lonami/klooni/game/Cell.java
// public class Cell implements BinSerializable {
// 
//     //region Members
// 
//     // Negative index indicates that the cell is empty
//     private int colorIndex;
// 
//     public final Vector2 pos;
//     public final float size;
// 
//     //endregion
// 
//     //region Constructor
// 
//     Cell(float x, float y, float cellSize) {
//         pos = new Vector2(x, y);
//         size = cellSize;
// 
//         colorIndex = -1;
//     }
// 
//     //endregion
// 
//     //region Package local methods
// 
//     // Sets the cell to be non-empty and of the specified color index
//     public void set(int ci) {
//         colorIndex = ci;
//     }
// 
//     public void draw(Batch batch) {
//         // Always query the color to the theme, because it might have changed
//         draw(Klooni.theme.getCellColor(colorIndex), batch, pos.x, pos.y, size);
//     }
// 
//     public Color getColorCopy() {
//         return Klooni.theme.getCellColor(colorIndex).cpy();
//     }
// 
//     boolean isEmpty() {
//         return colorIndex < 0;
//     }
// 
//     //endregion
// 
//     //region Static methods
// 
//     // Default texture (don't call overloaded version to avoid overhead)
//     public static void draw(final Color color, final Batch batch,
//                             final float x, final float y, final float size) {
//         batch.setColor(color);
//         batch.draw(Klooni.theme.cellTexture, x, y, size, size);
//     }
// 
//     // Custom texture
//     public static void draw(final Texture texture, final Color color, final Batch batch,
//                             final float x, final float y, final float size) {
//         batch.setColor(color);
//         batch.draw(texture, x, y, size, size);
//     }
// 
//     //endregion
// 
//     //region Serialization
// 
//     @Override
//     public void write(DataOutputStream out) throws IOException {
//         // Only the color index is saved
//         out.writeInt(colorIndex);
//     }
// 
//     @Override
//     public void read(DataInputStream in) throws IOException {
//         colorIndex = in.readInt();
//     }
// 
//     //endregion
// }
// 
// Path: core/src/dev/lonami/klooni/interfaces/IEffect.java
// public interface IEffect {
//     void setInfo(Cell deadCell, Vector2 culprit);
// 
//     void draw(Batch batch);
// 
//     boolean isDone();
// }
// 
// Path: core/src/dev/lonami/klooni/interfaces/IEffectFactory.java
// public interface IEffectFactory {
//     String getName();
// 
//     String getDisplay();
// 
//     int getPrice();
// 
//     IEffect create(final Cell deadCell, final Vector2 culprit);
// }


import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.math.Interpolation;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector2;
import dev.lonami.klooni.game.Cell;
import dev.lonami.klooni.interfaces.IEffect;
import dev.lonami.klooni.interfaces.IEffectFactory;
            pos = deadCell.pos.cpy();
            originalX = pos.x;
            size = deadCell.size;

            vanishSize = deadCell.size;
            vanishColor = deadCell.getColorCopy();
            driftMagnitude = Gdx.graphics.getWidth() * 0.05f;
            vanishElapsed = 0;
            randomOffset = MathUtils.random(MathUtils.PI2);
        }

        @Override
        public void draw(Batch batch) {
            vanishElapsed += Gdx.graphics.getDeltaTime();

            // Update the size as we fade away
            final float progress = vanishElapsed * INV_LIFETIME;
            vanishSize = Interpolation.fade.apply(size, 0, progress);

            // Fade away depending on the time
            vanishColor.set(vanishColor.r, vanishColor.g, vanishColor.b, 1.0f - progress);

            // Ghostly fade upwards, by doing a lerp from our current position to the wavy one
            pos.x = MathUtils.lerp(
                    pos.x,
                    originalX + MathUtils.sin(randomOffset + vanishElapsed * 3f) * driftMagnitude,
                    0.3f
            );
            pos.y += UP_SPEED * Gdx.graphics.getDeltaTime();

// Path: core/src/dev/lonami/klooni/game/Cell.java
// public class Cell implements BinSerializable {
// 
//     //region Members
// 
//     // Negative index indicates that the cell is empty
//     private int colorIndex;
// 
//     public final Vector2 pos;
//     public final float size;
// 
//     //endregion
// 
//     //region Constructor
// 
//     Cell(float x, float y, float cellSize) {
//         pos = new Vector2(x, y);
//         size = cellSize;
// 
//         colorIndex = -1;
//     }
// 
//     //endregion
// 
//     //region Package local methods
// 
//     // Sets the cell to be non-empty and of the specified color index
//     public void set(int ci) {
//         colorIndex = ci;
//     }
// 
//     public void draw(Batch batch) {
//         // Always query the color to the theme, because it might have changed
//         draw(Klooni.theme.getCellColor(colorIndex), batch, pos.x, pos.y, size);
//     }
// 
//     public Color getColorCopy() {
//         return Klooni.theme.getCellColor(colorIndex).cpy();
//     }
// 
//     boolean isEmpty() {
//         return colorIndex < 0;
//     }
// 
//     //endregion
// 
//     //region Static methods
// 
//     // Default texture (don't call overloaded version to avoid overhead)
//     public static void draw(final Color color, final Batch batch,
//                             final float x, final float y, final float size) {
//         batch.setColor(color);
//         batch.draw(Klooni.theme.cellTexture, x, y, size, size);
//     }
// 
//     // Custom texture
//     public static void draw(final Texture texture, final Color color, final Batch batch,
//                             final float x, final float y, final float size) {
//         batch.setColor(color);
//         batch.draw(texture, x, y, size, size);
//     }
// 
//     //endregion
// 
//     //region Serialization
// 
//     @Override
//     public void write(DataOutputStream out) throws IOException {
//         // Only the color index is saved
//         out.writeInt(colorIndex);
//     }
// 
//     @Override
//     public void read(DataInputStream in) throws IOException {
//         colorIndex = in.readInt();
//     }
// 
//     //endregion
// }
// 
// Path: core/src/dev/lonami/klooni/interfaces/IEffect.java
// public interface IEffect {
//     void setInfo(Cell deadCell, Vector2 culprit);
// 
//     void draw(Batch batch);
// 
//     boolean isDone();
// }
// 
// Path: core/src/dev/lonami/klooni/interfaces/IEffectFactory.java
// public interface IEffectFactory {
//     String getName();
// 
//     String getDisplay();
// 
//     int getPrice();
// 
//     IEffect create(final Cell deadCell, final Vector2 culprit);
// }


// Path: core/src/dev/lonami/klooni/effects/EvaporateEffectFactory.java
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.math.Interpolation;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector2;
import dev.lonami.klooni.game.Cell;
import dev.lonami.klooni.interfaces.IEffect;
import dev.lonami.klooni.interfaces.IEffectFactory;

            pos = deadCell.pos.cpy();
            originalX = pos.x;
            size = deadCell.size;

            vanishSize = deadCell.size;
            vanishColor = deadCell.getColorCopy();
            driftMagnitude = Gdx.graphics.getWidth() * 0.05f;
            vanishElapsed = 0;
            randomOffset = MathUtils.random(MathUtils.PI2);
        }

        @Override
        public void draw(Batch batch) {
            vanishElapsed += Gdx.graphics.getDeltaTime();

            // Update the size as we fade away
            final float progress = vanishElapsed * INV_LIFETIME;
            vanishSize = Interpolation.fade.apply(size, 0, progress);

            // Fade away depending on the time
            vanishColor.set(vanishColor.r, vanishColor.g, vanishColor.b, 1.0f - progress);

            // Ghostly fade upwards, by doing a lerp from our current position to the wavy one
            pos.x = MathUtils.lerp(
                    pos.x,
                    originalX + MathUtils.sin(randomOffset + vanishElapsed * 3f) * driftMagnitude,
                    0.3f
            );
            pos.y += UP_SPEED * Gdx.graphics.getDeltaTime();

            Cell.draw(vanishColor, batch, pos.x, pos.y, vanishSize);