Skip to content

Instantly share code, notes, and snippets.

View tomhoule's full-sized avatar
🐩

Tom Houlé tomhoule

🐩
View GitHub Profile
@janickr
janickr / conway.sql
Last active September 10, 2020 21:49
conway's game of life in SQL (postgresql) - http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
with recursive generation1(x,y) as ( --the initial board setup
select 2, 3
union
select 3, 3
union
select 4, 3
),
game(n, x, y) as (
select 1, x, y from generation1 -- generation 1 is initial board setup
union all