package main import ( "log" "os" "fmt" "github.com/gdamore/tcell/v2" ) var dbg *log.Logger func DebugInit() { out, err := os.Create("debug.log") if err != nil { log.Fatal(err) } dbg = log.New(out, "", log.LstdFlags) } func (game *Game) DrawPaths() { for y, row := range game.Paths { for x, path_num := range row { if path_num == PATH_LIMIT { continue } as_str := fmt.Sprintf("%x", path_num % 16) style := tcell.StyleDefault.Foreground(tcell.ColorGray) if path_num >= 0 && path_num <= 16 { style = style.Reverse(true) } game.Screen.SetContent(x, y, rune(as_str[0]), nil, style) } } }