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.
Dependencies: mbed 4DGL-uLCD-SE PinDetect
main.cpp@6:7b71038ea3df, 2018-11-30 (annotated)
- Committer:
- sralph3
- Date:
- Fri Nov 30 06:33:17 2018 +0000
- Revision:
- 6:7b71038ea3df
- Parent:
- 5:52f97dae8794
- Child:
- 7:b5372b042ac7
fin
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| sralph3 | 5:52f97dae8794 | 1 | #include "uLCD_4DGL.h" |
| sralph3 | 5:52f97dae8794 | 2 | #include "MMA8452.h" |
| sralph3 | 5:52f97dae8794 | 3 | #include "Speaker.h" |
| sralph3 | 5:52f97dae8794 | 4 | #include "PinDetect.h" |
| sralph3 | 5:52f97dae8794 | 5 | |
| sralph3 | 5:52f97dae8794 | 6 | |
| sralph3 | 5:52f97dae8794 | 7 | #include "SSE.h" |
| sralph3 | 5:52f97dae8794 | 8 | #include "ConcreteAsteroid1.h" |
| sralph3 | 5:52f97dae8794 | 9 | #include "ConcreteAsteroid2.h" |
| sralph3 | 5:52f97dae8794 | 10 | #include "ConcreteAsteroid3.h" |
| sralph3 | 5:52f97dae8794 | 11 | #include "ConcreteAsteroid4.h" |
| sralph3 | 5:52f97dae8794 | 12 | #include "overlap.h" |
| sralph3 | 5:52f97dae8794 | 13 | |
| sralph3 | 5:52f97dae8794 | 14 | #include <math.h> |
| sralph3 | 5:52f97dae8794 | 15 | |
| sralph3 | 5:52f97dae8794 | 16 | |
| sralph3 | 5:52f97dae8794 | 17 | #define ASTEROID_HEIGHT 12 |
| sralph3 | 5:52f97dae8794 | 18 | #define ASTEROID_WIDTH 15 |
| sralph3 | 5:52f97dae8794 | 19 | #define SPRITE_MAX 15 |
| sralph3 | 5:52f97dae8794 | 20 | #define EARTH_WIDTH 10 |
| sralph3 | 5:52f97dae8794 | 21 | #define EARTH_HEIGHT 10 |
| sralph3 | 5:52f97dae8794 | 22 | #define EXPLOSION1_WIDTH 20 |
| sralph3 | 5:52f97dae8794 | 23 | |
| sralph3 | 5:52f97dae8794 | 24 | #define SCREEN_MAX 125 |
| sralph3 | 5:52f97dae8794 | 25 | #define SCREEN_MIN 1 |
| sralph3 | 5:52f97dae8794 | 26 | #define NUM_ASTEROIDS 4 |
| sralph3 | 5:52f97dae8794 | 27 | |
| sralph3 | 5:52f97dae8794 | 28 | #define Q 0x808000 //OLIVE |
| sralph3 | 5:52f97dae8794 | 29 | #define I 0x008000 //GREEN |
| sralph3 | 5:52f97dae8794 | 30 | #define S 0xC0C0C0 //SILVER |
| sralph3 | 5:52f97dae8794 | 31 | #define C 0x17202A //UFO GLASS |
| sralph3 | 5:52f97dae8794 | 32 | #define D 0x797D7F //DARK GREY |
| sralph3 | 5:52f97dae8794 | 33 | #define L 0x00FF00 //LIME |
| sralph3 | 5:52f97dae8794 | 34 | #define P 0xFF00FF //PINK |
| sralph3 | 5:52f97dae8794 | 35 | #define R 0xF1C40F //YELLOW |
| sralph3 | 5:52f97dae8794 | 36 | #define O 0xF39C12 //ORANGE |
| sralph3 | 5:52f97dae8794 | 37 | #define G 0xAAB7B8 //GREY |
| sralph3 | 5:52f97dae8794 | 38 | #define _ 0x000000 //BLACK |
| sralph3 | 5:52f97dae8794 | 39 | #define X 0xFFFFFF //WHITE |
| sralph3 | 5:52f97dae8794 | 40 | #define B 0x0000FF //BLUE |
| sralph3 | 5:52f97dae8794 | 41 | #define r 0xFF0000 //RED |
| sralph3 | 5:52f97dae8794 | 42 | |
| sralph3 | 5:52f97dae8794 | 43 | uLCD_4DGL uLCD(p28, p27, p29); |
| sralph3 | 5:52f97dae8794 | 44 | Serial pc(USBTX,USBRX); |
| sralph3 | 5:52f97dae8794 | 45 | MMA8452 acc(p9, p10, 40000); //instantiate an acc object! |
| sralph3 | 5:52f97dae8794 | 46 | Speaker mySpeaker(p21); |
| sralph3 | 5:52f97dae8794 | 47 | PinDetect pb1(p18); |
| sralph3 | 5:52f97dae8794 | 48 | |
| sralph3 | 5:52f97dae8794 | 49 | bool BombUsed = false; |
| sralph3 | 5:52f97dae8794 | 50 | bool ExplodeAllAsteroids = false; |
| sralph3 | 5:52f97dae8794 | 51 | |
| sralph3 | 5:52f97dae8794 | 52 | void pb1_hit_callback (void) |
| sralph3 | 5:52f97dae8794 | 53 | { |
| sralph3 | 5:52f97dae8794 | 54 | if (!BombUsed ){ |
| sralph3 | 5:52f97dae8794 | 55 | ExplodeAllAsteroids = true; |
| sralph3 | 5:52f97dae8794 | 56 | BombUsed = true; |
| sralph3 | 5:52f97dae8794 | 57 | mySpeaker.PlayNote(100.0,0.25,0.1); |
| sralph3 | 5:52f97dae8794 | 58 | } |
| sralph3 | 5:52f97dae8794 | 59 | } |
| sralph3 | 5:52f97dae8794 | 60 | |
| sralph3 | 5:52f97dae8794 | 61 | int asteroid_sprite_1[ASTEROID_HEIGHT * ASTEROID_WIDTH] = { |
| sralph3 | 5:52f97dae8794 | 62 | _,_,_,_,X,X,X,X,X,X,X,X,_,_,_, |
| sralph3 | 5:52f97dae8794 | 63 | _,_,_,X,_,_,_,_,_,_,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 64 | _,_,X,_,_,_,_,_,_,_,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 65 | _,X,_,_,_,_,_,_,_,_,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 66 | X,X,X,X,_,_,_,_,_,_,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 67 | _,_,_,X,_,_,_,_,_,_,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 68 | _,_,X,_,_,_,_,_,_,_,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 69 | _,X,_,_,_,_,_,X,_,_,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 70 | X,_,_,_,_,_,X,X,_,_,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 71 | _,X,_,_,_,X,_,X,_,_,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 72 | _,_,X,_,X,_,_,X,_,_,_,X,_,_,_, |
| sralph3 | 5:52f97dae8794 | 73 | _,_,_,X,_,_,_,X,X,X,X,_,_,_,_ |
| sralph3 | 5:52f97dae8794 | 74 | }; |
| sralph3 | 5:52f97dae8794 | 75 | |
| sralph3 | 5:52f97dae8794 | 76 | int asteroid_sprite_2[ASTEROID_HEIGHT * ASTEROID_WIDTH] = { |
| sralph3 | 5:52f97dae8794 | 77 | _,_,_,X,X,_,_,_,_,_,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 78 | _,_,X,_,_,X,X,_,_,_,_,X,_,X,_, |
| sralph3 | 5:52f97dae8794 | 79 | _,X,_,_,_,_,_,X,X,_,X,_,_,_,X, |
| sralph3 | 5:52f97dae8794 | 80 | X,_,_,_,_,_,_,_,_,X,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 81 | X,_,_,_,_,_,_,_,_,_,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 82 | X,_,_,_,_,_,_,_,_,_,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 83 | X,_,_,_,_,_,_,_,_,_,_,_,_,_,X, |
| sralph3 | 5:52f97dae8794 | 84 | X,_,_,_,_,_,_,_,_,_,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 85 | X,_,_,_,_,_,_,_,_,_,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 86 | _,X,_,_,_,_,_,_,_,_,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 87 | _,_,X,X,X,_,_,_,_,_,_,X,_,_,_, |
| sralph3 | 5:52f97dae8794 | 88 | _,_,_,_,_,X,X,X,X,X,X,_,_,_,_ |
| sralph3 | 5:52f97dae8794 | 89 | }; |
| sralph3 | 5:52f97dae8794 | 90 | |
| sralph3 | 5:52f97dae8794 | 91 | int asteroid_sprite_3[ASTEROID_HEIGHT * ASTEROID_WIDTH] = { |
| sralph3 | 5:52f97dae8794 | 92 | _,_,_,_,X,X,X,X,X,_,_,_,_,_,_, |
| sralph3 | 5:52f97dae8794 | 93 | _,_,_,_,X,_,_,_,_,X,X,_,_,_,_, |
| sralph3 | 5:52f97dae8794 | 94 | _,_,_,_,_,X,_,_,_,_,_,X,X,_,_, |
| sralph3 | 5:52f97dae8794 | 95 | _,X,X,X,X,_,_,_,_,_,_,_,_,_,X, |
| sralph3 | 5:52f97dae8794 | 96 | X,_,_,_,_,_,_,_,_,_,_,_,_,X,X, |
| sralph3 | 5:52f97dae8794 | 97 | X,_,_,_,_,_,_,_,_,_,_,X,X,_,_, |
| sralph3 | 5:52f97dae8794 | 98 | X,_,_,_,_,_,_,_,_,_,X,_,_,_,_, |
| sralph3 | 5:52f97dae8794 | 99 | X,X,_,_,_,_,_,_,_,_,_,X,X,X,X, |
| sralph3 | 5:52f97dae8794 | 100 | _,X,_,_,_,_,_,_,_,_,_,_,_,_,X, |
| sralph3 | 5:52f97dae8794 | 101 | _,_,X,_,_,_,_,_,_,X,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 102 | _,_,_,X,_,X,X,X,X,_,X,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 103 | _,_,_,_,X,_,_,_,_,_,_,X,_,_,_ |
| sralph3 | 5:52f97dae8794 | 104 | }; |
| sralph3 | 5:52f97dae8794 | 105 | |
| sralph3 | 5:52f97dae8794 | 106 | int asteroid_sprite_4[ASTEROID_HEIGHT * ASTEROID_WIDTH] = { |
| sralph3 | 5:52f97dae8794 | 107 | _,_,X,X,X,_,_,_,_,X,X,X,_,_,_, |
| sralph3 | 5:52f97dae8794 | 108 | _,X,_,_,X,X,_,_,X,X,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 109 | X,_,_,_,_,_,X,X,_,_,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 110 | _,X,_,_,_,_,_,_,_,_,_,_,_,_,X, |
| sralph3 | 5:52f97dae8794 | 111 | _,_,X,_,_,_,_,_,_,_,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 112 | _,_,X,_,_,_,_,_,_,_,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 113 | _,_,X,_,_,_,_,_,_,_,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 114 | _,X,_,_,_,_,_,_,_,_,_,_,_,_,X, |
| sralph3 | 5:52f97dae8794 | 115 | X,_,_,_,_,_,X,_,_,_,_,_,_,X,_, |
| sralph3 | 5:52f97dae8794 | 116 | _,X,_,_,_,X,_,X,X,_,_,_,X,_,_, |
| sralph3 | 5:52f97dae8794 | 117 | _,_,X,_,X,_,_,_,_,X,X,X,_,_,_, |
| sralph3 | 5:52f97dae8794 | 118 | _,_,_,X,_,_,_,_,_,_,_,_,_,_,_ |
| sralph3 | 5:52f97dae8794 | 119 | }; |
| sralph3 | 5:52f97dae8794 | 120 | |
| sralph3 | 5:52f97dae8794 | 121 | int spaceship_earth1[EARTH_WIDTH *EARTH_HEIGHT] = { |
| sralph3 | 5:52f97dae8794 | 122 | _,_,S,S,S,S,S,S,_,_, |
| sralph3 | 5:52f97dae8794 | 123 | _,S,I,I,I,I,I,I,S,_, |
| sralph3 | 5:52f97dae8794 | 124 | S,I,I,I,I,I,I,I,I,S, |
| sralph3 | 5:52f97dae8794 | 125 | S,I,I,I,I,I,I,I,I,S, |
| sralph3 | 5:52f97dae8794 | 126 | S,I,I,I,I,I,I,I,I,S, |
| sralph3 | 5:52f97dae8794 | 127 | S,I,I,I,I,I,I,I,I,S, |
| sralph3 | 5:52f97dae8794 | 128 | S,I,I,I,I,I,I,I,I,S, |
| sralph3 | 5:52f97dae8794 | 129 | S,I,I,I,I,I,I,I,I,S, |
| sralph3 | 5:52f97dae8794 | 130 | S,I,I,I,I,I,I,I,S,_, |
| sralph3 | 5:52f97dae8794 | 131 | _,S,S,S,S,S,S,S,_,_, |
| sralph3 | 5:52f97dae8794 | 132 | }; |
| sralph3 | 5:52f97dae8794 | 133 | int exp1[EARTH_WIDTH *EARTH_HEIGHT] = { |
| sralph3 | 5:52f97dae8794 | 134 | _,_,S,S,S,S,S,S,_,_, |
| sralph3 | 5:52f97dae8794 | 135 | _,R,r,r,r,r,r,r,S,R, |
| sralph3 | 5:52f97dae8794 | 136 | S,r,R,O,O,O,O,r,R,S, |
| sralph3 | 5:52f97dae8794 | 137 | S,r,O,R,R,R,R,R,r,S, |
| sralph3 | 5:52f97dae8794 | 138 | S,r,O,R,R,R,R,r,r,S, |
| sralph3 | 5:52f97dae8794 | 139 | S,r,O,R,R,R,R,r,r,S, |
| sralph3 | 5:52f97dae8794 | 140 | S,r,O,R,R,R,r,r,r,S, |
| sralph3 | 5:52f97dae8794 | 141 | S,r,R,R,O,O,O,O,O,S, |
| sralph3 | 5:52f97dae8794 | 142 | S,r,r,r,O,r,r,r,S,_, |
| sralph3 | 5:52f97dae8794 | 143 | _,S,S,S,S,S,S,S,_,_, |
| sralph3 | 5:52f97dae8794 | 144 | }; |
| sralph3 | 5:52f97dae8794 | 145 | |
| sralph3 | 5:52f97dae8794 | 146 | int main() { |
| sralph3 | 5:52f97dae8794 | 147 | uLCD.baudrate(300000); |
| sralph3 | 5:52f97dae8794 | 148 | wait(0.2); |
| sralph3 | 5:52f97dae8794 | 149 | srand(time(0)); // do this srandcall here ONLY... no where else in the code! |
| sralph3 | 5:52f97dae8794 | 150 | ScreenObject *AstAry[NUM_ASTEROIDS]; |
| sralph3 | 5:52f97dae8794 | 151 | |
| sralph3 | 5:52f97dae8794 | 152 | |
| sralph3 | 5:52f97dae8794 | 153 | pb1.mode(PullUp); |
| sralph3 | 5:52f97dae8794 | 154 | wait(0.1); |
| sralph3 | 5:52f97dae8794 | 155 | // Setup Interrupt callback function for a pb hit |
| sralph3 | 5:52f97dae8794 | 156 | pb1.attach_deasserted(&pb1_hit_callback); |
| sralph3 | 5:52f97dae8794 | 157 | // Start sampling pb input using interrupt |
| sralph3 | 5:52f97dae8794 | 158 | pb1.setSampleFrequency(); |
| sralph3 | 5:52f97dae8794 | 159 | |
| sralph3 | 5:52f97dae8794 | 160 | AstAry[0] = new ConcreteAsteroid1; |
| sralph3 | 5:52f97dae8794 | 161 | AstAry[1] = new ConcreteAsteroid2; |
| sralph3 | 5:52f97dae8794 | 162 | AstAry[2] = new ConcreteAsteroid3; |
| sralph3 | 5:52f97dae8794 | 163 | AstAry[3] = new ConcreteAsteroid4; |
| sralph3 | 5:52f97dae8794 | 164 | |
| sralph3 | 5:52f97dae8794 | 165 | SSE ship; |
| sralph3 | 5:52f97dae8794 | 166 | |
| sralph3 | 5:52f97dae8794 | 167 | |
| sralph3 | 5:52f97dae8794 | 168 | //set parameters -- use these and don't change |
| sralph3 | 5:52f97dae8794 | 169 | acc.setBitDepth(MMA8452::BIT_DEPTH_12); |
| sralph3 | 5:52f97dae8794 | 170 | acc.setDynamicRange(MMA8452::DYNAMIC_RANGE_4G); |
| sralph3 | 5:52f97dae8794 | 171 | acc.setDataRate(MMA8452::RATE_100); |
| sralph3 | 5:52f97dae8794 | 172 | |
| sralph3 | 5:52f97dae8794 | 173 | time_t startTime; |
| sralph3 | 5:52f97dae8794 | 174 | startTime = time(0); |
| sralph3 | 5:52f97dae8794 | 175 | time_t timeElapsed = time(0)-startTime; |
| sralph3 | 5:52f97dae8794 | 176 | while (true){ |
| sralph3 | 5:52f97dae8794 | 177 | uLCD.cls(); |
| sralph3 | 5:52f97dae8794 | 178 | |
| sralph3 | 5:52f97dae8794 | 179 | |
| sralph3 | 5:52f97dae8794 | 180 | timeElapsed = time(0)-startTime; |
| sralph3 | 5:52f97dae8794 | 181 | double t = (double)timeElapsed; |
| sralph3 | 5:52f97dae8794 | 182 | double tw = (t/30)*SCREEN_MAX; |
| sralph3 | 5:52f97dae8794 | 183 | uLCD.filled_rectangle(0, 0 , SCREEN_MAX-ceil(tw) , 5, G); |
| sralph3 | 5:52f97dae8794 | 184 | |
| sralph3 | 6:7b71038ea3df | 185 | if (timeElapsed >= 30){ |
| sralph3 | 5:52f97dae8794 | 186 | mySpeaker.PlayNote(600.0,0.25,0.2); |
| sralph3 | 5:52f97dae8794 | 187 | mySpeaker.PlayNote(800.0,0.25,0.1); |
| sralph3 | 5:52f97dae8794 | 188 | mySpeaker.PlayNote(900.0,0.25,0.1); |
| sralph3 | 5:52f97dae8794 | 189 | uLCD.printf("\nYOU WIN!\n PRESS BUTTON TO\n RESTART"); |
| sralph3 | 5:52f97dae8794 | 190 | wait(1); |
| sralph3 | 5:52f97dae8794 | 191 | return 0; |
| sralph3 | 5:52f97dae8794 | 192 | } |
| sralph3 | 5:52f97dae8794 | 193 | |
| sralph3 | 5:52f97dae8794 | 194 | if (ExplodeAllAsteroids){ |
| sralph3 | 5:52f97dae8794 | 195 | for(int i=0; i < NUM_ASTEROIDS; i++){ |
| sralph3 | 5:52f97dae8794 | 196 | int rando = (rand() % 4); |
| sralph3 | 5:52f97dae8794 | 197 | |
| sralph3 | 5:52f97dae8794 | 198 | if (rando == 0) { |
| sralph3 | 5:52f97dae8794 | 199 | AstAry[i] = new ConcreteAsteroid1; |
| sralph3 | 5:52f97dae8794 | 200 | } else if (rando == 1) { |
| sralph3 | 5:52f97dae8794 | 201 | AstAry[i] = new ConcreteAsteroid2; |
| sralph3 | 5:52f97dae8794 | 202 | } else if (rando == 2) { |
| sralph3 | 5:52f97dae8794 | 203 | AstAry[i] = new ConcreteAsteroid3; |
| sralph3 | 5:52f97dae8794 | 204 | } else { |
| sralph3 | 5:52f97dae8794 | 205 | AstAry[i] = new ConcreteAsteroid4; |
| sralph3 | 5:52f97dae8794 | 206 | } |
| sralph3 | 5:52f97dae8794 | 207 | } |
| sralph3 | 5:52f97dae8794 | 208 | ExplodeAllAsteroids = false; |
| sralph3 | 5:52f97dae8794 | 209 | } |
| sralph3 | 5:52f97dae8794 | 210 | |
| sralph3 | 5:52f97dae8794 | 211 | ship.update(); |
| sralph3 | 5:52f97dae8794 | 212 | |
| sralph3 | 5:52f97dae8794 | 213 | for(int i=0; i < NUM_ASTEROIDS; i++){ |
| sralph3 | 5:52f97dae8794 | 214 | AstAry[i]->update(); |
| sralph3 | 5:52f97dae8794 | 215 | if(AstAry[i]->outB()){ |
| sralph3 | 5:52f97dae8794 | 216 | int rando = (rand() % 4); |
| sralph3 | 5:52f97dae8794 | 217 | |
| sralph3 | 5:52f97dae8794 | 218 | if (rando == 0) { |
| sralph3 | 5:52f97dae8794 | 219 | AstAry[i] = new ConcreteAsteroid1; |
| sralph3 | 5:52f97dae8794 | 220 | } else if (rando == 1) { |
| sralph3 | 5:52f97dae8794 | 221 | AstAry[i] = new ConcreteAsteroid2; |
| sralph3 | 5:52f97dae8794 | 222 | } else if (rando == 2) { |
| sralph3 | 5:52f97dae8794 | 223 | AstAry[i] = new ConcreteAsteroid3; |
| sralph3 | 5:52f97dae8794 | 224 | } else { |
| sralph3 | 5:52f97dae8794 | 225 | AstAry[i] = new ConcreteAsteroid4; |
| sralph3 | 5:52f97dae8794 | 226 | } |
| sralph3 | 5:52f97dae8794 | 227 | } |
| sralph3 | 5:52f97dae8794 | 228 | |
| sralph3 | 5:52f97dae8794 | 229 | if(overlap( ship, *AstAry[i])){ |
| sralph3 | 5:52f97dae8794 | 230 | uLCD.BLIT(ship.xpos, ship.ypos, EARTH_WIDTH, EARTH_HEIGHT, exp1); |
| sralph3 | 5:52f97dae8794 | 231 | mySpeaker.PlayNote(800.0,0.25,0.1); |
| sralph3 | 5:52f97dae8794 | 232 | mySpeaker.PlayNote(400.0,0.25,0.1); |
| sralph3 | 5:52f97dae8794 | 233 | mySpeaker.PlayNote(200.0,0.25,0.1); |
| sralph3 | 5:52f97dae8794 | 234 | uLCD.printf("\nGAME OVER\n"); |
| sralph3 | 5:52f97dae8794 | 235 | wait(2); |
| sralph3 | 5:52f97dae8794 | 236 | return 0; |
| sralph3 | 5:52f97dae8794 | 237 | } |
| sralph3 | 5:52f97dae8794 | 238 | AstAry[i]->draw(); |
| sralph3 | 5:52f97dae8794 | 239 | } |
| sralph3 | 5:52f97dae8794 | 240 | ship.draw(); |
| sralph3 | 5:52f97dae8794 | 241 | wait(.1); |
| sralph3 | 5:52f97dae8794 | 242 | } |
| sralph3 | 5:52f97dae8794 | 243 | } |