Hi, I am new with c++. I'm trying to create a chess board program using pointer, object and class. This is my header file
#ifndef BOARD_H
#define BOARD_H
class Board;
#include "Piece.h"
#include <iostream>
using namespace std;
#define MAXROWS 8
#define MAXCOLS 8
typedef Piece* PiecePtr;
class Board
{
public:
Board();
Board (const Board& other);
~Board();
bool move (int fromX, int fromY, int toX, int toY);
bool place (const PiecePtr& p, int x, int y);
bool remove (int x, int y);
void write (ostream& out) const;
Board& operator= (const Board& other);
private:
PiecePtr grid[MAXROWS][MAXCOLS];
void initBoard();
void clearBoard();
void copyBoard(const Board& other);
bool canMove (int fromX, int fromY, int toX, int toY);
};
ostream& operator<< (ostream& out, const Board& b);
#endif
I want to draw a board like the link below but I don't know how.The link does not contain any virus, it's because I can't upload any picture in here so I have to convert it to html. Please help me, I really appreciate your help.
http://www.htmlpublish.com/convert-pdf-to-html/success.aspx?zip=DocStorage/3d537d7ca44b4597ae3f13c9d9080e44/Screen%20Shot%202015-04-12%20at%201.40.15%20AM.zip&app=pdf2word