Uses accompanying Basket, Objects and Fruit libraries to create Fruit Basket game. If an object is caught, points are added; if an object in missed, a 'life' is lost.

Dependents:   Game_Controller_Project

Committer:
Nathanj94
Date:
Tue Mar 14 10:50:52 2017 +0000
Revision:
0:8d02400f792a
Child:
1:43fbcc3584d6
Catch_Model.h incomplete
; Catch_Model.cpp incomplete
; Library has no documentation and has only been developed to allow the movement of the basket on the display

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Nathanj94 0:8d02400f792a 1 #ifndef CATCH_MODEL_H
Nathanj94 0:8d02400f792a 2 #define CATCH_MODEL_H
Nathanj94 0:8d02400f792a 3
Nathanj94 0:8d02400f792a 4 #include "mbed.h"
Nathanj94 0:8d02400f792a 5 #include "N5110.h"
Nathanj94 0:8d02400f792a 6 #include "Gamepad.h"
Nathanj94 0:8d02400f792a 7 #include "Basket.h"
Nathanj94 0:8d02400f792a 8
Nathanj94 0:8d02400f792a 9 class Catch_Model
Nathanj94 0:8d02400f792a 10 {
Nathanj94 0:8d02400f792a 11 public:
Nathanj94 0:8d02400f792a 12
Nathanj94 0:8d02400f792a 13 Catch_Model();
Nathanj94 0:8d02400f792a 14 ~Catch_Model();
Nathanj94 0:8d02400f792a 15
Nathanj94 0:8d02400f792a 16 void init(int basket_y, int basket_width);
Nathanj94 0:8d02400f792a 17 void input(Gamepad &pad);
Nathanj94 0:8d02400f792a 18 void update(Gamepad &pad);
Nathanj94 0:8d02400f792a 19 void draw(N5110 &lcd);
Nathanj94 0:8d02400f792a 20
Nathanj94 0:8d02400f792a 21 private:
Nathanj94 0:8d02400f792a 22
Nathanj94 0:8d02400f792a 23 Basket _basket;
Nathanj94 0:8d02400f792a 24
Nathanj94 0:8d02400f792a 25 int _basket_y;
Nathanj94 0:8d02400f792a 26 int _basket_width;
Nathanj94 0:8d02400f792a 27
Nathanj94 0:8d02400f792a 28 Direction _d;
Nathanj94 0:8d02400f792a 29 float _mag;
Nathanj94 0:8d02400f792a 30 Gamepad _pad;
Nathanj94 0:8d02400f792a 31
Nathanj94 0:8d02400f792a 32 };
Nathanj94 0:8d02400f792a 33 #endif