/BSQ

Primary LanguageC

The aim of this project is to find the biggest square on a map, avoiding obstacles.

A file containing the map will be provided. It’ll have to be passed as an argument for the program.

  • The first line of the map contains information on how to read the map :
  • The number of lines on the map;
  • The "empty" character;
  • The "obstacle" character;
  • The "full" character.

The map is made up of ’"empty" characters’, lines and ’"obstacle" characters’.

The aim of the program is to replace ’"empty" characters’ by ’"full" characters’ in order to represent the biggest square possible.

In the case that more than one solution exists, we’ll choose to represent the square that’s closest to the top of the map, then the one that’s most to the left.

How to run the program :

just type make, and a program named bsq will appear , you can then use it by providing a text file as an argument.

the text file must meet the valid map requierements , you can find some map examples in the ./map directory.

you can also run the program without argument. In this case you will have to draw your own map in the standard input !