Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Snake/Snake.h

Committer:
AhmedPlaymaker
Date:
2019-04-09
Revision:
20:1e6338403427
Parent:
19:05cc9f801468
Child:
21:e41126528cc6

File content as of revision 20:1e6338403427:

#ifndef Snake_H
#define Snake_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"


class Snake
{
    public:
    
    
    Snake();
    ~Snake();
    
    /** Initialise Snake
    *
    *   This function initalises the Snake library.
    */
    void init();
    
    /** Draw
    *
    *   This function draws the Snake sprite onto the screen at the specified coordinates.
    */
    int draw(Gamepad &pad, N5110 &lcd, int length, int level);
    
    /** Update
    *
    *   This function updates the Snake sprite position on screen.
    */
    void update(Direction d,float mag,int length, int speed, int* b0_to_b14);
    
    /** Get Position
    *
    *   This function obtains the coordinate of the top-left pixel in the Snake sprite.
    */
    Vector2D get_pos(int length);
    Vector2D get_pos_before1(int length);
    Vector2D get_pos_before2(int length);
    Vector2D get_pos_before3(int length);
    Vector2D get_pos_before4(int length);
    Vector2D get_pos_before5(int length);
    Vector2D get_pos_before6(int length);
    Vector2D get_pos_before7(int length);
    Vector2D get_pos_before8(int length);
    Vector2D get_pos_before9(int length);
    Vector2D get_pos_before10(int length);
    Vector2D get_pos_before11(int length);
    Vector2D get_pos_before12(int length);
    Vector2D get_pos_before13(int length);
    Vector2D get_pos_before14(int length);
    
    int m;
    int b0;
    int b1;
    int b2;
    int b3;
    int b4;
    int b5;
    int b6;
    int b7;
    int b8;
    int b9;
    int b10;
    int b11;
    int b12;
    int b13;
    int b14; 
    private:
    int _speed;
    int _x;
    int _xa;
    int _xb;
    int _xc;
    int _xd;
    int _xe;
    int _xf ;
    int _xg;
    int _xh;
    int _xi;
    int _xj;
    int _xk;
    int _xl;
    int _xm;
    int _xn;
    int _y;
    int _ya;
    int _yb;
    int _yc;
    int _yd;
    int _ye;
    int _yf ;
    int _yg;
    int _yh;
    int _yi;
    int _yj;
    int _yk;
    int _yl;
    int _ym;
    int _yn;

};
#endif