aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJared Folkins <jfolkins@gmail.com>2016-03-08 17:09:31 -0800
committerJared Folkins <jfolkins@gmail.com>2016-03-08 17:09:31 -0800
commited88747493d14cfe1841a21eb22908b3d3dd9b17 (patch)
tree4a3e137eb6ee14ce631139cda7f21b7af99e7c7c
parentfedb576870bdb152708a999fb9bf81cd7b303355 (diff)
downloadsshtron-ed88747493d14cfe1841a21eb22908b3d3dd9b17.tar.gz
fix: HandleRight() not updating LastAction, edge case player is kicked
-rw-r--r--game.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/game.go b/game.go
index 18c10fd..209b776 100644
--- a/game.go
+++ b/game.go
@@ -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 {
Un proyecto texto-plano.xyz