add example

This commit is contained in:
Dawid Wysokiński 2020-06-28 13:53:08 +02:00
parent cc037d744b
commit 5c03ba1d81
2 changed files with 23 additions and 0 deletions

BIN
example/image.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

23
example/main.go Normal file
View File

@ -0,0 +1,23 @@
package main
import (
"log"
"os"
"time"
"github.com/tribalwarshelp/map-generator/generator"
)
func main() {
t1 := time.Now()
f, _ := os.Create("image.jpg")
defer f.Close()
generator.Generate(generator.Config{
Destination: f,
Scale: 10,
ContinentGrid: true,
ContinentNumbers: true,
})
log.Print(time.Now().Sub(t1).String())
}