-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcombatant.cc
More file actions
37 lines (23 loc) · 1.05 KB
/
combatant.cc
File metadata and controls
37 lines (23 loc) · 1.05 KB
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
// Time-stamp: <2016-03-03 09:24:01 dmendyke>
// Required header files
//-----------------------------------------------------------------------------
#include "combatant.hh" // parsec::combatant_t
// NS short hand
//-----------------------------------------------------------------------------
using namespace parsec;
// Constructor
//-----------------------------------------------------------------------------
combatant_t::combatant_t( int ship_attack, uint64_t ship_id )
: attack( ship_attack ), id( ship_id ) {
}; // end combatant_t constructor
// Other constructor
//-----------------------------------------------------------------------------
combatant_t::combatant_t( const ship_t& ship )
: combatant_t( 0x0, ship.id() ) {
if ( id != 0x0 ) attack = ship();
}; // end other constructor
// Compare two combatant attack values
//-----------------------------------------------------------------------------
//combatant_t::operator()( const combatant_t& def, const combatant_t& att ) {
// return def.attack > att.attack;
//}; // end operator()