#include #include #include using namespace std; class piece { char color; //w for white, b for white, e for empty int xpos; int ypos; public: piece(int x, int y) { xpos = x; ypos = y; } void setColor(char kolor) { color = kolor; } char getColor() { return color; } }; struct moves { int x; int y; string moveType; moves(int _x, int _y, string m) { x = _x; y = _y; moveType = m; } }; class Board { char boardArray [8][8]; public: Board() { for (int i = 0; i < 2; ++i) { for (int j = 0; j < 8; ++j) { boardArray[i][j] = 'X'; } } for (int i = 2; i < 6; ++i) { for (int j = 0; j < 8; ++j) { boardArray[i][j] = '_'; } } for (int i = 6; i <= 7; ++i) { for (int j = 0; j < 8; ++j) { boardArray[i][j] = 'O'; } } } void displayBoard() { cout<<"\n\n"; for (int i = 0; i < 8; ++i) { for (int j = 0; j < 8; ++j) { cout< 8 || x < 0 || y > 8 || y < 0) { cout<<"ERROR: index out of bound!"< viewPossibleMoves() { cout<<"not yet!"<>x; cout<<"y: "; cin>>y; cout<<"moveType: "; cin>>move; b.move(x,y,move); } }