ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18jkeo

Dependencies:   mbed

Committer:
josh_ohara
Date:
Sun May 17 16:32:36 2020 +0000
Revision:
31:27c938ec2a11
Parent:
15:dde4ce4bf7fe
Child:
39:5d4277548303
more tidying;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
josh_ohara 15:dde4ce4bf7fe 1 #include "mbed.h"
josh_ohara 15:dde4ce4bf7fe 2 #include "N5110.h"
josh_ohara 15:dde4ce4bf7fe 3 #include "Gamepad.h"
josh_ohara 15:dde4ce4bf7fe 4
josh_ohara 15:dde4ce4bf7fe 5 class Rock
josh_ohara 15:dde4ce4bf7fe 6 {
josh_ohara 15:dde4ce4bf7fe 7 public:
josh_ohara 31:27c938ec2a11 8 void init(int x, int y, int size); //sets private variables to inputs
josh_ohara 31:27c938ec2a11 9 void render(N5110 &lcd); //draws rock
josh_ohara 31:27c938ec2a11 10 //accessors and mutators//
josh_ohara 31:27c938ec2a11 11 Vector2D get_position(); //returns position of the rock
josh_ohara 31:27c938ec2a11 12 void set_life(bool x); //sets the life variable of the rock
josh_ohara 31:27c938ec2a11 13 bool get_life(); //returns the life variable of the rock
josh_ohara 15:dde4ce4bf7fe 14
josh_ohara 15:dde4ce4bf7fe 15 private:
josh_ohara 31:27c938ec2a11 16 int _x; //x position of the rock
josh_ohara 31:27c938ec2a11 17 int _y; //y position of the rock
josh_ohara 31:27c938ec2a11 18 bool _life; //life variable
josh_ohara 31:27c938ec2a11 19 int _size; //size of the rock
josh_ohara 15:dde4ce4bf7fe 20
josh_ohara 15:dde4ce4bf7fe 21 };