Skip to content
Go implementation of a quadtree with Game of Life's hashlife algorithm.
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitpod.yml
.travis.yml
README.md
example_test.go
go.mod
go.sum
quadtree.go
quadtree_helper.go
quadtree_helper_test.go
quadtree_test.go

README.md

Open in Gitpod GoDoc

quadtree

Go implementation of a quadtree with Game of Life's hashlife algorithm.

Usage

// empty tree with level 2
qt := quadtree.EmptyTree(2)

// quadtrees are immutable, so each change gives you a new quadtree
qt = qt.SetCell(1, 1, 1)

// print tree to console, don't do that for bigger trees
qt.Print()

// calculates next generation
qtNext := qt.NextGen()
You can’t perform that action at this time.