Skip to content

Program that receives list of tetrominoes to assemble them in order to create the smallest square possible.

Notifications You must be signed in to change notification settings

SpectreH/tetris-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TETRIS-OPTIMIZER

About The Project

Tetris-optimizer is a program that receives only one argument, a path to a text file which contains a list of tetrominoes to assemble them in order to create the smallest square possible.

Installation

git clone https://github.com/SpectreH/tetris-optimizer.git
cd tetris-optimizer

Usage

go run . [FILE]

Examples

cat tests/sample.txt
...#
...#
...#
...#

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

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

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

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

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

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

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

go run . tests/sample.txt
ABBBB.
ACCCEE
AFFCEE
A.FFGG
HHHDDG
.HDD.G

Additional information

Only standard go packages were in use. In tests folder you can find several presets to generate squares and in error-tests folder some bad presets examples.

To go through all tests, you can use:

bash test.sh

Author

About

Program that receives list of tetrominoes to assemble them in order to create the smallest square possible.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published