rp-scrabble
Simple, terminal-based Scrabble game
tile.h
Go to the documentation of this file.
1 
4 #ifndef TILE_H
5 #define TILE_H
6 #include <string>
7 
8 class Bag;
9 class Rack;
10 class Square;
11 
16 
22 class Tile {
23 private:
25  char letter;
26  int points;
30 
31 public:
32  Tile(char l, int p, enum_location p_loc);
33  Tile(Tile& source);
34  ~Tile() {}
35 
36  char getLetter();
37  std::string getLetterStr();
38  int getPoints();
39  int getLoc();
40  Rack* getRack();
41  Bag* getBag();
42  Square* getSquare();
43 
44  void setLoc(int loc);
45  void setBag(Bag* b);
46  void setRack(Rack* r);
47  void setSquare(Square* s);
48  void show();
49 
50 };
51 
52 #endif
enum_location loc
Definition: bag.cc:13
Definition: bag.h:15
Definition: rack.h:17
Definition: square.h:30
Definition: tile.h:22
int getPoints()
Definition: tile.cc:73
enum_location presentLoc
Definition: tile.h:29
void setSquare(Square *s)
Definition: tile.cc:207
Square * tSquare
Definition: tile.h:24
Bag * getBag()
Definition: tile.cc:133
void show()
Definition: tile.cc:49
Rack * getRack()
Definition: tile.cc:121
Bag * tBag
Definition: tile.h:27
int points
Definition: tile.h:26
Tile(char l, int p, enum_location p_loc)
Definition: tile.cc:21
Square * getSquare()
Definition: tile.cc:145
void setRack(Rack *r)
Definition: tile.cc:170
std::string getLetterStr()
Definition: tile.cc:109
Rack * tRack
Definition: tile.h:28
~Tile()
Definition: tile.h:34
char letter
Definition: tile.h:25
void setBag(Bag *b)
Definition: tile.cc:157
int getLoc()
Definition: tile.cc:85
void setLoc(int loc)
Definition: tile.cc:183
char getLetter()
Definition: tile.cc:61
enum_location
Definition: tile.h:15
@ BAG
Definition: tile.h:15
@ BOARD
Definition: tile.h:15
@ RACK
Definition: tile.h:15