diff --git a/connection.go b/connection.go index 1124c3d..c61b17b 100644 --- a/connection.go +++ b/connection.go @@ -63,10 +63,11 @@ func (c *Connection) Login() { log_error("could not read player: %v", err) player = &Player{name: name} if err := player.Create(); err != nil { - + log_error("unable to create player record: %v", err) } fmt.Fprintf(c, "you look new around these parts, %s.\n", player.name) fmt.Fprintf(c, `if you'd like a description of how to play, type the "help" command`) + c.player = player } else { c.player = player fmt.Fprintf(c, "welcome back, %s.\n", player.name) diff --git a/player.go b/player.go index b119089..caf5469 100644 --- a/player.go +++ b/player.go @@ -29,6 +29,14 @@ func (p *Player) Create() error { return nil } +func (p *Player) Dead() bool { + return false +} + +func (p *Player) Tick(frame int64) { + +} + func playersTable() { stmnt := `create table if not exists players ( id integer not null primary key autoincrement, diff --git a/system.go b/system.go index 35457e6..f8fb062 100644 --- a/system.go +++ b/system.go @@ -246,4 +246,3 @@ func randomSystem() (*System, error) { planet := index[pick] return planet, nil } -