Design Patterns
room_with_a_bomb.h
Go to the documentation of this file.
1 // Based on "Design Patterns: Elements of Reusable Object-Oriented Software"
2 // book by Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm
3 //
4 // Created by Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan.
5 
6 #ifndef CREATIONAL_MAZEPARTS_ROOM_WITH_A_BOMB_H_
7 #define CREATIONAL_MAZEPARTS_ROOM_WITH_A_BOMB_H_
8 
9 #include "room.h"
10 
11 namespace creational
12 {
13 namespace commons
14 {
15 class RoomWithABomb : public Room
16 {
17  public:
19  explicit RoomWithABomb(const int& room_number, const bool& has_bomb);
20 
21  virtual RoomWithABomb *Clone() const override;
22  bool has_bomb() const;
23  void Initialize(const bool& bombed);
24 
25  private:
26  bool has_bomb_;
27 };
28 }
29 }
30 
31 #endif
32 
RoomWithABomb(const RoomWithABomb &)
Definition: room_with_a_bomb.cc:14
Definition: bombed_maze_factory.cc:11
void Initialize(const bool &bombed)
Definition: room_with_a_bomb.cc:26
int room_number() const
Definition: room.cc:43
Definition: room.h:16
bool has_bomb() const
Definition: room_with_a_bomb.cc:16
Definition: room_with_a_bomb.h:15
virtual RoomWithABomb * Clone() const override
Definition: room_with_a_bomb.cc:21