INF205/lab_3/21_and_22/test.cpp

21 lines
507 B
C++
Raw Normal View History

2024-03-12 23:06:47 +00:00
#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]);
}
}