added method for sorting the flipped pieces by distance to Move.position

This commit is contained in:
Ticho Hidding
2025-10-19 02:18:11 +02:00
parent 3a120803e3
commit 0447f7b0fe
2 changed files with 29 additions and 3 deletions

View File

@@ -83,6 +83,11 @@ public abstract class GameCanvas {
graphics.clearRect(0, 0, width, height);
}
public void clearCell(int cellIndex) {
Cell cell = cells[cellIndex];
graphics.clearRect(cell.x, cell.y, cell.width, cell.height);
}
public void render() {
graphics.setFill(color);