Skip to content

SkyfightTV/BSQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BSQ

You must find the largest possible square on a board while avoiding obstacles. The board can be generated two ways. The first one is by reading a file passed as the program’s argument.

The file is valid if it is respecting those constraints:

• its first line contains the number of lines on the board (and only that),
• “.” (representing an empty place) and “o” (representing an obstacle) are the only two characters for the other lines,
• all of the lines are of the same length (except the first one),
• it contains at least one line,
• each line is terminated by ‘\n’.

You program must print the board, with some “.” replaced by “x” to represent the largest square you found.

Run

Clone the project

  git clone https://github.com/SkyfightTV/BSQ.git

Go to the project directory

  cd BSQ

Create binary file

  make 

To solve a map

  ./bsq [map_path]

To generate a map

  ./bsq [map_size] [map_pattern]

Demo

Solve map

Solve image

Generate map

Generate image

Running Tests

To run tests, run the following command

  make tests_run

To create coverage folder, run the following command

  make coverage

Authors

About

Find the biggest square

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published