Skip to content

ivankozlovcodes/fillit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fillit

TOC

What is it about?

A bin-packing algorithm to fit Tetris pieces into a box, using recursive backtracking. Bitwise implementations.

Creator: Pedago Team. Task description

The purpose is to make the smallest possible "square" (which can contain holes) with a given list of tetriminos(tetris pieces), but the disposition must be as such that it returns the first possible solution when placing them recursively from the top left.

Usage

Download and compile repo:

    git clone https://github.com/IvanKozlov95/fillit
    cd fillit
    make

Executable fillit will be created. Usage:

    ./fillit [file]

Examples

There are some example files in sample folder for you to try it out.

    ./fillit samples/test_8

    .AABB..
    AACCB..
    .CC.BDD
    .EE.DD.
    EEFFGG.
    .FFGGHH
    ....HH.

Authors

This project was developed jointly by Ivan Kozlov @ivankozlov95 and Marc G Tan @mgia

License

This project is licensed under the GNU General Public License 3.