-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhex.hh
More file actions
41 lines (22 loc) · 735 Bytes
/
hex.hh
File metadata and controls
41 lines (22 loc) · 735 Bytes
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
// Time-stamp: <2016-03-07 10:21:45 dmendyke>
#ifndef __HEX_HH__
#define __HEX_HH__
// Project Namespace
//-----------------------------------------------------------------------------
namespace parsec {
// Wrapper around a single hex
//---------------------------------------------------------------------------
class hex_t {
public:
hex_t( int = 0, int = 0 );
virtual ~hex_t();
int distance( const hex_t& ) const;
protected:
private:
int q_; // the 'x' axial
int r_; // the 'y' axial
friend int distance_between( const hex_t&, const hex_t& );
static int distance_between( const hex_t&, const hex_t& );
}; // end hex_t
}; // end project NS parsec
#endif // __HEX_HH__