1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
#ifndef __FACTORYFORSHIP_
#define __FACTORYFORSHIP_ 1
#include<iostream>
#include <string>
#include "AbstractShip.h"
#include "fct_strike.h"
using namespace std;
class FactoryForShip:public AbstractShip
{
private:
string Name;
string Command;
int nbAllowedAttacks;
int *AllowedAttacks;
int *MBonus;
int nbDefaultAttacks;
int *DefaultAttacks;
int Shield;
int Handling;
int StrikeCost;
bool Hidden;
bool LastDefence;
protected:
bool IsAllowed(Strike);
public:
FactoryForShip();
FactoryForShip(string _Name, string _Command, int _nbAllowedAttacks, int* _AllowedAttacks, int* _MBonus, int _nbDefaultAttacks,int *_DefaultAttacks,
int _LifePoints, int _Shield, int _Handling, int _StrikeCost, bool _Hidden);
~FactoryForShip();
string getName();
void setName(string);
string getCommand();
void setCommand(string);
int getnbAllowedAttacks();
void setnbAllowedAttacks(int);
int* getMBonus();
void setMBonus(int* _MBonus);
int* getAllowedAttacks();
void setAllowedAttacks(int*);
int getnbDefaultAttacks();
void setnbDefaultAttacks(int);
int* getDefaultAttacks();
void setDefaultAttacks(int*);
int getShield();
void setShield(int);
int getHandling();
void setHandling(int);
int getStrikeCost();
void setStrikeCost(int);
bool getHidden();
void setHidden(bool);
bool getLastDefence();
void setLastDefence(bool);
virtual Strike GetDefauldStrike() = 0;
Strike fight();
bool dodge(Strike&);
};
#endif |