39 lines
712 B
C++
39 lines
712 B
C++
//
|
|
// Created by pranshav on 11/18/24.
|
|
//
|
|
|
|
#ifndef BOARD_H
|
|
#define BOARD_H
|
|
#include "scores.h"
|
|
#include "points.h"
|
|
class Board {
|
|
private:
|
|
char** board;
|
|
int rows;
|
|
int cols;
|
|
|
|
public:
|
|
|
|
|
|
Board(int ro, int co);
|
|
|
|
~Board();
|
|
|
|
//Checking if memory being accessed is in or out of bounds to prevent segmentation faults
|
|
bool isOutOfBounds(int ro, int co, int max_ro, int max_co);
|
|
|
|
bool oddRowBoxComplete(point temp, Scores& scoreList, int max_ro, int max_co);
|
|
|
|
bool evenRowBoxComplete(point temp, Scores& scoreList, int max_ro, int max_co);
|
|
|
|
void updateBoard(char player, int x, int y);
|
|
|
|
void printBoard();
|
|
|
|
char** getBoard();
|
|
|
|
friend class Gameplay;
|
|
};
|
|
|
|
#endif //BOARD_H
|