project for 2035

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

snake.cpp

Committer:
kblake9
Date:
2020-11-25
Revision:
22:33f1a0dff46c
Parent:
18:92431a28b46b

File content as of revision 22:33f1a0dff46c:

// 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.

#include "snake.h"

void snake_init (Snake * s)
{
    s->length = 2;
    s->score = 0;
    s->locations[0].x = 50;
    s->locations[0].y = 50;
    s->locations[1].x = 39;
    s->locations[1].y = 50;
    s->head_x = 5;
    s->head_y = 5;
    s->head_px = 5;
    s->head_py = 5;
}