/[eliot]/eliot/game/coord.h
ViewVC logotype

Diff of /eliot/game/coord.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by ipkiss, Fri Nov 4 23:26:03 2005 UTC revision 1.5 by ipkiss, Sat Nov 5 13:56:59 2005 UTC
# Line 35  public: Line 35  public:
35    
36      enum Direction {VERTICAL, HORIZONTAL};      enum Direction {VERTICAL, HORIZONTAL};
37    
38      Coord();      // Construction, destruction
39        Coord(int iRow = -1, int iCol = -1, Direction iDir = HORIZONTAL);
40      Coord(const string &iStr);      Coord(const string &iStr);
41      virtual ~Coord();      virtual ~Coord() {}
42    
43      void setRow(int iRow);      // Accessors
44      void setCol(int iCol);      void setRow(int iRow)       { m_row = iRow; }
45      void setDir(Direction iDir);      void setCol(int iCol)       { m_col = iCol; }
46        void setDir(Direction iDir) { m_dir = iDir; }
47      Direction getDir() const;      int getRow() const          { return m_row; }
48      int getRow() const;      int getCol() const          { return m_col; }
49      int getCol() const;      Direction getDir() const    { return m_dir; }
50    
51        bool isValid() const;
52      void operator=(const Coord &iOther);      void operator=(const Coord &iOther);
53    
54        // Swap the coordinates (without changing the direction)
55        void swap();
56    
57      void setFromString(const string &iStr);      void setFromString(const string &iStr);
58      string toString() const;      string toString() const;
59    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26