[bug] reset won flag on game reset
This commit is contained in:
parent
60cd422423
commit
fa1d4a4f77
1
main.go
1
main.go
@ -136,6 +136,7 @@ func NewGame(screenWidth, screenHeight int, initLength int, speed time.Duration)
|
|||||||
|
|
||||||
func (w *WormGame) Reset() {
|
func (w *WormGame) Reset() {
|
||||||
w.lost = false
|
w.lost = false
|
||||||
|
w.won = false
|
||||||
w.score = 0
|
w.score = 0
|
||||||
w.board = make([][]Tile, w.width)
|
w.board = make([][]Tile, w.width)
|
||||||
for idx := range w.board {
|
for idx := range w.board {
|
||||||
|
Loading…
Reference in New Issue
Block a user