-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathline.hh
51 lines (32 loc) · 1.14 KB
/
line.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
48
49
50
51
// Time-stamp: <2016-03-02 16:22:45 dmendyke>
#ifndef __LINE_HH__
#define __LINE_HH__
//
// line.hh: Defines a Wall of Battle with two ships defending
// and three ships attacking.
//
// Required header files
//-----------------------------------------------------------------------------
#include <array> // std::array
#include <iosfwd> // forward declaration of ostream
#include "fleet.hh" // parsec::fleet_t
#include "combatant.hh" // parsec::combatant_t
//-----------------------------------------------------------------------------
namespace parsec {
// Wrapper around the line of battle
//---------------------------------------------------------------------------
class battle_line_t {
public:
battle_line_t( fleet_t& );
virtual ~battle_line_t();
combatant_t operator[]( int );
friend std::ostream& operator<<( std::ostream&, const battle_line_t& );
protected:
void fill_line_();
private:
std::array< combatant_t, 0x3 > line_;
fleet_t& fleet_;
}; // end class battle_line_t
std::ostream& operator<<( std::ostream&, const battle_line_t& );
}; // end project NS
#endif // __LINE_HH__