Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //--------------------------------------------------------
- // Tic-Tac-Toe - TicTacToe.h
- //--------------------------------------------------------
- // Project: Individual Project Prompt - Tic-Tac-Toe
- // By: Shamyak Singh
- // Course: CS 371 - Introduction To Computer Networking
- // File: main.cpp
- // Date: November 19th 2018
- // Purpose: The purpose of this project is to play a game
- // of Tic-Tac-Toe that can be played remotely by
- // using socket programming in order to create a
- // client-server application that executes the
- // game.
- //--------------------------------------------------------
- // Header File
- enum Marker {
- none, X, O
- }
- class TicTacToe{
- public:
- TicTacToe();
- Marker getPosition(int x, int y);
- void setPosition(int x, int y, Marker M);
- Marker getWinner();
- bool isFull();
- bool isGameOver();
- void print();
- private:
- Marker board [3][3];
- Marker checkColumnWinner(int column);
- Marker checkRowWinner(int row);
- Marker checkDiagonalDown();
- Marker checkDiagonalUp();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement