You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
791 B
Go

2 years ago
package main
import (
"flag"
"log"
// "github.com/goccy/go-graphviz"
_ "github.com/mattn/go-sqlite3"
2 years ago
)
func main() {
var (
mapDB string
)
flag.StringVar(&mapDB, "map", "Aardwolf.db", "name of aardwolf map file")
flag.Parse()
am, err := NewMapper(mapDB)
if err != nil {
log.Fatalf("error creating AardMapper: %s\n", err)
}
// log.Printf("databse opened: %#+v\n", am)
2 years ago
exits, err := am.Exits()
if err != nil {
log.Fatalf("error fetching Rooms: %s\n", err)
}
for _, v := range exits {
// log.Printf("Area: %#+v\n", v)
log.Printf("RoomExit found: %s\n", v)
break
}
// now that I have areas and rooms, I can start building a map
// first iteration should be a recursive walk
// step over every room. add a vertex, then descend into each
// adjoining room
2 years ago
}