Skip to content

pm37/Fillit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fillit

Fillit is a recursive backtracking algorithm that fits a set of Tetriminos in the smallest possible square without rotating the Tetriminos. For more information, please read the pdf.

Here is an example of valid input of 9 Tetriminos (maximum of 26 blocks):

....
.##.
.##.
....

...#
...#
...#
...#

....
..##
.##.
....

....
..#.
.##.
.#..

.###
...#
....
....

##..
.#..
.#..
....

....
..##
.##.
....

.#..
.##.
..#.
....

....
###.
.#..
....

Solution (each individual tetriminos renamed starting from A):

AAB.CCD
AABCCDD
FFB..D.
.FBEEE.
HF.GGE.
HHGGIII
.H...I.

How to use:

Clone the repo and open it:

git clone https://github.com/pimichau/Fillit.git
cd Fillit
make

Then choose an input file from the tests folder:

./fillit tests/valid_1

For this example:

....
.##.
..#.
..#.

.##.
..#.
..#.
....

The output should be this:

AABB
.A.B
.A.B
....

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published