Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

polyomino

node.js library for working with all kinds of polyominoes.

npm install polyomino

API

Free, one-sided and fixed polyominoes are all supported:

  • get(n): return a Set of fixed polyominoes of order n.
  • OneSided(n): return a Set of one-sided polyominoes of order n.
  • Free(n): return a Set of free polyominoes of order n.

Examples

$ 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`));'
  ████
  ██  ██
██████████
      ██

    ██
  ██████
██  ██
██████
    ██

  ██
██████████
  ██  ██
    ████

  ██
  ██████
  ██  ██
██████
  ██

About

polyomino algorithms for node.js

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages