private boolean canMove(int x, int y, int[] block) {
        for (int i = 0; i < currentBlockSize; i++) {
            for (int j = 0; j < currentBlockSize; j++) {
                if (block[i + j * currentBlockSize] > 0
                        && ((x + i) < 0
                        || (x + i) >= cols
                        || (y + j) >= rows
                        || (y + j) < 0
                        || field[x + y * cols + i + j * cols] + block[i + j * currentBlockSize] > block[i + j * currentBlockSize])) {
                    return false;
                }
            }
        }
        return true;
    }