GitList
Repositories
Help
Report an Issue
boggleQt
Code
Commits
Branches
Tags
Search
Tree:
bfb7340
Branches
Tags
master
boggleQt
logic
headers
Tile.h
pushing work done till now
Dev Ghai
commited
bfb7340
at 2013-09-23 08:22:07
Tile.h
Blame
History
Raw
#ifndef TILE_H #define TILE_H #include <QString> class Tile { private: /// <summary> /// X co-ordinate of the tile in the board array. /// This is a read only property. /// </summary> int _x; /// <summary> /// Y co-ordinate of the tile in the board array. /// This is a read only property. /// </summary> int _y; /// <summary> /// The alphabet contained in the tile. It can be any valid letter or 'QU'. /// This is a read only property. /// </summary> QString _alphabet; bool _hasBeenVisited; public: int getX() { return _x; } int getY() { return _y; } QString getAlphabet() { return _alphabet; } void setVisited(bool hasBeenVisited) { this->_hasBeenVisited = hasBeenVisited; } bool isVisited() { return this->_hasBeenVisited; } Tile(int x, int y, QString alphabet) { this->_x = x; this->_y = y; this->_alphabet = alphabet; this->_hasBeenVisited = false; } Tile(const Tile& tileToBeCopied) { this->_x = tileToBeCopied._x; this->_y = tileToBeCopied._y; this->_alphabet = tileToBeCopied._alphabet; this->_hasBeenVisited = tileToBeCopied._hasBeenVisited; } }; #endif // TILE_H