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.
Arrays.h
00001 /** 00002 @file main.h 00003 @brief Header file containing functions prototypes, defines and global variables. 00004 @brief Shows examples of creating Doxygen documentation. 00005 @brief Revision 1.0. 00006 @author Martin Woodhams 00007 @date March 2015 00008 */ 00009 00010 #ifndef ARRAYS_H 00011 #define ARRAYS_H 00012 00013 int shoot[10][4]; /*!< this is the 10 by 4 array that is used to postion and move bullets*/ 00014 int asteroid[8][5]; /*!<this 8 by 5 array is used to positon and move the asteroids*/ 00015 00016 int shootHorizontal[1][2]= { 00017 {1,1} 00018 }; /*!<an array to call the horizontal bullets*/ 00019 00020 int shootVertical[2][1]={ 00021 {1}, 00022 {1} 00023 }; /*!<an array to call the vertical bullets*/ 00024 00025 int shootDiaganol1[2][2]={ 00026 {0,1}, 00027 {1,0} 00028 }; /*!< an array to call the up right diagonal*/ 00029 00030 int shootDiaganol2[3][3]={ 00031 {1,0,0}, 00032 {0,1,0}, 00033 {0,0,1} 00034 }; /*!<an array to call the up left diagonal*/ 00035 00036 int shipUp [9][9]= { 00037 {0,0,0,0,0,0,0,0,0}, 00038 {0,0,0,0,0,0,0,0,0}, 00039 {0,0,0,0,1,0,0,0,0}, 00040 {0,0,0,1,1,1,0,0,0}, 00041 {0,0,1,1,1,1,1,0,0}, 00042 {0,1,1,1,1,1,1,1,0}, 00043 {1,1,1,0,0,0,1,1,1}, 00044 {0,0,0,0,0,0,0,0,0}, 00045 {0,0,0,0,0,0,0,0,0} 00046 }; /*!< an array that sets the ship in an upward facing position*/ 00047 00048 int shipUR [9][9]= { 00049 {0,0,0,0,0,0,0,0,0}, 00050 {0,0,0,0,0,0,0,0,0}, 00051 {0,0,0,0,0,0,0,0,0}, 00052 {1,1,1,1,1,1,0,0,0}, 00053 {1,1,1,1,1,1,0,0,0}, 00054 {0,0,1,1,1,1,0,0,0}, 00055 {0,0,1,1,1,1,0,0,0}, 00056 {0,0,0,0,1,1,0,0,0}, 00057 {0,0,0,0,1,1,0,0,0} 00058 }; /*!< an array that sets the ship to face the upper right hand corner */ 00059 00060 int shipRight [9][9]= { 00061 {0,0,1,0,0,0,0,0,0}, 00062 {0,0,1,1,0,0,0,0,0}, 00063 {0,0,1,1,1,0,0,0,0}, 00064 {0,0,0,1,1,1,0,0,0}, 00065 {0,0,0,1,1,1,1,0,0}, 00066 {0,0,0,1,1,1,0,0,0}, 00067 {0,0,1,1,1,0,0,0,0}, 00068 {0,0,1,1,0,0,0,0,0}, 00069 {0,0,1,0,0,0,0,0,0} 00070 }; /*!< an array that sets the ship to face right*/ 00071 00072 int shipDR [9][9]= { 00073 {0,0,0,0,1,1,0,0,0}, 00074 {0,0,0,0,1,1,0,0,0}, 00075 {0,0,1,1,1,1,0,0,0}, 00076 {0,0,1,1,1,1,0,0,0}, 00077 {1,1,1,1,1,1,0,0,0}, 00078 {1,1,1,1,1,1,0,0,0}, 00079 {0,0,0,0,0,0,0,0,0}, 00080 {0,0,0,0,0,0,0,0,0}, 00081 {0,0,0,0,0,0,0,0,0} 00082 }; /*!< an array that sets the ship to face the down right corner*/ 00083 00084 int shipDown [9][9]= { 00085 {0,0,0,0,0,0,0,0,0}, 00086 {0,0,0,0,0,0,0,0,0}, 00087 {1,1,1,0,0,0,1,1,1}, 00088 {0,1,1,1,1,1,1,1,0}, 00089 {0,0,1,1,1,1,1,0,0}, 00090 {0,0,0,1,1,1,0,0,0}, 00091 {0,0,0,0,1,0,0,0,0}, 00092 {0,0,0,0,0,0,0,0,0}, 00093 {0,0,0,0,0,0,0,0,0} 00094 }; /*!< an array that sets the ship to face down*/ 00095 00096 int shipDL [9][9]= { 00097 {0,0,0,1,1,0,0,0,0}, 00098 {0,0,0,1,1,0,0,0,0}, 00099 {0,0,0,1,1,1,1,0,0}, 00100 {0,0,0,1,1,1,1,0,0}, 00101 {0,0,0,1,1,1,1,1,1}, 00102 {0,0,0,1,1,1,1,1,1}, 00103 {0,0,0,0,0,0,0,0,0}, 00104 {0,0,0,0,0,0,0,0,0}, 00105 {0,0,0,0,0,0,0,0,0} 00106 }; /*!< an array that sets the ship to face the bottom left corner*/ 00107 00108 int shipLeft [9][9]= { 00109 {0,0,0,0,0,0,1,0,0}, 00110 {0,0,0,0,0,1,1,0,0}, 00111 {0,0,0,0,1,1,1,0,0}, 00112 {0,0,0,1,1,1,0,0,0}, 00113 {0,0,1,1,1,1,0,0,0}, 00114 {0,0,0,1,1,1,0,0,0}, 00115 {0,0,0,0,1,1,1,0,0}, 00116 {0,0,0,0,0,1,1,0,0}, 00117 {0,0,0,0,0,0,1,0,0} 00118 }; /*!< an array that sets the ship to face left*/ 00119 00120 int shipUL [9][9]= { 00121 {0,0,0,0,0,0,0,0,0}, 00122 {0,0,0,0,0,0,0,0,0}, 00123 {0,0,0,0,0,0,0,0,0}, 00124 {0,0,0,1,1,1,1,1,1}, 00125 {0,0,0,1,1,1,1,1,1}, 00126 {0,0,0,1,1,1,1,0,0}, 00127 {0,0,0,1,1,1,1,0,0}, 00128 {0,0,0,1,1,0,0,0,0}, 00129 {0,0,0,1,1,0,0,0,0} 00130 }; /*!< an array that sets the ship to face the top left corner*/ 00131 00132 00133 00134 00135 int asteroid1 [9][9]= { 00136 {0,1,1,1,1,1,1,0,0}, 00137 {1,1,0,0,0,0,1,0,0}, 00138 {1,0,0,0,0,0,1,1,1}, 00139 {1,0,0,0,0,0,0,0,1}, 00140 {1,1,1,0,0,0,0,0,1}, 00141 {0,0,1,0,0,0,0,1,1}, 00142 {0,0,1,0,0,0,0,1,0}, 00143 {0,0,1,0,0,0,1,1,0}, 00144 {0,0,1,1,1,1,1,0,0}, 00145 }; /*!< an array that sets array type 1*/ 00146 00147 int asteroid2 [9][9]= { 00148 {0,0,0,1,1,1,0,0,0}, 00149 {0,1,0,1,0,1,1,0,0}, 00150 {0,1,1,1,0,0,1,1,0}, 00151 {1,1,0,0,0,0,0,1,0}, 00152 {1,0,0,0,0,0,0,1,1}, 00153 {1,1,1,0,0,0,0,0,1}, 00154 {1,0,1,0,0,0,0,1,0}, 00155 {0,0,0,1,0,0,1,1,0}, 00156 {0,0,1,1,1,1,1,0,0}, 00157 }; /*!< an array that sets array type 2*/ 00158 00159 int asteroid3 [9][9]= { 00160 {0,0,1,0,1,1,1,0,0}, 00161 {0,1,0,1,1,0,1,0,0}, 00162 {0,1,0,0,0,0,1,0,1}, 00163 {1,1,0,0,0,0,0,1,1}, 00164 {1,0,0,0,0,0,0,0,1}, 00165 {1,0,0,0,0,0,0,1,1}, 00166 {1,1,1,0,0,0,0,1,0}, 00167 {0,0,1,0,0,0,1,1,0}, 00168 {0,0,0,1,1,1,1,0,0}, 00169 }; /*!< an array that sets array type 3*/ 00170 00171 int asteroid4 [9][9]= { 00172 {0,0,0,0,1,0,0,0,0}, 00173 {0,1,1,1,1,1,1,0,0}, 00174 {0,0,1,1,0,0,1,0,0}, 00175 {0,1,0,0,0,0,1,1,0}, 00176 {1,0,0,0,0,0,0,0,1}, 00177 {0,1,1,0,0,0,0,1,0}, 00178 {0,0,1,1,0,0,1,1,0}, 00179 {0,0,0,1,0,1,1,1,0}, 00180 {0,0,0,0,1,0,0,0,0}, 00181 00182 }; /*!< an array that sets array type 4*/ 00183 00184 #endif
Generated on Tue Jul 12 2022 16:35:19 by
1.7.2