Tile - Shepphard/Rubics GitHub Wiki
Tile.h and Tile.cpp
The class Tile describes the smallest Object of the Rubic’s Cube. It’s just one little area containing one single color. The source code is more or less self explanatory.
Tile.h
class Tile
{
private:
signed int t_color; //The Color of the Tile
public:
//Constructors
Tile();
Tile(int color);
//Set or Get Color
void setColor(int const color);
int getColor() const;
}
Tile.cpp
Tile::Tile(int color)
{
t_color = color;
}
Tile::Tile()
{
t_color = -1; // Default Value -1
}
void Tile::setColor(int const color)
{
t_color = color;
}
int Tile::getColor() const
{
return t_color;
}