Skip to content

Commit

Permalink
fix: remove unknown state for gameover
Browse files Browse the repository at this point in the history
  • Loading branch information
BigJk committed Aug 27, 2024
1 parent 7f85f3c commit 98da619
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ui/menus/gameview/gameview.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package gameview

import (
"fmt"
"strings"

"github.com/BigJk/end_of_eden/game"
"github.com/BigJk/end_of_eden/system/audio"
"github.com/BigJk/end_of_eden/ui"
Expand All @@ -17,7 +19,6 @@ import (
"github.com/charmbracelet/lipgloss"
zone "github.com/lrstanley/bubblezone"
"github.com/samber/lo"
"strings"
)

const (
Expand Down Expand Up @@ -315,6 +316,8 @@ func (m Model) View() string {
return lipgloss.JoinVertical(lipgloss.Top, m.fightStatusTop(), m.merchant.View())
case game.GameStateEvent:
return lipgloss.Place(m.Size.Width, m.Size.Height, lipgloss.Center, lipgloss.Center, m.event.View(), lipgloss.WithWhitespaceChars(" "))
case game.GameStateGameOver:
return ""
}

return fmt.Sprintf("Unknown State: %s", m.Session.GetGameState())
Expand Down Expand Up @@ -515,7 +518,7 @@ func (m Model) fightStatusBottom() string {
lipgloss.Center,
m.zones.Mark(ZoneEndTurn, style.HeaderStyle.Copy().Background(lo.Ternary(m.zones.Get(ZoneEndTurn).InBounds(m.LastMouse), style.BaseRed, style.BaseRedDarker)).Margin(0, 4, 0, 0).Render("End Turn")),
style.RedDarkerText.Render(`▀ █▌█▌▪
·██·
·██·
▪▐█·█▌`))),
))
}
Expand Down

0 comments on commit 98da619

Please sign in to comment.