public void run(String[] args){
    
        int rows = 0;
        int columns = 0;
        List<? extends Piece> piecesToAllocate;
        String errorMsg;
        
        if (args.length != 3){
            errorMsg = messages.getString("numParametersInvalid");
            System.out.println(errorMsg);
        }else{
            
            //Get the row number.
            try{
               rows = Integer.parseInt(args[0]);
               
               //Get the column number.
               try{                  
                columns = Integer.parseInt(args[1]);

                //Get the pieces.
                try{
                piecesToAllocate = ChessTools.getPiecesFromString(args[2]);
                
                Cell[] chessBoard;
                chessBoard = new Cell[rows * columns];

                Arrays.fill(chessBoard, Cell.DEFAULT_EMPTY_CELL);

                ChessGameConfiguration cgc = new ChessGameConfiguration(chessBoard,rows,columns);

                
                SearchEngine searchEngine = new SearchEngine();
                ChessGameConfiguration[] results = searchEngine.search(cgc, piecesToAllocate);
                
                printResults(results);
                }catch(IllegalArgumentException invalidPieceCharException){
                   errorMsg = messages.getString("pieceCharInvalid");
                   System.out.println(errorMsg);
                }
                }catch(NumberFormatException columnsNumberFormatException){
                errorMsg = messages.getString("columnsNumberInvalid");
                System.out.println(errorMsg);
                }
            }catch(NumberFormatException rowNumberFormatException){
            errorMsg = messages.getString("rowsNumberInvalid");
            System.out.println(errorMsg);
            }
        }
    }