Class Cell

Class Documentation

class Cell

Simple structure containing the x and y positions of a cell.

Public Functions

Cell()

Default contructor for Cell.

Sets x and y to 0.

Cell(long x, long y)

Constructor for Cell, taking the x and y position.

Parameters
  • x: the x location
  • y: the y location

Cell &operator=(Cell const &c)

Overloading equality operator.

Return
the cell with the new values
Parameters
  • c: the Cell containing the values to overload

bool operator==(Cell const &c)

Equality operator for Cell.

Return
true if the x and y locations are identical
Parameters
  • c: the Cell object to compare against

bool operator!=(Cell const &c)

Inequality operator for Cell.

Return
true if the x and y locations are not identical
Parameters
  • c: the Cell object to compare against

Public Members

long x
long y