diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2020-08-17 18:11:08 +0200 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2020-08-17 18:11:22 +0200 |
| commit | af7fa8dd341578c1e39801cd230733ab66768465 (patch) | |
| tree | 0e216d23930e0a24d2400645018e27a603b5e2c5 /labb3/tiles/TileList.h | |
| parent | d894e06c6e6a335ea672ca2aaf30066b0a9d077a (diff) | |
| download | tddd86-af7fa8dd341578c1e39801cd230733ab66768465.tar.gz | |
initial tiles
Diffstat (limited to 'labb3/tiles/TileList.h')
| -rw-r--r-- | labb3/tiles/TileList.h | 10 |
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 |
