public boolean moveDown() { for (Cell cell : tetromino.getCells(this)) { if (isOccupied(cell.getCol(), cell.getRow() + 1)) return false; } tetromino.fall(); return true; }
/** Déplace le tetromino vers la droite */ public boolean moveRight() { for (Cell cell : tetromino.getCells(this)) if (isOccupied(cell.getCol() + 1, cell.getRow())) return false; tetromino.moveRight(); return true; }