[bug] reset won flag on game reset

This commit is contained in:
Mike Cugini 2021-12-11 15:15:07 -05:00
parent 60cd422423
commit fa1d4a4f77

View File

@ -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 {