cleaning up

master
Jordan Orelli 4 years ago
parent ff5243c435
commit 06b965d2aa

@ -1,5 +0,0 @@
package main
type effect interface {
apply(*room)
}

@ -9,7 +9,7 @@ import (
) )
func newLog(path string) *blammo.Log { func newLog(path string) *blammo.Log {
f, err := os.OpenFile("./belt.log", os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644) f, err := os.OpenFile("./astro.log", os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
if err != nil { if err != nil {
exit.WithMessage(1, "unable to open log file %q for writing: %v", err) exit.WithMessage(1, "unable to open log file %q for writing: %v", err)
} }
@ -22,7 +22,7 @@ func newLog(path string) *blammo.Log {
blammo.ErrorWriter(w), blammo.ErrorWriter(w),
} }
return blammo.NewLog("belt", options...) return blammo.NewLog("astro", options...)
} }
func main() { func main() {
@ -43,7 +43,7 @@ func main() {
blammo.ErrorWriter(stderr), blammo.ErrorWriter(stderr),
} }
log := blammo.NewLog("belt", options...).Child("server") log := blammo.NewLog("astro", options...).Child("server")
s := server{Log: log, host: "127.0.0.1", port: 12805} s := server{Log: log, host: "127.0.0.1", port: 12805}
err := s.listen() err := s.listen()
log.Error("listen error: %v", err) log.Error("listen error: %v", err)
@ -54,7 +54,7 @@ func main() {
} }
func runClient() { func runClient() {
log := newLog("./belt.log").Child("client") log := newLog("./astro.log").Child("client")
start := time.Now() start := time.Now()
log.Info("starting at: %v", start) log.Info("starting at: %v", start)

@ -1,8 +0,0 @@
package main
// room represents a rectangular space in the world state
type room struct {
name string
width int
height int
}

@ -16,7 +16,6 @@ type server struct {
*blammo.Log *blammo.Log
host string host string
port int port int
world *room
lastSessionID int lastSessionID int
} }

Loading…
Cancel
Save