func (f *fullMap) Generate() {
	rand.Seed(time.Now().UnixNano())
	for e := f.elevation; e > 0; e-- {
		for h := 0; h < f.height; h++ {
			for w := 0; w < f.width; w++ {
				if f.elements[h][w] > 0 {
					continue
				}
				if rand.Intn(100) < f.peakProbability {
					f.elements[h][w] = e
				}
			}
		}
	}
}
Generate generates the terrain map
package terrain
import (
	"fmt"
	"math/rand"
	"time"
)
type fullMap struct {
	width, height, elevation, peakProbability int
	elements                                  [][]int
}
func NewFullMap(width, height, elevation, peakProbability int) fullMap {
	elements := make([][]int, height)
	for i := 0; i < height; i++ {
		elements[i] = make([]int, width)
	}
	return fullMap{
		width:           width,
		height:          height,
		elevation:       elevation,
		peakProbability: peakProbability,
		elements:        elements,
	}
}