1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#ifndef BOARD_H_
#define BOARD_H_
#include <iostream>
#include <array>
class Board
{
std::array<std::array<char, 8>, 8> board
{{
{ -2 , -3 , -4 , -5 , -6 , -4 , -3 , -2 },
{ -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 },
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
{ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 },
{ 2 , 3 , 4 , 5 , 6 , 4 , 3 , 2 },
}};
public:
void setBoard();
char posQuery();
//void drawBoard(const std::array<std::array<int, 8>, 8> &n);
private:
void drawBoard(const std::array<std::array<int, 8>, 8>& n);
};
#endif
|