57 lines
1.3 KiB
C++
57 lines
1.3 KiB
C++
#pragma once
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <vector>
|
|
#include "FighterInterface.h"
|
|
using namespace std;
|
|
|
|
/*
|
|
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(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(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(string name) = 0;
|
|
|
|
/*
|
|
getSize()
|
|
|
|
Returns the number of fighters in the arena.
|
|
|
|
Return a non-negative integer.
|
|
*/
|
|
virtual int getSize() = 0;
|
|
};
|