LCOV - code coverage report
Current view: top level - maps/random/rmgen/painter - MultiPainter.js (source / functions) Hit Total Coverage
Test: lcov.info Lines: 8 8 100.0 %
Date: 2023-04-02 12:52:40 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /**
       2             :  * The MultiPainter applies several painters to the given area.
       3             :  */
       4             : function MultiPainter(painters)
       5             : {
       6          10 :         if (painters instanceof Array)
       7           1 :                 this.painters = painters;
       8           9 :         else if (!painters)
       9           8 :                 this.painters = [];
      10             :         else
      11           1 :                 this.painters = [painters];
      12             : }
      13             : 
      14           6 : MultiPainter.prototype.paint = function(area)
      15             : {
      16          10 :         for (let painter of this.painters)
      17           3 :                 painter.paint(area);
      18             : };

Generated by: LCOV version 1.14