testing documentation

Dependencies:   mbed ll16j23s_test_docs

SnakeBody/SnakeBody.h

Committer:
JoeShotton
Date:
2020-05-20
Revision:
3:fcd6d70e9694
Child:
4:ea3fa51c4386

File content as of revision 3:fcd6d70e9694:

#ifndef SNAKEBODY_H
#define SNAKEBODY_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include <vector>

class SnakeBody
{
    
struct Direction {
        int output;  // output value
        int delta_x; // increment value for x
        int delta_y; // increment value for y
        int nextState[5];  // array of next states
    };


public:

    SnakeBody();
    ~SnakeBody();
    void update_movement(int x_max, int y_max, int cell_size);
    /*
    void init(int x,int height,int width);
    void draw(N5110 &lcd);
    void update(Direction d,float mag);
    void add_score();
    int get_score();
    Vector2D get_pos();
    */
private:
    
    int _state;
    int _x_head;
    int _y_head;
    std::vector<int> _body_x;
    std::vector<int> _body_y;
    
    /*
    int _height;
    int _width;
    int _x;
    int _y;
    int _speed;
    int _score;
    */
};
#endif