diff --git a/main.go b/main.go index 1cf9dd1..f811bd4 100644 --- a/main.go +++ b/main.go @@ -2,32 +2,54 @@ package main import ( "fmt" + "os" + + "bufio" + _ "embed" "github.com/charmbracelet/lipgloss" - "github.com/charmbracelet/lipgloss/table" ) +//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() { - aqua := lipgloss.NewStyle().Foreground(lipgloss.Color("86")).Render - pink := lipgloss.NewStyle().Foreground(lipgloss.Color("201")).Render + officerStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("0000FF")) fmt.Println(border.Render("OPP Wars - Organized Crime Edition")) - t := table.New() - t.Row(border.Render("MAIN MENU"), border.Render("PLAYER STATS")) - t.Row("1. Locker", aqua("Money")) - t.Row("2. Aqcuire Drugs", aqua("")) - t.Row("3. Buy Condoms", aqua("Condoms")) - t.Row("4. Hit the Streets", aqua("Experience")) - t.Row("5. Find Whore", pink("Whores")) - t.Row("6. Pay off Judge", aqua("Bribes Rating")) - t.Row("7. Union", aqua("Rank")) - t.Row("8. Doctor", aqua("Diseases")) - t.Row("9. View High Score", aqua("Milky as well")) - t.Row("10. Clock Out", aqua("Also milky")) - fmt.Println(t.Render()) + fmt.Println(officerStyle.Render(officers)) + MashEnterKey() + + ClearScreen() + + fmt.Println(lipgloss.JoinHorizontal(lipgloss.Bottom, border.Render(menu), statsStyle.Render(CheckStats))) + } diff --git a/menu.txt b/menu.txt new file mode 100644 index 0000000..9416917 --- /dev/null +++ b/menu.txt @@ -0,0 +1,11 @@ +MAIN MENU + +1. Locker +2. Aqcuire Drugs +3. Buy Condoms +4. Hit the Streets +5. Find Whore +6. Pay off Judge +7. Union +8. Doctor +9. Clock Out diff --git a/officers.txt b/officers.txt new file mode 100644 index 0000000..ff25157 --- /dev/null +++ b/officers.txt @@ -0,0 +1,20 @@ + ____ ____ ____ + /....\ /....\ /....\ + .-. |::::::| .-. |::::::| .-. |::::::| + | | |::::::| | | |::::::| | | |::::::| + | | (`:'':') | | (`:'':') | | (`:'':') + | | _--|__|--__ | |.--|__|--__ | |_--|__|--__ + | | | ________|_|_|_ ________|_|_|_ ________|_____ + | | / | | | | | | + | |/ / | | | | | | + |_| |/| | | | | | | + (===)| | | O P P | | O P P | | O P P | + `===' |`-| |`-| |`-| | + | | |`-| |`-| |`-| | + |_| | | | | | | | + | | | | | | | + | | | | | | | + |`-| |`-| |`-| | + |__| |__| |__| | + /_ | |_ | |_ | | + |___`-__________-'__`-__________-'__`-__________-'