INF205/lab_3/21/queens.hh

48 lines
807 B
C++
Raw Normal View History

2024-03-12 23:06:47 +00:00
#include <array>
#include <vector>
namespace queens
{
// Easy way represent a conflict:
struct Conflict
{
int piece_1;
int piece_1_x;
int piece_1_y;
int piece_2;
int piece_2_x;
int piece_2_y;
};
class Piece
{
public:
int x;
int y;
Piece(int x, int y);
};
class Queen: public Piece
{
using Piece::Piece;
};
class Board
{
public:
int m;
int n;
};
class Configuration
{
public:
int number_of_pieces;
std::vector<Piece> pieces;
Board* board;
Configuration(int m, int n, int number_of_pieces);
std::vector<Conflict> get_conflicts();
};
}