17 |
/* along with this program; if not, write to the Free Software */ |
/* along with this program; if not, write to the Free Software */ |
18 |
/* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ |
/* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ |
19 |
|
|
|
/* $Id$ */ |
|
|
|
|
20 |
/** |
/** |
21 |
* \file coord.h |
* \file coord.h |
22 |
* \brief Game coordinates system |
* \brief Game coordinates system |
27 |
#ifndef _COORD_H |
#ifndef _COORD_H |
28 |
#define _COORD_H |
#define _COORD_H |
29 |
|
|
|
enum Tdirection {VERTICAL, HORIZONTAL}; |
|
|
typedef enum Tdirection Direction; |
|
30 |
|
|
31 |
class Coord |
class Coord |
32 |
{ |
{ |
33 |
public: |
public: |
34 |
|
|
35 |
|
enum Direction {VERTICAL, HORIZONTAL}; |
36 |
|
|
37 |
Coord(); |
Coord(); |
38 |
Coord(std::string); |
Coord(const std::string&); |
39 |
~Coord(); |
virtual ~Coord(); |
40 |
|
|
41 |
int valid(); |
int valid(); |
42 |
|
|
43 |
void set(std::string); |
void set(const std::string&); |
44 |
void setRow(int iRow); |
void setRow(int iRow); |
45 |
void setCol(int iCol); |
void setCol(int iCol); |
46 |
void setDir(Direction iDir); |
void setDir(Direction iDir); |
47 |
|
|
48 |
Direction getDir() const; |
Direction getDir() const; |
60 |
|
|
61 |
#endif |
#endif |
62 |
|
|
63 |
|
|
64 |
/// Local Variables: |
/// Local Variables: |
65 |
/// mode: hs-minor |
/// mode: hs-minor |
66 |
/// c-basic-offset: 4 |
/// c-basic-offset: 4 |