oppwars/main.go
2025-08-03 13:45:05 +00:00

55 lines
1 KiB
Go

package main
import (
"fmt"
"os"
"bufio"
_ "embed"
"github.com/charmbracelet/lipgloss"
)
//go:embed menu.txt
var menu string
//go:embed officers.txt
var officers string
var condoms = 10
var border = lipgloss.NewStyle().
BorderStyle(lipgloss.NormalBorder()).
BorderForeground(lipgloss.Color("63"))
var statsStyle = lipgloss.NewStyle().
Foreground(lipgloss.Color("#ffffffff ")).
Background(lipgloss.Color("#0000FF"))
func ClearScreen() {
fmt.Print("\033[H\033[2J")
}
func MashEnterKey() {
fmt.Println(statsStyle.Render("Mash the 'Enter' key!"))
bufio.NewReader(os.Stdin).ReadBytes('\n')
}
func CheckStats() {
fmt.Println(border.Render("PLAYER STATS"))
fmt.Println("Condoms:", condoms)
}
func main() {
officerStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("0000FF"))
fmt.Println(border.Render("OPP Wars - Organized Crime Edition"))
fmt.Println(officerStyle.Render(officers))
MashEnterKey()
ClearScreen()
fmt.Println(lipgloss.JoinHorizontal(lipgloss.Bottom, border.Render(menu), statsStyle.Render(CheckStats)))
}