rp-scrabble
Simple, terminal-based Scrabble game
rack.h
Go to the documentation of this file.
1 
4 #ifndef RACK_H
5 #define RACK_H
6 #include <array>
7 #include <vector>
8 #include <string>
9 
10 class Tile;
11 
17 class Rack {
18 private:
19  std::array<Tile*, 7> rack;
20 
21 public:
22  Rack();
23  ~Rack();
24 
25  Tile* getTile(char ch);
26  std::vector<Tile*> getTileStrVec(std::string tileStr);
27 
28  void fill(std::vector<Tile*> t);
29  void addTile(Tile* t);
30  bool isEmpty();
31  void show();
32 };
33 
34 #endif
Definition: rack.h:17
std::vector< Tile * > getTileStrVec(std::string tileStr)
Definition: rack.cc:141
void fill(std::vector< Tile * > t)
Definition: rack.cc:99
Rack()
Definition: rack.cc:14
void show()
Definition: rack.cc:34
Tile * getTile(char ch)
Definition: rack.cc:80
void addTile(Tile *t)
Definition: rack.cc:120
~Rack()
Definition: rack.cc:22
bool isEmpty()
Definition: rack.cc:172
std::array< Tile *, 7 > rack
Definition: rack.h:19
Definition: tile.h:22