sdl2-life

Conway's Game of Life with go-sdl2
git clone https://www.brianlane.com/git/sdl2-life
Log | Files | Refs | README

commit 32e6726bb6c73e0d46520dfcc6970c0d85bf608c
parent 889bff0a6c0f70eb430bbbd7177a71f470df9e87
Author: Brian C. Lane <bcl@brianlane.com>
Date:   Sat, 22 Apr 2023 17:09:00 -0700

Reinitialize on mouse click

Diffstat:
Mmain.go | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/main.go b/main.go @@ -940,6 +940,8 @@ func (g *LifeGame) Run() { if t.GetType() == sdl.MOUSEBUTTONDOWN { // log.Printf("x=%d y=%d\n", t.X, t.Y) g.PrintCellDetails(t.X, t.Y) + + g.InitializeRandomCells() } case *sdl.MouseMotionEvent: if t.GetType() == sdl.MOUSEMOTION {