Reformat with gofmt

This commit is contained in:
Petar Kapriš 2021-09-04 11:50:23 +02:00 committed by Петар Каприш
parent 66695e069b
commit 72916575bd

View file

@ -3,11 +3,10 @@ package main
import ( import (
"log" "log"
"os" "os"
"time"
"strconv" "strconv"
"time"
"unicode/utf8" "unicode/utf8"
"github.com/gdamore/tcell/v2" "github.com/gdamore/tcell/v2"
) )
@ -64,7 +63,7 @@ func centeredText(s string, x, y, width int, scr tcell.Screen, style tcell.Style
i := 0 i := 0
for _, char := range s { for _, char := range s {
if i >= width { if i >= width {
break; break
} }
scr.SetContent(start+i, y, char, nil, style) scr.SetContent(start+i, y, char, nil, style)
@ -79,7 +78,7 @@ func wrappedText(s string, scr tcell.Screen, style tcell.Style) {
for _, char := range s { for _, char := range s {
if x >= w { if x >= w {
if y >= h { if y >= h {
break; break
} }
x = 0 x = 0
y++ y++
@ -160,7 +159,6 @@ func main() {
wall.Clear() wall.Clear()
drawWall() drawWall()
quit := func() { quit := func() {
wall.Fini() wall.Fini()
os.Exit(0) os.Exit(0)