rp-scrabble
Simple, terminal-based Scrabble game
|
#include <square.h>
Public Member Functions | |
Square (enum_sqType st, int r, int c) | |
~Square () | |
int | getRow () |
int | getCol () |
int | getType () |
Square * | getLeft () |
Square * | getRight () |
Square * | getAbove () |
Square * | getBelow () |
Tile * | getTile () |
void | setLeft (Square *l) |
void | setRight (Square *r) |
void | setAbove (Square *u) |
void | setBelow (Square *d) |
void | setTile (Tile *t) |
bool | isEmpty () |
bool | checkNeighboursH () |
bool | checkNeighboursV () |
void | show () |
Private Attributes | |
enum_sqType | sqType |
Tile * | tileInSquare |
int | row |
int | col |
Square * | left |
Square * | right |
Square * | above |
Square * | below |
Implements a single square on the Scrabble board
Squares can be one of 5 types and can either be empty, or occupied by a Tile
Square::Square | ( | enum_sqType | st, |
int | r, | ||
int | c | ||
) |
bool Square::checkNeighboursH | ( | ) |
bool Square::checkNeighboursV | ( | ) |
Square * Square::getAbove | ( | ) |
Square * Square::getBelow | ( | ) |
int Square::getCol | ( | ) |
Square * Square::getLeft | ( | ) |
Square * Square::getRight | ( | ) |
int Square::getRow | ( | ) |
Tile * Square::getTile | ( | ) |
int Square::getType | ( | ) |
bool Square::isEmpty | ( | ) |
void Square::setAbove | ( | Square * | u | ) |
void Square::setBelow | ( | Square * | d | ) |
void Square::setLeft | ( | Square * | l | ) |
void Square::setRight | ( | Square * | r | ) |
void Square::setTile | ( | Tile * | t | ) |
void Square::show | ( | ) |
|
private |