INF205/lab_3/21_and_22/test.cpp
2024-03-13 01:52:09 +01:00

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]);
}
}