function spawnDockImage(docks, map) {
  if (coastTiles.length - docks.length <= 0) {
    // no sand left
    const randomWater = waterTiles[Math.ceil(Math.random() * waterTiles.length)]
    coastTiles.push(randomWater)
    map[randomWater.row][randomWater.col] = 48
  }
  return spawnDock(docks, map)
}
/**
 *
 * @param {Array} docks  the arry of player docks
 * @param {Arrya} map    the height map of the world
 */
@param {Array} docks  the arry of player docks
@param {Arrya} map    the height map of the world
@param { Array } docks the arry of player docks @param { Arrya } map the height map of the world
function spawnDockImage(docks, map) {
  if (coastTiles.length - docks.length <= 0) {
    const randomWater = waterTiles[Math.ceil(Math.random() * waterTiles.length)]
    coastTiles.push(randomWater)
    map[randomWater.row][randomWater.col] = 48
  }
  return spawnDock(docks, map)
}
function spawnDockImage ( docks , map ) { if ( coastTiles . length - docks . length <= 0 ) { const randomWater = waterTiles [ Math . ceil ( Math . random ( ) * waterTiles . length ) ] coastTiles . push ( randomWater ) map [ randomWater . row ] [ randomWater . col ] = 48 } return spawnDock ( docks , map ) }
@param {Array} docks  the arry of player docks
 @param {Arrya} map    the height map of the world
@param { Array } docks the arry of player docks @param { Arrya } map the height map of the world
// no sand left