Remove spurious logging
This commit is contained in:
+4
-5
@@ -1,7 +1,7 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"log"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/nsf/termbox-go"
|
||||
@@ -27,7 +27,7 @@ func (s *Client) Recv(bs *server.Boardstate) map[string]server.Instruction {
|
||||
func (s *Client) Visualize() {
|
||||
err := termbox.Init()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
panic(err)
|
||||
}
|
||||
|
||||
s.viewX, s.viewY = termbox.Size()
|
||||
@@ -50,7 +50,6 @@ func (s *Client) Visualize() {
|
||||
case termbox.EventKey:
|
||||
switch event.Key {
|
||||
case termbox.KeyCtrlZ, termbox.KeyCtrlC:
|
||||
log.Printf("exiting ...")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -64,7 +63,7 @@ func (s *Client) Visualize() {
|
||||
case termbox.EventResize:
|
||||
s.viewX, s.viewY = event.Width, event.Height
|
||||
case termbox.EventError:
|
||||
log.Fatalf("Quitting because of termbox error: \n%s\n", event.Err)
|
||||
panic(fmt.Sprintf("Quitting because of termbox error:\n%v\n", event.Err))
|
||||
}
|
||||
case u := <-s.StateStream:
|
||||
termbox.Clear(termbox.ColorBlack, termbox.ColorBlack)
|
||||
@@ -181,7 +180,7 @@ func (s *Client) Visualize() {
|
||||
|
||||
err := termbox.Flush()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
panic(err)
|
||||
}
|
||||
case <-s.Die:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user