Skip to content

Commit

Permalink
Added check error in Game of Life
Browse files Browse the repository at this point in the history
  • Loading branch information
msoap committed Feb 13, 2022
1 parent d76d5f0 commit 7b1855b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/game_of_life/game_of_life.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ func main() {
if width == 0 {
width, height = tg.ScreenSize()
} else {
tg.SetClipCenter(width, height)
if err := tg.SetClipCenter(width, height); err != nil {
tg.Finish()
log.Fatal(err)
}
}

tg.Buf.Rect(1, 2, tg.Width-2, tg.Height-4, tcg.Black) // coordinates in pixels
Expand Down

0 comments on commit 7b1855b

Please sign in to comment.