-
Notifications
You must be signed in to change notification settings - Fork 0
/
ArenaInterface.h
59 lines (52 loc) · 1.38 KB
/
ArenaInterface.h
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
#ifndef ARENAINTERFACE_HPP_
#define ARENAINTERFACE_HPP_
#include <iostream>
#include <string>
#include <vector>
#include "FighterInterface.h"
/*
* WARNING: It is expressly forbidden to modify any part of this document, including its name
*/
class ArenaInterface
{
public:
ArenaInterface() {}
virtual ~ArenaInterface() {}
/*
* addFighter(string)
*
* Adds a new fighter to the collection of fighters in the arena. Do not allow
* duplicate names. Reject any string that does not adhere to the format
* outlined in the lab specs.
*
* Return true if a new fighter was added; false otherwise.
*/
virtual bool addFighter(std::string info) = 0;
/*
* removeFighter(string)
*
* Removes the fighter whose name is equal to the given name. Does nothing if
* no fighter is found with the given name.
*
* Return true if a fighter is removed; false otherwise.
*/
virtual bool removeFighter(std::string name) = 0;
/*
* getFighter(string)
*
* Returns the memory address of a fighter whose name is equal to the given
* name. Returns NULL if no fighter is found with the given name.
*
* Return a memory address if a fighter is found; NULL otherwise.
*/
virtual FighterInterface* getFighter(std::string name) = 0;
/*
* getSize()
*
* Returns the number of fighters in the arena.
*
* Return a non-negative integer.
*/
virtual int getSize() const = 0;
};
#endif /* ARENAINTERFACE_HPP_ */