Class containing all the bitmaps for the 10 different mazes used throughout the game.

Revision:
0:d5a32831fa28
Child:
1:8ed19eb9e7e5
diff -r 000000000000 -r d5a32831fa28 Maze.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Maze.cpp	Tue Apr 04 10:30:22 2017 +0000
@@ -0,0 +1,80 @@
+//
+//  maze.cpp
+//
+//
+//  Created by Max Houghton on 19/03/2017.
+//
+//
+
+#include "Maze.h"
+
+Maze::Maze()
+{
+    
+}
+
+Maze::~Maze()
+{
+    
+}
+
+void Maze::drawBox(N5110 &lcd)
+{
+    // lcd.clear();
+    
+    for (int i = 0; i < WIDTH; i++){
+        lcd.setPixel(i, 0);
+        lcd.setPixel(i, HEIGHT - 1);
+    }
+    
+    for (int j = 0; j < HEIGHT; j++){
+        lcd.setPixel(0, j);
+        lcd.setPixel(WIDTH - 1, j);
+    }
+    
+    lcd.refresh();
+}
+
+void Maze::drawTest(N5110 &lcd)
+{
+    // lcd.clear();
+    
+    lcd.drawLine(2, 2, 30, 2, FILL_BLACK);
+    lcd.drawLine(20, 2, 20, 20, FILL_BLACK);
+    
+    lcd.refresh();
+}
+
+void Maze::drawMazeOne(N5110 &lcd)
+{
+    // lcd.clear();
+    
+    lcd.drawRect(0, 0, 83, 47, FILL_TRANSPARENT);
+    
+    lcd.drawLine(10, 0, 10, 40, FILL_BLACK);
+    lcd.drawLine(10, 40, 20, 40, FILL_BLACK);
+    lcd.drawLine(20, 0, 20, 20, FILL_BLACK);
+    lcd.drawLine(20, 10, 30, 10, FILL_BLACK);
+    lcd.drawLine(20, 30, 30, 30, FILL_BLACK);
+    lcd.drawLine(20, 20, 40, 20, FILL_BLACK);
+    lcd.drawLine(40, 0, 40, 10, FILL_BLACK);
+    lcd.drawLine(30, 30, 30, HEIGHT - 1, FILL_BLACK);
+    lcd.drawLine(30, 40, 50, 40, FILL_BLACK);
+    lcd.drawLine(40, 20, 40, 30, FILL_BLACK);
+    lcd.drawLine(40, 30, 60, 30, FILL_BLACK);
+    lcd.drawLine(50, 20, 70, 20, FILL_BLACK);
+    lcd.drawLine(50, 10, 50, 20, FILL_BLACK);
+    lcd.drawLine(60, 30, 60, 40, FILL_BLACK);
+    lcd.drawLine(70, 20, 70, 40, FILL_BLACK);
+    lcd.drawLine(50, 10, WIDTH - 1, 10, FILL_BLACK);
+    
+    // lcd.drawRect(20, 10, 11, 10, FILL_BLACK);
+    // lcd.drawRect(80, 10, 4, 38, FILL_BLACK);
+    
+    lcd.refresh();
+}
+
+void Maze::drawMazeTwo(N5110 &lcd)
+{
+    
+}