Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Tic-Tac-Toe/Grid.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
23 lines (18 sloc)
608 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef GRID_H | |
#define GRID_H | |
#include <iostream> | |
class Grid | |
{ | |
public: | |
Grid(); | |
bool checkWin(char symbol); | |
void resetGrid(); | |
void printGrid(); | |
int checkChoice(char symbol, int input); | |
char viewSquare(int position); | |
private: | |
const char blankGrid[9] = {'1', '2', '3', '4', '5', '6', '7', '8', '9'}; // Used to reset the main game grid | |
char grid[9] = {'1', '2', '3', '4', '5', '6', '7', '8', '9'}; // Grid the game is played on and that is displayed to the user | |
void replaceSquare(char symbol, int input); | |
}; | |
#endif // GRID_H |