21 lines
507 B
C++
21 lines
507 B
C++
#include "queens.hh"
|
|
#include <iostream>
|
|
|
|
void print_conflict(queens::Conflict c)
|
|
{
|
|
std::cout << "🚨 Conflict! "<< "Piece 1: x="<< c.piece_1_x << ", y=" << c.piece_1_y
|
|
<< " Piece 2: x="<< c.piece_2_x << ", y=" << c.piece_2_y << "\n";
|
|
}
|
|
|
|
int main()
|
|
{
|
|
queens::Configuration config = queens::Configuration(8, 8, 10);
|
|
std::vector<queens::Conflict> conflicts = config.get_conflicts();
|
|
for (int i=0; i<conflicts.size(); i++)
|
|
{
|
|
print_conflict(conflicts[i]);
|
|
|
|
}
|
|
|
|
|
|
} |