Ben Evans University Second Year Project. Game Called Defender.

Dependencies:   mbed

https://os.mbed.com/media/uploads/evanso/84bc1a30759fd6a1e3f1fd1fae3e97c2.png

Hello, soldier, you have been specially selected as the defender of planet earth.

Your mission, if you choose to accept it. Fly around the planet and pulverise invading alien ships for as long as you can. Stop the aliens abducting the innocent people on the ground. Be warned if an alien ship manages to abduct a person and take them to top of the screen, they will no longer move randomly and will begin to hunt you down. This sounds like a challenge you were trained for.

But don’t worry soldier you’re not going into battle empty-handed. Your ship is equipped with a state of the art laser beam that has unlimited ammo and four smart bombs that will destroy anything on the screen. The ship also has three lives so use them wisely.

As time goes on more alien ships will arrive on planet earth increasing the difficulty of your mission. And remember the landscape bellow loops around so if you continually fly in the same direction you go to your original position. Good luck soldier.

Committer:
evanso
Date:
Wed May 27 02:06:05 2020 +0000
Revision:
87:832ca78426b5
Parent:
48:e308067cfea5
Final Submission. I have read and agreed with Statement of Academic Integrity.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
evanso 48:e308067cfea5 1 /* mbed Microcontroller Library
evanso 48:e308067cfea5 2 * Copyright (c) 2006-2012 ARM Limited
evanso 48:e308067cfea5 3 *
evanso 48:e308067cfea5 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
evanso 48:e308067cfea5 5 * of this software and associated documentation files (the "Software"), to deal
evanso 48:e308067cfea5 6 * in the Software without restriction, including without limitation the rights
evanso 48:e308067cfea5 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
evanso 48:e308067cfea5 8 * copies of the Software, and to permit persons to whom the Software is
evanso 48:e308067cfea5 9 * furnished to do so, subject to the following conditions:
evanso 48:e308067cfea5 10 *
evanso 48:e308067cfea5 11 * The above copyright notice and this permission notice shall be included in
evanso 48:e308067cfea5 12 * all copies or substantial portions of the Software.
evanso 48:e308067cfea5 13 *
evanso 48:e308067cfea5 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
evanso 48:e308067cfea5 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
evanso 48:e308067cfea5 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
evanso 48:e308067cfea5 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
evanso 48:e308067cfea5 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
evanso 48:e308067cfea5 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
evanso 48:e308067cfea5 20 * SOFTWARE.
evanso 48:e308067cfea5 21 */
evanso 48:e308067cfea5 22 #ifndef MBED_FATFILEHANDLE_H
evanso 48:e308067cfea5 23 #define MBED_FATFILEHANDLE_H
evanso 48:e308067cfea5 24
evanso 48:e308067cfea5 25 #include "FileHandle.h"
evanso 48:e308067cfea5 26
evanso 48:e308067cfea5 27 using namespace mbed;
evanso 48:e308067cfea5 28
evanso 48:e308067cfea5 29 class FATFileHandle : public FileHandle {
evanso 48:e308067cfea5 30 public:
evanso 48:e308067cfea5 31
evanso 48:e308067cfea5 32 FATFileHandle(FIL fh);
evanso 48:e308067cfea5 33 virtual int close();
evanso 48:e308067cfea5 34 virtual ssize_t write(const void* buffer, size_t length);
evanso 48:e308067cfea5 35 virtual ssize_t read(void* buffer, size_t length);
evanso 48:e308067cfea5 36 virtual int isatty();
evanso 48:e308067cfea5 37 virtual off_t lseek(off_t position, int whence);
evanso 48:e308067cfea5 38 virtual int fsync();
evanso 48:e308067cfea5 39 virtual off_t flen();
evanso 48:e308067cfea5 40
evanso 48:e308067cfea5 41 virtual off_t seek(off_t position, int whence) { return lseek(position, whence); }
evanso 48:e308067cfea5 42 virtual off_t size() { return flen(); }
evanso 48:e308067cfea5 43
evanso 48:e308067cfea5 44 protected:
evanso 48:e308067cfea5 45
evanso 48:e308067cfea5 46 FIL _fh;
evanso 48:e308067cfea5 47
evanso 48:e308067cfea5 48 };
evanso 48:e308067cfea5 49
evanso 48:e308067cfea5 50 #endif