diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2020-01-19 22:00:35 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2020-01-19 22:00:35 -0500 |
commit | ec217654a6e497383e21bb09fe32e7b4abed9b12 (patch) | |
tree | fdff78a6df8a696211fcdc99cab68ee0fbb1edc5 /aesthetics.go | |
parent | e85463a03763416c0cf17d96b4e06761468a45e1 (diff) |
Blank screen between players
Diffstat (limited to 'aesthetics.go')
-rw-r--r-- | aesthetics.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/aesthetics.go b/aesthetics.go index 9766f92..4d6909f 100644 --- a/aesthetics.go +++ b/aesthetics.go @@ -4,6 +4,7 @@ package main // display or setup visuals without the use of tview. import ( + "github.com/mbndr/figlet4go" "strconv" ) @@ -108,6 +109,18 @@ var boatchars = [2][7]string{ {`~`, `△`, `▽`, `◁`, `▷`, `▯`, `▭`}, } +func figletWrite(text string) string { + ascii := figlet4go.NewAsciiRender() + options := figlet4go.NewRenderOptions() + options.FontName = "larry3d" + options.FontColor = []figlet4go.Color{ + figlet4go.ColorCyan, + } + // The underscore would be an error + renderStr, _ := ascii.Render(text) + return renderStr +} + // This constant keeps information about boats that aren't totally sunk secret. // It therefore substitues the shape of a boat on the target board when it is unsunk. const misteryHit = `▣` |