-
Notifications
You must be signed in to change notification settings - Fork 0
/
battle.hh
47 lines (26 loc) · 972 Bytes
/
battle.hh
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
// Time-stamp: <2016-03-02 16:44:34 dmendyke>
#ifndef __BATTLE_HH__
#define __BATTLE_HH__
// Required header files
//-----------------------------------------------------------------------------
#include "fleet.hh" // parsec::fleet_t
#include "combatant.hh" // parsec::combatant_t
// Project namespace
//-----------------------------------------------------------------------------
namespace parsec {
// Wrapper around a single battle between two fleets
//---------------------------------------------------------------------------
class battle_t {
public:
battle_t( fleet_t&, fleet_t& );
virtual ~battle_t( );
void run(); // Run the fight until one fleet is destroyed
protected:
void victory_( const combatant_t&, const combatant_t& );
void engagement_( ); // fight a single combat
private:
fleet_t& defender_;
fleet_t& attacker_;
}; // end class battle_t
}; // end project NS
#endif // __BATTLE_HH__