Files
TicTacToe/BoardClass/Board.h

41 lines
993 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#ifndef TICTACTOE_BOARD_H
#define TICTACTOE_BOARD_H
#include <iostream>
#include <string>
typedef unsigned int unint;
using namespace std;
//
const int LINES = 3, COLUMNS = 3;
//
//Класс, отвечающий за формирование и вывод поля
class Board {
public:
//
//ПЕРЕМЕННЫЕ
//Флаги победы первого и второго номеров, а также счётчик занятых клеток
bool Xwonflag=false;
bool Owonflag=false;
unint drawcounter=1;
//ИГРОВОЕ ПОЛЕ
//первое число LINES характеризует строку
//второе число COLUMNS характеризует столбик
string board[LINES][COLUMNS] = {
{"e", "e", "e"},
{"e", "e", "e"},
{"e", "e", "e"}
};
void BoardShow();
void BoardClr();
void XWon();
void OWon();
void Draw();
};
#endif //TICTACTOE_BOARD_H