Frank Duignan
/
Nucleo_microrealms
Microrealms: An adventure game on the mbed platform
main.cpp@0:4da21a20e2c1, 2014-12-04 (annotated)
- Committer:
- f3d
- Date:
- Thu Dec 04 14:17:50 2014 +0000
- Revision:
- 0:4da21a20e2c1
An adventure game called MicroRealms on the mbed platform. Should work with most mbed enabled devices as it is pretty frugal with resources. ; Requires a dumb terminal program (e.g. hyperterminal,minicom etc)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
f3d | 0:4da21a20e2c1 | 1 | // This is an mbed implementation of the microrealms game which was |
f3d | 0:4da21a20e2c1 | 2 | // originally implemented in C on the LPC810. |
f3d | 0:4da21a20e2c1 | 3 | // I could have spent lots ot time re-implementing the game in C++ but didn't :-) |
f3d | 0:4da21a20e2c1 | 4 | // (See http://eleceng.dit.ie/frank/arm/BareMetalLPC810/microrealms/ ) |
f3d | 0:4da21a20e2c1 | 5 | // It should run on any mbed platform that supports a serial terminal. |
f3d | 0:4da21a20e2c1 | 6 | // After you download the game, open your serial terminal and hit reset |
f3d | 0:4da21a20e2c1 | 7 | // on the target processor then play! |
f3d | 0:4da21a20e2c1 | 8 | |
f3d | 0:4da21a20e2c1 | 9 | /* |
f3d | 0:4da21a20e2c1 | 10 | Copyright (C) 2014 Frank Duignan |
f3d | 0:4da21a20e2c1 | 11 | |
f3d | 0:4da21a20e2c1 | 12 | This program is free software; you can redistribute it and/or |
f3d | 0:4da21a20e2c1 | 13 | modify it under the terms of the GNU General Public License |
f3d | 0:4da21a20e2c1 | 14 | as published by the Free Software Foundation; either version 2 |
f3d | 0:4da21a20e2c1 | 15 | of the License, or (at your option) any later version. |
f3d | 0:4da21a20e2c1 | 16 | |
f3d | 0:4da21a20e2c1 | 17 | This program is distributed in the hope that it will be useful, |
f3d | 0:4da21a20e2c1 | 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
f3d | 0:4da21a20e2c1 | 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f3d | 0:4da21a20e2c1 | 20 | GNU General Public License for more details. |
f3d | 0:4da21a20e2c1 | 21 | |
f3d | 0:4da21a20e2c1 | 22 | You should have received a copy of the GNU General Public License |
f3d | 0:4da21a20e2c1 | 23 | along with this program; if not, write to the Free Software |
f3d | 0:4da21a20e2c1 | 24 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
f3d | 0:4da21a20e2c1 | 25 | */ |
f3d | 0:4da21a20e2c1 | 26 | |
f3d | 0:4da21a20e2c1 | 27 | |
f3d | 0:4da21a20e2c1 | 28 | |
f3d | 0:4da21a20e2c1 | 29 | |
f3d | 0:4da21a20e2c1 | 30 | #include "mbed.h" |
f3d | 0:4da21a20e2c1 | 31 | #include "realm.h" |
f3d | 0:4da21a20e2c1 | 32 | |
f3d | 0:4da21a20e2c1 | 33 | |
f3d | 0:4da21a20e2c1 | 34 | int main() { |
f3d | 0:4da21a20e2c1 | 35 | |
f3d | 0:4da21a20e2c1 | 36 | |
f3d | 0:4da21a20e2c1 | 37 | while(1) { |
f3d | 0:4da21a20e2c1 | 38 | runGame(); |
f3d | 0:4da21a20e2c1 | 39 | } |
f3d | 0:4da21a20e2c1 | 40 | } |