szunami / xwords-rs

Tools to fill crosswords
Apache License 2.0
7 stars 1 forks source link

Filler prints output when solving takes some time #136

Open super7ramp opened 1 year ago

super7ramp commented 1 year ago

Issue

Filler prints some statistics when filling takes some time.

It's not really an issue when called from command-line but it's not desirable when integrating it as a library. (I've been working on integrating it in my own small tool. For now I've just patched it to remove the calls to println! from filler.)

Steps to reproduce

  1. Create the following grid in grids/empty_12x10.txt:

    *       
          * 
    *   *   
    *       
       *    
      *   * 
  *  *   *  
   *    *   
  1. Calls filler from command line: ./target/debug/xwords --width 12 --height 10 --input grids/empty_12x10.txt

Expected result

No progress output, unless specified otherwise (e.g. with an option from command-line). Ideally API would provide some kind of progress notification mechanism.

Actual result

After a while, some outputs starts to be printed periodically:

    C       
    *       
    C     *C
    *   *   
    *       
       *    
      *   *C
  *  *   *  
  P* O  *   
PHILOSOPHIST

(...)