Working some things out

This commit is contained in:
2025-08-14 14:21:19 -05:00
parent a74cf9fe61
commit acfe8be93d
9 changed files with 193 additions and 104 deletions

View File

@@ -23,6 +23,7 @@ package main
import (
"fmt"
"math/rand"
"os"
"github.com/gdamore/tcell"
@@ -116,3 +117,13 @@ func (ui *Ui) SetScreen(scr *UiScreen) {
func (ui *Ui) stop() { ui.running = false }
func (ui *Ui) cleanup() { ui.tScreen.Fini() }
const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
func RandomString(n int) string {
b := make([]byte, n)
for i := range b {
b[i] = letters[rand.Intn(len(letters))]
}
return string(b)
}