#include <iostream>
using namespace std;

class Board {

private:
    char grid[3][3];
public:
    Board();
    int makeMove(int xIn, int yIn,char playerTurnIn);
    void print();

};

/*default constructor which initializes an empty array with .*/
Board::Board():
  grid{{'.','.','.'},{'.','.','.'},{'.','.','.'}}
{ }

/*declare this in the board class

make sure to add Board:: for makeMove and print functions*/
int Board::makeMove(int xIn, int yIn,char playerTurnIn) {
    if (grid[xIn][yIn]=='.') {
        grid[xIn][yIn] = playerTurnIn;
        return true;
    }
    else {
        return false;
    }
}

void Board::print() {
    std::cout<<" 0 1 2"<<std::endl;
    for (int row = 0; row < 3; row++) {
        std::cout<<row<<' ';
        for (int col = 0; col < 3; col++) {
            std::cout<<grid[row][col]<<' ';
        }
        std::cout<<std::endl;

    }
}

int main() {
	Board board1;
    board1.print();
    board1.makeMove(0,0,'x');
    board1.print();
    if(board1.makeMove(0,0,'x'))
        std::cout<<"true"<<std::endl;
    else
        std::cout<<"false"<<std::endl;
    std::cout<<"finished!"<<std::endl;
	return 0;
}