Date: 30/4/2018
Last Edit: 10/5/2018
Assignment 6 in a C++ course
Dvir Barzilay
Kineret Ruth Nahary
Create a class called Board that represent the game tic-tac-toe.
The class is built by inputing it the board's size N * N.
Every square has to have only: '.' \ 'X' \ 'O' - the dot char represents an empty square.
The class has to support the operators: output, =, [].
The class has to deal with exceptions:
inputing an illegal char or trying to exceed the board's limits throws an exception according to the case.
.:
.gitignore
Board.cpp
Board.hpp
DerivedChar.cpp
DerivedChar.h
Coordinate.cpp
Coordinate.h
README.md
main.cpp
IllegalCoordinateException.cpp
IllegalCharException.cpp
Symbol.h
Makefile
- main.cpp - This class has some examples to run and check the code with it.
- Board.hpp - This class represents a board game of tic-tac-toe. Its fields are :
size - The board's size N * N.
board - The board game itself, build by a matrix of DerivedChar size N * N. - Board.cpp - The implementation of Board.hpp.
- Coordinate.hpp - This class represent a specific place in the matrix - board. Its fields are : X,Y.
- Coordinate.cpp - The implementation of Coordinate.hpp.
- DerivedChar.hpp - This class represent a square in the matrix - board. Its field is a char c.
- DerivedChar.cpp - The implementation of DerivedChar.hpp.
- IllegalCoordinateException.cpp - This class represents an exception thrown when illegal coordinate values are given.
- IllegalCharException.cpp - This class represents an exception thrown when an illegal char is given as an input.
The llegal chars in the game: '.', 'X', 'O' . - Symbol.h - This class represents the llegal chars in the game.
To compile all the files we have the file "Makefile" - converts all to binary type "file.o" files.
In order to compile by using the Makefile file - we run the command "make".
All the binary files will be created, and an "a.out" file to run the program with it.