-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add a winner screen when the game finishes
Add a fancy ASCII art to be displayed along with the final results when the game finishes. Closes #5
- Loading branch information
Showing
5 changed files
with
137 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.:.: | ||
.^.^7P~ | ||
..^!~G#. | ||
^7?PBP | ||
~PBPJ. | ||
.~! JP7 ^: | ||
7YPGG?:G7:JBBY!?~. | ||
JGGGGJ5J~!YBGGG5GBG^ | ||
.GGGGG?57 7BGYJPGGGJY^ | ||
~5GGGG7Y: 757YGGGGGG!~: | ||
JPGGGGGG~JGPGGGGGGBBBJ^ | ||
:J5GYGGPGYGGGGGGBBBG5~^?? | ||
~GGP5GJJGGGGGGGGY7: ^!7. | ||
JGGGGGJPGGGPY7:. ..!?J7. | ||
.GGGGGGGGGGGGJ~^::!GGY77. | ||
!#BBBBBBBBBBBB5?PPBGB?. | ||
JJBBBBBBBBBBP5GYJBBBB: | ||
^Y7GGBBBBGGBBBBBBY7YPB^ | ||
~: ^^^Y#?JBBBBGGBBBBBBBGJ~: | ||
G?:BBBBB5GBGY?5B55BBBBGBBG | ||
.B7^BBBBBBBBPJ~J7.GBBBB5GBP | ||
:#~~BBBBBBBBGGPP !#BB#Y5#? | ||
^#^!#BBBBBBG7JGP :#BB#5J#! | ||
^#^?#BBBB#GJ5Y?! .B#BBG!#^ | ||
~#:J#######BPJ~: .YP#B#!B: | ||
~#:5##########B#: .PY#B#75. | ||
^.~777?!Y######5 5?###?7 | ||
.B#B####^ JP###Y. | ||
Y#JP###5 5####G | ||
:##YYP55:P#####. | ||
G&&B5.:P#&####~. | ||
~&&&&!.#&&&&&&7! | ||
Y&&#P#&&&&&&&!5 | ||
.P#BP&&&&&&#&&JB | ||
~PY!J?~.?&5G&&##. | ||
5Y^JP&&&: | ||
:BB5Y#G7. | ||
B@#B&5 | ||
G&&PPG | ||
..:. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package ui | ||
|
||
import ( | ||
_ "embed" | ||
|
||
"github.com/gdamore/tcell/v2" | ||
"github.com/rivo/tview" | ||
) | ||
|
||
//go:embed congratulations.ascii | ||
var congratsArt string | ||
|
||
type CongratsPanel struct { | ||
tv *tview.TextView | ||
} | ||
|
||
func NewCongratsPanel() *CongratsPanel { | ||
p := &CongratsPanel{ | ||
tv: tview.NewTextView(), | ||
} | ||
|
||
p.tv. | ||
SetTextAlign(tview.AlignCenter). | ||
SetTextColor(tcell.ColorGreen). | ||
SetText(congratsArt) | ||
p.tv. | ||
SetBorderPadding(1, 0, 0, 0) | ||
|
||
return p | ||
} | ||
|
||
func (p *CongratsPanel) GetTextView() *tview.TextView { | ||
return p.tv | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.d8888b. 888 888 888 d8b 888 | ||
d88P Y88b 888 888 888 Y8P 888 | ||
888 888 888 888 888 888 | ||
888 .d88b. 88888b. .d88b. 888d888 8888b. 888888 888 888 888 8888b. 888888 888 .d88b. 88888b. .d8888b 888 | ||
888 d88""88b 888 "88b d88P"88b 888P" "88b 888 888 888 888 "88b 888 888 d88""88b 888 "88b 88K 888 | ||
888 888 888 888 888 888 888 888 888 .d888888 888 888 888 888 .d888888 888 888 888 888 888 888 "Y8888b. Y8P | ||
Y88b d88P Y88..88P 888 888 Y88b 888 888 888 888 Y88b. Y88b 888 888 888 888 Y88b. 888 Y88..88P 888 888 X88 " | ||
"Y8888P" "Y88P" 888 888 "Y88888 888 "Y888888 "Y888 "Y88888 888 "Y888888 "Y888 888 "Y88P" 888 888 88888P' 888 | ||
888 | ||
Y8b d88P | ||
"Y88P" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package ui | ||
|
||
import ( | ||
_ "embed" | ||
|
||
"github.com/gdamore/tcell/v2" | ||
"github.com/rivo/tview" | ||
) | ||
|
||
//go:embed bc_man.ascii | ||
var logoArt string | ||
|
||
type LogoPanel struct { | ||
tv *tview.TextView | ||
} | ||
|
||
func NewLogoPanel() *LogoPanel { | ||
p := &LogoPanel{ | ||
tv: tview.NewTextView(), | ||
} | ||
|
||
p.tv. | ||
SetTextAlign(tview.AlignCenter). | ||
SetTextColor(tcell.ColorGrey). | ||
SetText(logoArt) | ||
p.tv. | ||
SetBorderPadding(1, 0, 0, 0) | ||
|
||
return p | ||
} | ||
|
||
func (p *LogoPanel) GetTextView() *tview.TextView { | ||
return p.tv | ||
} |