 {
   int tailPosition = arrayPosition;
   for (int i=0; i < p1.Len; i++){
-      if(p1.Moves[tailPosition] != NULL)
-      {
-         arduboy.drawPixel(p1.Moves[tailPosition]->X, p1.Moves[tailPosition]->Y, 1);
+      if(p1.Moves[tailPosition].Active == true)
+      {
+         arduboy.drawPixel(p1.Moves[tailPosition].X, p1.Moves[tailPosition].Y, 1);
       }
       else
       {
         return;
       }
+
 
       if(tailPosition > 0)
       {

  char dir = 'R';
  int Len = 1;
  static const int MaxLength = 100;
  Coords *Moves[MaxLength] = {NULL};
};

typedef struct player Player;

Coords foodLocation;
Coords previousPosition;


int score = 0;
int arrayPosition = 0;

