diff options
author | Jared Folkins <jfolkins@gmail.com> | 2016-03-08 17:09:31 -0800 |
---|---|---|
committer | Jared Folkins <jfolkins@gmail.com> | 2016-03-08 17:09:31 -0800 |
commit | ed88747493d14cfe1841a21eb22908b3d3dd9b17 (patch) | |
tree | 4a3e137eb6ee14ce631139cda7f21b7af99e7c7c | |
parent | fedb576870bdb152708a999fb9bf81cd7b303355 (diff) | |
download | sshtron-ed88747493d14cfe1841a21eb22908b3d3dd9b17.tar.gz |
fix: HandleRight() not updating LastAction, edge case player is kicked
-rw-r--r-- | game.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -4,13 +4,14 @@ import ( "bufio" "bytes" "fmt" - "github.com/dustinkirkland/golang-petname" - "github.com/fatih/color" - "golang.org/x/crypto/ssh" "io" "math/rand" "sort" "time" + + "github.com/dustinkirkland/golang-petname" + "github.com/fatih/color" + "golang.org/x/crypto/ssh" ) type Hub struct { @@ -197,6 +198,7 @@ func (p *Player) HandleDown() { func (p *Player) HandleRight() { p.Direction = PlayerRight p.Marker = playerRightRune + p.s.didAction() } func (p *Player) Score() int { |