one implementation of the exam
This commit is contained in:
30
cpp_module_02/main.cpp
Normal file
30
cpp_module_02/main.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "Warlock.hpp"
|
||||
#include "Fwoosh.hpp"
|
||||
#include "Dummy.hpp"
|
||||
#include "BrickWall.hpp"
|
||||
#include "Polymorph.hpp"
|
||||
#include "TargetGenerator.hpp"
|
||||
#include "Fireball.hpp"
|
||||
|
||||
int main()
|
||||
{
|
||||
Warlock richard("Richard", "foo");
|
||||
richard.setTitle("Hello, I'm Richard the Warlock!");
|
||||
BrickWall model1;
|
||||
|
||||
Polymorph* polymorph = new Polymorph();
|
||||
TargetGenerator tarGen;
|
||||
|
||||
tarGen.learnTargetType(&model1);
|
||||
richard.learnSpell(polymorph);
|
||||
|
||||
Fireball* fireball = new Fireball();
|
||||
|
||||
richard.learnSpell(fireball);
|
||||
|
||||
ATarget* wall = tarGen.createTarget("Inconspicuous Red-brick Wall");
|
||||
|
||||
richard.introduce();
|
||||
richard.launchSpell("Polymorph", *wall);
|
||||
richard.launchSpell("Fireball", *wall);
|
||||
}
|
||||
Reference in New Issue
Block a user