#include <stdio.h>
#include <stdlib.h>
#include "stack.h"
#include "queue.h"

#ifndef _queens_h
#define _queens_h

#define ROWS 15
#define EMPTY -1
#define BFS 0
#define DFS 1
#define SEARCH BFS

typedef struct board {
  int board[ROWS];
  int nextRow;
} BOARD;

typedef BOARD *BOARDPTR;


BOARDPTR InitBoard ();

BOARDPTR CopyBoard (BOARDPTR old);

void AddMoves (BOARDPTR board, NODEPTR *open, NODEPTR *tail, int search);

BOARDPTR CreateBoard ();

BOARDPTR Search (NODEPTR *open, NODEPTR *tail, int *moves, int search);

void PrintBoard (BOARDPTR board);

void Add (BOARDPTR board, NODEPTR *open, NODEPTR *tail, int search);

BOARDPTR Remove (NODEPTR *open, NODEPTR *tail, int search);

int IsGoal (BOARDPTR board);

int IsLegal (int row, int col, int board[ROWS]);

#endif

