#ifndef _KNIGHT_H_
#define _KNIGHT_H_

#include <iostream>
#include <stack>
#include <iomanip>

class Knight {

	private:

		int chessboard_side;
		int** chessboard;
		int** moves;
		int moves_index;
		struct position {

			int x,y,level;
		};
		std::stack<position> st_moves;
		bool clear_chessboard();
		inline bool next_move(const position pos,const int x,const int y, std::stack<position> & st, const int level);

	public:

		Knight(int chessboard_side);
		~Knight();

		bool runTour(int pos_x, int pos_y);
		int** getmoves();
		
		#ifndef CHECK
		#define CHECK
		bool checkTour(int** tour_plan, int chessboard_side);
		#endif

  	friend	std::ostream & operator<<(std::ostream & os, const Knight &k);
};

#endif