summaryrefslogtreecommitdiffstats
path: root/labb3/tiles/TileList.h
diff options
context:
space:
mode:
Diffstat (limited to 'labb3/tiles/TileList.h')
-rw-r--r--labb3/tiles/TileList.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/labb3/tiles/TileList.h b/labb3/tiles/TileList.h
index a4b6ce6..026721f 100644
--- a/labb3/tiles/TileList.h
+++ b/labb3/tiles/TileList.h
@@ -15,15 +15,21 @@ public:
TileList();
~TileList();
void addTile(Tile tile);
- void drawAll(QGraphicsScene* scene);
- int indexOfTopTile(int x, int y);
+ void drawAll(QGraphicsScene* scene) const;
+ int indexOfTopTile(int x, int y) const;
void lower(int x, int y);
void raise(int x, int y);
void remove(int x, int y);
void removeAll(int x, int y);
private:
+ int cur_size = 0;
+ int amount_tiles;
+ Tile *tiles;
+ int indexOfBottomTile(int x, int y) const;
+ void shiftRight(int start, int end);
+ void shiftLeft(int start, int end);
};
#endif // TILELIST_H