P2-2 Harris Barton

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

snake.h

Committer:
hbarton7
Date:
2020-11-25
Revision:
3:e2fb359d6545
Parent:
2:4947d6a82971

File content as of revision 3:e2fb359d6545:

// Copyright 2020 Georgia Tech.  All rights reserved.
// The materials provided by the instructor in this course are for
// the use of the students currently enrolled in the course.
// Copyrighted course materials may not be further disseminated.
// This file must not be made publicly available anywhere.

#define SNAKE_MAX_LENGTH 50

// Structure of coordinates in the map
typedef struct{
    int x;
    int y;
} Coordinate;

// Snake Structure
typedef struct {
    int head_x, head_y, head_px, head_py; // Location of the head of the snake
    int length; // length of the snake
    Coordinate locations[SNAKE_MAX_LENGTH]; // Snake body locations
    int score; //Current score of the snake
    int pointLockTime;
    int speedupTime;
    int slowdownTime;
    bool invincible;
    int invincTimer;
    int lives;
} Snake;

// Initialize a snake structure
// You want to assign initial values to each of the variables defined above
// in the snake structure.
void snake_init (Snake * snake);