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

          Line data    Source code
       1             : /**
       2             :  * Sets the given height in the given Area.
       3             :  */
       4             : function ElevationPainter(elevation)
       5             : {
       6           0 :         this.elevation = elevation;
       7             : }
       8             : 
       9           6 : ElevationPainter.prototype.paint = function(area)
      10             : {
      11           0 :         for (let point of area.getPoints())
      12           0 :                 for (let vertex of g_TileVertices)
      13             :                 {
      14           0 :                         let position = Vector2D.add(point, vertex);
      15           0 :                         if (g_Map.validHeight(position))
      16           0 :                                 g_Map.setHeight(position, this.elevation);
      17             :                 }
      18             : };

Generated by: LCOV version 1.14