node.js library for working with all kinds of polyominoes.
npm install polyomino
Free, one-sided and fixed polyominoes are all supported:
get(n)
: return a Set of fixed polyominoes of ordern
.OneSided(n)
: return a Set of one-sided polyominoes of ordern
.Free(n)
: return a Set of free polyominoes of ordern
.
$ node -e 'require("polyomino").OneSidedPolyomino.get(4).forEach(item => console.log(`${item.render()}\n`));'
██
████
██
██
██
████
████
████
████
████
████
██
██
██
████
██
██
██
██
██
$ node -e 'require("polyomino").Polyomino.get(10).first().rotations().forEach(item => console.log(`${item.render()}\n`));'
████
██ ██
██████████
██
██
██████
██ ██
██████
██
██
██████████
██ ██
████
██
██████
██ ██
██████
██