You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
459 B
29 lines
459 B
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"math/rand"
|
|
"time"
|
|
|
|
"go-mazes/grid"
|
|
)
|
|
|
|
func main() {
|
|
rand.Seed(time.Now().UnixNano())
|
|
g := grid.Make(100, 100)
|
|
|
|
grid.GenerateBinaryTree(g)
|
|
|
|
cell := grid.RandomCell(g)
|
|
fmt.Println("Random Cell", cell)
|
|
cell = grid.RandomCell(g)
|
|
fmt.Println("Random Cell", cell)
|
|
cell = grid.RandomCell(g)
|
|
fmt.Println("Random Cell", cell)
|
|
|
|
fmt.Println("Grid Size", grid.Size(g))
|
|
|
|
// grid.Print(g)
|
|
grid.WritePng(g, "binary_tree.png")
|
|
}
|