[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Camino-devel] camino/src/common Tile.h Tile.cpp
From: |
Pascal Audoux |
Subject: |
[Camino-devel] camino/src/common Tile.h Tile.cpp |
Date: |
Sun, 26 Jan 2003 04:48:06 -0500 |
CVSROOT: /cvsroot/camino
Module name: camino
Changes by: Pascal Audoux <address@hidden> 03/01/26 04:48:06
Modified files:
src/common : Tile.h Tile.cpp
Log message:
manage 'rotation' attributes
Patches:
Index: camino/src/common/Tile.cpp
diff -u camino/src/common/Tile.cpp:1.2 camino/src/common/Tile.cpp:1.3
--- camino/src/common/Tile.cpp:1.2 Sat Jan 25 13:46:18 2003
+++ camino/src/common/Tile.cpp Sun Jan 26 04:48:05 2003
@@ -2,7 +2,7 @@
**
** Camino
**
-** Version : $Id: Tile.cpp,v 1.2 2003/01/25 18:46:18 Audoux Exp $
+** Version : $Id: Tile.cpp,v 1.3 2003/01/26 09:48:05 Audoux Exp $
**
** Author(s) : Philippe Fremy, Pascal Audoux
** Creation : 14/01/2003
@@ -32,12 +32,20 @@
{
_row = -1;
_col = -1;
- _type = TILE_UNKNOWN;
+ _type = TILE_UNKNOWN;
+ _rotation = 0;
+ _isRotationKnown = false;
}
void Tile::setPosition( int row, int col )
{
setRow( row );
setCol( col );
+}
+
+void Tile::cancelRotation()
+{
+ _isRotationKnown = false;
+ _rotation = 0;
}
Index: camino/src/common/Tile.h
diff -u camino/src/common/Tile.h:1.2 camino/src/common/Tile.h:1.3
--- camino/src/common/Tile.h:1.2 Sat Jan 25 13:46:18 2003
+++ camino/src/common/Tile.h Sun Jan 26 04:48:05 2003
@@ -5,7 +5,7 @@
** Tile.h
** Manage a tile on the board game
**
-** Version : $Id: Tile.h,v 1.2 2003/01/25 18:46:18 Audoux Exp $
+** Version : $Id: Tile.h,v 1.3 2003/01/26 09:48:05 Audoux Exp $
** Author(s) : Philippe Fremy, Pascal Audoux
** Creation : 16/01/2003
** Copyright: Pascal Audoux, Philippe Fremy 2003
@@ -68,6 +68,14 @@
void setType( TileType type ) { _type = type; }
+ int getRotation() { return _rotation; }
+
+ void setRotation( int rotation ) { _rotation = rotation; }
+
+ void cancelRotation();
+
+ bool isRotationKnown() { return _isRotationKnown; }
+
int getRow() { return _row; }
int getCol() { return _col; }
@@ -80,6 +88,8 @@
protected:
int _row, _col;
+ bool _isRotationKnown;
+ int _rotation;
TileType _type;
};