Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

CSC112 Spring 2016 Examples

2370 views
1
//Header file for the master-of-the-mind Alpaca
2
3
#ifndef ISCHOMER_ELPACA_H
4
#define ISCHOMER_ELPACA_H
5
6
#include "../alpaca.h"
7
#include "../alpacaFracasPack.h"
8
#include <string>
9
10
class elPaca : public Alpaca {
11
public:
12
//set up the alapca with 100 points
13
elPaca(const std::string &nickName, AlpacaFracasPack *p) : Alpaca(100), nickName(nickName), pack(p) {}
14
15
//virtual functions to override
16
virtual std::string name();
17
virtual void act(Alpaca *opponent);
18
19
//moveset
20
void burrito(Alpaca *opponent); //Weak attack
21
void taco(Alpaca *opponent); //strong attack
22
void sunbrero(); //defense++
23
void chile(); //attack++
24
void queso(Alpaca *opponent); //stun move
25
26
protected:
27
std::string nickName;
28
AlpacaFracasPack *pack;
29
};
30
31
#endif
32
33