Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Revision:
10:751bd953fa27
Child:
11:d6ceff1ff6d7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Blocks/Blocks.h	Sat Mar 30 17:09:18 2019 +0000
@@ -0,0 +1,59 @@
+#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
\ No newline at end of file