44 lines
451 B
C++
44 lines
451 B
C++
#include "Cell.hpp"
|
|
|
|
// Constructors
|
|
|
|
Cell::Cell()
|
|
{
|
|
m_value = ".";
|
|
}
|
|
|
|
Cell::Cell(std::string value)
|
|
{
|
|
m_value = value;
|
|
}
|
|
|
|
// Destructor
|
|
|
|
Cell::~Cell()
|
|
{
|
|
}
|
|
|
|
// Getters and setters
|
|
|
|
bool Cell::isEmpty()
|
|
{
|
|
return (m_value == ".");
|
|
}
|
|
|
|
std::string Cell::getValue()
|
|
{
|
|
return m_value;
|
|
}
|
|
|
|
bool Cell::equals(Cell *otherCell)
|
|
{
|
|
return (m_value == otherCell->getValue());
|
|
}
|
|
|
|
// Description
|
|
|
|
std::string Cell::description()
|
|
{
|
|
return m_value;
|
|
}
|
|
|