Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Maze.h
00001 /** Maze Class 00002 @brief Class contains all the mazes in the form of many series of lines. 00003 @author Max Houghton 00004 @date March 19 2017 00005 */ 00006 00007 #ifndef MAZE_H 00008 #define MAZE_H 00009 00010 #include "mbed.h" 00011 #include "N5110.h" 00012 00013 class Maze 00014 { 00015 00016 public: 00017 00018 /** 00019 * @details - constructor 00020 */ 00021 Maze(); 00022 00023 /** 00024 * @details - constructor 00025 */ 00026 ~Maze(); 00027 00028 /** Initialise the maze 00029 * 00030 * @details - maze object is initialised with specific maze index value 00031 * @param - mazeIndex - int to select which maze shall be drawn. 00032 */ 00033 void init(int mazeIndex); 00034 00035 /** Draw 00036 * 00037 * @details - Maze is drawn on LCD screen. 00038 * @param - lcd - N5110 Library used to draw lines and set pixels which make up maze. 00039 */ 00040 void draw(N5110 &lcd); 00041 00042 private: 00043 00044 /** Maze Zero 00045 * 00046 * @details - Adding lines and pixels to lcd buffer which make up first maze (index 0). This is easy maze 1. 00047 * @param - lcd - N5110 Library used to draw lines and pixels. 00048 * 00049 */ 00050 void mazeIndexZero(N5110 &lcd); 00051 00052 /** Maze One 00053 * 00054 * @details - Adding lines and pixels to lcd buffer which make up first maze (index 1). This is easy maze 2. 00055 * @param - lcd - N5110 Library used to draw lines and pixels. 00056 * 00057 */ 00058 void mazeIndexOne(N5110 &lcd); 00059 00060 00061 /** Maze Two 00062 * 00063 * @details - Adding lines and pixels to lcd buffer which make up first maze (index 2). This is easy maze 3. 00064 * @param - lcd - N5110 Library used to draw lines and pixels. 00065 * 00066 */ 00067 void mazeIndexTwo(N5110 &lcd); 00068 00069 /** Maze Three 00070 * 00071 * @details - Adding lines and pixels to lcd buffer which make up first maze (index 3). This is medium maze 1. 00072 * @param - lcd - N5110 Library used to draw lines and pixels. 00073 * 00074 */ 00075 void mazeIndexThree(N5110 &lcd); 00076 00077 /** Maze Four. 00078 * 00079 * @details - Adding lines and pixels to lcd buffer which make up first maze (index 4). This is medium maze 2. 00080 * @param - lcd - N5110 Library used to draw lines and pixels. 00081 * 00082 */ 00083 void mazeIndexFour(N5110 &lcd); 00084 00085 /** Maze Five. 00086 * 00087 * @details - Adding lines and pixels to lcd buffer which make up first maze (index 5). This is medium maze 3. 00088 * @param - lcd - N5110 Library used to draw lines and pixels. 00089 * 00090 */ 00091 void mazeIndexFive(N5110 &lcd); 00092 00093 00094 /** Maze Six. 00095 * 00096 * @details - Adding lines and pixels to lcd buffer which make up first maze (index 6). This is hard maze 1. 00097 * @param - lcd - N5110 Library used to draw lines and pixels. 00098 * 00099 */ 00100 void mazeIndexSix(N5110 &lcd); 00101 00102 /** Maze Seven. 00103 * 00104 * @details - Adding lines and pixels to lcd buffer which make up first maze (index 7). This is hard maze 2. 00105 * @param - lcd - N5110 Library used to draw lines and pixels. 00106 * 00107 */ 00108 void mazeIndexSeven(N5110 &lcd); 00109 00110 /** Maze Eight. 00111 * 00112 * @details - Adding lines and pixels to lcd buffer which make up first maze (index 8). This is hard maze 3. 00113 * @param - lcd - N5110 Library used to draw lines and pixels. 00114 * 00115 */ 00116 void mazeIndexEight(N5110 &lcd); 00117 00118 /** Maze Nine. 00119 * 00120 * @details - Adding lines and pixels to lcd buffer which make up first maze (index 9). This is the extreme version maze. 00121 * @param - lcd - N5110 Library used to draw lines and pixels. 00122 * 00123 */ 00124 void mazeIndexNine(N5110 &lcd); 00125 00126 /** 00127 * @details - Index value which is used in draw() function to allow the desired maze to be drawn. 00128 * @param - _mazeIndex - integer to specify desired maze. 00129 */ 00130 int _mazeIndex; 00131 }; 00132 00133 #endif /* MAZE_H */
Generated on Sat Jul 16 2022 18:45:02 by
1.7.2