Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
Blocks/Blocks.h
- Committer:
- AhmedPlaymaker
- Date:
- 2019-03-30
- Revision:
- 11:d6ceff1ff6d7
- Parent:
- 10:751bd953fa27
- Child:
- 12:1e601b176437
File content as of revision 11:d6ceff1ff6d7:
#ifndef BLOCKS_H #define BLOCKS_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" class Blocks { public: Blocks(); ~Blocks(); /** Initialise Blocks * * This function initialises the Blocks library. */ void init(); /** Draw * * This function draws the Blocks onto the screen. */ void draw(N5110 &lcd, int length); /** Update * * This function updates the position of the Blocks as they move down the screen. */ void update(); /** Get Position * * This function obtains the coordinates of the top-left pixel in the Blocks sprites. */ Vector2D get_pos(); /** Set Position * * This function is used to change the position of the sprite to specific coordinates when called. */ void set_pos(Vector2D p); int state; int times; int pos; int blockdrop; int caseselect[5]; int i; private: int k; int _bx; //block x int _by; //block y Vector2D _velocity; }; #endif